@docyrus/docyrus 0.0.50 → 0.0.51
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/package.json
CHANGED
|
@@ -196,7 +196,7 @@ Use `DataGridViewSelect` as the default saved-view UI for Docyrus grids, and per
|
|
|
196
196
|
14. **`DataGridViewSelect` needs a TanStack table instance** and should receive `fields` when you want the built-in filter builder/editor experience.
|
|
197
197
|
15. **Data view creation requires `name` and `tenant_data_source_id`**.
|
|
198
198
|
16. **Use `dataViews.update(viewId, { archived: true })` for soft-delete** and `dataViews.remove(viewId)` only for irreversible hard-delete.
|
|
199
|
-
17. **Regenerate collections after schema changes** by rebuilding the tenant OpenAPI spec, downloading the latest `openapi.json`, and re-running the collection generator.
|
|
199
|
+
17. **Regenerate collections after schema changes** by rebuilding the tenant OpenAPI spec, downloading the latest `openapi.json`, and re-running the collection generator. Use `--apps <appSlug>` or `--dataSources <appSlug/dataSourceSlug>` flags to regenerate only the affected collections instead of all (e.g., `pnpm generate-orm -- --dataSources crm/contacts crm/accounts`).
|
|
200
200
|
18. **ACL endpoints are usually raw-client integrations** — use `useDocyrusClient()` or `RestApiClient` for roles, user-role assignments, role queries, record sharing, and ownership transfer.
|
|
201
201
|
19. **Prefer role `uid` values** for ACL role writes, user-role `roleIds`, and role-query `roleIds`.
|
|
202
202
|
20. **Treat `PUT /v1/users/acl/users/:userId/roles` as full replacement** and `POST /v1/users/acl/users/:userId/roles` as additive.
|
package/resources/pi-agent/skills/docyrus-app-dev-react/references/collections-and-patterns.md
CHANGED
|
@@ -21,6 +21,28 @@ Collections are auto-generated from `openapi.json` using `@docyrus/tanstack-db-g
|
|
|
21
21
|
|
|
22
22
|
**Generate command**: `pnpm generate-orm` (runs `@docyrus/tanstack-db-generator openapi.json`)
|
|
23
23
|
|
|
24
|
+
The generator supports filtering to regenerate only specific collections:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Generate all collections
|
|
28
|
+
pnpm generate-orm
|
|
29
|
+
|
|
30
|
+
# Generate collections for specific apps only
|
|
31
|
+
pnpm generate-orm -- --apps crm support
|
|
32
|
+
|
|
33
|
+
# Generate only specific data source collections (appSlug/dataSourceSlug format)
|
|
34
|
+
pnpm generate-orm -- --dataSources crm/contacts crm/accounts
|
|
35
|
+
|
|
36
|
+
# Combine both filters (intersection — must match both)
|
|
37
|
+
pnpm generate-orm -- --apps crm --dataSources crm/contacts
|
|
38
|
+
|
|
39
|
+
# Comma-separated values are also accepted
|
|
40
|
+
pnpm generate-orm -- --apps crm,support
|
|
41
|
+
pnpm generate-orm -- --dataSources crm/contacts,crm/accounts
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Prefer targeted regeneration** (`--apps` or `--dataSources`) over full regeneration when you only changed a few data sources. This is faster and avoids unnecessary file churn.
|
|
45
|
+
|
|
24
46
|
**Key files:**
|
|
25
47
|
- `src/collections/<app>-<entity>.collection.ts` — generated React hooks with CRUD methods + entity types
|
|
26
48
|
- `src/collections/types.ts` — shared query types (filters, calculations, formulas, etc.)
|