@clubedge/create-clubedge-app 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +11 -10
- package/dist/deploy-preview.js +2 -0
- package/package.json +3 -3
- package/template/.github/workflows/preview.yml +13 -9
- package/template/apps/start/package.json +1 -1
- package/template/apps/web/package.json +1 -1
- package/template/package.json +1 -1
- package/template/packages/auth/package.json +1 -1
- package/template/packages/auth-better-auth/package.json +1 -1
- package/template/packages/auth-supabase/package.json +1 -1
- package/template/packages/cache/package.json +1 -1
- package/template/packages/cache-redis/package.json +1 -1
- package/template/packages/core/package.json +1 -1
- package/template/packages/db/package.json +1 -1
- package/template/packages/email/package.json +1 -1
- package/template/packages/email-resend/package.json +1 -1
- package/template/packages/email-smtp/package.json +1 -1
- package/template/packages/jobs/package.json +1 -1
- package/template/packages/jobs-pg-boss/package.json +1 -1
- package/template/packages/local-db/package.json +1 -1
- package/template/packages/observability/package.json +1 -1
- package/template/packages/observability-otel/package.json +1 -1
- package/template/packages/observability-sentry/package.json +1 -1
- package/template/packages/payments/package.json +1 -1
- package/template/packages/payments-stripe/package.json +1 -1
- package/template/packages/storage/package.json +1 -1
- package/template/packages/storage-s3/package.json +1 -1
- package/template/packages/storage-supabase/package.json +1 -1
- package/template/packages/ui/package.json +1 -1
- package/template.lock.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `create-clubedge-app` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.30.1
|
|
6
|
+
|
|
7
|
+
Railway previews, fixed after running them for real on the Starter's own pull requests.
|
|
8
|
+
|
|
9
|
+
- `deploy --preview` sets `PORT` on the Railway preview environment (#87). The preview's domain sends traffic to port 3000, but a production service without `PORT` gave the copied environment none: Railway assigned its own port, and the app answered 502.
|
|
10
|
+
- Default to Starter `v0.19.1` (#88), which fixes the Railway step of `.github/workflows/preview.yml`:
|
|
11
|
+
- It works with a workspace token as well as an account token: it no longer runs `railway link`, which needs an account token, since the Railway CLI targets the project from `RAILWAY_PROJECT_ID`.
|
|
12
|
+
- It sets `PORT=3000` on the pull request's environment, for the same reason as above.
|
|
13
|
+
- The pull request comment lists the Vercel and Railway apps separately when both deploy.
|
|
14
|
+
- Tested on the Starter's pull requests: a Neon branch with the migrations, a Vercel and a Railway preview each answering `/api/ready`, and cleanup of the branch and the Railway environment on merge.
|
|
15
|
+
- If your project deploys previews to Railway, run `pnpm clubedge upgrade` to get the fixed `preview.yml`.
|
|
16
|
+
|
|
5
17
|
## 0.30.0
|
|
6
18
|
|
|
7
19
|
- **`--infra neon`** gives a project a hosted Neon database with nothing to install and no account (#84):
|
package/README.md
CHANGED
|
@@ -129,7 +129,7 @@ pnpm dlx @clubedge/create-clubedge-app my-app --yes --no-git --framework tanstac
|
|
|
129
129
|
pnpm dlx @clubedge/create-clubedge-app my-app --ref main
|
|
130
130
|
|
|
131
131
|
# Reproduce a specific Starter release or commit
|
|
132
|
-
pnpm dlx @clubedge/create-clubedge-app my-app --ref v0.19.
|
|
132
|
+
pnpm dlx @clubedge/create-clubedge-app my-app --ref v0.19.1
|
|
133
133
|
pnpm dlx @clubedge/create-clubedge-app my-app --ref <commit-sha>
|
|
134
134
|
|
|
135
135
|
# Test local Starter changes before releasing them
|
|
@@ -148,7 +148,7 @@ pnpm clubedge add email resend payments stripe # several modules as
|
|
|
148
148
|
pnpm clubedge remove storage payments
|
|
149
149
|
pnpm dlx @clubedge/create-clubedge-app add infra local --dry-run
|
|
150
150
|
pnpm dlx @clubedge/create-clubedge-app@latest upgrade # to the newest CLI's Starter release
|
|
151
|
-
pnpm dlx @clubedge/create-clubedge-app upgrade --ref v0.19.
|
|
151
|
+
pnpm dlx @clubedge/create-clubedge-app upgrade --ref v0.19.1 # or a specific tag, branch, or commit
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
The CLI renders the project twice, from the Starter commit and modules recorded in your `package.json` and from the new state, and merges the difference into your project. The new state has other modules for `add` and `remove`, and the newer Starter with the same modules for `upgrade`. Modules a newer Starter introduces start as `none` where possible, so an upgrade never adds a service on its own.
|
|
@@ -259,27 +259,27 @@ Projects created with `--infra neon` also have `.github/workflows/preview.yml`,
|
|
|
259
259
|
Each CLI release is tested against one specific Starter release:
|
|
260
260
|
|
|
261
261
|
```text
|
|
262
|
-
create-clubedge-app v0.30.
|
|
262
|
+
create-clubedge-app v0.30.1
|
|
263
263
|
|
|
|
264
264
|
v
|
|
265
|
-
Clubedge Starter v0.19.
|
|
266
|
-
commit
|
|
265
|
+
Clubedge Starter v0.19.1
|
|
266
|
+
commit b113170a55a6d9990ca418f4968a7f50ebac1bca
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
The current relationship is:
|
|
270
270
|
|
|
271
271
|
| CLI release | Default Starter release | Meaning |
|
|
272
272
|
| --- | --- | --- |
|
|
273
|
-
| `create-clubedge-app@0.30.
|
|
273
|
+
| `create-clubedge-app@0.30.1` | `clubedge-starter@v0.19.1` | The CLI's required, tested default |
|
|
274
274
|
|
|
275
275
|
This means the same CLI version always scaffolds the same Starter revision by default. The CLI does not silently follow Starter `main`.
|
|
276
276
|
|
|
277
|
-
The `v0.19.
|
|
278
|
-
`
|
|
277
|
+
The `v0.19.1` tag is expected to resolve to commit
|
|
278
|
+
`b113170a55a6d9990ca418f4968a7f50ebac1bca`. The CLI verifies this before
|
|
279
279
|
scaffolding with the default reference and fails rather than silently using a
|
|
280
280
|
moved tag.
|
|
281
281
|
|
|
282
|
-
When the Starter changes, its maintainers first publish a new versioned release, such as `v0.19.
|
|
282
|
+
When the Starter changes, its maintainers first publish a new versioned release, such as `v0.19.1`. The CLI is then updated to use that release, all generated-project checks must pass, and a new CLI version is published. This keeps Starter and CLI releases independently versioned while preserving a tested compatibility relationship.
|
|
283
283
|
|
|
284
284
|
Every generated project records its CLI version, Starter repository, Starter ref, Starter commit, framework, and modules in `package.json` and `README.md`.
|
|
285
285
|
|
|
@@ -334,7 +334,7 @@ CI packs the CLI with `npm pack`, scaffolds clean projects from the packed tarba
|
|
|
334
334
|
1. Make and validate changes in `clubedge-starter`.
|
|
335
335
|
2. Run lint, typecheck, unit tests, browser tests, and production build.
|
|
336
336
|
3. Update the Starter package versions.
|
|
337
|
-
4. Commit `main`, create a release tag such as `v0.19.
|
|
337
|
+
4. Commit `main`, create a release tag such as `v0.19.1`, and publish the Starter release.
|
|
338
338
|
|
|
339
339
|
### CLI maintainers
|
|
340
340
|
|
|
@@ -374,6 +374,7 @@ Each phase ends with a Starter release and a CLI release pinned to it. The full
|
|
|
374
374
|
| 0.28.0 | v0.18.0 | `deploy` to Vercel (experimental) |
|
|
375
375
|
| 0.29.0 | v0.18.0 | `deploy` to Netlify and Render (experimental) |
|
|
376
376
|
| 0.30.0 | v0.19.0 | `--infra neon` with a free Neon database, the `neon` command, `deploy --preview` with a Neon branch per preview |
|
|
377
|
+
| 0.30.1 | v0.19.1 | Railway previews work with a workspace token and answer on the port their domain targets |
|
|
377
378
|
| next | | Show the Starter's version of a conflicted file next to yours |
|
|
378
379
|
|
|
379
380
|
## Community
|
package/dist/deploy-preview.js
CHANGED
|
@@ -192,6 +192,8 @@ async function toRailway(project, cli, environment, branch) {
|
|
|
192
192
|
for (const key of ["APP_URL", "NEXT_PUBLIC_APP_URL"]) {
|
|
193
193
|
await railway(rw, ["variable", "set", key, "--stdin", ...scope, "--skip-deploys"], { input: url });
|
|
194
194
|
}
|
|
195
|
+
// The domain sends traffic to appPort; without PORT, Railway assigns its own and the app answers 502.
|
|
196
|
+
await railway(rw, ["variable", "set", "PORT", "--stdin", ...scope, "--skip-deploys"], { input: String(appPort) });
|
|
195
197
|
progress.message("Uploading the project");
|
|
196
198
|
const started = new Date();
|
|
197
199
|
const id = parseDeploymentId(await railway(rw, ["up", ...scope, "--detach"]));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clubedge/create-clubedge-app",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"description": "Create a Next.js or TanStack Start application from the Clubedge Starter reference implementation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.9.0",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"clubedge": {
|
|
24
24
|
"starterRepository": "Clubedge/clubedge-starter",
|
|
25
|
-
"starterRef": "v0.19.
|
|
26
|
-
"starterCommit": "
|
|
25
|
+
"starterRef": "v0.19.1",
|
|
26
|
+
"starterCommit": "b113170a55a6d9990ca418f4968a7f50ebac1bca"
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"repository": {
|
|
@@ -84,8 +84,8 @@ jobs:
|
|
|
84
84
|
# clubedge:end
|
|
85
85
|
# clubedge:if deploy=railway
|
|
86
86
|
# A Railway environment per pull request, copied from production, with the pull request's
|
|
87
|
-
# branch as its database. It needs an account token (RAILWAY_API_TOKEN), since a
|
|
88
|
-
# token can't create environments
|
|
87
|
+
# branch as its database. It needs an account or workspace token (RAILWAY_API_TOKEN), since a
|
|
88
|
+
# project token can't create environments; the CLI finds the project from RAILWAY_PROJECT_ID.
|
|
89
89
|
- name: Deploy the preview to Railway
|
|
90
90
|
id: railway
|
|
91
91
|
if: env.HAS_RAILWAY == 'true'
|
|
@@ -98,9 +98,11 @@ jobs:
|
|
|
98
98
|
run: |
|
|
99
99
|
set -euo pipefail
|
|
100
100
|
railway() { npx --yes @railway/cli@5 "$@"; }
|
|
101
|
-
railway link --project "$RAILWAY_PROJECT_ID" --environment production --service "$RAILWAY_SERVICE"
|
|
102
101
|
railway environment new "$RAILWAY_ENVIRONMENT" --duplicate production --json || true
|
|
103
|
-
|
|
102
|
+
# The image listens on PORT, and the domain below sends traffic to 3000: set it here
|
|
103
|
+
# rather than rely on production having it, since Railway otherwise assigns its own.
|
|
104
|
+
PORT=3000
|
|
105
|
+
for key in DATABASE_URL DATABASE_URL_DIRECT PORT; do
|
|
104
106
|
printf '%s' "${!key}" | railway variable set "$key" --stdin \
|
|
105
107
|
--service "$RAILWAY_SERVICE" --environment "$RAILWAY_ENVIRONMENT" --skip-deploys
|
|
106
108
|
done
|
|
@@ -122,16 +124,19 @@ jobs:
|
|
|
122
124
|
GH_TOKEN: ${{ github.token }}
|
|
123
125
|
PR: ${{ github.event.number }}
|
|
124
126
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
125
|
-
# Empty without
|
|
126
|
-
|
|
127
|
+
# Empty without their deploy step.
|
|
128
|
+
VERCEL_URL: ${{ steps.vercel.outputs.url }}
|
|
129
|
+
RAILWAY_URL: ${{ steps.railway.outputs.url }}
|
|
127
130
|
run: |
|
|
128
131
|
set -euo pipefail
|
|
129
132
|
marker="<!-- clubedge-preview -->"
|
|
130
133
|
body="$marker
|
|
131
134
|
**Preview** for ${HEAD_SHA:0:7}
|
|
132
135
|
- Database: Neon branch \`$NEON_BRANCH\`, with this pull request's migrations"
|
|
133
|
-
if [ -n "$
|
|
134
|
-
- App: $
|
|
136
|
+
if [ -n "$VERCEL_URL" ]; then body="$body
|
|
137
|
+
- App on Vercel: $VERCEL_URL"; fi
|
|
138
|
+
if [ -n "$RAILWAY_URL" ]; then body="$body
|
|
139
|
+
- App on Railway: $RAILWAY_URL"; fi
|
|
135
140
|
id=$(gh api "repos/$GITHUB_REPOSITORY/issues/$PR/comments" --paginate \
|
|
136
141
|
--jq ".[] | select(.body | startswith(\"$marker\")) | .id" | head -n 1)
|
|
137
142
|
if [ -n "$id" ]; then
|
|
@@ -161,6 +166,5 @@ jobs:
|
|
|
161
166
|
RAILWAY_PROJECT_ID: ${{ vars.RAILWAY_PROJECT_ID }}
|
|
162
167
|
RAILWAY_SERVICE: ${{ vars.RAILWAY_SERVICE }}
|
|
163
168
|
run: |
|
|
164
|
-
npx --yes @railway/cli@5 link --project "$RAILWAY_PROJECT_ID" --environment production --service "$RAILWAY_SERVICE"
|
|
165
169
|
npx --yes @railway/cli@5 environment delete "$RAILWAY_ENVIRONMENT" --yes
|
|
166
170
|
# clubedge:end
|
package/template/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clubedge/observability",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Observability interface: error reports and spans for @clubedge/core's telemetry hooks, and an in-memory provider for tests.",
|
|
5
5
|
"private": true,
|
|
6
6
|
"license": "Apache-2.0",
|
package/template.lock.json
CHANGED