Skip to content

Commit 5844d8c

Browse files
Initial commit
0 parents  commit 5844d8c

File tree

154 files changed

+19045
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+19045
-0
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [["@aptos-labs/react", "@aptos-labs/js-pro"]],
6+
"linked": [],
7+
"access": "public",
8+
"privatePackages": false,
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["@aptos-labs/js-pro-vite"]
11+
}

.changeset/pre.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mode": "pre",
3+
"tag": "beta",
4+
"initialVersions": {
5+
"@aptos-labs/eslint-config-petra": "0.0.2-experimental.2",
6+
"@aptos-labs/js-pro": "0.1.0-beta.0",
7+
"@aptos-labs/react": "0.1.0-beta.0",
8+
"@aptos-labs/js-pro-vite": "0.0.0"
9+
},
10+
"changesets": []
11+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Description
2+
3+
<!-- Please describe your change and its motivation. -->
4+
5+
### Test Plan
6+
7+
<!-- Please provide us with clear details for verifying that your changes work. -->
8+
9+
### Related Links
10+
11+
<!-- Please link to any relevant issues or pull requests! -->

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: write
16+
pull-requests: write
17+
contents: write
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v4
21+
22+
- name: Authenticate as Sign in with Aptos Actions
23+
uses: actions/create-github-app-token@v1
24+
id: generate-token
25+
with:
26+
app-id: ${{ vars.APTOS_LABS_BOT_APP_ID }}
27+
private-key: ${{ secrets.APTOS_LABS_BOT_APP_PRIVATE_KEY }}
28+
29+
- name: Setup pnpm 10
30+
uses: pnpm/action-setup@v3
31+
with:
32+
version: 10
33+
34+
- name: Setup Node.js 22.x
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 22.x
38+
39+
- name: Install Dependencies
40+
run: pnpm i
41+
42+
- name: Create Release Pull Request or Publish to npm
43+
id: changesets
44+
uses: changesets/action@v1
45+
with:
46+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
47+
publish: pnpm release
48+
env:
49+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
50+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.DS_Store
2+
node_modules
3+
.turbo
4+
*.log
5+
.next
6+
dist
7+
dist-ssr
8+
*.local
9+
.env
10+
.cache
11+
server/dist
12+
public/dist
13+
.turbo
14+
.eslintcache
15+
coverage

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node 22.14.0
2+
pnpm 10.0.0

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Aptos JS-Pro
2+
3+
Aptos JS-Pro is a library of utilities built on top of the `@aptos-labs/ts-sdk`. This library is focused on an opinionated tools based off of internal usecases derived from Aptos Labs products such as Petra and Aptos Connect.
4+
5+
## Installation
6+
7+
### JavaScript
8+
9+
```bash
10+
npm install @aptos-labs/js-pro
11+
```
12+
13+
### React
14+
15+
```bash
16+
npm install @aptos-labs/js-pro @aptos-labs/react @tanstack/react-query
17+
```
18+
19+
## Getting Started
20+
21+
### Prerequisites
22+
23+
Check out [`.tool-versions`](.tool-versions) for runtime requirements.
24+
25+
### Installation
26+
27+
1. Clone the repository:
28+
29+
```bash
30+
git clone https://github.com/aptos-labs/sign-in-with-aptos.git
31+
cd sign-in-with-aptos
32+
```
33+
34+
2. Install runtimes (mise)
35+
36+
```bash
37+
mise install
38+
```
39+
40+
If `mise` is not installed, check out their [Getting Started](https://mise.jdx.dev/getting-started.html) page.
41+
42+
3. Install dependencies:
43+
44+
```bash
45+
pnpm install
46+
```
47+
48+
4. Build packages:
49+
50+
```bash
51+
pnpm build
52+
```

examples/vite/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

examples/vite/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13+
14+
```js
15+
export default tseslint.config({
16+
extends: [
17+
// Remove ...tseslint.configs.recommended and replace with this
18+
...tseslint.configs.recommendedTypeChecked,
19+
// Alternatively, use this for stricter rules
20+
...tseslint.configs.strictTypeChecked,
21+
// Optionally, add this for stylistic rules
22+
...tseslint.configs.stylisticTypeChecked,
23+
],
24+
languageOptions: {
25+
// other options...
26+
parserOptions: {
27+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
28+
tsconfigRootDir: import.meta.dirname,
29+
},
30+
},
31+
})
32+
```
33+
34+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35+
36+
```js
37+
// eslint.config.js
38+
import reactX from 'eslint-plugin-react-x'
39+
import reactDom from 'eslint-plugin-react-dom'
40+
41+
export default tseslint.config({
42+
plugins: {
43+
// Add the react-x and react-dom plugins
44+
'react-x': reactX,
45+
'react-dom': reactDom,
46+
},
47+
rules: {
48+
// other rules...
49+
// Enable its recommended typescript rules
50+
...reactX.configs['recommended-typescript'].rules,
51+
...reactDom.configs.recommended.rules,
52+
},
53+
})
54+
```

0 commit comments

Comments
 (0)