Skip to content

Commit 17c75fa

Browse files
feat: files
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
1 parent 0528830 commit 17c75fa

733 files changed

Lines changed: 72366 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": [
11+
"baseai.dev",
12+
"example-astro",
13+
"example-nextjs",
14+
"example-nodejs",
15+
"example-remix"
16+
]
17+
}

.env.baseai.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# !! SERVER SIDE ONLY !!
2+
# Keep all your API keys secret — use only on the server side.
3+
4+
# TODO: ADD: Both in your production and local env files.
5+
# Langbase API key for your User or Org account.
6+
# How to get this API key https://langbase.com/docs/api-reference/api-keys
7+
LANGBASE_API_KEY=
8+
9+
# TODO: ADD: LOCAL ONLY. Add only to local env files.
10+
# Following keys are needed for local pipe runs. For providers you are using.
11+
# For Langbase, please add the key to your LLM keysets.
12+
# Read more: Langbase LLM Keysets https://langbase.com/docs/features/keysets
13+
OPENAI_API_KEY=
14+
ANTHROPIC_API_KEY=
15+
COHERE_API_KEY=
16+
FIREWORKS_API_KEY=
17+
GOOGLE_API_KEY=
18+
GROQ_API_KEY=
19+
MISTRAL_API_KEY=
20+
PERPLEXITY_API_KEY=
21+
TOGETHER_API_KEY=

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@baseai/eslint-config/library.js'],
4+
settings: {
5+
next: {
6+
rootDir: ['apps/*/'],
7+
},
8+
},
9+
};

.github/.roadmap/playwright.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
branches: [ main, master ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: lts/*
16+
- name: Install dependencies
17+
run: npm install -g pnpm && pnpm install
18+
- name: Install Playwright Browsers
19+
run: pnpm exec playwright install --with-deps
20+
- name: Run Playwright tests
21+
run: pnpm exec playwright test
22+
- uses: actions/upload-artifact@v4
23+
if: always()
24+
with:
25+
name: playwright-report
26+
path: playwright-report/
27+
retention-days: 30

.github/.roadmap/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: 'Test'
12+
runs-on: ubuntu-latest
13+
# env:
14+
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
15+
# TURBO_TEAM: ${{ vars.TURBO_TEAM }}
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x]
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup pnpm 8
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: 8.6.9
29+
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v2
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
cache: 'pnpm'
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Install Playwright Browsers
40+
run: pnpm exec playwright install --with-deps
41+
42+
- name: Run tests
43+
run: pnpm test
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Quality
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
prettier:
11+
name: 'Prettier'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v2.2.4
19+
with:
20+
version: 8.6.9
21+
22+
- name: Use Node.js 18
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '18'
26+
cache: 'pnpm'
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Run Prettier check
32+
run: pnpm run prettier-check
33+
34+
eslint:
35+
name: 'ESLint'
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v3
40+
41+
- name: Setup pnpm
42+
uses: pnpm/action-setup@v2.2.4
43+
with:
44+
version: 8
45+
46+
- name: Use Node.js 18
47+
uses: actions/setup-node@v3
48+
with:
49+
node-version: '18'
50+
cache: 'pnpm'
51+
52+
- name: Install dependencies
53+
run: pnpm install --frozen-lockfile
54+
55+
- name: Run ESLint check
56+
run: pnpm run lint
57+
58+
types:
59+
name: 'TypeScript'
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout Repo
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Setup pnpm 8
68+
uses: pnpm/action-setup@v2
69+
with:
70+
version: 8.6
71+
72+
- name: Use Node.js 18
73+
uses: actions/setup-node@v3
74+
with:
75+
node-version: '18'
76+
cache: 'pnpm'
77+
78+
- name: Install dependencies
79+
run: pnpm install --frozen-lockfile
80+
81+
- name: Run TypeScript type check
82+
run: pnpm run type-check
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Snapshot Releases Workflow
2+
3+
# Purpose
4+
# This workflow allows you to create snapshot releases for testing changes in a pull request
5+
# before a full release, without entering pre-release mode.
6+
7+
# Problem
8+
# Changesets enforce pre-release mode across all packages in our mono repo, blocking stable
9+
# releases until pre-release mode is exited.
10+
11+
# Snapshot Releases
12+
# This workflow enables one-off releases from specific branches, known as snapshot releases.
13+
# These are published under the `snapshot` dist-tag with versions like
14+
# `0.4.0-b16419cd576a883e1ddde01bd2fe3f5f54bcc52a-20230913164912`, which include the
15+
# generated version, commit hash, and timestamp.
16+
17+
# Creating a Snapshot Release
18+
# 1. Push your branch to GitHub and commit a changeset. Generate a changeset with `pnpm changeset`.
19+
# 2. Go to the LangbaseInc/baseai repository on GitHub.
20+
# 3. Navigate to Actions > Release Snapshot.
21+
# 4. Click "Run workflow", select your branch, and click "Run workflow".
22+
# Inspired by turbo repo.
23+
24+
name: Release Snapshot
25+
26+
on:
27+
workflow_dispatch:
28+
29+
jobs:
30+
release-snapshot:
31+
name: Release Snapshot
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout Repo
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Setup pnpm 8
40+
uses: pnpm/action-setup@v2
41+
with:
42+
version: 8.6.9
43+
44+
- name: Setup Node.js 18.x
45+
uses: actions/setup-node@v2
46+
with:
47+
node-version: 18.x
48+
49+
- name: Add npm auth token to pnpm
50+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
51+
env:
52+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
53+
54+
- name: Install Dependencies
55+
run: pnpm i
56+
57+
- name: Build
58+
run: pnpm clean && pnpm build
59+
60+
- name: Add SHORT_SHA env property with commit short sha
61+
run: echo "SHORT_SHA=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
62+
63+
- name: Create Snapshot Release
64+
run: |
65+
pnpm changeset version --snapshot ${SHORT_SHA}
66+
pnpm clean-examples
67+
pnpm changeset publish --no-git-tag --tag snapshot
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '.changeset/**'
9+
- '.github/workflows/release.yml'
10+
workflow_dispatch:
11+
12+
concurrency: ${{ github.workflow }}-${{ github.ref }}
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup pnpm 8
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: 8.6.9
29+
30+
- name: Setup Node.js 18.x
31+
uses: actions/setup-node@v2
32+
with:
33+
node-version: 18.x
34+
35+
- name: Install Dependencies
36+
run: pnpm i
37+
38+
- name: Create Release Pull Request or Publish to npm
39+
id: changesets
40+
uses: changesets/action@v1
41+
with:
42+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
43+
publish: pnpm release
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
48+
# - name: Send a Slack notification if a publish happens
49+
# if: steps.changesets.outputs.published == 'true'
50+
# # You can do something when a publish happens.
51+
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"

0 commit comments

Comments
 (0)