Skip to content

Commit

Permalink
Merge pull request #4 from Anastasia-Labs/develop
Browse files Browse the repository at this point in the history
Finalize Direct Offer SDK
  • Loading branch information
solidsnakedev authored Jan 10, 2024
2 parents bcd4c69 + 9923b8e commit 20d2f6d
Show file tree
Hide file tree
Showing 27 changed files with 1,709 additions and 1,562 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"overrides": [
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
},
"ignorePatterns": ["test"]
}
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
push:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm i
- run: pnpm run lint && pnpm run build
- run: pnpm test
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- run: pnpm i
- run: pnpm run lint && pnpm run build
- run: pnpm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
registry-url: 'https://registry.npmjs.org'
- run: pnpm i --frozen-lockfile
- name: Build 🔨
run: pnpm build
- run: pnpm publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
dist
*.tgz
!lucid-cardano*.tgz
.direnv
test/lock.ts
test/unlock.ts
.vscode/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ https://docs.github.com/en/repositories/releasing-projects-on-github/managing-re
## Install package

```
npm install @anastasia-labs/linear-vesting-offchain
npm install @anastasia-labs/direct-offer-offchain
```

or

```
pnpm install @anastasia-labs/linear-vesting-offchain
pnpm install @anastasia-labs/direct-offer-offchain
```

## References
Expand Down
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
description = "A Nix-flake-based Node.js development environment";

nixConfig = {
bash-prompt = "\\[\\e[0;92m\\][\\[\\e[0;92m\\]nix develop:\\[\\e[0;92m\\]\\w\\[\\e[0;92m\\]]\\[\\e[0;92m\\]$ \\[\\e[0m\\]";
};

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anastasia-labs/linear-vesting-offchain",
"version": "0.0.10",
"name": "@anastasia-labs/direct-offer-offchain",
"version": "0.1.0",
"description": "https://docs.github.com/en/packages/quickstart",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -9,7 +9,7 @@
"dist"
],
"scripts": {
"test": "",
"test": "export NODE_ENV='emulator' && vitest run",
"build": "tsup src/index.ts --minify --format esm,cjs --dts --clean",
"lint": "eslint",
"repack": "pnpm run build && pnpm pack",
Expand All @@ -27,12 +27,13 @@
"eslint-config-prettier": "^8.8.0",
"ts-node": "^10.9.1",
"tsup": "^6.7.0",
"typescript": "^5.1.3"
"typescript": "^5.1.3",
"vitest": "0.34.6"
},
"directories": {
"test": "test"
},
"dependencies": {
"@anastasia-labs/lucid-cardano-fork": "^0.10.7"
"@anastasia-labs/lucid-cardano-fork": "^0.10.8-rc.2"
}
}
Loading

0 comments on commit 20d2f6d

Please sign in to comment.