@lowdefy/build 4.0.0-alpha.1 → 4.0.0-alpha.12
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/addDefaultPages/404.js +37 -42
- package/dist/build/addDefaultPages/addDefaultPages.js +7 -3
- package/dist/build/buildAuth/buildAuth.js +10 -29
- package/dist/build/buildAuth/buildAuthPlugins.js +78 -0
- package/dist/build/buildAuth/buildPageAuth.js +50 -0
- package/dist/build/buildAuth/getPageRoles.js +3 -4
- package/dist/build/buildAuth/getProtectedPages.js +6 -6
- package/dist/build/buildAuth/validateAuthConfig.js +61 -0
- package/dist/build/buildConnections.js +2 -3
- package/dist/build/buildImports/buildIconImports.js +87 -0
- package/dist/build/buildImports/buildImports.js +30 -0
- package/dist/build/buildImports/buildImportsDev.js +103 -0
- package/dist/build/buildImports/buildImportsProd.js +54 -0
- package/dist/build/buildImports/buildStyleImports.js +28 -0
- package/dist/build/buildImports/defaultIconsDev.js +584 -0
- package/dist/build/buildImports/defaultIconsProd.js +21 -0
- package/dist/build/buildMenu.js +1 -1
- package/dist/build/buildPages/buildBlock/buildBlock.js +6 -2
- package/dist/build/buildPages/buildBlock/buildEvents.js +5 -2
- package/dist/build/buildPages/buildBlock/buildRequests.js +2 -3
- package/dist/build/buildPages/buildBlock/buildSubBlocks.js +1 -1
- package/dist/build/buildPages/buildBlock/countBlockOperators.js +4 -6
- package/dist/build/buildPages/buildBlock/countBlockTypes.js +18 -0
- package/dist/build/buildPages/buildBlock/moveSkeletonBlocksToArea.js +35 -0
- package/dist/build/buildPages/buildBlock/moveSubBlocksToArea.js +1 -1
- package/dist/build/buildPages/buildBlock/setBlockId.js +1 -1
- package/dist/build/buildPages/buildBlock/validateBlock.js +2 -3
- package/dist/build/buildPages/buildPage.js +1 -1
- package/dist/build/buildPages/buildPages.js +1 -1
- package/dist/build/buildRefs/buildRefs.js +3 -3
- package/dist/build/buildRefs/evaluateBuildOperators.js +35 -0
- package/dist/build/buildRefs/getConfigFile.js +1 -1
- package/dist/build/buildRefs/getRefContent.js +2 -2
- package/dist/build/buildRefs/getRefPath.js +1 -1
- package/dist/build/buildRefs/getRefsFromFile.js +1 -1
- package/dist/build/buildRefs/getUserJavascriptFunction.js +7 -4
- package/dist/build/buildRefs/makeRefDefinition.js +2 -3
- package/dist/build/buildRefs/parseNunjucks.js +1 -1
- package/dist/build/buildRefs/parseRefContent.js +3 -3
- package/dist/build/buildRefs/populateRefs.js +1 -1
- package/dist/build/buildRefs/recursiveBuild.js +10 -5
- package/dist/build/buildRefs/runRefResolver.js +1 -1
- package/dist/build/buildRefs/runTransformer.js +8 -4
- package/dist/build/buildTypes.js +72 -43
- package/dist/build/cleanBuildDirectory.js +2 -2
- package/dist/build/copyPublicFolder.js +23 -0
- package/dist/build/testSchema.js +3 -4
- package/dist/build/updateServerPackageJson.js +49 -0
- package/dist/build/validateApp.js +3 -5
- package/dist/build/validateConfig.js +8 -28
- package/dist/build/writeApp.js +2 -6
- package/dist/build/writeAuth.js +18 -0
- package/dist/build/writeConfig.js +2 -6
- package/dist/build/writeConnections.js +2 -5
- package/dist/build/writeGlobal.js +3 -7
- package/dist/build/writeMenus.js +2 -5
- package/dist/build/writePages.js +3 -14
- package/dist/build/writePluginImports/generateImportFile.js +31 -0
- package/dist/build/writePluginImports/writeActionImports.js +22 -0
- package/dist/build/writePluginImports/writeAuthImports.js +30 -0
- package/dist/build/writePluginImports/writeBlockImports.js +6 -23
- package/dist/build/writePluginImports/writeConnectionImports.js +6 -23
- package/dist/build/writePluginImports/writeIconImports.js +31 -0
- package/dist/build/writePluginImports/writeOperatorImports.js +26 -0
- package/dist/build/writePluginImports/writePluginImports.js +52 -0
- package/dist/build/writePluginImports/writeStyleImports.js +28 -0
- package/dist/build/writeRequests.js +3 -8
- package/dist/build/writeTypes.js +2 -5
- package/dist/defaultTypesMap.json +1874 -0
- package/dist/index.js +126 -112
- package/dist/lowdefySchema.js +173 -79
- package/dist/scripts/generateDefaultTypes.js +47 -75
- package/dist/scripts/run.js +14 -12
- package/dist/test/buildRefs/testBuildRefsAsyncFunction.js +3 -6
- package/dist/test/buildRefs/testBuildRefsErrorResolver.js +2 -2
- package/dist/test/buildRefs/testBuildRefsNullResolver.js +2 -2
- package/dist/test/buildRefs/testBuildRefsParsingResolver.js +2 -2
- package/dist/test/buildRefs/testBuildRefsResolver.js +2 -2
- package/dist/test/buildRefs/testBuildRefsTransform.js +2 -2
- package/dist/test/buildRefs/testBuildRefsTransformIdentity.js +2 -2
- package/dist/test/testContext.js +12 -19
- package/dist/utils/countOperators.js +1 -1
- package/dist/utils/createCheckDuplicateId.js +1 -1
- package/dist/utils/createCounter.js +1 -1
- package/dist/utils/createPluginTypesMap.js +106 -0
- package/dist/utils/formatErrorMessage.js +2 -2
- package/dist/utils/{files/readConfigFile.js → readConfigFile.js} +3 -3
- package/dist/utils/{files/writeBuildArtifact.js → writeBuildArtifact.js} +4 -7
- package/package.json +48 -16
- package/dist/defaultTypes.json +0 -60
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-console */ /*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,24 +12,30 @@
|
|
|
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
|
-
*/ import {
|
|
15
|
+
*/ import { fileURLToPath } from 'url';
|
|
16
|
+
import { mergeObjects } from '@lowdefy/helpers';
|
|
17
|
+
import { readFile } from '@lowdefy/node-utils';
|
|
16
18
|
import createCounter from './utils/createCounter.js';
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
+
import createPluginTypesMap from './utils/createPluginTypesMap.js';
|
|
20
|
+
import createReadConfigFile from './utils/readConfigFile.js';
|
|
21
|
+
import createWriteBuildArtifact from './utils/writeBuildArtifact.js';
|
|
19
22
|
import addDefaultPages from './build/addDefaultPages/addDefaultPages.js';
|
|
20
23
|
import buildAuth from './build/buildAuth/buildAuth.js';
|
|
21
24
|
import buildConnections from './build/buildConnections.js';
|
|
25
|
+
import buildImports from './build/buildImports/buildImports.js';
|
|
22
26
|
import buildMenu from './build/buildMenu.js';
|
|
23
27
|
import buildPages from './build/buildPages/buildPages.js';
|
|
24
28
|
import buildRefs from './build/buildRefs/buildRefs.js';
|
|
25
29
|
import buildTypes from './build/buildTypes.js';
|
|
26
30
|
import cleanBuildDirectory from './build/cleanBuildDirectory.js';
|
|
31
|
+
import copyPublicFolder from './build/copyPublicFolder.js';
|
|
27
32
|
import testSchema from './build/testSchema.js';
|
|
28
33
|
import validateApp from './build/validateApp.js';
|
|
29
34
|
import validateConfig from './build/validateConfig.js';
|
|
35
|
+
import updateServerPackageJson from './build/updateServerPackageJson.js';
|
|
30
36
|
import writeApp from './build/writeApp.js';
|
|
31
|
-
import
|
|
32
|
-
import
|
|
37
|
+
import writeAuth from './build/writeAuth.js';
|
|
38
|
+
import writePluginImports from './build/writePluginImports/writePluginImports.js';
|
|
33
39
|
import writeConfig from './build/writeConfig.js';
|
|
34
40
|
import writeConnections from './build/writeConnections.js';
|
|
35
41
|
import writeGlobal from './build/writeGlobal.js';
|
|
@@ -37,17 +43,23 @@ import writeMenus from './build/writeMenus.js';
|
|
|
37
43
|
import writePages from './build/writePages.js';
|
|
38
44
|
import writeRequests from './build/writeRequests.js';
|
|
39
45
|
import writeTypes from './build/writeTypes.js';
|
|
40
|
-
async function createContext(
|
|
41
|
-
const
|
|
42
|
-
const defaultTypes = JSON.parse(await readFile(new URL('./defaultTypes.json', import.meta.url).pathname));
|
|
43
|
-
// TODO: resolve custom plugin types
|
|
46
|
+
async function createContext({ customTypesMap , directories , logger , refResolver , stage ='prod' }) {
|
|
47
|
+
const defaultTypesMap = JSON.parse(await readFile(fileURLToPath(new URL('./defaultTypesMap.json', import.meta.url))));
|
|
44
48
|
const context = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
directories,
|
|
50
|
+
logger,
|
|
51
|
+
readConfigFile: createReadConfigFile({
|
|
52
|
+
directories
|
|
53
|
+
}),
|
|
54
|
+
refResolver,
|
|
55
|
+
stage,
|
|
49
56
|
typeCounters: {
|
|
50
57
|
actions: createCounter(),
|
|
58
|
+
auth: {
|
|
59
|
+
callbacks: createCounter(),
|
|
60
|
+
events: createCounter(),
|
|
61
|
+
providers: createCounter()
|
|
62
|
+
},
|
|
51
63
|
blocks: createCounter(),
|
|
52
64
|
connections: createCounter(),
|
|
53
65
|
requests: createCounter(),
|
|
@@ -56,110 +68,112 @@ async function createContext(options) {
|
|
|
56
68
|
server: createCounter()
|
|
57
69
|
}
|
|
58
70
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
refResolver,
|
|
64
|
-
types: defaultTypes,
|
|
71
|
+
typesMap: mergeObjects([
|
|
72
|
+
defaultTypesMap,
|
|
73
|
+
customTypesMap
|
|
74
|
+
]),
|
|
65
75
|
writeBuildArtifact: createWriteBuildArtifact({
|
|
66
|
-
|
|
76
|
+
directories
|
|
67
77
|
})
|
|
68
78
|
};
|
|
69
79
|
return context;
|
|
70
80
|
}
|
|
71
81
|
async function build(options) {
|
|
72
82
|
const context = await createContext(options);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
83
|
+
const components = await buildRefs({
|
|
84
|
+
context
|
|
85
|
+
});
|
|
86
|
+
await testSchema({
|
|
87
|
+
components,
|
|
88
|
+
context
|
|
89
|
+
});
|
|
90
|
+
await validateApp({
|
|
91
|
+
components,
|
|
92
|
+
context
|
|
93
|
+
});
|
|
94
|
+
await validateConfig({
|
|
95
|
+
components,
|
|
96
|
+
context
|
|
97
|
+
});
|
|
98
|
+
await addDefaultPages({
|
|
99
|
+
components,
|
|
100
|
+
context
|
|
101
|
+
});
|
|
102
|
+
await buildAuth({
|
|
103
|
+
components,
|
|
104
|
+
context
|
|
105
|
+
});
|
|
106
|
+
await buildConnections({
|
|
107
|
+
components,
|
|
108
|
+
context
|
|
109
|
+
});
|
|
110
|
+
await buildPages({
|
|
111
|
+
components,
|
|
112
|
+
context
|
|
113
|
+
});
|
|
114
|
+
await buildMenu({
|
|
115
|
+
components,
|
|
116
|
+
context
|
|
117
|
+
});
|
|
118
|
+
await buildTypes({
|
|
119
|
+
components,
|
|
120
|
+
context
|
|
121
|
+
});
|
|
122
|
+
await buildImports({
|
|
123
|
+
components,
|
|
124
|
+
context
|
|
125
|
+
});
|
|
126
|
+
await cleanBuildDirectory({
|
|
127
|
+
context
|
|
128
|
+
});
|
|
129
|
+
await writeApp({
|
|
130
|
+
components,
|
|
131
|
+
context
|
|
132
|
+
});
|
|
133
|
+
await writeAuth({
|
|
134
|
+
components,
|
|
135
|
+
context
|
|
136
|
+
});
|
|
137
|
+
await writeConnections({
|
|
138
|
+
components,
|
|
139
|
+
context
|
|
140
|
+
});
|
|
141
|
+
await writeRequests({
|
|
142
|
+
components,
|
|
143
|
+
context
|
|
144
|
+
});
|
|
145
|
+
await writePages({
|
|
146
|
+
components,
|
|
147
|
+
context
|
|
148
|
+
});
|
|
149
|
+
await writeConfig({
|
|
150
|
+
components,
|
|
151
|
+
context
|
|
152
|
+
});
|
|
153
|
+
await writeGlobal({
|
|
154
|
+
components,
|
|
155
|
+
context
|
|
156
|
+
});
|
|
157
|
+
await writeMenus({
|
|
158
|
+
components,
|
|
159
|
+
context
|
|
160
|
+
});
|
|
161
|
+
await writeTypes({
|
|
162
|
+
components,
|
|
163
|
+
context
|
|
164
|
+
});
|
|
165
|
+
await writePluginImports({
|
|
166
|
+
components,
|
|
167
|
+
context
|
|
168
|
+
});
|
|
169
|
+
await updateServerPackageJson({
|
|
170
|
+
components,
|
|
171
|
+
context
|
|
172
|
+
});
|
|
173
|
+
await copyPublicFolder({
|
|
174
|
+
components,
|
|
175
|
+
context
|
|
176
|
+
});
|
|
163
177
|
}
|
|
164
|
-
export { createContext };
|
|
178
|
+
export { createContext, createPluginTypesMap };
|
|
165
179
|
export default build;
|
package/dist/lowdefySchema.js
CHANGED
|
@@ -24,12 +24,9 @@ export default {
|
|
|
24
24
|
type: 'Action "id" should be a string.'
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
messages: {
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
skip: {
|
|
32
|
-
},
|
|
27
|
+
messages: {},
|
|
28
|
+
params: {},
|
|
29
|
+
skip: {},
|
|
33
30
|
type: {
|
|
34
31
|
type: 'string',
|
|
35
32
|
errorMessage: {
|
|
@@ -75,36 +72,73 @@ export default {
|
|
|
75
72
|
type: 'object',
|
|
76
73
|
additionalProperties: false,
|
|
77
74
|
errorMessage: {
|
|
78
|
-
type: 'App "
|
|
75
|
+
type: 'App "auth" should be an object.'
|
|
79
76
|
},
|
|
80
77
|
properties: {
|
|
81
|
-
|
|
82
|
-
type: '
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
callbacks: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
items: {
|
|
81
|
+
type: 'object',
|
|
82
|
+
required: [
|
|
83
|
+
'id',
|
|
84
|
+
'type'
|
|
85
|
+
],
|
|
86
|
+
properties: {
|
|
87
|
+
id: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
errorMessage: {
|
|
90
|
+
type: 'Auth callback "id" should be a string.'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
type: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
errorMessage: {
|
|
96
|
+
type: 'Auth callback "type" should be a string.'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
properties: {
|
|
100
|
+
type: 'object'
|
|
93
101
|
}
|
|
94
102
|
},
|
|
95
|
-
|
|
96
|
-
type: '
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
type: '
|
|
103
|
+
errorMessage: {
|
|
104
|
+
type: 'Auth callback should be an object.',
|
|
105
|
+
required: {
|
|
106
|
+
id: 'Auth callback should have required property "id".',
|
|
107
|
+
type: 'Auth callback should have required property "type".'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
events: {
|
|
113
|
+
type: 'array',
|
|
114
|
+
items: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
required: [
|
|
117
|
+
'id',
|
|
118
|
+
'type'
|
|
119
|
+
],
|
|
120
|
+
properties: {
|
|
121
|
+
id: {
|
|
122
|
+
type: 'string',
|
|
123
|
+
errorMessage: {
|
|
124
|
+
type: 'Auth event "id" should be a string.'
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
type: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
errorMessage: {
|
|
130
|
+
type: 'Auth event "type" should be a string.'
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
properties: {
|
|
134
|
+
type: 'object'
|
|
100
135
|
}
|
|
101
136
|
},
|
|
102
|
-
|
|
103
|
-
type: '
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
type: 'App "config.auth.openId.scope" should be a string.'
|
|
137
|
+
errorMessage: {
|
|
138
|
+
type: 'Auth event should be an object.',
|
|
139
|
+
required: {
|
|
140
|
+
id: 'Auth event should have required property "id".',
|
|
141
|
+
type: 'Auth event should have required property "type".'
|
|
108
142
|
}
|
|
109
143
|
}
|
|
110
144
|
}
|
|
@@ -122,13 +156,13 @@ export default {
|
|
|
122
156
|
'boolean'
|
|
123
157
|
],
|
|
124
158
|
errorMessage: {
|
|
125
|
-
type: 'App "
|
|
159
|
+
type: 'App "auth.pages.protected.$" should be an array of strings.'
|
|
126
160
|
},
|
|
127
161
|
items: {
|
|
128
162
|
type: 'string',
|
|
129
163
|
description: 'Page ids for which authentication is required. When specified, all unspecified pages will be public.',
|
|
130
164
|
errorMessage: {
|
|
131
|
-
type: 'App "
|
|
165
|
+
type: 'App "auth.pages.protected.$" should be an array of strings.'
|
|
132
166
|
}
|
|
133
167
|
}
|
|
134
168
|
},
|
|
@@ -138,13 +172,13 @@ export default {
|
|
|
138
172
|
'boolean'
|
|
139
173
|
],
|
|
140
174
|
errorMessage: {
|
|
141
|
-
type: 'App "
|
|
175
|
+
type: 'App "auth.pages.public.$" should be an array of strings.'
|
|
142
176
|
},
|
|
143
177
|
items: {
|
|
144
178
|
type: 'string',
|
|
145
179
|
description: 'Page ids for which authentication is not required. When specified, all unspecified pages will be protected.',
|
|
146
180
|
errorMessage: {
|
|
147
|
-
type: 'App "
|
|
181
|
+
type: 'App "auth.pages.public.$" should be an array of strings.'
|
|
148
182
|
}
|
|
149
183
|
}
|
|
150
184
|
},
|
|
@@ -157,46 +191,55 @@ export default {
|
|
|
157
191
|
type: 'string'
|
|
158
192
|
},
|
|
159
193
|
errorMessage: {
|
|
160
|
-
type: 'App "
|
|
194
|
+
type: 'App "auth.pages.roles.[role]" should be an array of strings.'
|
|
161
195
|
}
|
|
162
196
|
}
|
|
163
197
|
},
|
|
164
198
|
errorMessage: {
|
|
165
|
-
type: 'App "
|
|
199
|
+
type: 'App "auth.pages.roles" should be an object.'
|
|
166
200
|
}
|
|
167
201
|
}
|
|
168
202
|
}
|
|
169
203
|
},
|
|
170
|
-
|
|
171
|
-
type: '
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
'
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
204
|
+
providers: {
|
|
205
|
+
type: 'array',
|
|
206
|
+
items: {
|
|
207
|
+
type: 'object',
|
|
208
|
+
required: [
|
|
209
|
+
'id',
|
|
210
|
+
'type'
|
|
211
|
+
],
|
|
212
|
+
properties: {
|
|
213
|
+
id: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
errorMessage: {
|
|
216
|
+
type: 'Auth provider "id" should be a string.'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
type: {
|
|
220
|
+
type: 'string',
|
|
221
|
+
errorMessage: {
|
|
222
|
+
type: 'Auth provider "type" should be a string.'
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
properties: {
|
|
226
|
+
type: 'object'
|
|
186
227
|
}
|
|
187
228
|
},
|
|
188
|
-
|
|
189
|
-
type:
|
|
190
|
-
|
|
191
|
-
'
|
|
192
|
-
|
|
193
|
-
default: '5min',
|
|
194
|
-
description: 'The length of time an authorization request token should be valid. Can be expressed as a number in seconds, or a vercel/ms string (https://github.com/vercel/ms)',
|
|
195
|
-
errorMessage: {
|
|
196
|
-
type: 'App "config.auth.jwt.loginStateExpiresIn" should be a string or number.'
|
|
229
|
+
errorMessage: {
|
|
230
|
+
type: 'Auth provider should be an object.',
|
|
231
|
+
required: {
|
|
232
|
+
id: 'Auth provider should have required property "id".',
|
|
233
|
+
type: 'Auth provider should have required property "type".'
|
|
197
234
|
}
|
|
198
235
|
}
|
|
199
236
|
}
|
|
237
|
+
},
|
|
238
|
+
session: {
|
|
239
|
+
type: 'object'
|
|
240
|
+
},
|
|
241
|
+
theme: {
|
|
242
|
+
type: 'object'
|
|
200
243
|
}
|
|
201
244
|
}
|
|
202
245
|
},
|
|
@@ -235,10 +278,10 @@ export default {
|
|
|
235
278
|
type: 'Block "layout" should be an object.'
|
|
236
279
|
}
|
|
237
280
|
},
|
|
238
|
-
|
|
281
|
+
skeleton: {
|
|
239
282
|
type: 'object',
|
|
240
283
|
errorMessage: {
|
|
241
|
-
type: 'Block "
|
|
284
|
+
type: 'Block "skeleton" should be an object.'
|
|
242
285
|
}
|
|
243
286
|
},
|
|
244
287
|
style: {
|
|
@@ -247,8 +290,8 @@ export default {
|
|
|
247
290
|
type: 'Block "style" should be an object.'
|
|
248
291
|
}
|
|
249
292
|
},
|
|
250
|
-
visible: {
|
|
251
|
-
},
|
|
293
|
+
visible: {},
|
|
294
|
+
loading: {},
|
|
252
295
|
blocks: {
|
|
253
296
|
type: 'array',
|
|
254
297
|
items: {
|
|
@@ -267,8 +310,7 @@ export default {
|
|
|
267
310
|
type: 'Block "requests" should be an array.'
|
|
268
311
|
}
|
|
269
312
|
},
|
|
270
|
-
required: {
|
|
271
|
-
},
|
|
313
|
+
required: {},
|
|
272
314
|
validate: {
|
|
273
315
|
type: 'array',
|
|
274
316
|
items: {
|
|
@@ -541,6 +583,41 @@ export default {
|
|
|
541
583
|
}
|
|
542
584
|
}
|
|
543
585
|
},
|
|
586
|
+
plugin: {
|
|
587
|
+
type: 'object',
|
|
588
|
+
additionalProperties: false,
|
|
589
|
+
required: [
|
|
590
|
+
'name',
|
|
591
|
+
'version'
|
|
592
|
+
],
|
|
593
|
+
properties: {
|
|
594
|
+
name: {
|
|
595
|
+
type: 'string',
|
|
596
|
+
errorMessage: {
|
|
597
|
+
type: 'Plugin "name" should be a string.'
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
version: {
|
|
601
|
+
type: 'string',
|
|
602
|
+
errorMessage: {
|
|
603
|
+
type: 'Plugin "version" should be a string.'
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
typePrefix: {
|
|
607
|
+
type: 'string',
|
|
608
|
+
errorMessage: {
|
|
609
|
+
type: 'Plugin "typePrefix" should be a string.'
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
errorMessage: {
|
|
614
|
+
type: 'Plugin should be an object.',
|
|
615
|
+
required: {
|
|
616
|
+
name: 'Plugin should have required property "name".',
|
|
617
|
+
version: 'Plugin should have required property "version".'
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
},
|
|
544
621
|
request: {
|
|
545
622
|
type: 'object',
|
|
546
623
|
additionalProperties: false,
|
|
@@ -617,6 +694,9 @@ export default {
|
|
|
617
694
|
app: {
|
|
618
695
|
$ref: '#/definitions/app'
|
|
619
696
|
},
|
|
697
|
+
auth: {
|
|
698
|
+
$ref: '#/definitions/authConfig'
|
|
699
|
+
},
|
|
620
700
|
cli: {
|
|
621
701
|
type: 'object',
|
|
622
702
|
errorMessage: {
|
|
@@ -630,6 +710,13 @@ export default {
|
|
|
630
710
|
},
|
|
631
711
|
additionalProperties: false,
|
|
632
712
|
properties: {
|
|
713
|
+
basePath: {
|
|
714
|
+
type: 'string',
|
|
715
|
+
description: 'App base path to apply to all routes. Base path must start with "/".',
|
|
716
|
+
errorMessage: {
|
|
717
|
+
type: 'App "config.basePath" should be a string.'
|
|
718
|
+
}
|
|
719
|
+
},
|
|
633
720
|
homePageId: {
|
|
634
721
|
type: 'string',
|
|
635
722
|
description: 'Page id to use as homepage. When visiting home route "/", the router will redirect to this page. If not provided, the first page in default or first menu will be used as the homePageId.',
|
|
@@ -637,23 +724,30 @@ export default {
|
|
|
637
724
|
type: 'App "config.homePageId" should be a string.'
|
|
638
725
|
}
|
|
639
726
|
},
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
types: {
|
|
646
|
-
type: 'object',
|
|
647
|
-
patternProperties: {
|
|
648
|
-
'^.*$': {
|
|
649
|
-
url: 'string',
|
|
727
|
+
theme: {
|
|
728
|
+
type: 'object',
|
|
650
729
|
errorMessage: {
|
|
651
|
-
|
|
730
|
+
type: 'App "config.theme" should be an object.'
|
|
731
|
+
},
|
|
732
|
+
properties: {
|
|
733
|
+
lessVariables: {
|
|
734
|
+
type: 'object',
|
|
735
|
+
description: 'App theme less variables.',
|
|
736
|
+
errorMessage: {
|
|
737
|
+
type: 'App "config.theme.lessVariables" should be an object.'
|
|
738
|
+
}
|
|
739
|
+
}
|
|
652
740
|
}
|
|
653
741
|
}
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
plugins: {
|
|
745
|
+
type: 'array',
|
|
746
|
+
items: {
|
|
747
|
+
$ref: '#/definitions/plugin'
|
|
654
748
|
},
|
|
655
749
|
errorMessage: {
|
|
656
|
-
type: 'App "
|
|
750
|
+
type: 'App "plugins" should be an array.'
|
|
657
751
|
}
|
|
658
752
|
},
|
|
659
753
|
global: {
|