-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ag/feat/tx-operations
- Loading branch information
Showing
13 changed files
with
3,995 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ "repo": "FuelLabs/fuel-explorer" } | ||
], | ||
"privatePackages": { | ||
"version": true, | ||
"tag": true | ||
}, | ||
"commit": false, | ||
"fixed": [["@fuels/ui"]], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [ | ||
"@fuel-explorer/graphql", | ||
"e2e-tests", | ||
"app-portal", | ||
"app-explorer", | ||
"app-commons", | ||
"predicate" | ||
], | ||
"snapshot": { | ||
"useCalculatedVersion": true, | ||
"prereleaseTemplate": "{tag}-{commit}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@fuels/ui": minor | ||
--- | ||
|
||
Make the @fuels/ui package public and publishable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: "Release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
BUILD_VERSION: "" | ||
|
||
jobs: | ||
release-changesets: | ||
name: Release master or rc | ||
runs-on: buildjet-4vcpu-ubuntu-2204 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# need this to get full git-history/clone in order to build changelogs and check changesets | ||
fetch-depth: 0 | ||
# workaround to ensure force pushes to changeset branch use REPO_TOKEN owner's account | ||
# see https://github.com/changesets/action/issues/70 | ||
persist-credentials: false | ||
- uses: FuelLabs/github-actions/setups/node@master | ||
with: | ||
node-version: 20.15.1 | ||
pnpm-version: 9.5.0 | ||
|
||
- uses: FuelLabs/github-actions/setups/npm@master | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Bump and Collect Version | ||
run: | | ||
pnpm changeset version | ||
echo "BUILD_VERSION=$(pnpm -s packages:version)" >> $GITHUB_ENV | ||
git reset --hard | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup git user (for changelog step) | ||
run: | | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Create Release Pull Request or Publish to NPM | ||
id: changesets | ||
uses: FuelLabs/changesets-action@main | ||
with: | ||
publish: pnpm changeset publish --tag next | ||
commit: "ci(changesets): versioning packages" | ||
title: "ci(changesets): versioning packages" | ||
createGithubReleases: aggregate | ||
githubReleaseName: v${{ env.BUILD_VERSION }} | ||
githubTagName: v${{ env.BUILD_VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/app-explorer/src/systems/Block/actions/get-blocks.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use server'; | ||
|
||
import { z } from 'zod'; | ||
import { act } from '~/systems/Core/utils/act-server'; | ||
import { sdk } from '~/systems/Core/utils/sdk'; | ||
|
||
const PER_PAGE = 10; | ||
|
||
const schema = z.object({ | ||
cursor: z.string().optional().nullable(), | ||
dir: z.enum(['after', 'before']).optional(), | ||
}); | ||
|
||
export const getBlocks = act(schema, async ({ cursor, dir = 'after' }) => { | ||
const params = { last: PER_PAGE } as { | ||
first?: number; | ||
last?: number; | ||
before?: string; | ||
after?: string; | ||
}; | ||
if (cursor && dir === 'after') { | ||
params.after = cursor; | ||
} | ||
if (cursor && dir === 'before') { | ||
params.before = cursor; | ||
} | ||
|
||
const { data } = await sdk.blocks(params); | ||
return data; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.