Skip to content

Commit

Permalink
Split SDK + initial cheqd support (#449)
Browse files Browse the repository at this point in the history
* Initial

* Tweaks

* Tutorials

* Mention `tutorials` in `README.md`

* Bump up node version

* Update test name

* Track `master`

* Minor tweaks

* Try to publish packages

* Update `package.json`s

* Publish packages

* Update `changeset` config

* Revert back npm workflow

* Proper naming

* Improve READMEs
  • Loading branch information
olegnn authored Oct 9, 2024
1 parent 243afb2 commit 4fd1281
Show file tree
Hide file tree
Showing 652 changed files with 40,216 additions and 38,475 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
13 changes: 0 additions & 13 deletions .dockerignore

This file was deleted.

34 changes: 23 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
{
"plugins": ["jest", "sonarjs", "unused-imports"],
"root": true,
"plugins": ["jest", "sonarjs"],
"globals": {
"process": "readonly"
},
"env": {
"browser": true,
"es6": true
},
"extends": ["plugin:sonarjs/recommended", "eslint:recommended", "plugin:jest/recommended", "airbnb-base"],
"parser": "babel-eslint",
"extends": [
"plugin:sonarjs/recommended",
"eslint:recommended",
"plugin:jest/recommended",
"airbnb-base"
],
"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2022,
"sourceType": "module"
},
"rules": {
"no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" }],
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"no-use-before-define": [
"error",
{
Expand All @@ -23,17 +35,17 @@
"variables": true
}
],
"unused-imports/no-unused-imports": "error",
"no-void": "off",
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"class-methods-use-this": "off",
"no-return-await": "off",
"no-bitwise": ["error", { "allow": ["~"] }],
"no-plusplus": "off",
"no-restricted-properties": "off",
"no-void": "off",
"max-len": "off",
"no-underscore-dangle": ["error", { "enforceInMethodNames": false }],
"max-classes-per-file": "off",
"import/prefer-default-export": "off",
"import/no-unresolved": "off",
"no-useless-constructor": "off",
"no-console": "off",
"no-else-return": "off",
"no-restricted-syntax": [
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/cheqd-sdk-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Cheqd blockchain modules tests

on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "20.x"
- run: yarn install --frozen-lockfile --ignore-scripts
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: CHEQD_MNEMONIC=$CHEQD_MNEMONIC turbo run test-with-node --filter @docknetwork/cheqd-blockchain-modules
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Unit tests
name: Credential SDK tests

on: [pull_request]
jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn build
- run: yarn test
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run test --filter @docknetwork/credential-sdk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration tests
name: Dock blockchain modules tests

on: [pull_request]
jobs:
Expand All @@ -10,10 +10,11 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "18.x"
node-version: "20.x"
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test-with-node
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run test-with-node --filter @docknetwork/dock-blockchain-modules
mainnet:
runs-on: ubuntu-latest
env:
Expand All @@ -22,19 +23,22 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "18.x"
node-version: "20.x"
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test-with-node
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run test-with-node --filter @docknetwork/dock-blockchain-modules
testnet:
runs-on: ubuntu-latest
env:
CONFIG_DOCK_NODE_IMAGE_TAG: "testnet"
DisableTrustRegistryParticipantsTests: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "18.x"
node-version: "20.x"
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test-with-node
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run test-with-node --filter @docknetwork/dock-blockchain-modules
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
- name: Setup Node JS
uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"

- name: Install and Build 🔧 # Only need to install jsdoc package here and then run docs script
run: |
yarn install --frozen-lockfile --ignore-scripts
yarn docs
turbo run docs
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
mdbook-version: "latest"

- name: Generate mdBook
run: yarn mdbook
run: turbo run mdbook

- name: Install SSH Client 🔑
uses: webfactory/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,39 @@ jobs:
master:
runs-on: ubuntu-latest
env:
CONFIG_DOCK_NODE_IMAGE_TAG: 'master'
CONFIG_DOCK_NODE_IMAGE_TAG: "master"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn examples-with-node
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run examples-with-node
mainnet:
runs-on: ubuntu-latest
env:
CONFIG_DOCK_NODE_IMAGE_TAG: 'mainnet'
CONFIG_DOCK_NODE_IMAGE_TAG: "mainnet"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn examples-with-node
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run examples-with-node
testnet:
runs-on: ubuntu-latest
env:
CONFIG_DOCK_NODE_IMAGE_TAG: 'testnet'
CONFIG_DOCK_NODE_IMAGE_TAG: "testnet"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn examples-with-node
- run: npm install -g [email protected]
- run: turbo telemetry disable
- run: turbo run examples-with-node
55 changes: 0 additions & 55 deletions .github/workflows/integration-tests-ipfs.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"

- name: Install, lint, type check and generate docs # Not uploading the docs.
run: |
yarn install --frozen-lockfile --ignore-scripts
yarn lint
yarn docs
npm install -g [email protected]
turbo run lint --parallel
turbo run docs --parallel
4 changes: 2 additions & 2 deletions .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ on:
- ".github/workflows/**"

schedule:
- cron: '0 0 * * 0' # Every sunday at midnight
- cron: "0 0 * * 0" # Every sunday at midnight

jobs:
audit:
runs-on: ubuntu-latest
env:
NODE_VERSION: 18.x
NODE_VERSION: 20.x
AVOID_LICENSES: "AGPL;GPL;AGPL-3.0"
IGNORE_PACKAGES: ""

Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
name: NPM Publish
name: npm Publish

on:
release:
types: [published]

jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: "20.x"
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn build
- run: cp -rf package.json dist
- run: node scripts/set_export_paths.js
- run: cp -rf README.md dist
- run: cd dist && npm publish --access public
- run: yarn changeset publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Loading

0 comments on commit 4fd1281

Please sign in to comment.