@lowdefy/build 5.1.0 → 5.3.0
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/dist/build/buildAgents.js +249 -0
- package/dist/build/buildApi/buildRoutine/countStepTypes.js +3 -0
- package/dist/build/buildApi/buildRoutine/setStepId.js +3 -2
- package/dist/build/buildApi/buildRoutine/validateStep.js +19 -0
- package/dist/build/buildApi/validateEndpoint.js +10 -0
- package/dist/build/buildApi/validateStepReferences.js +4 -4
- package/dist/build/buildAuth/buildApiAuth.js +2 -1
- package/dist/build/buildAuth/buildPageAuth.js +2 -1
- package/dist/build/buildAuth/getApiRoles.js +12 -6
- package/dist/build/buildAuth/getPageRoles.js +12 -6
- package/dist/build/buildAuth/getProtectedApi.js +3 -2
- package/dist/build/buildAuth/getProtectedPages.js +3 -2
- package/dist/build/buildAuth/matchPattern.js +22 -0
- package/dist/build/buildConnections.js +42 -4
- package/dist/build/buildImports/buildImportsDev.js +5 -0
- package/dist/build/buildImports/buildImportsProd.js +1 -0
- package/dist/build/buildJs/jsMapParser.js +25 -12
- package/dist/build/buildJs/writeJs.js +2 -2
- package/dist/build/buildMenu.js +41 -0
- package/dist/build/buildModuleDefs.js +97 -0
- package/dist/build/buildModules.js +96 -0
- package/dist/build/buildPages/buildBlock/buildBlock.js +2 -2
- package/dist/build/buildPages/buildBlock/buildEvents.js +16 -1
- package/dist/build/buildPages/buildBlock/buildSubBlocks.js +2 -1
- package/dist/build/buildPages/buildBlock/validateBlock.js +3 -3
- package/dist/build/buildPages/buildPage.js +1 -0
- package/dist/build/buildPages/validateCallApiRefs.js +31 -0
- package/dist/build/buildRefs/getModuleRefContent.js +81 -0
- package/dist/build/buildRefs/makeRefDefinition.js +6 -0
- package/dist/build/buildRefs/walker.js +424 -44
- package/dist/build/buildTypes.js +7 -0
- package/dist/build/copyAgentFileSystems.js +45 -0
- package/dist/build/fetchGitHubModule.js +94 -0
- package/dist/build/fetchModules.js +60 -0
- package/dist/build/full/buildPages.js +10 -1
- package/dist/build/full/updateServerPackageJson.js +1 -0
- package/dist/build/full/writePages.js +1 -1
- package/dist/build/jit/buildPageJit.js +34 -4
- package/dist/build/jit/collectSkeletonSourceFiles.js +8 -0
- package/dist/build/jit/createPageRegistry.js +10 -1
- package/dist/build/jit/shallowBuild.js +37 -11
- package/dist/build/jit/writePageJit.js +2 -2
- package/dist/build/jit/writeSourcelessPages.js +1 -1
- package/dist/build/parseModuleSource.js +48 -0
- package/dist/build/registerModules.js +247 -0
- package/dist/build/resolveDepTarget.js +43 -0
- package/dist/build/resolveModuleDependencies.js +60 -0
- package/dist/build/resolveModuleOperators.js +27 -0
- package/dist/build/testSchema.js +22 -11
- package/dist/build/writeAgents.js +26 -0
- package/dist/build/writePluginImports/writeAgentImports.js +22 -0
- package/dist/build/writePluginImports/writeGlobalsCss.js +1 -1
- package/dist/build/writePluginImports/writePluginImports.js +5 -0
- package/dist/createContext.js +6 -0
- package/dist/defaultPackages.js +58 -0
- package/dist/defaultTypesMap.js +469 -357
- package/dist/index.js +31 -1
- package/dist/indexDev.js +3 -1
- package/dist/lowdefySchema.js +302 -0
- package/dist/scripts/generateDefaultTypes.js +2 -35
- package/dist/test-utils/testContext.js +2 -0
- package/dist/utils/createPluginTypesMap.js +7 -0
- package/package.json +53 -42
- package/dist/build/jit/stripPageContent.js +0 -29
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import makeId from './utils/makeId.js';
|
|
|
20
20
|
import tryBuildStep from './utils/tryBuildStep.js';
|
|
21
21
|
import addDefaultPages from './build/addDefaultPages/addDefaultPages.js';
|
|
22
22
|
import addKeys from './build/addKeys.js';
|
|
23
|
+
import buildAgents from './build/buildAgents.js';
|
|
23
24
|
import buildApp from './build/buildApp.js';
|
|
24
25
|
import buildAuth from './build/buildAuth/buildAuth.js';
|
|
25
26
|
import buildConnections from './build/buildConnections.js';
|
|
@@ -28,15 +29,19 @@ import buildImports from './build/buildImports/buildImports.js';
|
|
|
28
29
|
import buildJs from './build/full/buildJs.js';
|
|
29
30
|
import buildLogger from './build/buildLogger.js';
|
|
30
31
|
import buildMenu from './build/buildMenu.js';
|
|
32
|
+
import buildModuleDefs from './build/buildModuleDefs.js';
|
|
33
|
+
import buildModules from './build/buildModules.js';
|
|
31
34
|
import buildPages from './build/full/buildPages.js';
|
|
32
35
|
import buildRefs from './build/buildRefs/buildRefs.js';
|
|
33
36
|
import collectPageContent from './build/collectPageContent.js';
|
|
34
37
|
import buildTypes from './build/buildTypes.js';
|
|
35
38
|
import cleanBuildDirectory from './build/cleanBuildDirectory.js';
|
|
39
|
+
import copyAgentFileSystems from './build/copyAgentFileSystems.js';
|
|
36
40
|
import copyPublicFolder from './build/copyPublicFolder.js';
|
|
37
41
|
import testSchema from './build/testSchema.js';
|
|
38
42
|
import updateServerPackageJson from './build/full/updateServerPackageJson.js';
|
|
39
43
|
import validateConfig from './build/validateConfig.js';
|
|
44
|
+
import writeAgents from './build/writeAgents.js';
|
|
40
45
|
import writeApp from './build/writeApp.js';
|
|
41
46
|
import writeAuth from './build/writeAuth.js';
|
|
42
47
|
import writeConfig from './build/writeConfig.js';
|
|
@@ -58,8 +63,14 @@ async function build(options) {
|
|
|
58
63
|
let context;
|
|
59
64
|
try {
|
|
60
65
|
context = createContext(options);
|
|
66
|
+
// Phase 1: Build module definitions
|
|
67
|
+
// Parses lowdefy.yaml, resolves module refs, populates context.modules
|
|
68
|
+
await buildModuleDefs({
|
|
69
|
+
context
|
|
70
|
+
});
|
|
61
71
|
let components;
|
|
62
72
|
try {
|
|
73
|
+
// Phase 2: Ref resolution (handles _ref: { module, component/menu })
|
|
63
74
|
components = await buildRefs({
|
|
64
75
|
context
|
|
65
76
|
});
|
|
@@ -73,17 +84,24 @@ async function build(options) {
|
|
|
73
84
|
}
|
|
74
85
|
// Stop if buildRefs collected any errors (YAML parse, missing files, etc.)
|
|
75
86
|
logCollectedErrors(context);
|
|
87
|
+
// Phase 3: Process modules — scopes IDs, merges into components
|
|
88
|
+
buildModules({
|
|
89
|
+
components,
|
|
90
|
+
context
|
|
91
|
+
});
|
|
76
92
|
// Build steps - collect all errors before stopping
|
|
77
93
|
// addKeys runs first so testSchema has ~k markers for error location info
|
|
78
94
|
tryBuildStep(addKeys, 'addKeys', {
|
|
79
95
|
components,
|
|
80
96
|
context
|
|
81
97
|
});
|
|
98
|
+
// testSchema emits warnings (not errors) — focused validations in each
|
|
99
|
+
// build step provide better error messages with full context
|
|
82
100
|
tryBuildStep(testSchema, 'testSchema', {
|
|
83
101
|
components,
|
|
84
102
|
context
|
|
85
103
|
});
|
|
86
|
-
//
|
|
104
|
+
// Stop if addKeys collected any errors (e.g. invalid ~ignoreBuildChecks)
|
|
87
105
|
logCollectedErrors(context);
|
|
88
106
|
tryBuildStep(buildApp, 'buildApp', {
|
|
89
107
|
components,
|
|
@@ -118,6 +136,10 @@ async function build(options) {
|
|
|
118
136
|
components,
|
|
119
137
|
context
|
|
120
138
|
});
|
|
139
|
+
tryBuildStep(buildAgents, 'buildAgents', {
|
|
140
|
+
components,
|
|
141
|
+
context
|
|
142
|
+
});
|
|
121
143
|
tryBuildStep(buildPages, 'buildPages', {
|
|
122
144
|
components,
|
|
123
145
|
context
|
|
@@ -171,6 +193,10 @@ async function build(options) {
|
|
|
171
193
|
components,
|
|
172
194
|
context
|
|
173
195
|
});
|
|
196
|
+
await writeAgents({
|
|
197
|
+
components,
|
|
198
|
+
context
|
|
199
|
+
});
|
|
174
200
|
await writeApi({
|
|
175
201
|
components,
|
|
176
202
|
context
|
|
@@ -227,6 +253,10 @@ async function build(options) {
|
|
|
227
253
|
components,
|
|
228
254
|
context
|
|
229
255
|
});
|
|
256
|
+
await copyAgentFileSystems({
|
|
257
|
+
components,
|
|
258
|
+
context
|
|
259
|
+
});
|
|
230
260
|
} catch (err) {
|
|
231
261
|
if (err instanceof BuildError) {
|
|
232
262
|
throw err;
|
package/dist/indexDev.js
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ export { default as
|
|
15
|
+
*/ export { default as buildModuleDefs } from './build/buildModuleDefs.js';
|
|
16
|
+
export { default as buildModules } from './build/buildModules.js';
|
|
17
|
+
export { default as shallowBuild } from './build/jit/shallowBuild.js';
|
|
16
18
|
export { default as buildPageJit } from './build/jit/buildPageJit.js';
|
|
17
19
|
export { default as createPageRegistry } from './build/jit/createPageRegistry.js';
|
|
18
20
|
export { default as createContext } from './createContext.js';
|
package/dist/lowdefySchema.js
CHANGED
|
@@ -67,6 +67,229 @@ export default {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
+
agent: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
required: [
|
|
74
|
+
'id',
|
|
75
|
+
'type',
|
|
76
|
+
'connectionId'
|
|
77
|
+
],
|
|
78
|
+
properties: {
|
|
79
|
+
'~ignoreBuildChecks': {
|
|
80
|
+
oneOf: [
|
|
81
|
+
{
|
|
82
|
+
const: true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: 'array',
|
|
86
|
+
items: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
enum: [
|
|
89
|
+
'state-refs',
|
|
90
|
+
'payload-refs',
|
|
91
|
+
'step-refs',
|
|
92
|
+
'link-refs',
|
|
93
|
+
'request-refs',
|
|
94
|
+
'connection-refs',
|
|
95
|
+
'types',
|
|
96
|
+
'schema'
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
'~r': {},
|
|
103
|
+
'~l': {},
|
|
104
|
+
id: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
errorMessage: {
|
|
107
|
+
type: 'Agent "id" should be a string.'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
type: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
errorMessage: {
|
|
113
|
+
type: 'Agent "type" should be a string.'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
connectionId: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
errorMessage: {
|
|
119
|
+
type: 'Agent "connectionId" should be a string.'
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
properties: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
errorMessage: {
|
|
125
|
+
type: 'Agent "properties" should be an object.'
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
tools: {
|
|
129
|
+
type: 'array',
|
|
130
|
+
items: {
|
|
131
|
+
anyOf: [
|
|
132
|
+
{
|
|
133
|
+
type: 'string'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'object',
|
|
137
|
+
required: [
|
|
138
|
+
'endpointId'
|
|
139
|
+
],
|
|
140
|
+
properties: {
|
|
141
|
+
endpointId: {
|
|
142
|
+
type: 'string'
|
|
143
|
+
},
|
|
144
|
+
confirm: {
|
|
145
|
+
const: true
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
additionalProperties: false
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
errorMessage: {
|
|
153
|
+
type: 'Agent "tools" should be an array.'
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
mcp: {
|
|
157
|
+
type: 'array',
|
|
158
|
+
items: {
|
|
159
|
+
anyOf: [
|
|
160
|
+
{
|
|
161
|
+
type: 'string'
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'object',
|
|
165
|
+
properties: {
|
|
166
|
+
connectionId: {
|
|
167
|
+
type: 'string'
|
|
168
|
+
},
|
|
169
|
+
url: {
|
|
170
|
+
type: 'string'
|
|
171
|
+
},
|
|
172
|
+
transport: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
enum: [
|
|
175
|
+
'http',
|
|
176
|
+
'sse',
|
|
177
|
+
'stdio'
|
|
178
|
+
],
|
|
179
|
+
default: 'http'
|
|
180
|
+
},
|
|
181
|
+
headers: {
|
|
182
|
+
type: 'object'
|
|
183
|
+
},
|
|
184
|
+
command: {
|
|
185
|
+
type: 'string'
|
|
186
|
+
},
|
|
187
|
+
args: {
|
|
188
|
+
type: 'array',
|
|
189
|
+
items: {
|
|
190
|
+
type: 'string'
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
env: {
|
|
194
|
+
type: 'object'
|
|
195
|
+
},
|
|
196
|
+
confirm: {
|
|
197
|
+
const: true
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
additionalProperties: false
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
errorMessage: {
|
|
205
|
+
type: 'Agent "mcp" should be an array.'
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
hooks: {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
onStart: {
|
|
212
|
+
type: 'array',
|
|
213
|
+
items: {
|
|
214
|
+
type: 'string'
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
onStepStart: {
|
|
218
|
+
type: 'array',
|
|
219
|
+
items: {
|
|
220
|
+
type: 'string'
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
onToolCallStart: {
|
|
224
|
+
type: 'array',
|
|
225
|
+
items: {
|
|
226
|
+
type: 'string'
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
onToolCallFinish: {
|
|
230
|
+
type: 'array',
|
|
231
|
+
items: {
|
|
232
|
+
type: 'string'
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
onStepFinish: {
|
|
236
|
+
type: 'array',
|
|
237
|
+
items: {
|
|
238
|
+
type: 'string'
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
onFinish: {
|
|
242
|
+
type: 'array',
|
|
243
|
+
items: {
|
|
244
|
+
type: 'string'
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
errorMessage: {
|
|
249
|
+
type: 'Agent "hooks" should be an object.'
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
agents: {
|
|
253
|
+
type: 'array',
|
|
254
|
+
items: {
|
|
255
|
+
anyOf: [
|
|
256
|
+
{
|
|
257
|
+
type: 'string'
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
type: 'object',
|
|
261
|
+
required: [
|
|
262
|
+
'agentId'
|
|
263
|
+
],
|
|
264
|
+
properties: {
|
|
265
|
+
agentId: {
|
|
266
|
+
type: 'string'
|
|
267
|
+
},
|
|
268
|
+
description: {
|
|
269
|
+
type: 'string'
|
|
270
|
+
},
|
|
271
|
+
inputSchema: {
|
|
272
|
+
type: 'object'
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
additionalProperties: false
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
errorMessage: {
|
|
280
|
+
type: 'Agent "agents" should be an array.'
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
errorMessage: {
|
|
285
|
+
type: 'Agent should be an object.',
|
|
286
|
+
required: {
|
|
287
|
+
id: 'Agent should have required property "id".',
|
|
288
|
+
type: 'Agent should have required property "type".',
|
|
289
|
+
connectionId: 'Agent should have required property "connectionId".'
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
70
293
|
app: {
|
|
71
294
|
type: 'object',
|
|
72
295
|
additionalProperties: false,
|
|
@@ -905,6 +1128,18 @@ export default {
|
|
|
905
1128
|
type: 'Api endpoint "type" should be a string.'
|
|
906
1129
|
}
|
|
907
1130
|
},
|
|
1131
|
+
description: {
|
|
1132
|
+
type: 'string',
|
|
1133
|
+
errorMessage: {
|
|
1134
|
+
type: 'Api endpoint "description" should be a string.'
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
payloadSchema: {
|
|
1138
|
+
type: 'object',
|
|
1139
|
+
errorMessage: {
|
|
1140
|
+
type: 'Api endpoint "payloadSchema" should be an object.'
|
|
1141
|
+
}
|
|
1142
|
+
},
|
|
908
1143
|
routine: {
|
|
909
1144
|
anyOf: [
|
|
910
1145
|
{
|
|
@@ -1495,6 +1730,15 @@ export default {
|
|
|
1495
1730
|
type: 'App "global" should be an object.'
|
|
1496
1731
|
}
|
|
1497
1732
|
},
|
|
1733
|
+
agents: {
|
|
1734
|
+
type: 'array',
|
|
1735
|
+
items: {
|
|
1736
|
+
$ref: '#/definitions/agent'
|
|
1737
|
+
},
|
|
1738
|
+
errorMessage: {
|
|
1739
|
+
type: 'App "agents" should be an array.'
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1498
1742
|
connections: {
|
|
1499
1743
|
type: 'array',
|
|
1500
1744
|
items: {
|
|
@@ -1531,6 +1775,64 @@ export default {
|
|
|
1531
1775
|
type: 'App "pages" should be an array.'
|
|
1532
1776
|
}
|
|
1533
1777
|
},
|
|
1778
|
+
modules: {
|
|
1779
|
+
type: 'array',
|
|
1780
|
+
items: {
|
|
1781
|
+
type: 'object',
|
|
1782
|
+
required: [
|
|
1783
|
+
'id',
|
|
1784
|
+
'source'
|
|
1785
|
+
],
|
|
1786
|
+
properties: {
|
|
1787
|
+
'~r': {},
|
|
1788
|
+
'~l': {},
|
|
1789
|
+
id: {
|
|
1790
|
+
type: 'string',
|
|
1791
|
+
errorMessage: {
|
|
1792
|
+
type: 'Module "id" should be a string.'
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
source: {
|
|
1796
|
+
type: 'string',
|
|
1797
|
+
errorMessage: {
|
|
1798
|
+
type: 'Module "source" should be a string.'
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
vars: {
|
|
1802
|
+
type: 'object',
|
|
1803
|
+
errorMessage: {
|
|
1804
|
+
type: 'Module "vars" should be an object.'
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
connections: {
|
|
1808
|
+
type: 'object',
|
|
1809
|
+
errorMessage: {
|
|
1810
|
+
type: 'Module "connections" should be an object.'
|
|
1811
|
+
}
|
|
1812
|
+
},
|
|
1813
|
+
dependencies: {
|
|
1814
|
+
type: 'object',
|
|
1815
|
+
additionalProperties: {
|
|
1816
|
+
type: 'string'
|
|
1817
|
+
},
|
|
1818
|
+
errorMessage: {
|
|
1819
|
+
type: 'Module "dependencies" should be an object with string values.'
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
additionalProperties: false,
|
|
1824
|
+
errorMessage: {
|
|
1825
|
+
type: 'Module should be an object.',
|
|
1826
|
+
required: {
|
|
1827
|
+
id: 'Module should have required property "id".',
|
|
1828
|
+
source: 'Module should have required property "source".'
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1832
|
+
errorMessage: {
|
|
1833
|
+
type: 'App "modules" should be an array.'
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1534
1836
|
logger: {
|
|
1535
1837
|
type: 'object',
|
|
1536
1838
|
additionalProperties: false,
|
|
@@ -16,45 +16,12 @@
|
|
|
16
16
|
*/ import path from 'path';
|
|
17
17
|
import { readFile, writeFile } from '@lowdefy/node-utils';
|
|
18
18
|
import createPluginTypesMap from '../utils/createPluginTypesMap.js';
|
|
19
|
-
|
|
20
|
-
'@lowdefy/actions-core',
|
|
21
|
-
'@lowdefy/actions-pdf-make',
|
|
22
|
-
'@lowdefy/blocks-aggrid',
|
|
23
|
-
'@lowdefy/blocks-antd',
|
|
24
|
-
'@lowdefy/blocks-basic',
|
|
25
|
-
'@lowdefy/blocks-diff',
|
|
26
|
-
'@lowdefy/blocks-echarts',
|
|
27
|
-
'@lowdefy/blocks-google-maps',
|
|
28
|
-
'@lowdefy/blocks-loaders',
|
|
29
|
-
'@lowdefy/blocks-markdown',
|
|
30
|
-
'@lowdefy/blocks-qr',
|
|
31
|
-
'@lowdefy/connection-axios-http',
|
|
32
|
-
'@lowdefy/connection-elasticsearch',
|
|
33
|
-
'@lowdefy/connection-test',
|
|
34
|
-
'@lowdefy/connection-google-sheets',
|
|
35
|
-
'@lowdefy/connection-knex',
|
|
36
|
-
'@lowdefy/connection-mongodb',
|
|
37
|
-
'@lowdefy/connection-redis',
|
|
38
|
-
'@lowdefy/connection-sendgrid',
|
|
39
|
-
'@lowdefy/connection-stripe',
|
|
40
|
-
'@lowdefy/operators-change-case',
|
|
41
|
-
'@lowdefy/operators-diff',
|
|
42
|
-
'@lowdefy/operators-js',
|
|
43
|
-
'@lowdefy/operators-jsonata',
|
|
44
|
-
'@lowdefy/operators-dayjs',
|
|
45
|
-
'@lowdefy/operators-mql',
|
|
46
|
-
'@lowdefy/operators-nunjucks',
|
|
47
|
-
'@lowdefy/operators-uuid',
|
|
48
|
-
'@lowdefy/operators-yaml',
|
|
49
|
-
'@lowdefy/plugin-auth0',
|
|
50
|
-
'@lowdefy/plugin-aws',
|
|
51
|
-
'@lowdefy/plugin-csv',
|
|
52
|
-
'@lowdefy/plugin-next-auth'
|
|
53
|
-
];
|
|
19
|
+
import defaultPackages from '../defaultPackages.js';
|
|
54
20
|
async function generateDefaultTypesMap() {
|
|
55
21
|
const packageFile = JSON.parse(await readFile(path.resolve(process.cwd(), './package.json')));
|
|
56
22
|
const defaultTypesMap = {
|
|
57
23
|
actions: {},
|
|
24
|
+
agents: {},
|
|
58
25
|
auth: {
|
|
59
26
|
adapters: {},
|
|
60
27
|
callbacks: {},
|
|
@@ -29,6 +29,7 @@ function testContext({ writeBuildArtifact, configDirectory, readConfigFile, logg
|
|
|
29
29
|
},
|
|
30
30
|
typeCounters: {
|
|
31
31
|
actions: createCounter(),
|
|
32
|
+
agents: createCounter(),
|
|
32
33
|
auth: {
|
|
33
34
|
adapters: createCounter(),
|
|
34
35
|
callbacks: createCounter(),
|
|
@@ -49,6 +50,7 @@ function testContext({ writeBuildArtifact, configDirectory, readConfigFile, logg
|
|
|
49
50
|
refMap: {},
|
|
50
51
|
keyMap: {},
|
|
51
52
|
jsMap: {},
|
|
53
|
+
agentIds: new Set(),
|
|
52
54
|
connectionIds: new Set()
|
|
53
55
|
};
|
|
54
56
|
context.logger = {
|
|
@@ -32,6 +32,13 @@ function createPluginTypesMap({ packageName, packageTypes, typePrefix = '', type
|
|
|
32
32
|
typePrefix,
|
|
33
33
|
version
|
|
34
34
|
});
|
|
35
|
+
createTypeDefinitions({
|
|
36
|
+
typeNames: packageTypes.agents,
|
|
37
|
+
store: typesMap.agents,
|
|
38
|
+
packageName,
|
|
39
|
+
typePrefix,
|
|
40
|
+
version
|
|
41
|
+
});
|
|
35
42
|
createTypeDefinitions({
|
|
36
43
|
typeNames: type.isObject(packageTypes.auth) ? packageTypes.auth.adapters : [],
|
|
37
44
|
store: typesMap.auth.adapters,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/build",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -45,57 +45,68 @@
|
|
|
45
45
|
"dist/*"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@lowdefy/
|
|
49
|
-
"@lowdefy/
|
|
50
|
-
"@lowdefy/
|
|
51
|
-
"@lowdefy/blocks-
|
|
52
|
-
"@lowdefy/
|
|
53
|
-
"@lowdefy/
|
|
54
|
-
"@lowdefy/
|
|
55
|
-
"@lowdefy/
|
|
56
|
-
"@lowdefy/
|
|
57
|
-
"@lowdefy/operators
|
|
48
|
+
"@lowdefy/ai-utils": "5.3.0",
|
|
49
|
+
"@lowdefy/ajv": "5.3.0",
|
|
50
|
+
"@lowdefy/block-utils": "5.3.0",
|
|
51
|
+
"@lowdefy/blocks-basic": "5.3.0",
|
|
52
|
+
"@lowdefy/blocks-loaders": "5.3.0",
|
|
53
|
+
"@lowdefy/errors": "5.3.0",
|
|
54
|
+
"@lowdefy/helpers": "5.3.0",
|
|
55
|
+
"@lowdefy/node-utils": "5.3.0",
|
|
56
|
+
"@lowdefy/nunjucks": "5.3.0",
|
|
57
|
+
"@lowdefy/operators": "5.3.0",
|
|
58
|
+
"@lowdefy/operators-js": "5.3.0",
|
|
58
59
|
"ajv": "8.12.0",
|
|
59
60
|
"json5": "2.2.3",
|
|
61
|
+
"picomatch": "4.0.1",
|
|
62
|
+
"semver": "7.5.4",
|
|
63
|
+
"tar": "6.2.1",
|
|
60
64
|
"yaml": "2.3.4",
|
|
61
65
|
"yargs": "17.7.2"
|
|
62
66
|
},
|
|
63
67
|
"devDependencies": {
|
|
64
68
|
"@jest/globals": "28.1.3",
|
|
65
|
-
"@lowdefy/actions-core": "5.
|
|
66
|
-
"@lowdefy/actions-pdf-make": "5.
|
|
67
|
-
"@lowdefy/blocks-aggrid": "5.
|
|
68
|
-
"@lowdefy/blocks-antd": "5.
|
|
69
|
-
"@lowdefy/blocks-
|
|
70
|
-
"@lowdefy/blocks-
|
|
71
|
-
"@lowdefy/blocks-
|
|
72
|
-
"@lowdefy/blocks-
|
|
73
|
-
"@lowdefy/blocks-
|
|
74
|
-
"@lowdefy/
|
|
75
|
-
"@lowdefy/
|
|
76
|
-
"@lowdefy/connection-
|
|
77
|
-
"@lowdefy/connection-
|
|
78
|
-
"@lowdefy/connection-
|
|
79
|
-
"@lowdefy/connection-
|
|
80
|
-
"@lowdefy/connection-
|
|
81
|
-
"@lowdefy/connection-
|
|
82
|
-
"@lowdefy/connection-
|
|
83
|
-
"@lowdefy/
|
|
84
|
-
"@lowdefy/
|
|
85
|
-
"@lowdefy/
|
|
86
|
-
"@lowdefy/
|
|
87
|
-
"@lowdefy/
|
|
88
|
-
"@lowdefy/
|
|
89
|
-
"@lowdefy/
|
|
90
|
-
"@lowdefy/
|
|
91
|
-
"@lowdefy/
|
|
92
|
-
"@lowdefy/
|
|
93
|
-
"@lowdefy/
|
|
94
|
-
"@lowdefy/
|
|
69
|
+
"@lowdefy/actions-core": "5.3.0",
|
|
70
|
+
"@lowdefy/actions-pdf-make": "5.3.0",
|
|
71
|
+
"@lowdefy/blocks-aggrid": "5.3.0",
|
|
72
|
+
"@lowdefy/blocks-antd": "5.3.0",
|
|
73
|
+
"@lowdefy/blocks-antd-x": "5.3.0",
|
|
74
|
+
"@lowdefy/blocks-diff": "5.3.0",
|
|
75
|
+
"@lowdefy/blocks-echarts": "5.3.0",
|
|
76
|
+
"@lowdefy/blocks-google-maps": "5.3.0",
|
|
77
|
+
"@lowdefy/blocks-markdown": "5.3.0",
|
|
78
|
+
"@lowdefy/blocks-qr": "5.3.0",
|
|
79
|
+
"@lowdefy/blocks-tiptap": "5.3.0",
|
|
80
|
+
"@lowdefy/connection-ai-gateway": "5.3.0",
|
|
81
|
+
"@lowdefy/connection-anthropic": "5.3.0",
|
|
82
|
+
"@lowdefy/connection-axios-http": "5.3.0",
|
|
83
|
+
"@lowdefy/connection-elasticsearch": "5.3.0",
|
|
84
|
+
"@lowdefy/connection-google": "5.3.0",
|
|
85
|
+
"@lowdefy/connection-google-sheets": "5.3.0",
|
|
86
|
+
"@lowdefy/connection-knex": "5.3.0",
|
|
87
|
+
"@lowdefy/connection-mcp": "5.3.0",
|
|
88
|
+
"@lowdefy/connection-mongodb": "5.3.0",
|
|
89
|
+
"@lowdefy/connection-openai": "5.3.0",
|
|
90
|
+
"@lowdefy/connection-redis": "5.3.0",
|
|
91
|
+
"@lowdefy/connection-sendgrid": "5.3.0",
|
|
92
|
+
"@lowdefy/connection-stripe": "5.3.0",
|
|
93
|
+
"@lowdefy/connection-test": "5.3.0",
|
|
94
|
+
"@lowdefy/logger": "5.3.0",
|
|
95
|
+
"@lowdefy/operators-change-case": "5.3.0",
|
|
96
|
+
"@lowdefy/operators-dayjs": "5.3.0",
|
|
97
|
+
"@lowdefy/operators-diff": "5.3.0",
|
|
98
|
+
"@lowdefy/operators-jsonata": "5.3.0",
|
|
99
|
+
"@lowdefy/operators-mql": "5.3.0",
|
|
100
|
+
"@lowdefy/operators-nunjucks": "5.3.0",
|
|
101
|
+
"@lowdefy/operators-uuid": "5.3.0",
|
|
102
|
+
"@lowdefy/operators-yaml": "5.3.0",
|
|
103
|
+
"@lowdefy/plugin-auth0": "5.3.0",
|
|
104
|
+
"@lowdefy/plugin-aws": "5.3.0",
|
|
105
|
+
"@lowdefy/plugin-csv": "5.3.0",
|
|
106
|
+
"@lowdefy/plugin-next-auth": "5.3.0",
|
|
95
107
|
"@swc/cli": "0.8.0",
|
|
96
108
|
"@swc/core": "1.15.18",
|
|
97
109
|
"@swc/jest": "0.2.39",
|
|
98
|
-
"@lowdefy/logger": "5.1.0",
|
|
99
110
|
"jest": "28.1.3",
|
|
100
111
|
"pino": "8.16.2"
|
|
101
112
|
},
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2026 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
|
-
*/ import { type } from '@lowdefy/helpers';
|
|
16
|
-
import PAGE_CONTENT_KEYS from './pageContentKeys.js';
|
|
17
|
-
function stripPageContent({ components, context }) {
|
|
18
|
-
for (const page of components.pages ?? []){
|
|
19
|
-
// Only strip pages that have a source ref (will be JIT-rebuilt).
|
|
20
|
-
// Inline pages (no ~r) must keep their content for buildShallowPages.
|
|
21
|
-
const keyMapEntry = context.keyMap[page['~k']];
|
|
22
|
-
const refId = keyMapEntry?.['~r'] ?? null;
|
|
23
|
-
if (type.isNone(refId)) continue;
|
|
24
|
-
for (const key of PAGE_CONTENT_KEYS){
|
|
25
|
-
delete page[key];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export default stripPageContent;
|