create-prisma-php-app 5.0.0-alpha.19 → 5.0.0-alpha.20
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/dist/AGENTS.md +25 -7
- package/package.json +1 -1
package/dist/AGENTS.md
CHANGED
|
@@ -25,7 +25,7 @@ Important rules:
|
|
|
25
25
|
- treat `./node_modules/prisma-php/dist/docs` as the single documentation source of truth for the installed Prisma PHP version
|
|
26
26
|
- expect `./AGENTS.md` at the project root
|
|
27
27
|
- when the installed docs and a habit from another framework conflict, follow Prisma PHP
|
|
28
|
-
- when updating Prisma PHP package/docs sources, keep `AGENTS.md
|
|
28
|
+
- when updating Prisma PHP package/docs sources, keep `AGENTS.md` and `dist/docs` aligned for consumer apps; if the Prisma PHP package source repo also maintains `.github/copilot-instructions.md`, keep that source-repo file aligned there too
|
|
29
29
|
|
|
30
30
|
## Installed docs location
|
|
31
31
|
|
|
@@ -89,6 +89,9 @@ Before generating code, examples, instructions, or reviews, choose the documenta
|
|
|
89
89
|
- **Environment variables, `.env`, `PP\Env`, `Env::get`, `Env::string`, `Env::bool`, `Env::int`, feature flags, host and port config, or runtime bootstrap settings**
|
|
90
90
|
Read `env.md`, then verify the official env docs at `env` and `env-file`
|
|
91
91
|
|
|
92
|
+
- **Bootstrap flow, request initialization, `FUNCTION_CALL_SECRET`, `prisma_php_csrf`, `pp_local_store_key`, route resolution, or runtime init order**
|
|
93
|
+
Read `bootstrap-runtime.md`, then use `env.md`, `fetching-data.md`, or `error-handling.md` as needed
|
|
94
|
+
|
|
92
95
|
- **File uploads, `multipart/form-data`, `$_FILES`, `PP\FileManager\UploadFile`, rename flows, replace flows, delete flows, allowed file types, upload size rules, or file manager UI behavior**
|
|
93
96
|
Read `file-manager.md`, then verify the official File Manager docs and, when internals matter, the core upload file at `vendor/tsnc/prisma-php/src/FileManager/UploadFile.php`
|
|
94
97
|
|
|
@@ -134,6 +137,7 @@ The current Prisma PHP docs shipped here include:
|
|
|
134
137
|
|
|
135
138
|
- `authentication.md`
|
|
136
139
|
- `backend-only.md`
|
|
140
|
+
- `bootstrap-runtime.md`
|
|
137
141
|
- `caching.md`
|
|
138
142
|
- `commands.md`
|
|
139
143
|
- `components.md`
|
|
@@ -172,6 +176,20 @@ Treat `files-list.json` as a framework-generated file for route discovery and in
|
|
|
172
176
|
|
|
173
177
|
If a route task appears to require editing `files-list.json`, that is almost certainly the wrong approach.
|
|
174
178
|
|
|
179
|
+
## Framework-managed package scripts
|
|
180
|
+
|
|
181
|
+
Prisma PHP can generate `package.json` scripts for BrowserSync, Tailwind, TypeScript, WebSocket, MCP, Swagger docs, and related project helpers.
|
|
182
|
+
|
|
183
|
+
AI agents should follow this default rule:
|
|
184
|
+
|
|
185
|
+
- prefer `npm run dev` for ordinary local development
|
|
186
|
+
- prefer `npm run build` for ordinary production-style asset builds
|
|
187
|
+
- do **not** default to telling users to run `npm run tailwind`, `npm run tailwind:build`, `npm run ts:watch`, or `npm run ts:build` after routine file changes, because those are usually framework-managed through the generated top-level scripts
|
|
188
|
+
- use `npm run websocket` or `npm run mcp` only when isolating local runtime startup, debugging, or when the project's scripts show those services are not already covered by the normal development flow
|
|
189
|
+
- use `npm run create-swagger-docs` only when Swagger or OpenAPI output must be intentionally generated or refreshed
|
|
190
|
+
|
|
191
|
+
When a task involves package scripts, read `commands.md` first and inspect the current `package.json` before assuming which feature scripts exist.
|
|
192
|
+
|
|
175
193
|
## Default interactive UI and data-flow rule
|
|
176
194
|
|
|
177
195
|
For normal full-stack Prisma PHP work, assume the user wants the PulsePoint-first approach unless they explicitly ask otherwise.
|
|
@@ -290,7 +308,7 @@ For document metadata, prefer `MainLayout::$title` and `MainLayout::$description
|
|
|
290
308
|
Important metadata rules:
|
|
291
309
|
|
|
292
310
|
- a local `$title` variable only affects rendered page content unless you also assign metadata through `MainLayout`
|
|
293
|
-
- use `MainLayout::
|
|
311
|
+
- use `MainLayout::addCustomMetadata(...)` for additional `<meta>` values when needed
|
|
294
312
|
- keep visible headings separate from document metadata when the UI text and SEO title must differ
|
|
295
313
|
- read `metadata-and-og-images.md` or `layouts-and-pages.md` before inventing Next.js-style metadata exports or Open Graph image workflows
|
|
296
314
|
|
|
@@ -320,7 +338,7 @@ Low-level helpers exist when manual SSE control is required:
|
|
|
320
338
|
Core locations documented for those helpers are:
|
|
321
339
|
|
|
322
340
|
```txt
|
|
323
|
-
vendor/tsnc/prisma-php/src/SSE.php
|
|
341
|
+
vendor/tsnc/prisma-php/src/Streaming/SSE.php
|
|
324
342
|
vendor/tsnc/prisma-php/src/Streaming/ServerSentEvent.php
|
|
325
343
|
```
|
|
326
344
|
|
|
@@ -373,9 +391,9 @@ Important auth rules:
|
|
|
373
391
|
|
|
374
392
|
- route privacy strategy is configured from `AuthConfig.php`
|
|
375
393
|
- Prisma PHP supports both public-default and private-default route protection strategies
|
|
376
|
-
- sign users in with `Auth::signIn(...)`
|
|
377
|
-
- sign users out with `Auth::signOut(...)`
|
|
378
|
-
- use `refreshUserSession(...)` when current-session auth payloads must be updated after role or profile changes
|
|
394
|
+
- sign users in with `Auth::getInstance()->signIn(...)`
|
|
395
|
+
- sign users out with `Auth::getInstance()->signOut(...)`
|
|
396
|
+
- use `Auth::getInstance()->refreshUserSession(...)` when current-session auth payloads must be updated after role or profile changes
|
|
379
397
|
- use role-based route protection in auth config for page access control
|
|
380
398
|
- use `#[Exposed(allowedRoles: [...])]` for function-level access control when frontend code calls PHP directly
|
|
381
399
|
- for credentials auth, model the schema first, then generate ORM classes before writing auth flows
|
|
@@ -637,7 +655,7 @@ vendor/tsnc/prisma-php/src
|
|
|
637
655
|
vendor/tsnc/prisma-php/src/PHPMailer/Mailer.php
|
|
638
656
|
vendor/tsnc/prisma-php/src/FileManager/UploadFile.php
|
|
639
657
|
vendor/tsnc/prisma-php/src/Validator.php
|
|
640
|
-
vendor/tsnc/prisma-php/src/SSE.php
|
|
658
|
+
vendor/tsnc/prisma-php/src/Streaming/SSE.php
|
|
641
659
|
vendor/tsnc/prisma-php/src/Streaming/ServerSentEvent.php
|
|
642
660
|
```
|
|
643
661
|
|