chore: to monorepo

This commit is contained in:
Neko Ayaka
2024-12-03 16:07:57 +08:00
parent 11f40cb80b
commit ee4878710e
59 changed files with 1791 additions and 1801 deletions
-76
View File
@@ -1,76 +0,0 @@
name: Build Previewing Docs
on:
pull_request:
branches:
- main
env:
STORE_PATH: ''
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
name: Build - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
# This is quite weird.
# Eventhough this is the *intended* solution introduces in official blog post here
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.
# But still, as https://github.com/orgs/community/discussions/25220#discussioncomment-7856118 stated,
# this is vulnerable since there is no source of truth about which PR in the triggered workflow.
- name: Presist PR number
run: |
echo "${{ github.event.number }}" > pr_num
- name: Upload PR artifact
uses: actions/upload-artifact@v4
with:
name: pr-num
path: ./pr_num
overwrite: true
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Site
run: pnpm build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: site-${{ matrix.os }}-build
path: dist
overwrite: true
@@ -1,151 +0,0 @@
name: Push Previewing Docs to Netlify
on:
workflow_run:
workflows:
- Build Previewing Docs
types:
- completed
env:
PR_NUM: 0
STORE_PATH: ''
UBUNTU_NETLIFY_JSON_OUTPUT: ''
UBUNTU_NETLIFY_URL: ''
WINDOWS_NETLIFY_JSON_OUTPUT: ''
WINDOWS_NETLIFY_URL: ''
jobs:
on-success:
name: Deploy to Netlify
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download artifact - PR
uses: dawidd6/action-download-artifact@v7
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
name: pr-num
path: pr-num
allow_forks: true
- name: Obtain PR number
id: pr-num
run: |
echo "PR_NUM=$(cat pr-num/pr_num)" >> $GITHUB_ENV
- name: Download artifact - Ubuntu
uses: dawidd6/action-download-artifact@v7
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
name: site-ubuntu-latest-build
path: site-ubuntu-latest-build
allow_forks: true
- name: Install Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
run_install: false
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Netlify CLI
run: pnpm install -g netlify-cli@17.36.0
- name: Push to Netlify - Ubuntu
id: netlify-ubuntu-latest
timeout-minutes: 10
run: |
UBUNTU_NETLIFY_JSON_OUTPUT=$(netlify deploy --dir site-ubuntu-latest-build --json)
echo $UBUNTU_NETLIFY_JSON_OUTPUT
echo "UBUNTU_NETLIFY_JSON_OUTPUT=$(echo $UBUNTU_NETLIFY_JSON_OUTPUT)" >> $GITHUB_ENV
echo "UBUNTU_NETLIFY_URL=$(echo $UBUNTU_NETLIFY_JSON_OUTPUT | jq -r .deploy_url)" >> $GITHUB_ENV
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ env.PR_NUM }}
comment-author: 'github-actions[bot]'
body-includes: to Netlify
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ env.PR_NUM }}
body: |
## ✅ Successfully deployed to Netlify
| Platform | Status | URL |
|:---------|:------------|:---------------------------------|
| Ubuntu | Success | ${{ env.UBUNTU_NETLIFY_URL }} |
edit-mode: replace
on-failure:
name: Failed to build previewing docs
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Download artifact - PR
uses: dawidd6/action-download-artifact@v7
with:
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
name: pr-num
path: pr-num
allow_forks: true
- name: Obtain PR number
id: pr-num
run: |
echo "PR_NUM=$(cat pr-num/pr_num)" >> $GITHUB_ENV
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ env.PR_NUM }}
comment-author: 'github-actions[bot]'
body-includes: to Netlify
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ env.PR_NUM }}
body: |
## ❌ Failed to deploy to Netlify
| Platform | Status | URL |
|:---------|:------------|:------------------------------------------------------|
| Ubuntu | Failed | Please check the status and logs of the workflow run. |
edit-mode: replace
@@ -1,69 +0,0 @@
name: Build Docs to Netlify
on:
push:
branches:
- main
env:
STORE_PATH: ''
jobs:
build:
name: Build
runs-on: ubuntu-24.04
environment:
name: Production Docs
url: https://nolebase-integrations.ayaka.io
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Site
run: |
pnpm build
ls -la dist/assets
env:
# As suggested in Verbose Build option to be able to track down errors https://github.com/vuejs/vitepress/issues/422
# vitepress build command does not have --debug option, so we need to set it manually where the debug package is used.
# DEBUG: 'vitepress:*'
VUE_PROD_HYDRATION_MISMATCH_DETAILS_FLAG: '1'
- name: Install Netlify CLI
run: pnpm install -g netlify-cli@17.36.0
- name: Push to Netlify
timeout-minutes: 10
run: |
netlify deploy --dir 'dist' --prod --debug
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+3 -1
View File
@@ -13,7 +13,7 @@ components.d.ts
dist
node_modules
.eslintcache
.cache/
**/.cache/**
**/.vitepress/docsMetadata.json
**/.vitepress/cache/
@@ -21,3 +21,5 @@ node_modules
**/.netlify/functions-serve/*
coverage/
**/public/assets/js/*
**/public/assets/live2d/models/*
+3
View File
@@ -6,6 +6,8 @@ words:
- acubismmotion
- airi-vtuber
- Attributify
- Ayaka
- bumpp
- composables
- csmmap
- csmvector
@@ -26,6 +28,7 @@ words:
- live2dcubismcore
- live2dcubismframework
- Myriam
- Neko
- nekomeowww
- Neuro
- Neuro-sama
+33 -72
View File
@@ -1,100 +1,61 @@
{
"name": "airi-vtuber",
"type": "module",
"private": true,
"packageManager": "pnpm@9.14.4",
"description": "LLM powered virtual character",
"author": {
"name": "Neko Ayaka",
"email": "neko@ayaka.moe",
"url": "https://github.com/nekomeowww"
},
"license": "MIT",
"scripts": {
"build": "vite build",
"dev": "vite --port 3333 --open",
"lint": "eslint .",
"preview": "vite preview",
"preview-https": "serve dist",
"test": "vitest",
"test:unit": "vitest",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint --cache .",
"lint:fix": "eslint --cache --fix .",
"typecheck": "pnpm -r --filter=./packages/* run build",
"dev": "pnpm packages:dev",
"build": "pnpm packages:build",
"packages:dev": "pnpm -r --filter=./packages/* run dev",
"packages:build": "pnpm -r --filter=./packages/* run build",
"test": "vitest --coverage",
"test:run": "vitest run",
"up": "taze major -I",
"postinstall": "npx simple-git-hooks",
"sizecheck": "npx vite-bundle-visualizer"
},
"dependencies": {
"@11labs/client": "^0.0.4",
"@ai-sdk/openai": "^1.0.5",
"@pixi/app": "^6.5.10",
"@pixi/constants": "6",
"@pixi/core": "6",
"@pixi/display": "6",
"@pixi/extensions": "^6.5.10",
"@pixi/loaders": "6",
"@pixi/math": "6",
"@pixi/runner": "6",
"@pixi/settings": "6",
"@pixi/sprite": "6",
"@pixi/ticker": "^6.5.10",
"@pixi/utils": "6",
"@types/yauzl": "^2.10.3",
"@unhead/vue": "^1.11.13",
"@unocss/reset": "^0.65.0",
"@vueuse/core": "^12.0.0",
"@vueuse/head": "^2.0.0",
"ai": "^4.0.10",
"nprogress": "^0.2.0",
"ofetch": "^1.4.1",
"openai": "^4.74.0",
"pinia": "^2.2.8",
"pixi-live2d-display": "^0.4.0",
"rehype-stringify": "^10.0.1",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.1",
"unified": "^11.0.5",
"vue": "^3.5.13",
"vue-demi": "^0.14.10",
"vue-i18n": "^10.0.5",
"vue-router": "^4.5.0",
"yauzl": "^3.2.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@antfu/eslint-config": "^3.11.2",
"@iconify-json/carbon": "^1.2.4",
"@intlify/unplugin-vue-i18n": "^6.0.0",
"@shikijs/markdown-it": "^1.24.0",
"@types/markdown-it-link-attributes": "^3.0.5",
"@types/nprogress": "^0.2.3",
"@antfu/ni": "^0.23.1",
"@cspell/dict-ru_ru": "^2.2.4",
"@types/node": "^22.10.1",
"@unocss/eslint-config": "^0.65.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vue-macros/volar": "^0.30.6",
"critters": "^0.0.25",
"@unocss/eslint-plugin": "^0.65.0",
"bumpp": "^9.8.1",
"cross-env": "^7.0.3",
"eslint": "^9.16.0",
"eslint-plugin-cypress": "^4.1.0",
"eslint-plugin-format": "^0.1.3",
"https-localhost": "^4.7.1",
"lint-staged": "^15.2.10",
"markdown-it-link-attributes": "^4.0.1",
"pnpm": "^9.14.4",
"rollup": "^4.28.0",
"shiki": "^1.24.0",
"simple-git-hooks": "^2.11.1",
"taze": "^0.18.0",
"typescript": "~5.7.2",
"unocss": "^0.65.0",
"unplugin-auto-import": "^0.18.6",
"unplugin-vue-components": "^0.27.5",
"unplugin-vue-macros": "^2.13.4",
"unplugin-vue-markdown": "^0.27.1",
"unplugin-vue-router": "^0.10.8",
"vite": "^6.0.2",
"vite-bundle-visualizer": "^1.2.1",
"vite-plugin-inspect": "^0.10.2",
"vite-plugin-pwa": "^0.21.1",
"vite-plugin-vue-devtools": "^7.6.7",
"vite-plugin-vue-layouts": "^0.11.0",
"vite-plugin-webfont-dl": "^3.10.2",
"vitest": "^2.1.8",
"vue-tsc": "^2.1.10"
"vite-plugin-inspect": "^0.10.3",
"vitest": "^2.1.8"
},
"resolutions": {
"vite": "^6.0.2",
"vite-plugin-inspect": "^0.10.2"
"workspaces": [
"packages/*",
"docs"
],
"pnpm": {
"override": {
"@babel/preset-env": "7.26.0",
"workbox-build": "7.3.0"
}
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
+79
View File
@@ -0,0 +1,79 @@
{
"name": "@airi-vtuber/stage",
"type": "module",
"private": true,
"packageManager": "pnpm@9.14.4",
"description": "LLM powered virtual character",
"author": {
"name": "Neko Ayaka",
"email": "neko@ayaka.moe",
"url": "https://github.com/nekomeowww"
},
"license": "MIT",
"scripts": {
"build": "vite build",
"dev": "vite",
"lint": "eslint .",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"@11labs/client": "^0.0.4",
"@ai-sdk/openai": "^1.0.5",
"@pixi/app": "^6.5.10",
"@pixi/constants": "6",
"@pixi/core": "6",
"@pixi/display": "6",
"@pixi/extensions": "^6.5.10",
"@pixi/loaders": "6",
"@pixi/math": "6",
"@pixi/runner": "6",
"@pixi/settings": "6",
"@pixi/sprite": "6",
"@pixi/ticker": "^6.5.10",
"@pixi/utils": "6",
"@types/yauzl": "^2.10.3",
"@unhead/vue": "^1.11.13",
"@unocss/reset": "^0.65.0",
"@vueuse/core": "^12.0.0",
"@vueuse/head": "^2.0.0",
"ai": "^4.0.10",
"nprogress": "^0.2.0",
"ofetch": "^1.4.1",
"openai": "^4.74.0",
"pinia": "^2.2.8",
"pixi-live2d-display": "^0.4.0",
"rehype-stringify": "^10.0.1",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.1",
"unified": "^11.0.5",
"vue": "^3.5.13",
"vue-demi": "^0.14.10",
"vue-i18n": "^10.0.5",
"vue-router": "^4.5.0",
"yauzl": "^3.2.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@iconify-json/carbon": "^1.2.4",
"@intlify/unplugin-vue-i18n": "^6.0.0",
"@shikijs/markdown-it": "^1.24.0",
"@types/markdown-it-link-attributes": "^3.0.5",
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.2.1",
"@vue-macros/volar": "^0.30.6",
"markdown-it-link-attributes": "^4.0.1",
"shiki": "^1.24.0",
"unplugin-auto-import": "^0.18.6",
"unplugin-vue-components": "^0.27.5",
"unplugin-vue-macros": "^2.13.4",
"unplugin-vue-markdown": "^0.27.1",
"unplugin-vue-router": "^0.10.8",
"vite-bundle-visualizer": "^1.2.1",
"vite-plugin-pwa": "^0.21.1",
"vite-plugin-vue-devtools": "^7.6.7",
"vite-plugin-vue-layouts": "^0.11.0",
"vite-plugin-webfont-dl": "^3.10.2",
"vue-tsc": "^2.1.10"
}
}

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View File
+1
View File
@@ -0,0 +1 @@
export * from '../../uno.config'
+1669 -1415
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
packages:
- 'packages/**'
- '!**/dist/**'
-17
View File
@@ -1,17 +0,0 @@
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
AudioWaveform: typeof import('./components/AudioWaveform.vue')['default']
BasicTextarea: typeof import('./components/BasicTextarea.vue')['default']
Live2DViewer: typeof import('./components/Live2DViewer.vue')['default']
MainStage: typeof import('./components/MainStage.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}