@nocobase/plugin-data-source-manager 2.1.0-alpha.23 → 2.1.0-alpha.24
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.
|
@@ -59,6 +59,30 @@ Use `dataQuery` when the user wants:
|
|
|
59
59
|
|
|
60
60
|
Prefer `dataQuery` over `dataSourceCounting` whenever the request can be expressed as a measure query, because it is closer to the repository `query` capability used by charts, actions, ACL, and MCP.
|
|
61
61
|
|
|
62
|
+
### Aggregate Query Failure Handling
|
|
63
|
+
|
|
64
|
+
If `dataQuery` fails, do not immediately switch to `dataSourceQuery` and manually sum, count, group, or rank records.
|
|
65
|
+
|
|
66
|
+
Before falling back to raw records, inspect the tool error and retry `dataQuery` with corrected parameters. Date filters are the most common source of aggregate query failures, so check them first. Common fixes include:
|
|
67
|
+
|
|
68
|
+
- rebuild date ranges with the frontend date filter contract below, such as `$dateOn`, `$dateBetween`, or relative period objects
|
|
69
|
+
- replace unsupported calendar operators such as `$gte`, `$gt`, `$lte`, `$lt`, or custom date operator names
|
|
70
|
+
- avoid UTC boundary expansions like `2026-04-01T00:00:00.000Z` to `2026-05-01T00:00:00.000Z` unless the user explicitly asks for exact timestamp comparison
|
|
71
|
+
- verify field names, relation paths, and data types with metadata
|
|
72
|
+
- correct `measures`, `dimensions`, aliases, and `orders`
|
|
73
|
+
- fix `filter` versus `having` placement
|
|
74
|
+
- simplify grouping, relation paths, or post-aggregation filters
|
|
75
|
+
- confirm the intended `dataSource` and `collectionName`
|
|
76
|
+
|
|
77
|
+
For aggregation/statistics/rankings/trends, raw record fetching plus manual calculation is a last resort only. Use `dataSourceQuery` as a fallback only when:
|
|
78
|
+
|
|
79
|
+
- the user explicitly asks to inspect raw records
|
|
80
|
+
- the requested computation cannot be expressed with `dataQuery`
|
|
81
|
+
- boundary-sensitive verification requires a small sample of source records
|
|
82
|
+
- at least two corrected `dataQuery` attempts have failed and the error has been analyzed
|
|
83
|
+
|
|
84
|
+
When a raw-record fallback is unavoidable, explain why `dataQuery` could not be used, keep the fetched record set small, and do not fetch large datasets just to manually aggregate them.
|
|
85
|
+
|
|
62
86
|
## Count Records
|
|
63
87
|
|
|
64
88
|
Use `dataSourceCounting` only for a simple total when grouped output is unnecessary.
|
|
@@ -217,6 +241,6 @@ Action:
|
|
|
217
241
|
|
|
218
242
|
- Always validate collection and field names before querying.
|
|
219
243
|
- Prefer metadata tools first when the request is ambiguous.
|
|
220
|
-
- Prefer `dataQuery` for analysis and metrics.
|
|
244
|
+
- Prefer `dataQuery` for analysis and metrics. If it fails, first check whether the date range or date operator is invalid, then retry corrected aggregate queries before using raw records.
|
|
221
245
|
- Use `dataSourceQuery` for raw rows and `dataSourceCounting` for the simplest count case.
|
|
222
246
|
- Respect user permissions; if the tool returns `No permissions`, explain that the current role cannot access the requested data.
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.24",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/plugin-acl": "2.1.0-alpha.
|
|
14
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
15
|
-
"@nocobase/ai": "2.1.0-alpha.
|
|
16
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
17
|
-
"@nocobase/data-source-manager": "2.1.0-alpha.
|
|
13
|
+
"@nocobase/plugin-acl": "2.1.0-alpha.24",
|
|
14
|
+
"@nocobase/utils": "2.1.0-alpha.24",
|
|
15
|
+
"@nocobase/ai": "2.1.0-alpha.24",
|
|
16
|
+
"@nocobase/server": "2.1.0-alpha.24",
|
|
17
|
+
"@nocobase/data-source-manager": "2.1.0-alpha.24",
|
|
18
18
|
"lodash": "4.18.1",
|
|
19
|
-
"@nocobase/acl": "2.1.0-alpha.
|
|
20
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
19
|
+
"@nocobase/acl": "2.1.0-alpha.24",
|
|
20
|
+
"@nocobase/database": "2.1.0-alpha.24",
|
|
21
21
|
"@ant-design/icons": "5.6.1",
|
|
22
22
|
"antd": "5.24.2",
|
|
23
23
|
"react-router-dom": "6.30.1",
|
|
24
|
-
"@nocobase/flow-engine": "2.1.0-alpha.
|
|
24
|
+
"@nocobase/flow-engine": "2.1.0-alpha.24",
|
|
25
25
|
"@formily/shared": "2.3.7",
|
|
26
26
|
"@formily/react": "2.3.7",
|
|
27
27
|
"react-i18next": "11.18.6",
|
|
28
28
|
"@emotion/css": "11.13.0",
|
|
29
|
-
"@nocobase/actions": "2.1.0-alpha.
|
|
29
|
+
"@nocobase/actions": "2.1.0-alpha.24",
|
|
30
30
|
"sequelize": "6.35.2",
|
|
31
|
-
"@nocobase/test": "2.1.0-alpha.
|
|
31
|
+
"@nocobase/test": "2.1.0-alpha.24",
|
|
32
32
|
"@formily/antd-v5": "1.2.3",
|
|
33
33
|
"@formily/core": "2.3.7",
|
|
34
34
|
"@formily/reactive": "2.3.7",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-
|
|
1
|
+
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-26T11:25:29.942Z"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-source-manager",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.24",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"displayName": "Data source manager",
|
|
6
6
|
"displayName.ru-RU": "Менеджер управления источниками данных",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"keywords": [
|
|
21
21
|
"Data model tools"
|
|
22
22
|
],
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "effaf56a9b9ea2d40200c4c10854a84d9622f071",
|
|
24
24
|
"license": "Apache-2.0"
|
|
25
25
|
}
|