Skip to content

Commit da4cc3e

Browse files
authored
Merge pull request #253 from underctrl-io/rewrite-docs
Rewrite docs guide
2 parents 0ca7a00 + a3049bb commit da4cc3e

File tree

176 files changed

+10408
-5146
lines changed

Some content is hidden

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

176 files changed

+10408
-5146
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
- '!renovate/*'
8+
9+
jobs:
10+
check-types:
11+
name: Check Types
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: '10.14.0'
18+
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 24
24+
registry-url: https://registry.npmjs.org
25+
26+
- name: Install Dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Check TypeScript Types
30+
run: pnpm dlx turbo check-types
31+
32+
prettier:
33+
name: Prettier Check
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 10
36+
steps:
37+
- uses: pnpm/action-setup@v4
38+
with:
39+
version: '10.14.0'
40+
41+
- uses: actions/checkout@v4
42+
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: 24
46+
registry-url: https://registry.npmjs.org
47+
48+
- name: Install Dependencies
49+
run: pnpm install --frozen-lockfile
50+
51+
- name: Check Prettier Formatting
52+
run: pnpm prettier:check

.github/workflows/lint.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/publish-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-node@v4
2121
with:
22-
node-version: 22
22+
node-version: 24
2323
registry-url: https://registry.npmjs.org
2424

2525
- name: Install dependencies

.github/workflows/publish-latest.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 22
21+
node-version: 24
2222
registry-url: https://registry.npmjs.org
2323

2424
- name: Install dependencies
@@ -39,12 +39,30 @@ jobs:
3939
"@commandkit/i18n:packages/i18n"
4040
"@commandkit/devtools:packages/devtools"
4141
"@commandkit/cache:packages/cache"
42+
"@commandkit/analytics:packages/analytics"
43+
"@commandkit/ai:packages/ai"
4244
"@commandkit/queue:packages/queue"
4345
"@commandkit/tasks:packages/tasks"
4446
)
4547
4648
for entry in "${PACKAGES[@]}"; do
4749
IFS=":" read -r name path <<< "$entry"
4850
echo "Publishing $name..."
49-
(pnpm --filter="$name" publish --no-git-checks --access public && echo "✅ Published $name") || echo "❌ Failed to publish $name"
51+
52+
VERSION=$(node -p "require('./$path/package.json').version")
53+
54+
if npm view "$name@$VERSION" version >/dev/null 2>&1; then
55+
echo "📦 $name@$VERSION already exists on npm, skipping..."
56+
else
57+
if pnpm --filter="$name" publish --no-git-checks --access public; then
58+
echo "✅ Published $name@$VERSION"
59+
else
60+
if npm view "$name@$VERSION" version >/dev/null 2>&1; then
61+
echo "📦 $name@$VERSION was published by another process, skipping..."
62+
else
63+
echo "❌ Failed to publish $name@$VERSION"
64+
exit 1
65+
fi
66+
fi
67+
fi
5068
done

.github/workflows/publish-rc.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Publish release candidate builds
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
rc_version:
7+
description: 'Release candidate version number (e.g., 1 for -rc1, 2 for -rc2)'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
publish:
13+
name: Publish release candidate builds
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: pnpm/action-setup@v4
17+
with:
18+
version: '10.14.0'
19+
20+
- uses: actions/checkout@v4
21+
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 24
25+
registry-url: https://registry.npmjs.org
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Validate RC version input
31+
run: |
32+
if ! [[ "${{ github.event.inputs.rc_version }}" =~ ^[0-9]+$ ]]; then
33+
echo "❌ RC version must be a positive integer"
34+
exit 1
35+
fi
36+
37+
- name: Update package versions
38+
run: |
39+
rc_suffix="-rc${{ github.event.inputs.rc_version }}"
40+
echo "Adding suffix: $rc_suffix"
41+
42+
for dir in packages/*; do
43+
[ -f "$dir/package.json" ] || continue
44+
echo "Updating $dir/package.json..."
45+
node -e "
46+
const fs = require('fs');
47+
const path = './$dir/package.json';
48+
const pkg = require(path);
49+
pkg.version += '$rc_suffix';
50+
fs.writeFileSync(path, JSON.stringify(pkg, null, 2));
51+
console.log('Updated ' + pkg.name + ' to version ' + pkg.version);
52+
"
53+
done
54+
55+
- name: Build packages
56+
run: pnpm dlx turbo build --filter='./packages/*'
57+
58+
- name: Publish packages
59+
env:
60+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
61+
run: |
62+
PACKAGES=(
63+
"commandkit:packages/commandkit"
64+
"create-commandkit:packages/create-commandkit"
65+
"@commandkit/legacy:packages/legacy"
66+
"@commandkit/redis:packages/redis"
67+
"@commandkit/i18n:packages/i18n"
68+
"@commandkit/devtools:packages/devtools"
69+
"@commandkit/cache:packages/cache"
70+
"@commandkit/analytics:packages/analytics"
71+
"@commandkit/ai:packages/ai"
72+
"@commandkit/queue:packages/queue"
73+
"@commandkit/tasks:packages/tasks"
74+
)
75+
76+
for entry in "${PACKAGES[@]}"; do
77+
IFS=":" read -r name path <<< "$entry"
78+
echo "Publishing $name..."
79+
80+
VERSION=$(node -p "require('./$path/package.json').version")
81+
82+
if npm view "$name@$VERSION" version >/dev/null 2>&1; then
83+
echo "📦 $name@$VERSION already exists on npm, skipping..."
84+
else
85+
if pnpm --filter="$name" publish --no-git-checks --access public --tag next; then
86+
echo "✅ Published $name@$VERSION under 'next' tag"
87+
else
88+
if npm view "$name@$VERSION" version >/dev/null 2>&1; then
89+
echo "📦 $name@$VERSION was published by another process, skipping..."
90+
else
91+
echo "❌ Failed to publish $name@$VERSION"
92+
exit 1
93+
fi
94+
fi
95+
fi
96+
done
97+
98+
- name: Summary
99+
run: |
100+
echo "🎉 Release candidate build completed!"
101+
echo "📋 Summary:"
102+
echo " RC Version: ${{ github.event.inputs.rc_version }}"
103+
echo " Tag: next"
104+
echo " Suffix: -rc${{ github.event.inputs.rc_version }}"

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22

33
**/website/docs/api-reference
4+
**/website/docs/guide.old
45
**/website/versioned_docs
56
**/website/versioned_sidebars
67
.docusaurus

.prettierrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,14 @@
77
"semi": true,
88
"endOfLine": "lf",
99
"useTabs": false,
10-
"jsxSingleQuote": false
10+
"jsxSingleQuote": false,
11+
"overrides": [
12+
{
13+
"files": ["*.md", "*.mdx"],
14+
"options": {
15+
"proseWrap": "always",
16+
"printWidth": 70
17+
}
18+
}
19+
]
1120
}

0 commit comments

Comments
 (0)