@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.
Files changed (31) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +11 -10
  3. package/dist/deploy-preview.js +2 -0
  4. package/package.json +3 -3
  5. package/template/.github/workflows/preview.yml +13 -9
  6. package/template/apps/start/package.json +1 -1
  7. package/template/apps/web/package.json +1 -1
  8. package/template/package.json +1 -1
  9. package/template/packages/auth/package.json +1 -1
  10. package/template/packages/auth-better-auth/package.json +1 -1
  11. package/template/packages/auth-supabase/package.json +1 -1
  12. package/template/packages/cache/package.json +1 -1
  13. package/template/packages/cache-redis/package.json +1 -1
  14. package/template/packages/core/package.json +1 -1
  15. package/template/packages/db/package.json +1 -1
  16. package/template/packages/email/package.json +1 -1
  17. package/template/packages/email-resend/package.json +1 -1
  18. package/template/packages/email-smtp/package.json +1 -1
  19. package/template/packages/jobs/package.json +1 -1
  20. package/template/packages/jobs-pg-boss/package.json +1 -1
  21. package/template/packages/local-db/package.json +1 -1
  22. package/template/packages/observability/package.json +1 -1
  23. package/template/packages/observability-otel/package.json +1 -1
  24. package/template/packages/observability-sentry/package.json +1 -1
  25. package/template/packages/payments/package.json +1 -1
  26. package/template/packages/payments-stripe/package.json +1 -1
  27. package/template/packages/storage/package.json +1 -1
  28. package/template/packages/storage-s3/package.json +1 -1
  29. package/template/packages/storage-supabase/package.json +1 -1
  30. package/template/packages/ui/package.json +1 -1
  31. 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.0
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.0 # or a specific tag, branch, or commit
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.0
262
+ create-clubedge-app v0.30.1
263
263
  |
264
264
  v
265
- Clubedge Starter v0.19.0
266
- commit 1fa6afcefb99f26332f08cd08ac63f6b229cafda
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.0` | `clubedge-starter@v0.19.0` | The CLI's required, tested default |
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.0` tag is expected to resolve to commit
278
- `1fa6afcefb99f26332f08cd08ac63f6b229cafda`. The CLI verifies this before
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.0`. 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.
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.0`, and publish the Starter release.
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
@@ -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.0",
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.0",
26
- "starterCommit": "1fa6afcefb99f26332f08cd08ac63f6b229cafda"
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 project
88
- # token can't create environments, and the RAILWAY_PROJECT_ID and RAILWAY_SERVICE variables.
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
- for key in DATABASE_URL DATABASE_URL_DIRECT; do
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 a deploy step.
126
- URL: ${{ steps.vercel.outputs.url || steps.railway.outputs.url }}
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 "$URL" ]; then body="$body
134
- - App: $URL"; fi
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/start",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/web",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clubedge-starter-v1",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "packageManager": "pnpm@10.9.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/auth",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/auth-better-auth",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Better Auth adapter for @clubedge/auth, storing users and sessions in your own PostgreSQL.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/auth-supabase",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Supabase Auth adapter for @clubedge/auth.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/cache",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/cache-redis",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Redis rate limiter and cache for @clubedge/cache.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/core",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/db",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/email",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Email interface, console and in-memory providers, and message templates.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/email-resend",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Resend provider for @clubedge/email, through Resend's HTTP API.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/email-smtp",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "SMTP provider for @clubedge/email, for any SMTP server.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/jobs",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Background jobs interface: job definitions, a queue contract, and an in-memory queue.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/jobs-pg-boss",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "pg-boss provider for @clubedge/jobs: a job queue stored in the project's PostgreSQL.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/local-db",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "PostgreSQL for development without Docker: PGlite served over the PostgreSQL protocol.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/observability",
3
- "version": "0.19.0",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/observability-otel",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "OpenTelemetry provider for @clubedge/observability: traces and error logs exported over OTLP to any collector.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/observability-sentry",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Sentry provider for @clubedge/observability: server and browser errors, traces, and source map uploads.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/payments",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Provider-neutral payments: the PaymentProvider interface, billing logic, and subscription tables.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/payments-stripe",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Stripe provider for @clubedge/payments: Checkout, the customer portal, and verified webhooks.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/storage",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/storage-s3",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "S3-compatible adapter for @clubedge/storage.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/storage-supabase",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Supabase Storage adapter for @clubedge/storage.",
5
5
  "private": true,
6
6
  "license": "Apache-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubedge/ui",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "private": true,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "repository": "Clubedge/clubedge-starter",
3
- "ref": "v0.19.0",
4
- "commit": "1fa6afcefb99f26332f08cd08ac63f6b229cafda",
3
+ "ref": "v0.19.1",
4
+ "commit": "b113170a55a6d9990ca418f4968a7f50ebac1bca",
5
5
  "files": [
6
6
  ".dockerignore",
7
7
  ".env.example",