@lowdefy/build 4.0.0-alpha.12 → 4.0.0-alpha.15
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/addDefaultPages.js +2 -3
- package/dist/build/buildAuth/buildAuth.js +4 -1
- package/dist/build/buildAuth/getProtectedPages.js +2 -4
- package/dist/build/buildConnections.js +1 -1
- package/dist/build/buildImports/buildIconImports.js +4 -8
- package/dist/build/buildImports/buildImportsDev.js +1 -3
- package/dist/build/buildImports/buildImportsProd.js +1 -2
- package/dist/build/buildImports/buildStyleImports.js +3 -6
- package/dist/build/buildMenu.js +9 -13
- package/dist/build/buildPages/buildBlock/buildBlock.js +2 -2
- package/dist/build/buildPages/buildBlock/buildEvents.js +7 -9
- package/dist/build/buildPages/buildBlock/buildSubBlocks.js +2 -7
- package/dist/build/buildPages/buildPage.js +2 -2
- package/dist/build/buildPages/buildPages.js +3 -5
- package/dist/build/buildPages/buildTestPage.js +46 -0
- package/dist/build/buildRefs/evaluateBuildOperators.js +2 -3
- package/dist/build/buildTypes.js +2 -4
- package/dist/build/testSchema.js +4 -5
- package/dist/build/validateApp.js +1 -1
- package/dist/build/validateConfig.js +1 -1
- package/dist/build/writePages.js +1 -2
- package/dist/build/writeRequests.js +1 -2
- package/dist/createContext.js +54 -0
- package/dist/{defaultTypesMap.json → defaultTypesMap.js} +293 -291
- package/dist/index.js +13 -53
- package/dist/lowdefySchema.js +6 -0
- package/dist/scripts/generateDefaultTypes.js +4 -1
- package/dist/test/buildRefs/testBuildRefsResolver.js +1 -1
- package/dist/test/testContext.js +6 -1
- package/package.json +44 -41
package/dist/index.js
CHANGED
|
@@ -12,13 +12,8 @@
|
|
|
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
|
|
16
|
-
import { mergeObjects } from '@lowdefy/helpers';
|
|
17
|
-
import { readFile } from '@lowdefy/node-utils';
|
|
18
|
-
import createCounter from './utils/createCounter.js';
|
|
15
|
+
*/ import createContext from './createContext.js';
|
|
19
16
|
import createPluginTypesMap from './utils/createPluginTypesMap.js';
|
|
20
|
-
import createReadConfigFile from './utils/readConfigFile.js';
|
|
21
|
-
import createWriteBuildArtifact from './utils/writeBuildArtifact.js';
|
|
22
17
|
import addDefaultPages from './build/addDefaultPages/addDefaultPages.js';
|
|
23
18
|
import buildAuth from './build/buildAuth/buildAuth.js';
|
|
24
19
|
import buildConnections from './build/buildConnections.js';
|
|
@@ -43,83 +38,48 @@ import writeMenus from './build/writeMenus.js';
|
|
|
43
38
|
import writePages from './build/writePages.js';
|
|
44
39
|
import writeRequests from './build/writeRequests.js';
|
|
45
40
|
import writeTypes from './build/writeTypes.js';
|
|
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))));
|
|
48
|
-
const context = {
|
|
49
|
-
directories,
|
|
50
|
-
logger,
|
|
51
|
-
readConfigFile: createReadConfigFile({
|
|
52
|
-
directories
|
|
53
|
-
}),
|
|
54
|
-
refResolver,
|
|
55
|
-
stage,
|
|
56
|
-
typeCounters: {
|
|
57
|
-
actions: createCounter(),
|
|
58
|
-
auth: {
|
|
59
|
-
callbacks: createCounter(),
|
|
60
|
-
events: createCounter(),
|
|
61
|
-
providers: createCounter()
|
|
62
|
-
},
|
|
63
|
-
blocks: createCounter(),
|
|
64
|
-
connections: createCounter(),
|
|
65
|
-
requests: createCounter(),
|
|
66
|
-
operators: {
|
|
67
|
-
client: createCounter(),
|
|
68
|
-
server: createCounter()
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
typesMap: mergeObjects([
|
|
72
|
-
defaultTypesMap,
|
|
73
|
-
customTypesMap
|
|
74
|
-
]),
|
|
75
|
-
writeBuildArtifact: createWriteBuildArtifact({
|
|
76
|
-
directories
|
|
77
|
-
})
|
|
78
|
-
};
|
|
79
|
-
return context;
|
|
80
|
-
}
|
|
81
41
|
async function build(options) {
|
|
82
|
-
const context =
|
|
42
|
+
const context = createContext(options);
|
|
83
43
|
const components = await buildRefs({
|
|
84
44
|
context
|
|
85
45
|
});
|
|
86
|
-
|
|
46
|
+
testSchema({
|
|
87
47
|
components,
|
|
88
48
|
context
|
|
89
49
|
});
|
|
90
|
-
|
|
50
|
+
validateApp({
|
|
91
51
|
components,
|
|
92
52
|
context
|
|
93
53
|
});
|
|
94
|
-
|
|
54
|
+
validateConfig({
|
|
95
55
|
components,
|
|
96
56
|
context
|
|
97
57
|
});
|
|
98
|
-
|
|
58
|
+
addDefaultPages({
|
|
99
59
|
components,
|
|
100
60
|
context
|
|
101
61
|
});
|
|
102
|
-
|
|
62
|
+
buildAuth({
|
|
103
63
|
components,
|
|
104
64
|
context
|
|
105
65
|
});
|
|
106
|
-
|
|
66
|
+
buildConnections({
|
|
107
67
|
components,
|
|
108
68
|
context
|
|
109
69
|
});
|
|
110
|
-
|
|
70
|
+
buildPages({
|
|
111
71
|
components,
|
|
112
72
|
context
|
|
113
73
|
});
|
|
114
|
-
|
|
74
|
+
buildMenu({
|
|
115
75
|
components,
|
|
116
76
|
context
|
|
117
77
|
});
|
|
118
|
-
|
|
78
|
+
buildTypes({
|
|
119
79
|
components,
|
|
120
80
|
context
|
|
121
81
|
});
|
|
122
|
-
|
|
82
|
+
buildImports({
|
|
123
83
|
components,
|
|
124
84
|
context
|
|
125
85
|
});
|
|
@@ -175,5 +135,5 @@ async function build(options) {
|
|
|
175
135
|
context
|
|
176
136
|
});
|
|
177
137
|
}
|
|
178
|
-
export {
|
|
138
|
+
export { createPluginTypesMap };
|
|
179
139
|
export default build;
|
package/dist/lowdefySchema.js
CHANGED
|
@@ -73,6 +73,9 @@ async function generateDefaultTypesMap() {
|
|
|
73
73
|
version
|
|
74
74
|
});
|
|
75
75
|
}));
|
|
76
|
-
await writeFile(path.resolve(process.cwd(), './dist/defaultTypesMap.
|
|
76
|
+
await writeFile(path.resolve(process.cwd(), './dist/defaultTypesMap.js'), `const defaultTypesMap = ${JSON.stringify(defaultTypesMap, null, 2)};
|
|
77
|
+
|
|
78
|
+
export default defaultTypesMap;
|
|
79
|
+
`);
|
|
77
80
|
}
|
|
78
81
|
generateDefaultTypesMap();
|
package/dist/test/testContext.js
CHANGED
|
@@ -22,12 +22,17 @@ function testContext({ writeBuildArtifact , configDirectory , readConfigFile , l
|
|
|
22
22
|
succeed: ()=>{}
|
|
23
23
|
};
|
|
24
24
|
const context = {
|
|
25
|
-
|
|
25
|
+
stage: 'test',
|
|
26
26
|
directories: {
|
|
27
27
|
config: configDirectory || ''
|
|
28
28
|
},
|
|
29
29
|
typeCounters: {
|
|
30
30
|
actions: createCounter(),
|
|
31
|
+
auth: {
|
|
32
|
+
callbacks: createCounter(),
|
|
33
|
+
events: createCounter(),
|
|
34
|
+
providers: createCounter()
|
|
35
|
+
},
|
|
31
36
|
blocks: createCounter(),
|
|
32
37
|
connections: createCounter(),
|
|
33
38
|
requests: createCounter(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/build",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
4
|
-
"
|
|
3
|
+
"version": "4.0.0-alpha.15",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
"bin": {
|
|
37
37
|
"lowdefy-build": "./dist/scripts/run.js"
|
|
38
38
|
},
|
|
39
|
-
"exports":
|
|
39
|
+
"exports": {
|
|
40
|
+
".": "./dist/index.js",
|
|
41
|
+
"./buildTestPage": "./dist/build/buildPages/buildTestPage.js"
|
|
42
|
+
},
|
|
40
43
|
"files": [
|
|
41
44
|
"dist/*"
|
|
42
45
|
],
|
|
@@ -49,49 +52,49 @@
|
|
|
49
52
|
"test": "yarn node --experimental-vm-modules $(yarn bin jest)"
|
|
50
53
|
},
|
|
51
54
|
"dependencies": {
|
|
52
|
-
"@lowdefy/ajv": "4.0.0-alpha.
|
|
53
|
-
"@lowdefy/blocks-basic": "4.0.0-alpha.
|
|
54
|
-
"@lowdefy/blocks-loaders": "4.0.0-alpha.
|
|
55
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
56
|
-
"@lowdefy/node-utils": "4.0.0-alpha.
|
|
57
|
-
"@lowdefy/nunjucks": "4.0.0-alpha.
|
|
58
|
-
"@lowdefy/operators": "4.0.0-alpha.
|
|
59
|
-
"@lowdefy/operators-js": "4.0.0-alpha.
|
|
60
|
-
"ajv": "8.
|
|
61
|
-
"json5": "2.2.
|
|
55
|
+
"@lowdefy/ajv": "4.0.0-alpha.15",
|
|
56
|
+
"@lowdefy/blocks-basic": "4.0.0-alpha.15",
|
|
57
|
+
"@lowdefy/blocks-loaders": "4.0.0-alpha.15",
|
|
58
|
+
"@lowdefy/helpers": "4.0.0-alpha.15",
|
|
59
|
+
"@lowdefy/node-utils": "4.0.0-alpha.15",
|
|
60
|
+
"@lowdefy/nunjucks": "4.0.0-alpha.15",
|
|
61
|
+
"@lowdefy/operators": "4.0.0-alpha.15",
|
|
62
|
+
"@lowdefy/operators-js": "4.0.0-alpha.15",
|
|
63
|
+
"ajv": "8.11.0",
|
|
64
|
+
"json5": "2.2.1",
|
|
62
65
|
"uuid": "8.3.2",
|
|
63
|
-
"yaml": "2.
|
|
64
|
-
"yargs": "17.
|
|
66
|
+
"yaml": "2.1.1",
|
|
67
|
+
"yargs": "17.5.1"
|
|
65
68
|
},
|
|
66
69
|
"devDependencies": {
|
|
67
|
-
"@jest/globals": "
|
|
68
|
-
"@lowdefy/actions-core": "4.0.0-alpha.
|
|
69
|
-
"@lowdefy/blocks-antd": "4.0.0-alpha.
|
|
70
|
-
"@lowdefy/blocks-color-selectors": "4.0.0-alpha.
|
|
71
|
-
"@lowdefy/blocks-echarts": "4.0.0-alpha.
|
|
72
|
-
"@lowdefy/blocks-markdown": "4.0.0-alpha.
|
|
73
|
-
"@lowdefy/connection-axios-http": "4.0.0-alpha.
|
|
74
|
-
"@lowdefy/connection-elasticsearch": "4.0.0-alpha.
|
|
75
|
-
"@lowdefy/connection-google-sheets": "4.0.0-alpha.
|
|
76
|
-
"@lowdefy/connection-knex": "4.0.0-alpha.
|
|
77
|
-
"@lowdefy/connection-mongodb": "4.0.0-alpha.
|
|
78
|
-
"@lowdefy/connection-redis": "4.0.0-alpha.
|
|
79
|
-
"@lowdefy/connection-sendgrid": "4.0.0-alpha.
|
|
80
|
-
"@lowdefy/connection-stripe": "4.0.0-alpha.
|
|
81
|
-
"@lowdefy/operators-change-case": "4.0.0-alpha.
|
|
82
|
-
"@lowdefy/operators-diff": "4.0.0-alpha.
|
|
83
|
-
"@lowdefy/operators-mql": "4.0.0-alpha.
|
|
84
|
-
"@lowdefy/operators-nunjucks": "4.0.0-alpha.
|
|
85
|
-
"@lowdefy/operators-uuid": "4.0.0-alpha.
|
|
86
|
-
"@lowdefy/operators-yaml": "4.0.0-alpha.
|
|
87
|
-
"@lowdefy/plugin-next-auth": "4.0.0-alpha.
|
|
88
|
-
"@swc/cli": "0.1.
|
|
89
|
-
"@swc/core": "1.2.
|
|
90
|
-
"@swc/jest": "0.2.
|
|
91
|
-
"jest": "
|
|
70
|
+
"@jest/globals": "28.1.0",
|
|
71
|
+
"@lowdefy/actions-core": "4.0.0-alpha.15",
|
|
72
|
+
"@lowdefy/blocks-antd": "4.0.0-alpha.15",
|
|
73
|
+
"@lowdefy/blocks-color-selectors": "4.0.0-alpha.15",
|
|
74
|
+
"@lowdefy/blocks-echarts": "4.0.0-alpha.15",
|
|
75
|
+
"@lowdefy/blocks-markdown": "4.0.0-alpha.15",
|
|
76
|
+
"@lowdefy/connection-axios-http": "4.0.0-alpha.15",
|
|
77
|
+
"@lowdefy/connection-elasticsearch": "4.0.0-alpha.15",
|
|
78
|
+
"@lowdefy/connection-google-sheets": "4.0.0-alpha.15",
|
|
79
|
+
"@lowdefy/connection-knex": "4.0.0-alpha.15",
|
|
80
|
+
"@lowdefy/connection-mongodb": "4.0.0-alpha.15",
|
|
81
|
+
"@lowdefy/connection-redis": "4.0.0-alpha.15",
|
|
82
|
+
"@lowdefy/connection-sendgrid": "4.0.0-alpha.15",
|
|
83
|
+
"@lowdefy/connection-stripe": "4.0.0-alpha.15",
|
|
84
|
+
"@lowdefy/operators-change-case": "4.0.0-alpha.15",
|
|
85
|
+
"@lowdefy/operators-diff": "4.0.0-alpha.15",
|
|
86
|
+
"@lowdefy/operators-mql": "4.0.0-alpha.15",
|
|
87
|
+
"@lowdefy/operators-nunjucks": "4.0.0-alpha.15",
|
|
88
|
+
"@lowdefy/operators-uuid": "4.0.0-alpha.15",
|
|
89
|
+
"@lowdefy/operators-yaml": "4.0.0-alpha.15",
|
|
90
|
+
"@lowdefy/plugin-next-auth": "4.0.0-alpha.15",
|
|
91
|
+
"@swc/cli": "0.1.57",
|
|
92
|
+
"@swc/core": "1.2.194",
|
|
93
|
+
"@swc/jest": "0.2.21",
|
|
94
|
+
"jest": "28.1.0"
|
|
92
95
|
},
|
|
93
96
|
"publishConfig": {
|
|
94
97
|
"access": "public"
|
|
95
98
|
},
|
|
96
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "b4e4538475e997f95baa37f01f39689240e6f01c"
|
|
97
100
|
}
|