-
Notifications
You must be signed in to change notification settings - Fork 38
update main to dev #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
update main to dev #416
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,10 @@ | ||
| *.log | ||
| *.env | ||
| npm-debug.log* | ||
| node_modules | ||
| package-lock.json | ||
| src | ||
| tests | ||
| index.ts | ||
| .eslintrc.json | ||
| .turbo |
This file contains hidden or 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,7 @@ | ||
| # @reown/appkit-react-native-cli | ||
|
|
||
| ## 1.3.0 | ||
|
|
||
| ### Minor Changes | ||
|
|
||
| - [#414](https://github.com/reown-com/appkit-react-native/pull/414) [`c88fa8c`](https://github.com/reown-com/appkit-react-native/commit/c88fa8c29d0dcb7cc99392534b62bcb11b41e2cb) Thanks [@ignaciosantise](https://github.com/ignaciosantise)! - feat: added appkit cli for react native |
This file contains hidden or 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,14 @@ | ||
| module.exports = { | ||
| source: 'src', | ||
| output: 'lib', | ||
| targets: [ | ||
| 'commonjs', | ||
| 'module', | ||
| [ | ||
| 'typescript', | ||
| { | ||
| tsc: '../../node_modules/.bin/tsc' | ||
| } | ||
| ] | ||
| ] | ||
| }; |
This file contains hidden or 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,52 @@ | ||
| { | ||
| "name": "@reown/appkit-react-native-cli", | ||
| "version": "1.3.0", | ||
| "sideEffects": false, | ||
| "description": "Reown AppKit CLI for React Native", | ||
| "main": "lib/commonjs/index.js", | ||
| "types": "lib/typescript/index.d.ts", | ||
| "module": "lib/module/index.js", | ||
| "bin": { | ||
| "appkit-react-native": "lib/commonjs/index.js" | ||
| }, | ||
| "repository": "https://github.com/reown-com/appkit-react-native", | ||
| "author": "Reown (https://discord.gg/reown)", | ||
| "homepage": "https://reown.com/appkit", | ||
| "license": "Apache-2.0", | ||
| "bugs": { | ||
| "url": "https://github.com/reown-com/appkit-react-native/issues" | ||
| }, | ||
| "scripts": { | ||
| "build": "bob build", | ||
| "clean": "rm -rf lib", | ||
| "lint": "eslint . --ext .js,.jsx,.ts,.tsx" | ||
| }, | ||
| "files": [ | ||
| "src", | ||
| "lib", | ||
| "!**/__tests__", | ||
| "!**/__fixtures__", | ||
| "!**/__mocks__" | ||
| ], | ||
| "dependencies": { | ||
| "chalk": "5.4.1" | ||
| }, | ||
| "publishConfig": { | ||
| "registry": "https://registry.npmjs.org/", | ||
| "access": "public" | ||
| }, | ||
| "eslintIgnore": [ | ||
| "node_modules/", | ||
| "lib/" | ||
| ], | ||
| "keywords": [ | ||
| "appkit", | ||
| "wallet", | ||
| "onboarding", | ||
| "reown", | ||
| "dapps", | ||
| "web3", | ||
| "wagmi", | ||
| "ethereum" | ||
| ] | ||
| } |
This file contains hidden or 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,56 @@ | ||
| #!/usr/bin/env node | ||
| import chalk from 'chalk'; | ||
| import { spawn } from 'child_process'; | ||
|
|
||
| import { banner } from './utils'; | ||
|
|
||
| // Define styles | ||
| const redTip = chalk.hex('#C70039'); // Red for tips | ||
|
|
||
| // Display CLI Banner | ||
| // eslint-disable-next-line no-console | ||
| console.log(banner); | ||
|
|
||
| const TEMPLATE_URL = | ||
| 'https://github.com/reown-com/react-native-examples/tree/main/dapps/appkit-expo-wagmi'; | ||
|
|
||
| function runExpoCreate() { | ||
| return new Promise<void>((resolve, reject) => { | ||
| const child = spawn('npx', ['create-expo', '--template', TEMPLATE_URL], { | ||
| stdio: 'inherit', | ||
| shell: process.platform === 'win32' | ||
| }); | ||
|
|
||
| child.on('error', reject); | ||
| child.on('close', code => { | ||
| if (code === 0) { | ||
| resolve(); | ||
| } else { | ||
| reject(new Error(`create-expo exited with code ${code}`)); | ||
| } | ||
| }); | ||
| }); | ||
| } | ||
|
|
||
| export async function main() { | ||
| try { | ||
| await runExpoCreate(); | ||
| } catch (error: any) { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Failed to run Expo initializer:', error?.message || error); | ||
| process.exitCode = 1; | ||
|
|
||
| return; | ||
| } | ||
|
|
||
| const url = 'https://dashboard.reown.com'; | ||
| // eslint-disable-next-line no-console | ||
| console.log(`Your ${redTip('Project Id')} will work only on the Expo Go environment`); | ||
| // eslint-disable-next-line no-console | ||
| console.log(` | ||
| Go to: ${url} | ||
| To create a personal ProjectId | ||
| `); | ||
| } | ||
|
|
||
| main(); | ||
This file contains hidden or 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,17 @@ | ||
| export const banner = ` | ||
| @@@@@@@ @@@@@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@ | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ Reown AppKit React Native CLI | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@@@@@ The easiest way to build dApps! | ||
| @@@@@@ @@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@ | ||
| @@@@@@ @@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ | ||
| @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ | ||
| @@@@@ @@@@@@@@@@@@@@@@@@ | ||
| `; |
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "include": ["src"], | ||
| "exclude": ["lib", "node_modules"] | ||
| } |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'any' type defeats the purpose of TypeScript's type safety. Consider using 'unknown' type instead and properly type guard the error, or create a specific error type.