Skip to content

Commit

Permalink
Merge pull request #27 from ar-io/develop
Browse files Browse the repository at this point in the history
chore(PE-7017): release new ANT source code
  • Loading branch information
atticusofsparta authored Nov 25, 2024
2 parents 1b74722 + 28c6c26 commit a793cf3
Show file tree
Hide file tree
Showing 41 changed files with 2,089 additions and 836 deletions.
11 changes: 5 additions & 6 deletions .busted
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
print("Loading .busted configuration...")

return {
_all = {
default = {
root = "src",
pattern = "**/*_spec.lua$",
helper = "spec/setup.lua",
verbose = true,
coverage = true,
output = "utfTerminal",
jobs = 4,
},
default = {
ROOT = {"ant"},
pattern = "**/*_spec.lua$",
helper = "spec/setup.lua",
}
}
20 changes: 18 additions & 2 deletions .github/workflows/ant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, workflow_dispatch]

jobs:
unit:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
name: Check out repository code
Expand All @@ -29,6 +29,22 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: '5.3'

- name: Setup LuaRocks
uses: leafo/[email protected]

- name: Install Luacheck
run: luarocks install luacheck

- run: luacheck src spec

# TODO: add ar-io-sdk e2e tests against lua code to be bundled on changes (e.g. create a new ant, publish it and validate it works with the sdk)

integration:
Expand All @@ -47,7 +63,7 @@ jobs:
publish:
runs-on: ubuntu-latest
environment: main
needs: [unit, integration]
needs: [lint, unit, integration]
permissions:
contents: write # to be able to publish a GitHub release
outputs:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ node_modules
wallet.json
.DS_Store
luacov-html
.luacov
*.gz
luacov.stats.out
process.wasm
dist
publish-output.json
publish-output.json
luarocks-3.9.1
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

yarn lint-staged
21 changes: 21 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
allow_defined = true
exclude_files = {
"dist/",
}
globals = {
"Handlers",
"ao",
"Owner",
"Balances",
"Records",
"Controllers",
"Name",
"Ticker",
"TotalSupply",
"Logo",
"Description",
"Keywords",
"Denomination",
"Initialized"
}
max_line_length = 185
5 changes: 5 additions & 0 deletions .luacov
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
statsfile = 'coverage/luacov.stats.out';
reportfile = 'coverage/luacov.report.out';
deleteStatsFile = false;
include = { "src/" }
exclude = { "crypto", "json", "base64", "ao" }
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"JohnnyMorganz.stylua",
"sumneko.lua",
"esbenp.prettier-vscode"
]
}
27 changes: 21 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file",
"[mjs, js]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file"
},
"prettier.configPath": ".prettierrc",
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"[typescript]": {
"editor.formatOnSave": true
},
"[markdown]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file"
},
"search.exclude": {
"**/node_modules": true,
"**/lib": true,
"**/dist": true,
"**/coverage": true
},
"Lua.codeLens.enable": true,
"Lua.workspace.library": ["${workspaceFolderBasename}/**"],
"Lua.completion.callSnippet": "Both",
"Lua.signatureHelp.enable": true,
"Lua.workspace.checkThirdParty": true,
"Lua.diagnostics.enable": true,
"Lua.diagnostics.disable": ["lowercase-global", "undefined-global"],
"Lua.format.defaultConfig": {
"indent_style": "space",
"indent_size": "2"
},
"[lua]": {
"editor.defaultFormatter": "JohnnyMorganz.stylua",
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file"
}
}
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Added

- Release-Name Handler
- Calls the IO Network Process to release the specified ArNS name that is registered to the ANT.
- Reassign-Name Handler
- Calls the IO Network Process to assign a new ANT Process to the respective name - must be a name registered the the ANT in question.
- Set-Description Handler
- Allows for setting the description of the ANT
- Set-Keywords Handler
- Allows for setting keywords on the ANT
- Set-Logo Handler
- Allows for setting the logo of the ANT
- Add Approve-Primary-Name handler
- Approves a primary name request on the specified IO process ID
- Add Remove-Primary-Names handler
- Forwards a Remove-Primary-Names action to the specified IO process ID

### Changed

- Refactored handlers to use a util that codifies responses on calls.
- Added documentation with luadoc types for improved linting.
- Removed `Evolve` handler and SourceCodeTxId from state and state responses.

### Fixed

- Fixed the Remove-Record api to return appropriate notices on calls.

<!-- eslint-disable-next-line -->

## [7] - [p6svP-fOm1N9imdx9wF2h3u81Qbc7y-HLEGBDCCE3s4] - (2024-10-03)
Expand Down
Loading

0 comments on commit a793cf3

Please sign in to comment.