Skip to content

Commit e1ad039

Browse files
committed
chore: initialize opencode-3qs-metaads from bun-module template
0 parents  commit e1ad039

31 files changed

Lines changed: 931 additions & 0 deletions

.github/workflows/pr-title.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'LintPrTitle'
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions:
11+
pull-requests: write
12+
13+
jobs:
14+
ValidatePrTitle:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Pr
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
actions: read
13+
contents: read
14+
15+
jobs:
16+
Check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
23+
24+
- name: Setup Tooling
25+
uses: jdx/mise-action@d6e32c1796099e0f1f3ac741c220a8b7eae9e5dd
26+
with:
27+
install: true
28+
cache: true
29+
experimental: true
30+
31+
- name: Run Checks
32+
run: |
33+
mise run setup
34+
mise run lint
35+
mise run test
36+
mise run build

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'npm tag (latest or next)'
8+
required: true
9+
type: choice
10+
options:
11+
- latest
12+
- next
13+
repository_dispatch:
14+
types: [publish-package]
15+
16+
permissions:
17+
id-token: write
18+
contents: read
19+
20+
jobs:
21+
publish:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
fetch-tags: true
28+
29+
- uses: jdx/mise-action@d6e32c1796099e0f1f3ac741c220a8b7eae9e5dd
30+
with:
31+
install: true
32+
cache: true
33+
experimental: true
34+
35+
- name: Build
36+
run: mise run build
37+
38+
- id: inputs
39+
uses: simenandre/setup-inputs@v1
40+
41+
- name: Publish to npm with OIDC
42+
run: |
43+
TAG="${{ steps.inputs.outputs.tag }}"
44+
if [ -z "$TAG" ]; then
45+
TAG="latest"
46+
fi
47+
48+
echo "Publishing with tag: $TAG"
49+
mise run publish --tag "$TAG"

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
process:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
releases_created: ${{ steps.release-please.outputs.releases_created }}
20+
prs_created: ${{ steps.release-please.outputs.prs_created }}
21+
steps:
22+
- uses: google-github-actions/release-please-action@v4
23+
id: release-please
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
release-type: node
27+
skip-github-pull-request: false
28+
29+
dispatch-publish:
30+
needs: process
31+
runs-on: ubuntu-latest
32+
if: needs.process.outputs.releases_created == 'true' || needs.process.outputs.prs_created == 'true'
33+
steps:
34+
- name: Dispatch publish for releases
35+
if: needs.process.outputs.releases_created == 'true'
36+
uses: peter-evans/repository-dispatch@v2
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
event-type: publish-package
40+
client-payload: '{"tag": "latest"}'
41+
42+
- name: Dispatch publish for prerelease
43+
if: needs.process.outputs.prs_created == 'true'
44+
uses: peter-evans/repository-dispatch@v2
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
event-type: publish-package
48+
client-payload: '{"tag": "next"}'

.github/workflows/stale.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Close stale issues and PRs
2+
3+
on:
4+
schedule:
5+
- cron: '30 1 * * *' # Run daily at 1:30 AM UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
stale:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
# Issue settings
19+
stale-issue-message: >
20+
This issue has been automatically marked as stale because it has not had
21+
recent activity. It will be closed in 7 days if no further activity occurs.
22+
Thank you for your contributions.
23+
close-issue-message: >
24+
This issue was closed because it has been stale for 7 days with no activity.
25+
Feel free to reopen if this is still relevant.
26+
days-before-issue-stale: 60
27+
days-before-issue-close: 7
28+
stale-issue-label: 'stale'
29+
30+
# PR settings
31+
stale-pr-message: >
32+
This pull request has been automatically marked as stale because it has not had
33+
recent activity. It will be closed in 14 days if no further activity occurs.
34+
Thank you for your contributions.
35+
close-pr-message: >
36+
This pull request was closed because it has been stale for 14 days with no activity.
37+
Feel free to reopen if you'd like to continue working on this.
38+
days-before-pr-stale: 60
39+
days-before-pr-close: 14
40+
stale-pr-label: 'stale'
41+
42+
# Exempt labels - items with these labels won't be marked stale
43+
exempt-issue-labels: 'pinned,security,bug,enhancement'
44+
exempt-pr-labels: 'pinned,security,work-in-progress'
45+
46+
# Don't stale items with milestones
47+
exempt-all-milestones: true

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules/
2+
dist/
3+
*.log
4+
.DS_Store
5+
.env
6+
.env.local
7+
coverage/
8+
.nyc_output/
9+
.eslintcache
10+
.bun/
11+
.bun.lockb
12+
.memory/

.mise/tasks/build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Build the project"
3+
#MISE depends=["setup"]
4+
#MISE sources=["src/**/*"]
5+
#MISE outputs=["dist/index.js"]
6+
7+
bun build ./src/index.ts --outdir dist --target bun
8+
9+
# If you need to exlude some packages from your bundle, you can use the --external flag. For example, to exclude the "lodash" package, you can run:
10+
# bun build ./src/index.ts --outdir dist --target bun --external lodash

.mise/tasks/dev

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Build for development with sourcemaps and vendor splitting"
3+
#MISE sources=["src/**/*"]
4+
#MISE outputs=["dist/index.js", "dist/index.js.map", "dist/vendor.js"]
5+
6+
bun build ./src/index.ts \
7+
--outdir dist \
8+
--target bun \
9+
--sourcemap=inline \
10+
--splitting \
11+
--entry-naming='[dir]/[name].js' \
12+
--chunk-naming='[name].js'

.mise/tasks/lint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Run ESLint"
3+
bun x eslint . --ext .ts

.mise/tasks/lint:fix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Run ESLint with auto-fix"
3+
eslint . --ext .ts --fix

0 commit comments

Comments
 (0)