Skip to content

Commit

Permalink
Merge pull request #6 from omnisat/cleaning
Browse files Browse the repository at this point in the history
try formatting
  • Loading branch information
hathbanger authored Oct 12, 2024
2 parents a0eac40 + c8fe392 commit 2e6df7d
Show file tree
Hide file tree
Showing 40 changed files with 652 additions and 601 deletions.
63 changes: 48 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,60 +13,93 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6.32.9

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18'
cache: 'pnpm'

- name: Install dependencies
run: |
pnpm install
pnpm run build
run: pnpm install

- name: Build
run: pnpm run build

lint:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6.32.9

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Lint code
run: pnpm lint

test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6.32.9

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test

format:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6.32.9

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '18'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Format code
run: pnpm format
38 changes: 22 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ on:
jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
with:
node-version: 18
cache: 'pnpm'
version: 9

- name: Install dependencies
run: pnpm install
Expand All @@ -25,15 +24,22 @@ jobs:
run: pnpx changeset version

- name: Push Changeset version update
run: echo "Pushing Changeset version update"
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# git add .
# git commit -m "Version Packages"
# git push
#
# - name: Publish to npm
# run: pnpm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Version Packages"
git push
- name: Create GitHub Release
uses: changesets/action@v2
with:
publish: false
version: false
changelog: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Echo statement instead of publishing to npm (for now)
- name: Echo publish action
run: echo "This is where the package would be published to npm."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ A common wallet interface for building React applications on Bitcoin.
![Version](https://img.shields.io/npm/v/@omnisat/lasereyes)
![license](https://img.shields.io/github/license/omnisat/lasereyes.svg?style=flat-square)


---

## Don't Trust, Verify

[Try It Out](https://demo.lasereyes.build)

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion apps/demo.lasereyes.build/app/api/authorize/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server'
import { Verifier } from 'bip322-js'
import * as jwt from 'jsonwebtoken'

const SECRET_KEY = process.env.JWT_SECRET_KEY
const SECRET_KEY = String(process.env.JWT_SECRET_KEY)

export const POST = async (req: NextRequest) => {
try {
Expand Down
7 changes: 5 additions & 2 deletions apps/demo.lasereyes.build/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ import {

import App from '@/components/App'
import { useState } from 'react'
import dynamic from "next/dynamic";
import dynamic from 'next/dynamic'

const DynamicLaserEyesProvider = dynamic(() => import('@omnisat/lasereyes-react').then((mod) => mod.LaserEyesProvider), { ssr: false });
const DynamicLaserEyesProvider = dynamic(
() => import('@omnisat/lasereyes-react').then((mod) => mod.LaserEyesProvider),
{ ssr: false }
)

export default function Home() {
const [network, setNetwork] = useState<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const ClickToCopyNpmInstallPill = ({
<div
className={cn(
badgeVariants({ variant: 'outline' }),
'self-end font-windows text-xs gap-3 transition-all text-[#a7a7a8] select-none border-[#3c393f] p-0 cursor-pointer ',
'self-end font-windows text-xs gap-3 transition-all text-white select-none border-[#3c393f] p-0 cursor-pointer ',
className
)}
>
Expand Down
14 changes: 7 additions & 7 deletions apps/demo.lasereyes.build/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client"
'use client'

import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import * as React from 'react'
import * as AvatarPrimitive from '@radix-ui/react-avatar'

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils'

const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
Expand All @@ -12,7 +12,7 @@ const Avatar = React.forwardRef<
<AvatarPrimitive.Root
ref={ref}
className={cn(
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
className
)}
{...props}
Expand All @@ -26,7 +26,7 @@ const AvatarImage = React.forwardRef<
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Image
ref={ref}
className={cn("aspect-square h-full w-full", className)}
className={cn('aspect-square h-full w-full', className)}
{...props}
/>
))
Expand All @@ -39,7 +39,7 @@ const AvatarFallback = React.forwardRef<
<AvatarPrimitive.Fallback
ref={ref}
className={cn(
"flex h-full w-full items-center justify-center rounded-full bg-muted",
'flex h-full w-full items-center justify-center rounded-full bg-muted',
className
)}
{...props}
Expand Down
14 changes: 7 additions & 7 deletions apps/demo.lasereyes.build/components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client"
'use client'

import * as React from "react"
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
import { Check } from "lucide-react"
import * as React from 'react'
import * as CheckboxPrimitive from '@radix-ui/react-checkbox'
import { Check } from 'lucide-react'

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils'

const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,
Expand All @@ -13,13 +13,13 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Root
ref={ref}
className={cn(
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
'peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
className
)}
{...props}
>
<CheckboxPrimitive.Indicator
className={cn("flex items-center justify-center text-current")}
className={cn('flex items-center justify-center text-current')}
>
<Check className="h-4 w-4" />
</CheckboxPrimitive.Indicator>
Expand Down
8 changes: 4 additions & 4 deletions apps/demo.lasereyes.build/components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react"
import * as React from 'react'

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils'

export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
Expand All @@ -11,7 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
className
)}
ref={ref}
Expand All @@ -20,6 +20,6 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
)
}
)
Input.displayName = "Input"
Input.displayName = 'Input'

export { Input }
12 changes: 7 additions & 5 deletions apps/demo.lasereyes.build/components/ui/sonner.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Toaster as Sonner } from "sonner";
type ToasterProps = React.ComponentProps<typeof Sonner>;
declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
export { Toaster };
//# sourceMappingURL=sonner.d.ts.map
import { Toaster as Sonner } from 'sonner'
type ToasterProps = React.ComponentProps<typeof Sonner>
declare const Toaster: ({
...props
}: ToasterProps) => import('react/jsx-runtime').JSX.Element
export { Toaster }
//# sourceMappingURL=sonner.d.ts.map
18 changes: 9 additions & 9 deletions apps/demo.lasereyes.build/components/ui/sonner.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
"use client"
'use client'

import { useTheme } from "next-themes"
import { Toaster as Sonner } from "sonner"
import { useTheme } from 'next-themes'
import { Toaster as Sonner } from 'sonner'

type ToasterProps = React.ComponentProps<typeof Sonner>

const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()
const { theme = 'system' } = useTheme()

return (
<Sonner
theme={theme as ToasterProps["theme"]}
theme={theme as ToasterProps['theme']}
className="toaster group"
toastOptions={{
classNames: {
toast:
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
description: "group-[.toast]:text-muted-foreground",
'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
description: 'group-[.toast]:text-muted-foreground',
actionButton:
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
cancelButton:
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
},
}}
{...props}
Expand Down
10 changes: 5 additions & 5 deletions apps/demo.lasereyes.build/components/ui/tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client"
'use client'

import * as React from "react"
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
import * as React from 'react'
import * as TooltipPrimitive from '@radix-ui/react-tooltip'

import { cn } from "@/lib/utils"
import { cn } from '@/lib/utils'

const TooltipProvider = TooltipPrimitive.Provider

Expand All @@ -19,7 +19,7 @@ const TooltipContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
className
)}
{...props}
Expand Down
8 changes: 4 additions & 4 deletions apps/demo.lasereyes.build/lib/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ClassValue } from 'clsx';
export declare function cn(...inputs: ClassValue[]): string;
export declare function truncateString(str: string, maxLength: number): string;
//# sourceMappingURL=utils.d.ts.map
import { type ClassValue } from 'clsx'
export declare function cn(...inputs: ClassValue[]): string
export declare function truncateString(str: string, maxLength: number): string
//# sourceMappingURL=utils.d.ts.map
Loading

0 comments on commit 2e6df7d

Please sign in to comment.