From ae3a82f0db49f25ddcaa10917099fb7fad5af63c Mon Sep 17 00:00:00 2001 From: XYHub Date: Sun, 8 Sep 2024 00:10:37 +0000 Subject: [PATCH 01/16] int dev readmes --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d4bad1c..2ec00cf 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ --- +# Dev Branch + `Omi3` is an open-source project focused on building audio processing and playback capabilities for web applications. ## Project Overview From 517815de2c9b6d842100327917877aa9414e1c69 Mon Sep 17 00:00:00 2001 From: XYHub Date: Sun, 8 Sep 2024 00:15:20 +0000 Subject: [PATCH 02/16] Change readme --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ec00cf..4d58bae 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@
Logo Omi3 - Build Status - Test - Repo Size +

+ Build Status + Test + Repo Size +

--- From d878647f21f086993da1db1b84694f80f9440c8c Mon Sep 17 00:00:00 2001 From: lU Date: Sun, 8 Sep 2024 12:38:37 +0000 Subject: [PATCH 03/16] Create FUNDING.yml --- .github/FUNDING.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..384c699 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,15 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: omi3 +open_collective: omi3 +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: # Replace with a single Buy Me a Coffee username +thanks_dev: xyhomi3 +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From b0af1013e97d542ac92617dd99737c30f53d7751 Mon Sep 17 00:00:00 2001 From: XYHub Date: Sun, 8 Sep 2024 13:27:05 +0000 Subject: [PATCH 04/16] Add producthunt badge to main reademe --- .github/.keep | 0 README.md | 5 +++++ 2 files changed, 5 insertions(+) delete mode 100644 .github/.keep diff --git a/.github/.keep b/.github/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index 4d58bae..bb8c660 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Test Repo Size

+ --- @@ -62,3 +63,7 @@ We welcome contributions from the community! Please read our [Contributing Guide ## License `Omi3` is open-source software licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for more details. + +--- + +Omi3 - Audio processing and playback capabilities for web. | Product Hunt From 203f78fe36c161678bde39cc859a83a2a7a2f065 Mon Sep 17 00:00:00 2001 From: XYHub Date: Sun, 8 Sep 2024 20:30:59 +0000 Subject: [PATCH 05/16] docs(changeset): init changeset --- .changeset/tasty-ladybugs-battle.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/tasty-ladybugs-battle.md diff --git a/.changeset/tasty-ladybugs-battle.md b/.changeset/tasty-ladybugs-battle.md new file mode 100644 index 0000000..5e90404 --- /dev/null +++ b/.changeset/tasty-ladybugs-battle.md @@ -0,0 +1,8 @@ +--- +'@omi3/audio': patch +'@omi3/utils': patch +'@omi3/tsup': patch +'@omi3/site': patch +--- + +init changeset From c530822e66c04c8005326755a76ffb5de6be5f3f Mon Sep 17 00:00:00 2001 From: XYHub Date: Sun, 8 Sep 2024 20:32:05 +0000 Subject: [PATCH 06/16] chore: add initial changeset --- .changeset/README.md | 8 + .changeset/config.json | 11 + .github/workflows/build.yml | 13 +- .github/workflows/release.yml | 41 +++ .github/workflows/test.yml | 22 +- apps/site/Dockerfile | 4 + apps/site/app/_components/audio/player.tsx | 13 +- apps/site/app/_components/layout/footer.tsx | 4 +- apps/site/app/layout.tsx | 6 +- apps/site/app/page.tsx | 8 +- package.json | 7 +- packages/audio/package.json | 39 +- packages/utils/package.json | 23 +- pnpm-lock.yaml | 381 ++++++++++++++++---- tools/tsup/README.md | 0 tools/tsup/package.json | 20 +- turbo.json | 4 +- 17 files changed, 489 insertions(+), 115 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .github/workflows/release.yml create mode 100644 tools/tsup/README.md diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -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) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..d03b641 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": true, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a9762f6..dc0ffad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,17 @@ name: Build Site Docker Image on: push: - branches: ['main'] - tags: ['v*.*.*'] - pull_request: branches: [main] + tags: [v*.*.*] + pull_request: + branches: ['main'] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}-site + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + jobs: build: runs-on: ubuntu-latest @@ -40,6 +43,7 @@ jobs: uses: docker/metadata-action@v5.5.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push Docker image id: build-and-push uses: docker/build-push-action@v6.7.0 @@ -52,3 +56,6 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + TURBO_TOKEN=${{ secrets.TURBO_TOKEN }} + TURBO_TEAM=${{ vars.TURBO_TEAM }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1bb1e78 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release + +on: + push: + branches: [main] + tags: [v*.*.*] + pull_request: + branches: [main] + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: pnpm/action-setup@v2 + with: + version: 9.1.1 + + - uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'pnpm' + + - run: pnpm install --frozen-lockfile + + - name: Create Release Pull Request or Publish to npm + uses: changesets/action@v1 + with: + publish: pnpm release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2015fe..00f5736 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,27 +4,25 @@ on: branches: [main] pull_request: branches: [main] - jobs: test: timeout-minutes: 60 runs-on: ubuntu-latest + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ vars.TURBO_TEAM }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - uses: pnpm/action-setup@v2 with: version: 9.1.1 - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Install Playwright - run: pnpm exec playwright install --with-deps - - name: Build - run: pnpm build - - name: Run tests - run: pnpm test + - uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm exec playwright install --with-deps + - run: pnpm test - uses: actions/upload-artifact@v4 if: always() with: diff --git a/apps/site/Dockerfile b/apps/site/Dockerfile index cec02e1..d1f148c 100644 --- a/apps/site/Dockerfile +++ b/apps/site/Dockerfile @@ -1,12 +1,16 @@ # Use a base image with pnpm pre-installed FROM node:18-alpine AS base RUN npm install -g pnpm turbo +ARG TURBO_TOKEN +ARG TURBO_TEAM # Build stage FROM base AS builder RUN apk update && apk add --no-cache libc6-compat WORKDIR /app COPY . . +ENV TURBO_TOKEN=$TURBO_TOKEN +ENV TURBO_TEAM=$TURBO_TEAM RUN turbo prune @omi3/site --docker # Install and build stage diff --git a/apps/site/app/_components/audio/player.tsx b/apps/site/app/_components/audio/player.tsx index ac0405c..badf836 100644 --- a/apps/site/app/_components/audio/player.tsx +++ b/apps/site/app/_components/audio/player.tsx @@ -4,8 +4,8 @@ import { Button, Card, CardContent, CardHeader, CardTitle, Progress } from '@omi import { useCallback, useEffect, useMemo, useState } from 'react'; import { AudioChannel } from '@omi3/audio'; -import AudioVisualizer from './visualizer'; import { playtime } from '@omi3/utils'; +import AudioVisualizer from './visualizer'; const sampleMusic = { url: 'https://cdn.pixabay.com/audio/2023/12/29/audio_a1497a53af.mp3', @@ -65,17 +65,20 @@ export function AudioPlayer() { }, [audioChannel, isPlaying]); return ( - + Omi3 Player - +
+ +
-
- {playtime(currentTime)} / {playtime(duration)} +
+ {playtime(currentTime)} + {playtime(duration)}