create-bascik 1.0.0-rc.4 → 1.0.0-rc.5

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/assets/SKILL.md CHANGED
@@ -1256,7 +1256,7 @@ export default defineConfig({
1256
1256
  });
1257
1257
  ```
1258
1258
 
1259
- > **Reverse Proxy & CDN Note (`trustProxy`):** When deploying `bascik --server` behind a CDN or load balancer, set `http.trustProxy: true` in `bascik.config.ts`. This ensures per-IP rate limiting and HSTS headers accurately resolve the client from `X-Forwarded-For` and `X-Forwarded-Proto`. Do not enable `trustProxy` if the server is exposed directly to the Internet without a reverse proxy.
1259
+ > **Reverse Proxy & CDN Note (`trustProxy`):** When deploying `bascik --server` behind a CDN or load balancer, set `http.trustProxy: true` in `bascik.config.ts`. This ensures per-IP rate limiting, request URL origin reconstruction, and HSTS headers accurately resolve the client and public origin from `X-Forwarded-For`, `X-Forwarded-Proto`, and `X-Forwarded-Host`. Do not enable `trustProxy` if the server is exposed directly to the Internet without a reverse proxy.
1260
1260
 
1261
1261
  > **Health Endpoints & Port Conflicts:** `bascik --server` provides `GET /_health` (returns 200 when ready, 503 during boot or drain). Under `--server`, port conflicts (`EADDRINUSE`) fail fast rather than binding an unexpected port.
1262
1262
 
@@ -1401,6 +1401,7 @@ export const POST = async (request: Request): Promise<Response> => {
1401
1401
 
1402
1402
  * **Method exports:** `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS`, `HEAD`. Unexported methods return `405 Method Not Allowed` with an accurate `Allow` header.
1403
1403
  * **Derived HEAD & Auto OPTIONS:** `HEAD` auto-derives from `GET` (headers only, body stripped); `OPTIONS` auto-responds 204 with `Allow`.
1404
+ * **Catch-all:** a final `[...path]` segment (`src/api/files/[...path].ts`) matches one or more remaining segments (never zero) and gives `params.path` as a decoded `string[]`. Precedence: static, then `[param]`, then catch-all, independent of file order. Malformed encoding, `%2F`/`%5C`, `..` traversal, control characters, and empty interior segments return 400. Single-dot and hidden segments return 404 before matching. It must be a named, final segment; two catch-alls at one position are an error. API routes only.
1404
1405
  * **Context argument:** `(request, { params, remoteIp }, { signal })`. Route params are parsed from `[param]` segments. `remoteIp` is proxy-aware when `http.trustProxy` is true. `signal` provides cooperative abort on `http.apiTimeout`.
1405
1406
  * **Streaming request body:** `request.body` is a WHATWG stream with `duplex: 'half'`. Handlers call `.json()`, `.text()`, etc. `http.maxBodySize` (default 1 MB) counts streamed bytes and aborts with 413 without memory buffering.
1406
1407
  * **Security & secrets:** Handlers run in-process with access to `process.env`. Handler source files in `src/api/` are never served or copied to static builds. Thrown errors return 500 with zero stack/path info leaked to clients. No CORS headers are added by default.
package/dist/scaffold.js CHANGED
@@ -26,7 +26,7 @@ export const PACKAGE_JSON = (name) => JSON.stringify({
26
26
  e2e: "playwright test --config e2e/playwright.config.ts",
27
27
  },
28
28
  dependencies: {
29
- "@bascik/bascik": "^1.0.0-rc.4",
29
+ "@bascik/bascik": "^1.0.0-rc.5",
30
30
  },
31
31
  devDependencies: {
32
32
  "@bascik/language-server": "^0.1.0-rc.2",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-bascik",
3
3
  "description": "Create a new Bascik project",
4
- "version": "1.0.0-rc.4",
4
+ "version": "1.0.0-rc.5",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/bascikdev/bascik.git",
@@ -132,9 +132,9 @@ describe("PACKAGE_JSON", () => {
132
132
  expect(pkg.devDependencies["@playwright/test"]).toBeDefined();
133
133
  });
134
134
 
135
- it("uses the current Bascik prerelease dependency", () => {
135
+ it("includes Bascik as a dependency", () => {
136
136
  const pkg = JSON.parse(PACKAGE_JSON("my-app"));
137
- expect(pkg.dependencies["@bascik/bascik"]).toBe("^1.0.0-rc.4");
137
+ expect(pkg.dependencies["@bascik/bascik"]).toBeDefined();
138
138
  });
139
139
 
140
140
  it("uses the supplied name", () => {
package/src/scaffold.ts CHANGED
@@ -32,7 +32,7 @@ export const PACKAGE_JSON = (name: string): string =>
32
32
  e2e: "playwright test --config e2e/playwright.config.ts",
33
33
  },
34
34
  dependencies: {
35
- "@bascik/bascik": "^1.0.0-rc.4",
35
+ "@bascik/bascik": "^1.0.0-rc.5",
36
36
  },
37
37
  devDependencies: {
38
38
  "@bascik/language-server": "^0.1.0-rc.2",