diff --git a/.github/actions/style/action.yml b/.github/actions/style/action.yml index e81a9315d..fa09c7911 100644 --- a/.github/actions/style/action.yml +++ b/.github/actions/style/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | echo "Checking for Markdown/MDX changes..." - if echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then + if true || echo "$ALL_CHANGED_FILES" | grep -qE '\.mdx?$'; then if ! pnpm check:md; then echo "Markdown or MDX files are not properly formatted." exit 1 # Exit with a non-zero status code to indicate failure @@ -28,10 +28,10 @@ runs: shell: bash run: | echo "Checking for Rust code changes..." - if echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '\.rs$'; then echo "Running checks for the Rust code..." - # Install the nightly toolchain + # Install the nightly toolchain rustup toolchain install nightly # Install rustfmt for the nightly toolchain @@ -54,7 +54,7 @@ runs: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | echo "Checking for changes in node-ui files" - if echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then + if true || echo "$ALL_CHANGED_FILES" | grep -q '^node-ui/'; then echo "Running checks for the node-ui..." cd node-ui if ! pnpm prettier:check .; then @@ -75,7 +75,7 @@ runs: 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 + if true || 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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 59ae770e9..d001ff0f5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,39 +14,84 @@ jobs: name: Project setup runs-on: ubuntu-latest steps: + - name: Maximize build space + uses: easimon/maximize-build-space@v10 + with: + root-reserve-mb: 4096 + - name: Checkout code uses: actions/checkout@v4 + - name: How're we looking? + run: | + df -h + # Install Node.js (version 20) and pnpm - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '20' + - name: How're we looking? + run: | + df -h + - name: Install pnpm run: npm install -g pnpm + - name: How're we looking? + run: | + df -h + # Install and build node-ui - name: Install node-ui dependencies with pnpm run: pnpm install --prefix ./node-ui + - name: How're we looking? + run: | + df -h + - name: Build node-ui run: pnpm --filter ./node-ui run build + - name: How're we looking? + run: | + df -h + - name: Setup rust toolchain run: rustup toolchain install stable --profile minimal + - name: How're we looking? + run: | + df -h + - name: Setup rust cache uses: Swatinem/rust-cache@v2 + - name: How're we looking? + run: | + df -h + - name: Run code style checks uses: ./.github/actions/style + - name: How're we looking? + run: | + df -h + - name: Build run: cargo build --verbose + + - name: How're we looking? + run: | + df -h - name: Run tests run: | chmod +x $GITHUB_WORKSPACE/scripts/build-all-apps.sh chmod +x $GITHUB_WORKSPACE/scripts/test.sh $GITHUB_WORKSPACE/scripts/test.sh + + - name: How're we looking? + run: | + df -h diff --git a/packages/calimero-sdk/src/subscriptions/subscriptions.ts b/packages/calimero-sdk/src/subscriptions/subscriptions.ts index 97b172c7f..ec32d3742 100644 --- a/packages/calimero-sdk/src/subscriptions/subscriptions.ts +++ b/packages/calimero-sdk/src/subscriptions/subscriptions.ts @@ -5,7 +5,10 @@ export interface SubscriptionsClient { disconnect(connectionId?: string): void; subscribe(contextIds: string[], connectionId?: string): void; unsubscribe(contextIds: string[], connectionId?: string): void; - addCallback(callback: (event: NodeEvent) => void, connectionId?: string): void; + addCallback( + callback: (event: NodeEvent) => void, + connectionId?: string, + ): void; removeCallback( callback: (event: NodeEvent) => void, connectionId?: string, @@ -16,21 +19,23 @@ export type NodeEvent = ContextEvent; export type ContextEvent = ContextEventPayload & { contextId: ContextId; -} - -type ContextEventPayload = { - type: 'StateMutation', - data: StateMutation, -} | { - type: 'ExecutionEvent', - data: ExecutionEvent, }; +type ContextEventPayload = + | { + type: 'StateMutation'; + data: StateMutation; + } + | { + type: 'ExecutionEvent'; + data: ExecutionEvent; + }; + export interface StateMutation { newRoot: string; } export interface ExecutionEvent { - kind: string, - data: any, + kind: string; + data: any; }