@lowdefy/server-dev 0.0.0-experimental-20250915134255 → 0.0.0-experimental-20250926130521
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/app/api/ai/[transport]/helpers/loadDocsAsArray.js +32 -0
- package/app/api/ai/[transport]/helpers/{loadIndividualSchema.js → loadIndividualDoc.js} +5 -5
- package/app/api/ai/[transport]/tools/getAction.js +3 -7
- package/app/api/ai/[transport]/tools/getBlock.js +3 -7
- package/app/api/ai/[transport]/tools/getConnection.js +3 -5
- package/app/api/ai/[transport]/tools/getOperator.js +3 -7
- package/app/api/ai/[transport]/tools/getRequest.js +3 -5
- package/app/api/ai/[transport]/tools/listActions.js +7 -3
- package/app/api/ai/[transport]/tools/listBlocks.js +7 -3
- package/app/api/ai/[transport]/tools/listConnections.js +7 -3
- package/app/api/ai/[transport]/tools/listOperators.js +7 -3
- package/app/api/ai/[transport]/tools/listRequests.js +7 -3
- package/package.json +28 -28
- package/package.original.json +28 -28
- package/app/api/ai/[transport]/helpers/loadSchemasAsArray.js +0 -50
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
// Helper function to load block/action/operator names from filenames
|
|
5
|
+
function loadDocsAsArray(docType) {
|
|
6
|
+
try {
|
|
7
|
+
const docsDir = path.join(process.cwd(), 'build', 'docs', docType);
|
|
8
|
+
|
|
9
|
+
const files = fs.readdirSync(docsDir);
|
|
10
|
+
|
|
11
|
+
const docs = [];
|
|
12
|
+
|
|
13
|
+
files.forEach((file) => {
|
|
14
|
+
if (file.endsWith('.md')) {
|
|
15
|
+
// Use filename as title (remove .md extension)
|
|
16
|
+
const title = file.replace('.md', '');
|
|
17
|
+
|
|
18
|
+
const doc = {
|
|
19
|
+
title: title,
|
|
20
|
+
description: 'Description to be added.', // TODO: Extract description from md file
|
|
21
|
+
};
|
|
22
|
+
docs.push(doc);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return docs;
|
|
27
|
+
} catch (error) {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default loadDocsAsArray;
|
|
@@ -18,15 +18,15 @@ import fs from 'fs';
|
|
|
18
18
|
import path from 'path';
|
|
19
19
|
|
|
20
20
|
// Helper function to load individual schema
|
|
21
|
-
function
|
|
21
|
+
function loadIndividualDoc(docType, identifier) {
|
|
22
22
|
try {
|
|
23
|
-
const
|
|
24
|
-
const
|
|
23
|
+
const docPath = path.join(process.cwd(), `build/docs/${docType}/${identifier}.md`);
|
|
24
|
+
const content = fs.readFileSync(docPath, 'utf8');
|
|
25
25
|
|
|
26
|
-
return
|
|
26
|
+
return content;
|
|
27
27
|
} catch (error) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export default
|
|
32
|
+
export default loadIndividualDoc;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import
|
|
18
|
+
import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
'get_action',
|
|
@@ -26,7 +26,7 @@ export default [
|
|
|
26
26
|
.describe('The action type to get schema for (e.g., "CallAPI", "SetState", "Fetch")'),
|
|
27
27
|
},
|
|
28
28
|
async ({ actionType }) => {
|
|
29
|
-
const action =
|
|
29
|
+
const action = loadIndividualDoc('actions', actionType);
|
|
30
30
|
|
|
31
31
|
if (!action) {
|
|
32
32
|
return {
|
|
@@ -43,11 +43,7 @@ export default [
|
|
|
43
43
|
content: [
|
|
44
44
|
{
|
|
45
45
|
type: 'text',
|
|
46
|
-
text: `Action: ${actionType}\
|
|
47
|
-
action,
|
|
48
|
-
null,
|
|
49
|
-
2
|
|
50
|
-
)}`,
|
|
46
|
+
text: `Action: ${actionType}\nDocumentation:\n${action}`,
|
|
51
47
|
},
|
|
52
48
|
],
|
|
53
49
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import
|
|
18
|
+
import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
'get_block',
|
|
@@ -26,7 +26,7 @@ export default [
|
|
|
26
26
|
.describe('The block type to get schema for (e.g., "Button", "TextInput", "Card")'),
|
|
27
27
|
},
|
|
28
28
|
async ({ blockType }) => {
|
|
29
|
-
const block =
|
|
29
|
+
const block = loadIndividualDoc('blocks', blockType);
|
|
30
30
|
|
|
31
31
|
if (!block) {
|
|
32
32
|
return {
|
|
@@ -43,11 +43,7 @@ export default [
|
|
|
43
43
|
content: [
|
|
44
44
|
{
|
|
45
45
|
type: 'text',
|
|
46
|
-
text: `Block: ${blockType}\
|
|
47
|
-
block,
|
|
48
|
-
null,
|
|
49
|
-
2
|
|
50
|
-
)}`,
|
|
46
|
+
text: `Block: ${blockType}\nDocumentation:\n${block}`,
|
|
51
47
|
},
|
|
52
48
|
],
|
|
53
49
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import
|
|
18
|
+
import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
'get_connection',
|
|
@@ -26,7 +26,7 @@ export default [
|
|
|
26
26
|
.describe('The connection type to get schema for (e.g., "AxiosHttp", "MongoDBCollection")'),
|
|
27
27
|
},
|
|
28
28
|
async ({ connectionType }) => {
|
|
29
|
-
const connection =
|
|
29
|
+
const connection = loadIndividualDoc('connections', connectionType);
|
|
30
30
|
|
|
31
31
|
if (!connection) {
|
|
32
32
|
return {
|
|
@@ -43,9 +43,7 @@ export default [
|
|
|
43
43
|
content: [
|
|
44
44
|
{
|
|
45
45
|
type: 'text',
|
|
46
|
-
text: `Connection: ${connectionType}\
|
|
47
|
-
connection.package
|
|
48
|
-
}\nSchema:\n${JSON.stringify(connection, null, 2)}`,
|
|
46
|
+
text: `Connection: ${connectionType}\nDocumentation:\n${connection}`,
|
|
49
47
|
},
|
|
50
48
|
],
|
|
51
49
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import
|
|
18
|
+
import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
'get_operator',
|
|
@@ -26,7 +26,7 @@ export default [
|
|
|
26
26
|
.describe('The operator type to get schema for (e.g., "_and", "_array", "_string")'),
|
|
27
27
|
},
|
|
28
28
|
async ({ operatorType }) => {
|
|
29
|
-
const operator =
|
|
29
|
+
const operator = loadIndividualDoc('operators', operatorType);
|
|
30
30
|
|
|
31
31
|
if (!operator) {
|
|
32
32
|
return {
|
|
@@ -43,11 +43,7 @@ export default [
|
|
|
43
43
|
content: [
|
|
44
44
|
{
|
|
45
45
|
type: 'text',
|
|
46
|
-
text: `Operator: ${operatorType}\
|
|
47
|
-
operator,
|
|
48
|
-
null,
|
|
49
|
-
2
|
|
50
|
-
)}`,
|
|
46
|
+
text: `Operator: ${operatorType}\nDocumentation:\n${operator}`,
|
|
51
47
|
},
|
|
52
48
|
],
|
|
53
49
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import
|
|
18
|
+
import loadIndividualDoc from '../helpers/loadIndividualDoc.js';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
'get_request',
|
|
@@ -31,7 +31,7 @@ export default [
|
|
|
31
31
|
.describe('The request type to get schema for (e.g., "AxiosHttp", "MongoDBAggregation")'),
|
|
32
32
|
},
|
|
33
33
|
async ({ connectionType, requestType }) => {
|
|
34
|
-
const request =
|
|
34
|
+
const request = loadIndividualDoc(`requests/${connectionType}`, requestType);
|
|
35
35
|
|
|
36
36
|
if (!request) {
|
|
37
37
|
return {
|
|
@@ -48,9 +48,7 @@ export default [
|
|
|
48
48
|
content: [
|
|
49
49
|
{
|
|
50
50
|
type: 'text',
|
|
51
|
-
text: `Connection: ${connectionType}\nRequest: ${requestType}\
|
|
52
|
-
request.package
|
|
53
|
-
}\nSchema:\n${JSON.stringify(request, null, 2)}`,
|
|
51
|
+
text: `Connection: ${connectionType}\nRequest: ${requestType}\nDocumentation:\n${request}`,
|
|
54
52
|
},
|
|
55
53
|
],
|
|
56
54
|
};
|
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
|
|
18
18
|
|
|
19
19
|
export default [
|
|
20
20
|
'list_actions',
|
|
21
21
|
'Returns a list of all available Lowdefy actions with their types and packages',
|
|
22
22
|
{},
|
|
23
23
|
async () => {
|
|
24
|
-
const actionList =
|
|
24
|
+
const actionList = loadDocsAsArray('actions');
|
|
25
|
+
|
|
26
|
+
const formattedList = actionList
|
|
27
|
+
.map((action) => `- ${action.title}: ${action.description}`)
|
|
28
|
+
.join('\n');
|
|
25
29
|
|
|
26
30
|
return {
|
|
27
31
|
content: [
|
|
28
32
|
{
|
|
29
33
|
type: 'text',
|
|
30
|
-
text: `Available actions:\n${
|
|
34
|
+
text: `Available actions:\n${formattedList}`,
|
|
31
35
|
},
|
|
32
36
|
],
|
|
33
37
|
};
|
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
|
|
18
18
|
|
|
19
19
|
export default [
|
|
20
20
|
'list_blocks',
|
|
21
21
|
'Returns a list of all available Lowdefy blocks with their types and packages',
|
|
22
22
|
{},
|
|
23
23
|
async () => {
|
|
24
|
-
const blockList =
|
|
24
|
+
const blockList = loadDocsAsArray('blocks');
|
|
25
|
+
|
|
26
|
+
const formattedList = blockList
|
|
27
|
+
.map((block) => `- ${block.title}: ${block.description}`)
|
|
28
|
+
.join('\n');
|
|
25
29
|
|
|
26
30
|
return {
|
|
27
31
|
content: [
|
|
28
32
|
{
|
|
29
33
|
type: 'text',
|
|
30
|
-
text: `Available blocks:\n${
|
|
34
|
+
text: `Available blocks:\n${formattedList}`,
|
|
31
35
|
},
|
|
32
36
|
],
|
|
33
37
|
};
|
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
|
|
18
18
|
|
|
19
19
|
export default [
|
|
20
20
|
'list_connections',
|
|
21
21
|
'Returns a list of all available Lowdefy connections with their types and packages',
|
|
22
22
|
{},
|
|
23
23
|
async () => {
|
|
24
|
-
const connectionList =
|
|
24
|
+
const connectionList = loadDocsAsArray('connections');
|
|
25
|
+
|
|
26
|
+
const formattedList = connectionList
|
|
27
|
+
.map((connection) => `- ${connection.title}: ${connection.description}`)
|
|
28
|
+
.join('\n');
|
|
25
29
|
|
|
26
30
|
return {
|
|
27
31
|
content: [
|
|
28
32
|
{
|
|
29
33
|
type: 'text',
|
|
30
|
-
text: `Available connections:\n${
|
|
34
|
+
text: `Available connections:\n${formattedList}`,
|
|
31
35
|
},
|
|
32
36
|
],
|
|
33
37
|
};
|
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
|
|
18
18
|
|
|
19
19
|
export default [
|
|
20
20
|
'list_operators',
|
|
21
21
|
'Returns a list of all available Lowdefy operators with their types and packages',
|
|
22
22
|
{},
|
|
23
23
|
async () => {
|
|
24
|
-
const operatorList =
|
|
24
|
+
const operatorList = loadDocsAsArray('operators');
|
|
25
|
+
|
|
26
|
+
const formattedList = operatorList
|
|
27
|
+
.map((operator) => `- ${operator.title}: ${operator.description}`)
|
|
28
|
+
.join('\n');
|
|
25
29
|
|
|
26
30
|
return {
|
|
27
31
|
content: [
|
|
28
32
|
{
|
|
29
33
|
type: 'text',
|
|
30
|
-
text: `Available operators:\n${
|
|
34
|
+
text: `Available operators:\n${formattedList}`,
|
|
31
35
|
},
|
|
32
36
|
],
|
|
33
37
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
|
-
import
|
|
18
|
+
import loadDocsAsArray from '../helpers/loadDocsAsArray.js';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
'list_requests',
|
|
@@ -26,13 +26,17 @@ export default [
|
|
|
26
26
|
.describe('The connection type to get requests for (e.g., "AxiosHttp", "MongoDBCollection")'),
|
|
27
27
|
},
|
|
28
28
|
async ({ connectionType }) => {
|
|
29
|
-
const requestList =
|
|
29
|
+
const requestList = loadDocsAsArray(`requests/${connectionType}`);
|
|
30
|
+
|
|
31
|
+
const formattedList = requestList
|
|
32
|
+
.map((request) => `- ${request.title}: ${request.description}`)
|
|
33
|
+
.join('\n');
|
|
30
34
|
|
|
31
35
|
return {
|
|
32
36
|
content: [
|
|
33
37
|
{
|
|
34
38
|
type: 'text',
|
|
35
|
-
text: `Available requests:\n${
|
|
39
|
+
text: `Available requests for ${connectionType}:\n${formattedList}`,
|
|
36
40
|
},
|
|
37
41
|
],
|
|
38
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20250926130521",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -37,33 +37,33 @@
|
|
|
37
37
|
".npmrc"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@lowdefy/actions-core": "0.0.0-experimental-
|
|
41
|
-
"@lowdefy/api": "0.0.0-experimental-
|
|
42
|
-
"@lowdefy/block-utils": "0.0.0-experimental-
|
|
43
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-
|
|
44
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-
|
|
45
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-
|
|
46
|
-
"@lowdefy/blocks-color-selectors": "0.0.0-experimental-
|
|
47
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-
|
|
48
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-
|
|
49
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-
|
|
50
|
-
"@lowdefy/blocks-qr": "0.0.0-experimental-
|
|
51
|
-
"@lowdefy/build": "0.0.0-experimental-
|
|
52
|
-
"@lowdefy/client": "0.0.0-experimental-
|
|
53
|
-
"@lowdefy/connection-axios-http": "0.0.0-experimental-
|
|
54
|
-
"@lowdefy/engine": "0.0.0-experimental-
|
|
55
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
56
|
-
"@lowdefy/layout": "0.0.0-experimental-
|
|
57
|
-
"@lowdefy/node-utils": "0.0.0-experimental-
|
|
58
|
-
"@lowdefy/operators-change-case": "0.0.0-experimental-
|
|
59
|
-
"@lowdefy/operators-diff": "0.0.0-experimental-
|
|
60
|
-
"@lowdefy/operators-js": "0.0.0-experimental-
|
|
61
|
-
"@lowdefy/operators-moment": "0.0.0-experimental-
|
|
62
|
-
"@lowdefy/operators-mql": "0.0.0-experimental-
|
|
63
|
-
"@lowdefy/operators-nunjucks": "0.0.0-experimental-
|
|
64
|
-
"@lowdefy/operators-uuid": "0.0.0-experimental-
|
|
65
|
-
"@lowdefy/operators-yaml": "0.0.0-experimental-
|
|
66
|
-
"@lowdefy/plugin-next-auth": "0.0.0-experimental-
|
|
40
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20250926130521",
|
|
41
|
+
"@lowdefy/api": "0.0.0-experimental-20250926130521",
|
|
42
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20250926130521",
|
|
43
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20250926130521",
|
|
44
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20250926130521",
|
|
45
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20250926130521",
|
|
46
|
+
"@lowdefy/blocks-color-selectors": "0.0.0-experimental-20250926130521",
|
|
47
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20250926130521",
|
|
48
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20250926130521",
|
|
49
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20250926130521",
|
|
50
|
+
"@lowdefy/blocks-qr": "0.0.0-experimental-20250926130521",
|
|
51
|
+
"@lowdefy/build": "0.0.0-experimental-20250926130521",
|
|
52
|
+
"@lowdefy/client": "0.0.0-experimental-20250926130521",
|
|
53
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20250926130521",
|
|
54
|
+
"@lowdefy/engine": "0.0.0-experimental-20250926130521",
|
|
55
|
+
"@lowdefy/helpers": "0.0.0-experimental-20250926130521",
|
|
56
|
+
"@lowdefy/layout": "0.0.0-experimental-20250926130521",
|
|
57
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20250926130521",
|
|
58
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20250926130521",
|
|
59
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20250926130521",
|
|
60
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20250926130521",
|
|
61
|
+
"@lowdefy/operators-moment": "0.0.0-experimental-20250926130521",
|
|
62
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20250926130521",
|
|
63
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20250926130521",
|
|
64
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20250926130521",
|
|
65
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20250926130521",
|
|
66
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20250926130521",
|
|
67
67
|
"@modelcontextprotocol/sdk": "1.17.4",
|
|
68
68
|
"chokidar": "3.5.3",
|
|
69
69
|
"dotenv": "16.3.1",
|
package/package.original.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/server-dev",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20250926130521",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -44,33 +44,33 @@
|
|
|
44
44
|
"prepublishOnly": "pnpm build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@lowdefy/actions-core": "0.0.0-experimental-
|
|
48
|
-
"@lowdefy/api": "0.0.0-experimental-
|
|
49
|
-
"@lowdefy/block-utils": "0.0.0-experimental-
|
|
50
|
-
"@lowdefy/blocks-aggrid": "0.0.0-experimental-
|
|
51
|
-
"@lowdefy/blocks-antd": "0.0.0-experimental-
|
|
52
|
-
"@lowdefy/blocks-basic": "0.0.0-experimental-
|
|
53
|
-
"@lowdefy/blocks-color-selectors": "0.0.0-experimental-
|
|
54
|
-
"@lowdefy/blocks-echarts": "0.0.0-experimental-
|
|
55
|
-
"@lowdefy/blocks-loaders": "0.0.0-experimental-
|
|
56
|
-
"@lowdefy/blocks-markdown": "0.0.0-experimental-
|
|
57
|
-
"@lowdefy/blocks-qr": "0.0.0-experimental-
|
|
58
|
-
"@lowdefy/build": "0.0.0-experimental-
|
|
59
|
-
"@lowdefy/client": "0.0.0-experimental-
|
|
60
|
-
"@lowdefy/connection-axios-http": "0.0.0-experimental-
|
|
61
|
-
"@lowdefy/engine": "0.0.0-experimental-
|
|
62
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
63
|
-
"@lowdefy/layout": "0.0.0-experimental-
|
|
64
|
-
"@lowdefy/node-utils": "0.0.0-experimental-
|
|
65
|
-
"@lowdefy/operators-change-case": "0.0.0-experimental-
|
|
66
|
-
"@lowdefy/operators-diff": "0.0.0-experimental-
|
|
67
|
-
"@lowdefy/operators-js": "0.0.0-experimental-
|
|
68
|
-
"@lowdefy/operators-moment": "0.0.0-experimental-
|
|
69
|
-
"@lowdefy/operators-mql": "0.0.0-experimental-
|
|
70
|
-
"@lowdefy/operators-nunjucks": "0.0.0-experimental-
|
|
71
|
-
"@lowdefy/operators-uuid": "0.0.0-experimental-
|
|
72
|
-
"@lowdefy/operators-yaml": "0.0.0-experimental-
|
|
73
|
-
"@lowdefy/plugin-next-auth": "0.0.0-experimental-
|
|
47
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20250926130521",
|
|
48
|
+
"@lowdefy/api": "0.0.0-experimental-20250926130521",
|
|
49
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20250926130521",
|
|
50
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20250926130521",
|
|
51
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20250926130521",
|
|
52
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20250926130521",
|
|
53
|
+
"@lowdefy/blocks-color-selectors": "0.0.0-experimental-20250926130521",
|
|
54
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20250926130521",
|
|
55
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20250926130521",
|
|
56
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20250926130521",
|
|
57
|
+
"@lowdefy/blocks-qr": "0.0.0-experimental-20250926130521",
|
|
58
|
+
"@lowdefy/build": "0.0.0-experimental-20250926130521",
|
|
59
|
+
"@lowdefy/client": "0.0.0-experimental-20250926130521",
|
|
60
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20250926130521",
|
|
61
|
+
"@lowdefy/engine": "0.0.0-experimental-20250926130521",
|
|
62
|
+
"@lowdefy/helpers": "0.0.0-experimental-20250926130521",
|
|
63
|
+
"@lowdefy/layout": "0.0.0-experimental-20250926130521",
|
|
64
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20250926130521",
|
|
65
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20250926130521",
|
|
66
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20250926130521",
|
|
67
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20250926130521",
|
|
68
|
+
"@lowdefy/operators-moment": "0.0.0-experimental-20250926130521",
|
|
69
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20250926130521",
|
|
70
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20250926130521",
|
|
71
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20250926130521",
|
|
72
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20250926130521",
|
|
73
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20250926130521",
|
|
74
74
|
"@modelcontextprotocol/sdk": "1.17.4",
|
|
75
75
|
"chokidar": "3.5.3",
|
|
76
76
|
"dotenv": "16.3.1",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2024 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import fs from 'fs';
|
|
18
|
-
import path from 'path';
|
|
19
|
-
|
|
20
|
-
// Helper function to load all schemas from a directory as array
|
|
21
|
-
function loadSchemasAsArray(schemaType, excludeFields = []) {
|
|
22
|
-
try {
|
|
23
|
-
const schemasDir = path.join(process.cwd(), `build/schemas/${schemaType}`);
|
|
24
|
-
const files = fs.readdirSync(schemasDir);
|
|
25
|
-
const schemas = [];
|
|
26
|
-
|
|
27
|
-
files.forEach((file) => {
|
|
28
|
-
if (file.endsWith('.json')) {
|
|
29
|
-
const schemaPath = path.join(schemasDir, file);
|
|
30
|
-
const schemaContent = fs.readFileSync(schemaPath, 'utf8');
|
|
31
|
-
let schema = JSON.parse(schemaContent);
|
|
32
|
-
|
|
33
|
-
// Apply field exclusion if specified
|
|
34
|
-
if (excludeFields.length > 0) {
|
|
35
|
-
const filteredSchema = { ...schema };
|
|
36
|
-
excludeFields.forEach((field) => delete filteredSchema[field]);
|
|
37
|
-
schema = filteredSchema;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
schemas.push(schema);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return schemas;
|
|
45
|
-
} catch (error) {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export default loadSchemasAsArray;
|