@lowdefy/build 4.4.0 → 4.5.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/LICENSE +183 -183
- package/dist/build/buildApi/buildApi.js +34 -0
- package/dist/build/buildApi/buildEndpoint.js +30 -0
- package/dist/build/buildApi/buildRoutine/buildControl.js +33 -0
- package/dist/build/buildApi/buildRoutine/buildRoutine.js +35 -0
- package/dist/build/buildApi/buildRoutine/buildStep.js +27 -0
- package/dist/build/buildApi/buildRoutine/controlTypes.js +214 -0
- package/dist/build/buildApi/buildRoutine/countControl.js +18 -0
- package/dist/build/buildApi/buildRoutine/countStepTypes.js +18 -0
- package/dist/build/buildApi/buildRoutine/setStepId.js +20 -0
- package/dist/build/buildApi/buildRoutine/validateStep.js +42 -0
- package/dist/build/buildApi/validateEndpoint.js +22 -0
- package/dist/build/buildAuth/buildApiAuth.js +50 -0
- package/dist/build/buildAuth/buildAuth.js +4 -15
- package/dist/build/buildAuth/getApiRoles.js +33 -0
- package/dist/build/buildAuth/getProtectedApi.js +28 -0
- package/dist/build/buildAuth/validateAuthConfig.js +15 -9
- package/dist/build/buildAuth/validateMutualExclusivity.js +27 -0
- package/dist/build/buildJs/buildJs.js +5 -0
- package/dist/build/buildJs/writeJs.js +1 -1
- package/dist/build/buildTypes.js +1 -4
- package/dist/build/writeApi.js +30 -0
- package/dist/createContext.js +2 -2
- package/dist/defaultTypesMap.js +496 -461
- package/dist/index.js +10 -0
- package/dist/lowdefySchema.js +105 -0
- package/dist/scripts/generateDefaultTypes.js +1 -0
- package/dist/test/testContext.js +1 -3
- package/package.json +39 -38
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ import addKeys from './build/addKeys.js';
|
|
|
19
19
|
import buildApp from './build/buildApp.js';
|
|
20
20
|
import buildAuth from './build/buildAuth/buildAuth.js';
|
|
21
21
|
import buildConnections from './build/buildConnections.js';
|
|
22
|
+
import buildApi from './build/buildApi/buildApi.js';
|
|
22
23
|
import buildImports from './build/buildImports/buildImports.js';
|
|
23
24
|
import buildJs from './build/buildJs/buildJs.js';
|
|
24
25
|
import buildMenu from './build/buildMenu.js';
|
|
@@ -34,6 +35,7 @@ import writeApp from './build/writeApp.js';
|
|
|
34
35
|
import writeAuth from './build/writeAuth.js';
|
|
35
36
|
import writeConfig from './build/writeConfig.js';
|
|
36
37
|
import writeConnections from './build/writeConnections.js';
|
|
38
|
+
import writeApi from './build/writeApi.js';
|
|
37
39
|
import writeGlobal from './build/writeGlobal.js';
|
|
38
40
|
import writeJs from './build/buildJs/writeJs.js';
|
|
39
41
|
import writeMaps from './build/writeMaps.js';
|
|
@@ -71,6 +73,10 @@ async function build(options) {
|
|
|
71
73
|
components,
|
|
72
74
|
context
|
|
73
75
|
});
|
|
76
|
+
buildApi({
|
|
77
|
+
components,
|
|
78
|
+
context
|
|
79
|
+
});
|
|
74
80
|
buildPages({
|
|
75
81
|
components,
|
|
76
82
|
context
|
|
@@ -110,6 +116,10 @@ async function build(options) {
|
|
|
110
116
|
components,
|
|
111
117
|
context
|
|
112
118
|
});
|
|
119
|
+
await writeApi({
|
|
120
|
+
components,
|
|
121
|
+
context
|
|
122
|
+
});
|
|
113
123
|
await writeRequests({
|
|
114
124
|
components,
|
|
115
125
|
context
|
package/dist/lowdefySchema.js
CHANGED
|
@@ -114,6 +114,64 @@ export default {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
+
api: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
errorMessage: {
|
|
121
|
+
type: 'App "config.auth.api" should be an object.'
|
|
122
|
+
},
|
|
123
|
+
properties: {
|
|
124
|
+
protected: {
|
|
125
|
+
type: [
|
|
126
|
+
'array',
|
|
127
|
+
'boolean'
|
|
128
|
+
],
|
|
129
|
+
errorMessage: {
|
|
130
|
+
type: 'App "auth.api.protected.$" should be an array of strings.'
|
|
131
|
+
},
|
|
132
|
+
items: {
|
|
133
|
+
type: 'string',
|
|
134
|
+
description: 'Page ids for which authentication is required. When specified, all unspecified api endpoints will be public.',
|
|
135
|
+
errorMessage: {
|
|
136
|
+
type: 'App "auth.api.protected.$" should be an array of strings.'
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
public: {
|
|
141
|
+
type: [
|
|
142
|
+
'array',
|
|
143
|
+
'boolean'
|
|
144
|
+
],
|
|
145
|
+
errorMessage: {
|
|
146
|
+
type: 'App "auth.api.public.$" should be an array of strings.'
|
|
147
|
+
},
|
|
148
|
+
items: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
description: 'Page ids for which authentication is not required. When specified, all unspecified api endpoints will be protected.',
|
|
151
|
+
errorMessage: {
|
|
152
|
+
type: 'App "auth.api.public.$" should be an array of strings.'
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
roles: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
patternProperties: {
|
|
159
|
+
'^.*$': {
|
|
160
|
+
type: 'array',
|
|
161
|
+
items: {
|
|
162
|
+
type: 'string'
|
|
163
|
+
},
|
|
164
|
+
errorMessage: {
|
|
165
|
+
type: 'App "auth.api.roles.[role]" should be an array of strings.'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
errorMessage: {
|
|
170
|
+
type: 'App "auth.api.roles" should be an object.'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
117
175
|
authPages: {
|
|
118
176
|
type: 'object',
|
|
119
177
|
additionalProperties: false,
|
|
@@ -488,6 +546,44 @@ export default {
|
|
|
488
546
|
}
|
|
489
547
|
}
|
|
490
548
|
},
|
|
549
|
+
endpoint: {
|
|
550
|
+
type: 'object',
|
|
551
|
+
additionalProperties: false,
|
|
552
|
+
required: [
|
|
553
|
+
'id',
|
|
554
|
+
'type'
|
|
555
|
+
],
|
|
556
|
+
properties: {
|
|
557
|
+
id: {
|
|
558
|
+
type: 'string',
|
|
559
|
+
errorMessage: {
|
|
560
|
+
type: 'Api endpoint "id" should be a string.'
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
type: {
|
|
564
|
+
type: 'string',
|
|
565
|
+
errorMessage: {
|
|
566
|
+
type: 'Api endpoint "type" should be a string.'
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
routine: {
|
|
570
|
+
anyOf: [
|
|
571
|
+
{
|
|
572
|
+
type: 'array',
|
|
573
|
+
errorMessage: {
|
|
574
|
+
type: 'Api endpoint "routine" should be an array or object.'
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
type: 'object',
|
|
579
|
+
errorMessage: {
|
|
580
|
+
type: 'Api endpoint "routine" should be an array or object.'
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
},
|
|
491
587
|
connection: {
|
|
492
588
|
type: 'object',
|
|
493
589
|
additionalProperties: false,
|
|
@@ -845,6 +941,15 @@ export default {
|
|
|
845
941
|
type: 'App "connections" should be an array.'
|
|
846
942
|
}
|
|
847
943
|
},
|
|
944
|
+
api: {
|
|
945
|
+
type: 'array',
|
|
946
|
+
items: {
|
|
947
|
+
$ref: '#/definitions/endpoint'
|
|
948
|
+
},
|
|
949
|
+
errorMessage: {
|
|
950
|
+
type: 'App "api" should be an array.'
|
|
951
|
+
}
|
|
952
|
+
},
|
|
848
953
|
menus: {
|
|
849
954
|
type: 'array',
|
|
850
955
|
items: {
|
package/dist/test/testContext.js
CHANGED
|
@@ -26,9 +26,6 @@ function testContext({ writeBuildArtifact, configDirectory, readConfigFile, logg
|
|
|
26
26
|
directories: {
|
|
27
27
|
config: configDirectory || ''
|
|
28
28
|
},
|
|
29
|
-
entitlements: [
|
|
30
|
-
'AUTH'
|
|
31
|
-
],
|
|
32
29
|
typeCounters: {
|
|
33
30
|
actions: createCounter(),
|
|
34
31
|
auth: {
|
|
@@ -40,6 +37,7 @@ function testContext({ writeBuildArtifact, configDirectory, readConfigFile, logg
|
|
|
40
37
|
blocks: createCounter(),
|
|
41
38
|
connections: createCounter(),
|
|
42
39
|
requests: createCounter(),
|
|
40
|
+
controls: createCounter(),
|
|
43
41
|
operators: {
|
|
44
42
|
client: createCounter(),
|
|
45
43
|
server: createCounter()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/build",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"dist/*"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@lowdefy/ajv": "4.
|
|
48
|
-
"@lowdefy/blocks-basic": "4.
|
|
49
|
-
"@lowdefy/blocks-loaders": "4.
|
|
50
|
-
"@lowdefy/helpers": "4.
|
|
51
|
-
"@lowdefy/node-utils": "4.
|
|
52
|
-
"@lowdefy/nunjucks": "4.
|
|
53
|
-
"@lowdefy/operators": "4.
|
|
54
|
-
"@lowdefy/operators-js": "4.
|
|
47
|
+
"@lowdefy/ajv": "4.5.0",
|
|
48
|
+
"@lowdefy/blocks-basic": "4.5.0",
|
|
49
|
+
"@lowdefy/blocks-loaders": "4.5.0",
|
|
50
|
+
"@lowdefy/helpers": "4.5.0",
|
|
51
|
+
"@lowdefy/node-utils": "4.5.0",
|
|
52
|
+
"@lowdefy/nunjucks": "4.5.0",
|
|
53
|
+
"@lowdefy/operators": "4.5.0",
|
|
54
|
+
"@lowdefy/operators-js": "4.5.0",
|
|
55
55
|
"ajv": "8.12.0",
|
|
56
56
|
"json5": "2.2.3",
|
|
57
57
|
"yaml": "2.3.4",
|
|
@@ -59,35 +59,36 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@jest/globals": "28.1.3",
|
|
62
|
-
"@lowdefy/actions-core": "4.
|
|
63
|
-
"@lowdefy/actions-pdf-make": "4.
|
|
64
|
-
"@lowdefy/blocks-aggrid": "4.
|
|
65
|
-
"@lowdefy/blocks-algolia": "4.
|
|
66
|
-
"@lowdefy/blocks-antd": "4.
|
|
67
|
-
"@lowdefy/blocks-color-selectors": "4.
|
|
68
|
-
"@lowdefy/blocks-echarts": "4.
|
|
69
|
-
"@lowdefy/blocks-google-maps": "4.
|
|
70
|
-
"@lowdefy/blocks-markdown": "4.
|
|
71
|
-
"@lowdefy/blocks-qr": "4.
|
|
72
|
-
"@lowdefy/connection-axios-http": "4.
|
|
73
|
-
"@lowdefy/connection-elasticsearch": "4.
|
|
74
|
-
"@lowdefy/connection-google-sheets": "4.
|
|
75
|
-
"@lowdefy/connection-knex": "4.
|
|
76
|
-
"@lowdefy/connection-mongodb": "4.
|
|
77
|
-
"@lowdefy/connection-redis": "4.
|
|
78
|
-
"@lowdefy/connection-sendgrid": "4.
|
|
79
|
-
"@lowdefy/connection-stripe": "4.
|
|
80
|
-
"@lowdefy/operators-change-case": "4.
|
|
81
|
-
"@lowdefy/operators-diff": "4.
|
|
82
|
-
"@lowdefy/operators-
|
|
83
|
-
"@lowdefy/operators-
|
|
84
|
-
"@lowdefy/operators-
|
|
85
|
-
"@lowdefy/operators-
|
|
86
|
-
"@lowdefy/operators-
|
|
87
|
-
"@lowdefy/
|
|
88
|
-
"@lowdefy/plugin-
|
|
89
|
-
"@lowdefy/plugin-
|
|
90
|
-
"@lowdefy/plugin-
|
|
62
|
+
"@lowdefy/actions-core": "4.5.0",
|
|
63
|
+
"@lowdefy/actions-pdf-make": "4.5.0",
|
|
64
|
+
"@lowdefy/blocks-aggrid": "4.5.0",
|
|
65
|
+
"@lowdefy/blocks-algolia": "4.5.0",
|
|
66
|
+
"@lowdefy/blocks-antd": "4.5.0",
|
|
67
|
+
"@lowdefy/blocks-color-selectors": "4.5.0",
|
|
68
|
+
"@lowdefy/blocks-echarts": "4.5.0",
|
|
69
|
+
"@lowdefy/blocks-google-maps": "4.5.0",
|
|
70
|
+
"@lowdefy/blocks-markdown": "4.5.0",
|
|
71
|
+
"@lowdefy/blocks-qr": "4.5.0",
|
|
72
|
+
"@lowdefy/connection-axios-http": "4.5.0",
|
|
73
|
+
"@lowdefy/connection-elasticsearch": "4.5.0",
|
|
74
|
+
"@lowdefy/connection-google-sheets": "4.5.0",
|
|
75
|
+
"@lowdefy/connection-knex": "4.5.0",
|
|
76
|
+
"@lowdefy/connection-mongodb": "4.5.0",
|
|
77
|
+
"@lowdefy/connection-redis": "4.5.0",
|
|
78
|
+
"@lowdefy/connection-sendgrid": "4.5.0",
|
|
79
|
+
"@lowdefy/connection-stripe": "4.5.0",
|
|
80
|
+
"@lowdefy/operators-change-case": "4.5.0",
|
|
81
|
+
"@lowdefy/operators-diff": "4.5.0",
|
|
82
|
+
"@lowdefy/operators-jsonata": "4.5.0",
|
|
83
|
+
"@lowdefy/operators-moment": "4.5.0",
|
|
84
|
+
"@lowdefy/operators-mql": "4.5.0",
|
|
85
|
+
"@lowdefy/operators-nunjucks": "4.5.0",
|
|
86
|
+
"@lowdefy/operators-uuid": "4.5.0",
|
|
87
|
+
"@lowdefy/operators-yaml": "4.5.0",
|
|
88
|
+
"@lowdefy/plugin-auth0": "4.5.0",
|
|
89
|
+
"@lowdefy/plugin-aws": "4.5.0",
|
|
90
|
+
"@lowdefy/plugin-csv": "4.5.0",
|
|
91
|
+
"@lowdefy/plugin-next-auth": "4.5.0",
|
|
91
92
|
"@swc/cli": "0.1.63",
|
|
92
93
|
"@swc/core": "1.3.99",
|
|
93
94
|
"@swc/jest": "0.2.29",
|