create-bcp-app 0.1.9 → 0.1.11

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/README.md CHANGED
@@ -37,6 +37,24 @@ The generated TypeScript configuration uses `module: "ESNext"` and `moduleResolu
37
37
 
38
38
  Modules that use React client hooks such as `useState` or `useEffect` must declare `"use client"` at the top of the module.
39
39
 
40
+ The generated BCP dependency is pinned to the exact framework release selected by the generator, and new projects include:
41
+
42
+ ```json
43
+ {
44
+ "scripts": {
45
+ "update": "bcp update"
46
+ }
47
+ }
48
+ ```
49
+
50
+ After a newer stable BCP release is published, update the project with:
51
+
52
+ ```bash
53
+ npm run update
54
+ ```
55
+
56
+ This resolves the npm `latest` release through BCP's updater, updates the exact framework dependency and refreshes the active package-manager lockfile. Use `bcp update --check` to inspect an available update without changing files.
57
+
40
58
  ## Generated optional setup
41
59
 
42
60
  ### Tailwind CSS
@@ -76,7 +94,7 @@ The generated database helper starts with:
76
94
  import "bcp/server-only";
77
95
  ```
78
96
 
79
- This prevents database code from being used in a page/client module graph. Query the database from an API route and call that API from client components.
97
+ This prevents database code from being used in a page/client module graph. Query the database from an API route or a route-level server data loader and consume only serializable results from hydrated pages.
80
98
 
81
99
  For MySQL, the generated helper exports a reusable `db` pool and caches that pool on `globalThis` during development so hot reloads do not create a new connection pool every time:
82
100
 
@@ -168,5 +186,5 @@ npx create-bcp-app my-app --yes
168
186
  The `--bcp` option is primarily useful for prerelease and local package testing, for example:
169
187
 
170
188
  ```bash
171
- npx create-bcp-app my-app --bcp file:../bcp-0.1.8.tgz
189
+ npx create-bcp-app my-app --bcp file:../bcp-0.1.9.tgz
172
190
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bcp-app",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Create a new BCP Framework application.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.mjs CHANGED
@@ -91,6 +91,8 @@ export async function createBcpApp(
91
91
  "bcp start",
92
92
  routes:
93
93
  "bcp routes",
94
+ update:
95
+ "bcp update",
94
96
  typecheck:
95
97
  "tsc --noEmit",
96
98
  },
@@ -322,10 +324,10 @@ function createDefaultBcpPackageSpecifier(
322
324
  if (
323
325
  frameworkPackage === "bcp"
324
326
  ) {
325
- return `^${version}`;
327
+ return version;
326
328
  }
327
329
 
328
- return `npm:${frameworkPackage}@^${version}`;
330
+ return `npm:${frameworkPackage}@${version}`;
329
331
  }
330
332
 
331
333
  function runInstall(