Skip to content

Commit

Permalink
refactor: extract calimero sdk from core (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejVukosav authored Dec 3, 2024
1 parent 7c07b30 commit d282b1c
Show file tree
Hide file tree
Showing 42 changed files with 76 additions and 5,038 deletions.
21 changes: 0 additions & 21 deletions .github/actions/style/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,3 @@ runs:
# exit 1 # Fail if linter detects issues
# fi
fi
# Check for changes in the 'packages/calimero-sdk' directory and run formatting/linting
- name: Check for changes in calimero-sdk
shell: bash
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Checking for changes in calimero-sdk files"
if echo "$ALL_CHANGED_FILES" | grep -q '^packages/calimero-sdk/'; then
echo "Running checks for the calimero-sdk files"
cd packages/calimero-sdk
if ! pnpm prettier:check .; then
echo "Prettier found unformatted files in calimero-sdk."
exit 1 # Fail if Prettier detects issues
fi
# TODO: Uncomment after fixing linting issues
# if ! pnpm lint; then
# echo "Linting issues found in calimero-sdk."
# exit 1 # Fail if linter detects issues
# fi
fi
79 changes: 0 additions & 79 deletions .github/workflows/calimero_sdk_publish.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@ if git diff --cached --name-only | grep -q '^node-ui/'; then
echo "Running checks for the node-ui (Next.js app)..."
(cd node-ui && pnpm prettier && pnpm lint:fix)
fi

# Check for changes in the 'packages/calimero-sdk' directory
if git diff --cached --name-only | grep -q '^packages/calimero-sdk/'; then
echo "Running checks for the packages/calimero-sdk..."
(cd packages/calimero-sdk && pnpm prettier && pnpm lint:fix)
fi
2 changes: 0 additions & 2 deletions README.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Welcome to Calimero Network

[![Discord](https://dcbadge.vercel.app/api/server/KHezXS9XvT?style=flat&theme=default-inverted)](https://discord.com/invite/KHezXS9XvT)
[![SDK publish gh action](https://github.com/calimero-network/core/actions/workflows/calimero_sdk_publish.yml/badge.svg)](https://github.com/calimero-network/core/actions/workflows/calimero_sdk_publish.yml)
[![npm version](https://badge.fury.io/js/@calimero-is-near%2Fcalimero-p2p-sdk.svg)](https://badge.fury.io/js/@calimero-is-near%2Fcalimero-p2p-sdk)
[![License](https://img.shields.io/badge/License-Apache--2.0-blue)](#license)
[![Issues - calimero](https://img.shields.io/github/issues/calimero-network/core)](https://github.com/calimero-network/core/issues)

Expand Down
36 changes: 20 additions & 16 deletions crates/server/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# Node Server

- [Introduction](#introduction)
- [Admin API](#1-admin-api)
- [JSON rpc](#2-json-rpc)
- [Websocket](#3-websocket)
- [Node Server Workflows](#node-server-workflows)
- [Client Login Workflow](#client-login-workflow)
- [JSON rpc Workflow](#json-rpc-workflow)
- [Websocket Workflow](#websocket-workflow)
- [Admin API endpoints](#admin-api-endpoints)
- [Protected Routes](#protected-routes)
- [Unprotected Routes](#unprotected-routes)
- [JSON rpc endpoint](#json-rpc-endpoint)
- [Websocket endpoints](#websocket-endpoints)
- [Examples](#examples)
- [Node Server](#node-server)
- [Introduction](#introduction)
- [1. Admin API](#1-admin-api)
- [2. JSON rpc](#2-json-rpc)
- [Query Method](#query-method)
- [Mutate Method](#mutate-method)
- [3. Websocket](#3-websocket)
- [Subscription Handling:](#subscription-handling)
- [Unsubscription Handling:](#unsubscription-handling)
- [Node Server Workflows](#node-server-workflows)
- [Client Login Workflow](#client-login-workflow)
- [JSON rpc Workflow](#json-rpc-workflow)
- [Websocket Workflow](#websocket-workflow)
- [Admin API endpoints](#admin-api-endpoints)
- [Protected Routes](#protected-routes)
- [Unprotected Routes](#unprotected-routes)
- [JSON rpc endpoint](#json-rpc-endpoint)
- [Websocket endpoints](#websocket-endpoints)
- [Examples](#examples)

## Introduction

Expand Down Expand Up @@ -342,5 +347,4 @@ Examples of Node Server usage can be found within the
[Admin Dashboard](https://github.com/calimero-network/admin-dashboard) and the
[Only Peers example](https://github.com/calimero-network/only-peers-client)
application. All communication with the node is exposed through
[calimero sdk](https://github.com/calimero-network/core/tree/feat-admin_api_docs/packages/calimero-sdk)
library.
[calimero sdk](https://github.com/calimero-network/core-js-sdk) library.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"pnpm": ">=8"
},
"scripts": {
"buildSdk": "pnpm install && cd packages/calimero-sdk && pnpm build",
"format:md": "prettier --write \"**/*.{md,mdx}\"",
"check:md": "prettier --check \"**/*.{md,mdx}\"",
"prepare": "husky"
Expand All @@ -26,4 +25,4 @@
"typescript": "^4.9.5"
},
"version": "0.0.2-beta.0"
}
}
41 changes: 0 additions & 41 deletions packages/calimero-sdk/.eslint.config.mjs

This file was deleted.

5 changes: 0 additions & 5 deletions packages/calimero-sdk/.eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions packages/calimero-sdk/.husky/pre-commit

This file was deleted.

5 changes: 0 additions & 5 deletions packages/calimero-sdk/.prettierignore

This file was deleted.

2 changes: 0 additions & 2 deletions packages/calimero-sdk/build-script.sh

This file was deleted.

88 changes: 0 additions & 88 deletions packages/calimero-sdk/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/calimero-sdk/prettier.config.cjs

This file was deleted.

Loading

0 comments on commit d282b1c

Please sign in to comment.