@travetto/model-query 5.0.0-rc.2 → 5.0.0-rc.4
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 +5 -5
- package/src/model/where-clause.ts +1 -2
- package/support/doc.support.tsx +4 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-query",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.4",
|
|
4
4
|
"description": "Datastore abstraction for advanced query support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datastore",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"directory": "module/model-query"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/di": "^5.0.0-rc.
|
|
31
|
-
"@travetto/model": "^5.0.0-rc.
|
|
32
|
-
"@travetto/schema": "^5.0.0-rc.
|
|
30
|
+
"@travetto/di": "^5.0.0-rc.4",
|
|
31
|
+
"@travetto/model": "^5.0.0-rc.4",
|
|
32
|
+
"@travetto/schema": "^5.0.0-rc.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@travetto/test": "^5.0.0-rc.
|
|
35
|
+
"@travetto/test": "^5.0.0-rc.4"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"@travetto/test": {
|
package/support/doc.support.tsx
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource @travetto/doc */
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { d, DocJSXElementByFn, DocJSXElement } from '@travetto/doc';
|
|
5
|
-
import { Runtime } from '@travetto/runtime';
|
|
2
|
+
import { d, DocJSXElementByFn, DocJSXElement, DocFileUtil } from '@travetto/doc';
|
|
6
3
|
|
|
7
4
|
export const Links = {
|
|
8
5
|
QueryCrud: d.codeLink('Query Crud', '@travetto/model-query/src/service/crud.ts', /export interface/),
|
|
@@ -11,14 +8,11 @@ export const Links = {
|
|
|
11
8
|
Query: d.codeLink('Query', '@travetto/model-query/src/service/query.ts', /export interface/),
|
|
12
9
|
};
|
|
13
10
|
|
|
14
|
-
export const ModelQueryTypes = (
|
|
15
|
-
|
|
16
|
-
file = Runtime.getSource(file);
|
|
17
|
-
}
|
|
18
|
-
const contents = readFileSync(file, 'utf8');
|
|
11
|
+
export const ModelQueryTypes = (fn: Function): DocJSXElement[] => {
|
|
12
|
+
const { content } = DocFileUtil.readSource(fn);
|
|
19
13
|
const found: DocJSXElementByFn<'CodeLink'>[] = [];
|
|
20
14
|
const seen = new Set();
|
|
21
|
-
for (const [, key] of
|
|
15
|
+
for (const [, key] of content.matchAll(/Model(Query(Suggest|Facet|Crud)?)Support/g)) {
|
|
22
16
|
if (!seen.has(key)) {
|
|
23
17
|
seen.add(key);
|
|
24
18
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|