@docyrus/docyrus 0.0.50 → 0.0.52

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/docyrus",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "private": false,
5
5
  "description": "Docyrus API CLI",
6
6
  "main": "./main.js",
@@ -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.
@@ -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.)
package/server-loader.js CHANGED
@@ -23031,14 +23031,7 @@ var DEFAULT_LOGIN_SCOPES = [
23031
23031
  "profile",
23032
23032
  "offline_access",
23033
23033
  "ReadWrite.All",
23034
- "User.ReadWrite",
23035
- "Users.ReadWrite.All",
23036
- "Tenant.Read",
23037
- "Teams.Read.All",
23038
- "DS.ReadWrite.All",
23039
- "Docs.ReadWrite.All",
23040
- "Architect.ReadWrite.All",
23041
- "AI.ReadWrite.All"
23034
+ "Architect.ReadWrite.All"
23042
23035
  ].join(" ");
23043
23036
  var DOCYRUS_SETTINGS_DIR_NAME = ".docyrus";
23044
23037
  var DOCYRUS_PI_DIR_NAME = "pi";