@lowdefy/server-dev 0.0.0-experimental-20250911081238 → 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.
@@ -0,0 +1,60 @@
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 path from 'path';
18
+ import crypto from 'crypto';
19
+ import { createApiContext } from '@lowdefy/api';
20
+ import { getSecretsFromEnv } from '@lowdefy/node-utils';
21
+
22
+ import config from '../../../../../build/config.json';
23
+ import connections from '../../../../../build/plugins/connections.js';
24
+ import createLogger from '../../../../../lib/server/log/createLogger.js';
25
+ import fileCache from '../../../../../lib/server/fileCache.js';
26
+ import logError from '../../../../../lib/server/log/logError.js';
27
+ import logRequest from '../../../../../lib/server/log/logRequest.js';
28
+ import operators from '../../../../../build/plugins/operators/server.js';
29
+ import jsMap from '../../../../../build/plugins/operators/serverJsMap.js';
30
+ import getAuthOptions from '../../../../../lib/server/auth/getAuthOptions.js';
31
+
32
+ const secrets = getSecretsFromEnv();
33
+
34
+ async function createContext() {
35
+ const context = {
36
+ rid: crypto.randomUUID(),
37
+ buildDirectory: path.join(process.cwd(), 'build'),
38
+ config,
39
+ connections,
40
+ fileCache,
41
+ jsMap,
42
+ logger: console,
43
+ operators,
44
+ secrets,
45
+ };
46
+
47
+ try {
48
+ context.logger = createLogger({ rid: context.rid });
49
+ context.authOptions = getAuthOptions(context);
50
+
51
+ createApiContext(context);
52
+ logRequest({ context });
53
+ } catch (error) {
54
+ logError({ error, context });
55
+ }
56
+
57
+ return context;
58
+ }
59
+
60
+ export default createContext;
@@ -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 loadIndividualSchema(schemaType, identifier) {
21
+ function loadIndividualDoc(docType, identifier) {
22
22
  try {
23
- const schemaPath = path.join(process.cwd(), `build/schemas/${schemaType}/${identifier}.json`);
24
- const schemaContent = fs.readFileSync(schemaPath, 'utf8');
23
+ const docPath = path.join(process.cwd(), `build/docs/${docType}/${identifier}.md`);
24
+ const content = fs.readFileSync(docPath, 'utf8');
25
25
 
26
- return JSON.parse(schemaContent);
26
+ return content;
27
27
  } catch (error) {
28
28
  return null;
29
29
  }
30
30
  }
31
31
 
32
- export default loadIndividualSchema;
32
+ export default loadIndividualDoc;
@@ -25,6 +25,7 @@ import listBlocks from './tools/listBlocks.js';
25
25
  import listConnections from './tools/listConnections.js';
26
26
  import listOperators from './tools/listOperators.js';
27
27
  import listRequests from './tools/listRequests.js';
28
+ import executeRequest from './tools/executeRequest.js';
28
29
 
29
30
  const handler = createMcpHandler(
30
31
  async (server) => {
@@ -47,6 +48,7 @@ const handler = createMcpHandler(
47
48
  // Requests
48
49
  server.tool(...listRequests);
49
50
  server.tool(...getRequest);
51
+ server.tool(...executeRequest);
50
52
  },
51
53
  {
52
54
  // Optional server options
@@ -0,0 +1,63 @@
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 { z } from 'zod';
18
+ import { callRequest } from '@lowdefy/api';
19
+
20
+ import createContext from '../helpers/createContext.js';
21
+
22
+ export default [
23
+ 'execute_request',
24
+ 'Execute a request with specified blockId, pageId, payload and requestId',
25
+ {
26
+ blockId: z.string().describe('The block ID to test against'),
27
+ pageId: z.string().describe('The page ID to test against'),
28
+ payload: z.record(z.any()).optional().describe('Additional payload for the request'),
29
+ requestId: z.string().optional().describe('The request ID to test against'),
30
+ },
31
+ async ({ blockId, pageId, payload = {}, requestId }) => {
32
+ const requestConfig = {
33
+ blockId,
34
+ pageId,
35
+ payload,
36
+ requestId,
37
+ };
38
+
39
+ let responseText = `Executing Request:\n${JSON.stringify(requestConfig, null, 2)}`;
40
+
41
+ try {
42
+ const context = await createContext();
43
+ const response = await callRequest(context, requestConfig);
44
+
45
+ responseText += `\n\nExecution Result:\n${JSON.stringify(response, null, 2)}`;
46
+ } catch (error) {
47
+ responseText += `\n\nExecution Error:\n${error.message || 'Unknown error occurred'}`;
48
+
49
+ if (error.stack) {
50
+ responseText += `\n\nStack Trace:\n${error.stack}`;
51
+ }
52
+ }
53
+
54
+ return {
55
+ content: [
56
+ {
57
+ type: 'text',
58
+ text: responseText,
59
+ },
60
+ ],
61
+ };
62
+ },
63
+ ];
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { z } from 'zod';
18
- import loadIndividualSchema from '../helpers/loadIndividualSchema.js';
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 = loadIndividualSchema('actions', actionType);
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}\nPackage: ${action.package}\nSchema:\n${JSON.stringify(
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 loadIndividualSchema from '../helpers/loadIndividualSchema.js';
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 = loadIndividualSchema('blocks', blockType);
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}\nPackage: ${block.package}\nSchema:\n${JSON.stringify(
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 loadIndividualSchema from '../helpers/loadIndividualSchema.js';
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 = loadIndividualSchema('connections', connectionType);
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}\nPackage: ${
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 loadIndividualSchema from '../helpers/loadIndividualSchema.js';
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 = loadIndividualSchema('operators', operatorType);
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}\nPackage: ${operator.package}\nSchema:\n${JSON.stringify(
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 loadIndividualSchema from '../helpers/loadIndividualSchema.js';
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 = loadIndividualSchema(`requests/${connectionType}`, requestType);
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}\nPackage: ${
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 loadSchemasAsArray from '../helpers/loadSchemasAsArray.js';
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 = loadSchemasAsArray('actions', ['schema']);
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${JSON.stringify(actionList, null, 2)}`,
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 loadSchemasAsArray from '../helpers/loadSchemasAsArray.js';
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 = loadSchemasAsArray('blocks', ['schema']);
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${JSON.stringify(blockList, null, 2)}`,
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 loadSchemasAsArray from '../helpers/loadSchemasAsArray.js';
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 = loadSchemasAsArray('connections', ['schema']);
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${JSON.stringify(connectionList, null, 2)}`,
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 loadSchemasAsArray from '../helpers/loadSchemasAsArray.js';
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 = loadSchemasAsArray('operators', ['schema']);
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${JSON.stringify(operatorList, null, 2)}`,
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 loadSchemasAsArray from '../helpers/loadSchemasAsArray.js';
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 = loadSchemasAsArray(`requests/${connectionType}`, ['schema']);
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${JSON.stringify(requestList, null, 2)}`,
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-20250911081238",
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-20250911081238",
41
- "@lowdefy/api": "0.0.0-experimental-20250911081238",
42
- "@lowdefy/block-utils": "0.0.0-experimental-20250911081238",
43
- "@lowdefy/blocks-aggrid": "0.0.0-experimental-20250911081238",
44
- "@lowdefy/blocks-antd": "0.0.0-experimental-20250911081238",
45
- "@lowdefy/blocks-basic": "0.0.0-experimental-20250911081238",
46
- "@lowdefy/blocks-color-selectors": "0.0.0-experimental-20250911081238",
47
- "@lowdefy/blocks-echarts": "0.0.0-experimental-20250911081238",
48
- "@lowdefy/blocks-loaders": "0.0.0-experimental-20250911081238",
49
- "@lowdefy/blocks-markdown": "0.0.0-experimental-20250911081238",
50
- "@lowdefy/blocks-qr": "0.0.0-experimental-20250911081238",
51
- "@lowdefy/build": "0.0.0-experimental-20250911081238",
52
- "@lowdefy/client": "0.0.0-experimental-20250911081238",
53
- "@lowdefy/connection-axios-http": "0.0.0-experimental-20250911081238",
54
- "@lowdefy/engine": "0.0.0-experimental-20250911081238",
55
- "@lowdefy/helpers": "0.0.0-experimental-20250911081238",
56
- "@lowdefy/layout": "0.0.0-experimental-20250911081238",
57
- "@lowdefy/node-utils": "0.0.0-experimental-20250911081238",
58
- "@lowdefy/operators-change-case": "0.0.0-experimental-20250911081238",
59
- "@lowdefy/operators-diff": "0.0.0-experimental-20250911081238",
60
- "@lowdefy/operators-js": "0.0.0-experimental-20250911081238",
61
- "@lowdefy/operators-moment": "0.0.0-experimental-20250911081238",
62
- "@lowdefy/operators-mql": "0.0.0-experimental-20250911081238",
63
- "@lowdefy/operators-nunjucks": "0.0.0-experimental-20250911081238",
64
- "@lowdefy/operators-uuid": "0.0.0-experimental-20250911081238",
65
- "@lowdefy/operators-yaml": "0.0.0-experimental-20250911081238",
66
- "@lowdefy/plugin-next-auth": "0.0.0-experimental-20250911081238",
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",
@@ -79,7 +79,7 @@
79
79
  "swr": "2.2.4",
80
80
  "yaml": "2.3.4",
81
81
  "yargs": "17.7.2",
82
- "zod": "^3"
82
+ "zod": "3.25.76"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@next/eslint-plugin-next": "13.5.4",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/server-dev",
3
- "version": "0.0.0-experimental-20250911081238",
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-20250911081238",
48
- "@lowdefy/api": "0.0.0-experimental-20250911081238",
49
- "@lowdefy/block-utils": "0.0.0-experimental-20250911081238",
50
- "@lowdefy/blocks-aggrid": "0.0.0-experimental-20250911081238",
51
- "@lowdefy/blocks-antd": "0.0.0-experimental-20250911081238",
52
- "@lowdefy/blocks-basic": "0.0.0-experimental-20250911081238",
53
- "@lowdefy/blocks-color-selectors": "0.0.0-experimental-20250911081238",
54
- "@lowdefy/blocks-echarts": "0.0.0-experimental-20250911081238",
55
- "@lowdefy/blocks-loaders": "0.0.0-experimental-20250911081238",
56
- "@lowdefy/blocks-markdown": "0.0.0-experimental-20250911081238",
57
- "@lowdefy/blocks-qr": "0.0.0-experimental-20250911081238",
58
- "@lowdefy/build": "0.0.0-experimental-20250911081238",
59
- "@lowdefy/client": "0.0.0-experimental-20250911081238",
60
- "@lowdefy/connection-axios-http": "0.0.0-experimental-20250911081238",
61
- "@lowdefy/engine": "0.0.0-experimental-20250911081238",
62
- "@lowdefy/helpers": "0.0.0-experimental-20250911081238",
63
- "@lowdefy/layout": "0.0.0-experimental-20250911081238",
64
- "@lowdefy/node-utils": "0.0.0-experimental-20250911081238",
65
- "@lowdefy/operators-change-case": "0.0.0-experimental-20250911081238",
66
- "@lowdefy/operators-diff": "0.0.0-experimental-20250911081238",
67
- "@lowdefy/operators-js": "0.0.0-experimental-20250911081238",
68
- "@lowdefy/operators-moment": "0.0.0-experimental-20250911081238",
69
- "@lowdefy/operators-mql": "0.0.0-experimental-20250911081238",
70
- "@lowdefy/operators-nunjucks": "0.0.0-experimental-20250911081238",
71
- "@lowdefy/operators-uuid": "0.0.0-experimental-20250911081238",
72
- "@lowdefy/operators-yaml": "0.0.0-experimental-20250911081238",
73
- "@lowdefy/plugin-next-auth": "0.0.0-experimental-20250911081238",
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",
@@ -86,7 +86,7 @@
86
86
  "swr": "2.2.4",
87
87
  "yaml": "2.3.4",
88
88
  "yargs": "17.7.2",
89
- "zod": "^3"
89
+ "zod": "3.25.76"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@next/eslint-plugin-next": "13.5.4",
@@ -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;