Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Sep 20, 2024
0 parents commit 0a151ba
Show file tree
Hide file tree
Showing 47 changed files with 16,840 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
tab_width = 2
max_line_length = 140
trim_trailing_whitespace = true
9 changes: 9 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ALGOD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ALGOD_SERVER=http://localhost
ALGOD_PORT=4001

KMD_PORT=4002

INDEXER_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
INDEXER_SERVER=http://localhost
INDEXER_PORT=8980
16 changes: 16 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# don't lint the linter config
.eslintrc.js
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
build
# don't lint nyc coverage output
coverage
# don't lint generated types
**/generated/types.d.ts
**/generated/types.ts
# don't lint ide files
.idea
.vscode
debug-utils
27 changes: 27 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"root": true,
"env": {
"node": true
},
"extends": ["@makerx/eslint-config"],
"rules": {
"no-restricted-syntax": [
"error",
{
// Algosdk v2.x.x exports a malformed ES module and when using utils-ts in an ESM project
// the CJS module may be loaded, which may not fuly support all named exports.
// The easiest solution for now, is to only use the default export.
"message": "Only use the default export in 'algosdk'. See rule comment for details",
"selector": "ImportDeclaration[source.value=\"algosdk\"] ImportSpecifier"
}
]
},
"overrides": [
{
"files": ["**/*.spec.ts"],
"rules": {
"no-restricted-syntax": 0
}
}
]
}
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Set the repository to show as TypeScript rather than JS in GitHub
*.js linguist-detectable=false

# Treat text as lf
* text=auto
* eol=lf
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "\U0001F41C Bug report"
about: Report a reproducible bug.
title: ''
labels: new-bug
assignees: ''
---

### Subject of the issue

<!-- Describe your issue here. -->

### Your environment

<!--
* Please provide the output of `algokit doctor` command response,
* This will give us a good idea about your environment
-->

### Steps to reproduce

1.
2.

### Expected behaviour

### Actual behaviour
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "\U0001F514 Feature Request"
about: Suggestions for how we can improve the algorand platform.
title: ''
labels: new-feature-request
assignees: ''
---

## Problem

<!-- What is the problem that we’re trying to solve? -->

## Solution

<!-- Do you have a potential/suggested solution? Document more than one if possible. -->

### Proposal

<!-- Describe the solution you’d like in detail. -->

### Pros and Cons

<!-- What are the advantages and disadvantages of this solution? -->

## Dependencies

<!-- Does the solution have any team or design dependencies? -->
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(deps)'
groups:
all:
patterns:
- '*'
update-types:
- 'minor'
- 'patch'
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Proposed Changes

-
-
-
56 changes: 56 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Pull Request

on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
pull_request:
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: 18.x
working-directory: ./
run-commit-lint: true
run-build: true
pre-test-script: |
pipx install algokit
algokit localnet start
npx --yes wait-on tcp:4001 -t 30000
audit-script: |
npm run audit
pull_request_debug_package:
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: 18.x
working-directory: ./debug-utils
run-commit-lint: true
run-build: true
pre-test-script: |
pipx install algokit
algokit localnet start
npx --yes wait-on tcp:4001 -t 30000
audit-script: |
npm run audit
check_docs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Check docs are up to date
shell: bash
run: |
npm ci --ignore-scripts
npm run generate:code-docs
# Add untracked files as empty so they come up in diff
git add -N .
# Print changed files and error out if there are changes after generating docs
git diff --exit-code --name-only
31 changes: 31 additions & 0 deletions .github/workflows/prod_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Prod Publish

on:
workflow_dispatch:

permissions:
contents: write

jobs:
prod_release:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Merge main -> release
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
with:
type: now
from_branch: main
target_branch: release
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge release -> main
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
with:
type: now
from_branch: release
target_branch: main
message: Merge release back to main to get version increment [no ci]
github_token: ${{ secrets.GITHUB_TOKEN }}
93 changes: 93 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish

on:
push:
branches:
- main
- release
workflow_dispatch:

concurrency: release

permissions:
contents: write
issues: read

jobs:
ci:
name: Continuous Integration
uses: makerxstudio/shared-config/.github/workflows/node-ci.yml@main
with:
node-version: 18.x
run-commit-lint: true
pre-test-script: |
pipx install algokit
algokit localnet start
npx --yes wait-on tcp:4001 -t 30000
audit-script: |
npm run audit
check_docs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Check docs are up to date
shell: bash
run: |
npm ci --ignore-scripts
npm run generate:code-docs
# Add untracked files as empty so they come up in diff
git add -N .
# Print changed files and error out if there are changes after generating docs
git diff --exit-code --name-only
build:
name: Build
uses: makerxstudio/shared-config/.github/workflows/node-build-zip.yml@main
needs:
- ci
- check_docs
with:
node-version: 18.x
build-path: dist
artifact-name: package

release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 0

# semantic-release needs node 20
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Download built package
uses: actions/download-artifact@v4
with:
name: package
path: artifacts

- name: Unzip package
shell: bash
run: |
mkdir -p dist
unzip -q "artifacts/package.zip" -d dist
- name: Install dependencies to get semantic release components and plugins
run: npm ci --ignore-scripts

- name: 'Semantic release'
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59 changes: 59 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

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

# Editor/OS directories and files
.DS_Store
*.suo

# Jetbrains
.idea/shelf/
.idea/workspace.xml
# Editor-based HTTP Client requests
.idea/httpRequests/
# Datasource local storage ignored files
.idea/dataSources/
.idea/dataSources.local.xml

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

# Compiled code
dist/
build/

# Coverage report
coverage

# Website & Code docs generation
code-docs/
out/

# dotenv environment variable files
.env
.env.*
!.env.template
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!dist/**
!readme.md
1 change: 1 addition & 0 deletions .nsprc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit 0a151ba

Please sign in to comment.