Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 9 additions & 10 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn build:asc
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 15 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ typings/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
Expand All @@ -103,4 +102,18 @@ dist
# TernJS port file
.tern-port

/build
# Don't publish the source
src/

# Config files we don't need
.github
.vscode
.prettierrc
.eslintignore
.eslintrc.json
.gitignore
.mocharc.json
asconfig.json
jest.config.json
nyc.config.json
tsconfig.json
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

The items in this library will allow you to interact with Estfor Kingdom via:

- Vanilla JS applications
- Vanilla JavaScript applications
- React, Angular, and other front end frameworks
- NodeJS / Typescript back end services
- NodeJS / TypeScript back end services
- AssemblyScript / WebAssembly for use with [The Graph Protocol](https://github.com/graphprotocol/graph-node)'s web3 indexing

[NPMJS Package](https://www.npmjs.com/package/@paintswap/estfor-definitions)
Expand Down Expand Up @@ -134,8 +134,8 @@ npm publish
yarn publish
```

### Via github CI
### Via GitHub CI

1. Push any changes to github
1. Push any changes to GitHub
2. Create a new release version with `yarn version`
3. It will tag and push to Github which will trigger the CI to publish to NPM
3. It will tag and push to GitHub which will trigger the CI to publish to NPM
4 changes: 2 additions & 2 deletions asconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"targets": {
"release": {
"optimize": true,
"outFile": "build/index.wasm"
"outFile": "dist/index.wasm"
},
"debug": {
"debug": true,
"outFile": "build/debug.wasm"
"outFile": "dist/debug.wasm"
}
}
}
47 changes: 26 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"name": "@paintswap/estfor-definitions",
"version": "1.0.89",
"description": "Types and constants for Estfor Kingdom",
"repository": {
"type": "git",
"url": "git+https://github.com/PaintSwap/estfor-definitions.git"
},
"keywords": [
"estfor",
"estfor kingdom",
Expand All @@ -18,30 +14,39 @@
"web3",
"thegraph"
],
"module": "src/index.mjs",
"author": "PaintSwap Team",
"license": "MIT",
"bugs": {
"url": "https://github.com/PaintSwap/estfor-definitions/issues"
},
"homepage": "https://github.com/PaintSwap/estfor-definitions",
"repository": {
"type": "git",
"url": "git+https://github.com/PaintSwap/estfor-definitions.git"
},
"module": "dist/index.mjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"ascMain": "src/index.ts",
"main": "index.js",
"types": "index.d.ts",
"exports": {
".": "./dist/index.js",
"./types": "./dist/types.js",
"./constants": "./dist/constants.js"
},
"scripts": {
"build": "yarn build:tsc",
"build:tsc": "tsc",
"clean": "shx rm -rf ./dist",
"build": "npm run build:tsc && npm run build:asc && npm run build:mjs",
"build:asc": "asc --target release",
"build:asc:debug": "asc --target debug",
"prepare": "yarn build",
"build:tsc": "tsc",
"build:mjs": "shx cp src/index.mjs dist/index.mjs",
"prepare": "npm run clean && npm run build",
"version": "git add -A src",
"postversion": "git push && git push --tags"
},
"author": "Paintswap Team",
"license": "MIT",
"bugs": {
"url": "https://github.com/PaintSwap/estfor-definitions/issues"
},
"homepage": "https://github.com/PaintSwap/estfor-definitions",
"devDependencies": {
"run-script-os": "^1.1.6",
"typescript": "^4.9.5"
},
"dependencies": {
"assemblyscript": "0.19.10"
"assemblyscript": "0.19.23",
"shx": "^0.3.4",
"typescript": "^5.3.3"
}
}
8 changes: 3 additions & 5 deletions src/index.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { NONE } from '../constants.js'
import * as EstforTypes from '../types.js'
import * as EstforConstants from '../constants.js'

export { EstforTypes, EstforConstants, NONE }
export { NONE } from './constants.js'
export * as EstforTypes from './types.js'
export * as EstforConstants from './constants.js'
6 changes: 3 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,14 @@ export class Player {
boostStartTime: u64 = 0
boostDuration: u32 = 0
boostVal: u8 = 0
boostType: BoostType
boostType: BoostType = BoostType.NONE
boostItemTokenId: u16 = 0

/* Extra Boost */
extraBoostStartTime: u64 = 0
extraBoostDuration: u32 = 0
extraBoostVal: u8 = 0
extraBoostType: BoostType
extraBoostType: BoostType = BoostType.NONE
extraBoostItemTokenId: u16 = 0

/* Socials */
Expand Down Expand Up @@ -904,7 +904,7 @@ export class Clan {
boostStartTime: u64 = 0
boostDuration: u32 = 0
boostVal: u8 = 0
boostType: BoostType
boostType: BoostType = BoostType.NONE
boostItemTokenId: u16 = 0

totalDonated: string = '0'
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"outDir": "./",
"outDir": "./dist"
}
}
}
Loading