chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:18:05 +08:00
commit acd8e21031
297 changed files with 56514 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Package version (please fill the releated package info)**
- @manycore/aholo-viewer: [e.g. 1.0.0]
**Desktop (please complete the following information optional, only if you found the issue):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information, optional, only if you found the issue):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Viewer Config (If possible, please complete the content, the config you used when call `setViewConfig`)**
```typescript
{
// fill the config here.
}
```
**Check List**
- [ ] Can you reproduce the issue on https://aholojs.dev/en-US/viewer/?
- [ ] Can you reproduce the issue on the latest version?
**Additional context**
Add any other context about the problem here.
+7
View File
@@ -0,0 +1,7 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---
+19
View File
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+144
View File
@@ -0,0 +1,144 @@
on:
push:
branches:
- 'master'
paths:
- 'packages/splat-transform-native/source/**'
pull_request:
branches:
- 'master'
paths:
- 'packages/splat-transform-native/source/**'
workflow_dispatch:
name: build native
env:
NODE_VERSION: 24
jobs:
build-splat-transform-native:
name: Build splat-transform native (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: win32-x64-msvc
native-script: build:native:win32-x64
os: windows-2025-vs2026
shell: pwsh
- target: win32-arm64-msvc
native-script: build:native:win32-arm64
os: windows-11-vs2026-arm
shell: pwsh
- target: linux-x64-gnu
native-script: build:native:linux-x64-gnu
os: ubuntu-22.04
shell: bash
- target: linux-arm64-gnu
native-script: build:native:linux-arm64-gnu
os: ubuntu-22.04-arm
shell: bash
- target: darwin-arm64
native-script: build:native:darwin-arm64
os: macos-26
shell: bash
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
lfs: true
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install workspace dependencies
run: |
corepack enable
corepack install
pnpm install
- name: Setup env (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
wget https://apt.llvm.org/llvm.sh
chmod a+x ./llvm.sh
sudo ./llvm.sh 21
sudo apt-get update
sudo apt-get install -y clang-21 clang-tools-21 lld-21 ninja-build pkg-config nasm
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 20
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-21 20
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-21 20
sudo update-alternatives --set clang /usr/bin/clang-21
sudo update-alternatives --set clang++ /usr/bin/clang++-21
sudo update-alternatives --set cc /usr/bin/clang-21
sudo update-alternatives --set c++ /usr/bin/clang++-21
cmake --version
cc --version
c++ --version
ninja --version
- name: Setup env (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew install ninja nasm
cmake --version
clang --version
ninja --version
- name: Setup vcpkg (Windows)
if: startsWith(matrix.os, 'windows')
run: |
if ($env:VCPKG_INSTALLATION_ROOT -and (Test-Path $env:VCPKG_INSTALLATION_ROOT)) {
$vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
} else {
$vcpkgRoot = Join-Path $env:RUNNER_TEMP "vcpkg"
git clone https://github.com/microsoft/vcpkg $vcpkgRoot
& (Join-Path $vcpkgRoot "bootstrap-vcpkg.bat") -disableMetrics
}
"VCPKG_ROOT=$vcpkgRoot" >> $env:GITHUB_ENV
- name: Setup vcpkg (Unix)
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
if [ -n "${VCPKG_INSTALLATION_ROOT:-}" ] && [ -d "${VCPKG_INSTALLATION_ROOT}" ]; then
vcpkg_root="${VCPKG_INSTALLATION_ROOT}"
else
vcpkg_root="${RUNNER_TEMP}/vcpkg"
git clone https://github.com/microsoft/vcpkg "${vcpkg_root}"
"${vcpkg_root}/bootstrap-vcpkg.sh" -disableMetrics
fi
echo "VCPKG_ROOT=${vcpkg_root}" >> "${GITHUB_ENV}"
- name: Build splat-transform native
working-directory: packages/splat-transform-native/source
run: pnpm run ${{ matrix.native-script }}
- name: Validate native package (Windows)
if: startsWith(matrix.os, 'windows')
run: |
if (!(Test-Path ./packages/splat-transform-native/splat-transform-${{ matrix.target }}/splat-transform.node)) {
throw "Missing splat-transform.node"
}
node -e "require('./packages/splat-transform-native/splat-transform-${{ matrix.target }}/splat-transform.node'); console.log('native require ok')"
- name: Validate native package (Unix)
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
test -f ./packages/splat-transform-native/splat-transform-${{ matrix.target }}/splat-transform.node
node -e "require('./packages/splat-transform-native/splat-transform-${{ matrix.target }}/splat-transform.node'); console.log('native require ok')"
- name: Upload native package
uses: actions/upload-artifact@v7
with:
name: splat-transform-${{ matrix.target }}
path: packages/splat-transform-native/splat-transform-${{ matrix.target }}/splat-transform.node
if-no-files-found: error
+26
View File
@@ -0,0 +1,26 @@
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
name: check
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
lfs: true
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: 24
- run: |
chmod a+x ./ci/check.sh
./ci/check.sh
+123
View File
@@ -0,0 +1,123 @@
on: workflow_dispatch
name: publish
env:
NODE_VERSION: 24
jobs:
publish:
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
environment:
name: publish
deployment: false
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
lfs: true
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Check splat-transform publish status
id: splat-transform
run: |
package_name="$(node -p "require('./packages/splat-transform/package.json').name")"
package_version="$(node -p "require('./packages/splat-transform/package.json').version")"
if npm view "${package_name}@${package_version}" version --registry=https://registry.npmjs.org --silent >/dev/null 2>&1; then
echo "${package_name}@${package_version} already exists on npm."
echo "needs_publish=false" >> "$GITHUB_OUTPUT"
else
echo "${package_name}@${package_version} is not published yet."
echo "needs_publish=true" >> "$GITHUB_OUTPUT"
fi
- name: Resolve latest native build
if: steps.splat-transform.outputs.needs_publish == 'true'
id: native-build
env:
GH_TOKEN: ${{ github.token }}
run: |
run_id="$(gh api --method GET "/repos/${{ github.repository }}/actions/workflows/build-native.yaml/runs" -f branch=master -f status=success -f per_page=1 --jq '.workflow_runs[0].id // empty')"
if [ -z "$run_id" ]; then
echo "No successful build-native workflow run found on master." >&2
exit 1
fi
echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
- name: Download native packages
if: steps.splat-transform.outputs.needs_publish == 'true'
uses: actions/download-artifact@v7
with:
pattern: splat-transform-*
path: packages/splat-transform-native
merge-multiple: false
repository: ${{ github.repository }}
run-id: ${{ steps.native-build.outputs.run_id }}
github-token: ${{ github.token }}
- name: Publish packages
id: publish-packages
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
set -o pipefail
publish_log="$(mktemp)"
chmod a+x ./ci/publish.sh
./ci/publish.sh | tee "$publish_log"
if grep -q '^published:$' "$publish_log"; then
echo "has_published=true" >> "$GITHUB_OUTPUT"
else
echo "has_published=false" >> "$GITHUB_OUTPUT"
fi
- name: Create GitHub releases
if: steps.publish-packages.outputs.has_published == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
releases=(
"packages/splat-transform|splat-transform|false"
"packages/renderer|aholo-viewer|true"
)
for release in "${releases[@]}"; do
IFS='|' read -r package_dir tag_prefix make_latest <<< "$release"
package_name="$(node -p "require('./${package_dir}/package.json').name")"
package_version="$(node -p "require('./${package_dir}/package.json').version")"
tag_name="${tag_prefix}@${package_version}"
release_name="${tag_prefix} ${package_version}"
if gh release view "$tag_name" --repo "${{ github.repository }}" >/dev/null 2>&1; then
echo "GitHub release ${tag_name} already exists."
continue
fi
echo "Creating GitHub release ${tag_name} for ${package_name}@${package_version}."
release_notes_file="$(mktemp)"
node scripts/read-package-changelog.mjs "$package_name" "$package_version" > "$release_notes_file"
if git ls-remote --exit-code --tags origin "refs/tags/${tag_name}" >/dev/null 2>&1; then
git fetch --force --depth=1 origin "refs/tags/${tag_name}:refs/tags/${tag_name}"
if ! git cat-file -e "${tag_name}^{tag}" 2>/dev/null; then
echo "Tag ${tag_name} already exists but is not an annotated tag." >&2
exit 1
fi
echo "Annotated tag ${tag_name} already exists."
else
git tag -a "$tag_name" "$GITHUB_SHA" -m "$tag_name"
git push origin "refs/tags/${tag_name}"
fi
gh api --method POST "/repos/${{ github.repository }}/releases" \
-f tag_name="$tag_name" \
-f target_commitish="$GITHUB_SHA" \
-f name="$release_name" \
-F body=@"$release_notes_file" \
-f make_latest="$make_latest" >/dev/null
done