@lowdefy/build 4.0.0-alpha.10 → 4.0.0-alpha.11
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/buildAuth/buildAuth.js +9 -28
- package/dist/build/buildAuth/buildAuthPlugins.js +78 -0
- package/dist/build/buildAuth/buildPageAuth.js +50 -0
- package/dist/build/buildAuth/getPageRoles.js +1 -1
- package/dist/build/buildAuth/getProtectedPages.js +5 -5
- package/dist/build/buildAuth/validateAuthConfig.js +61 -0
- package/dist/build/{buildIcons.js → buildImports/buildIconImports.js} +9 -8
- package/dist/build/buildImports/buildImports.js +30 -0
- package/dist/build/buildImports/buildImportsDev.js +101 -0
- package/dist/build/buildImports/buildImportsProd.js +52 -0
- package/dist/build/{buildStyles.js → buildImports/buildStyleImports.js} +5 -6
- package/dist/build/buildTypes.js +23 -0
- package/dist/build/testSchema.js +2 -3
- package/dist/build/updateServerPackageJson.js +3 -0
- package/dist/build/validateConfig.js +0 -24
- package/dist/build/writeAuth.js +18 -0
- package/dist/build/writePluginImports/generateImportFile.js +1 -6
- package/dist/build/writePluginImports/writeActionImports.js +1 -1
- package/dist/build/writePluginImports/writeAuthImports.js +30 -0
- package/dist/build/writePluginImports/writeBlockImports.js +1 -1
- package/dist/build/writePluginImports/writeConnectionImports.js +1 -1
- package/dist/build/writePluginImports/writeIconImports.js +1 -1
- package/dist/build/writePluginImports/writeOperatorImports.js +4 -4
- package/dist/build/writePluginImports/writePluginImports.js +52 -0
- package/dist/build/writePluginImports/writeStyleImports.js +1 -1
- package/dist/defaultTypesMap.json +503 -227
- package/dist/index.js +17 -35
- package/dist/lowdefySchema.js +104 -58
- package/dist/scripts/generateDefaultTypes.js +7 -1
- package/dist/scripts/run.js +4 -3
- package/dist/utils/createPluginTypesMap.js +21 -0
- package/package.json +30 -29
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/ import generateImportFile from './generateImportFile.js';
|
|
16
16
|
async function writeActionImports({ components , context }) {
|
|
17
17
|
await context.writeBuildArtifact('plugins/actions.js', generateImportFile({
|
|
18
|
-
|
|
18
|
+
imports: components.imports.actions,
|
|
19
19
|
importPath: 'actions'
|
|
20
20
|
}));
|
|
21
21
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 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 generateImportFile from './generateImportFile.js';
|
|
16
|
+
async function writeAuthImports({ components , context }) {
|
|
17
|
+
await context.writeBuildArtifact('plugins/auth/callbacks.js', generateImportFile({
|
|
18
|
+
imports: components.imports.auth.callbacks,
|
|
19
|
+
importPath: 'auth/callbacks'
|
|
20
|
+
}));
|
|
21
|
+
await context.writeBuildArtifact('plugins/auth/events.js', generateImportFile({
|
|
22
|
+
imports: components.imports.auth.events,
|
|
23
|
+
importPath: 'auth/events'
|
|
24
|
+
}));
|
|
25
|
+
await context.writeBuildArtifact('plugins/auth/providers.js', generateImportFile({
|
|
26
|
+
imports: components.imports.auth.providers,
|
|
27
|
+
importPath: 'auth/providers'
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
export default writeAuthImports;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/ import generateImportFile from './generateImportFile.js';
|
|
16
16
|
async function writeBlockImports({ components , context }) {
|
|
17
17
|
await context.writeBuildArtifact('plugins/blocks.js', generateImportFile({
|
|
18
|
-
|
|
18
|
+
imports: components.imports.blocks,
|
|
19
19
|
importPath: 'blocks'
|
|
20
20
|
}));
|
|
21
21
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/ import generateImportFile from './generateImportFile.js';
|
|
16
16
|
async function writeConnectionImports({ components , context }) {
|
|
17
17
|
await context.writeBuildArtifact('plugins/connections.js', generateImportFile({
|
|
18
|
-
|
|
18
|
+
imports: components.imports.connections,
|
|
19
19
|
importPath: 'connections'
|
|
20
20
|
}));
|
|
21
21
|
}
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
async function writeIconImports({ components , context }) {
|
|
26
26
|
const templateFn = nunjucksFunction(template);
|
|
27
27
|
await context.writeBuildArtifact('plugins/icons.js', templateFn({
|
|
28
|
-
packages: components.icons
|
|
28
|
+
packages: components.imports.icons
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
31
31
|
export default writeIconImports;
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import generateImportFile from './generateImportFile.js';
|
|
16
16
|
async function writeOperatorImports({ components , context }) {
|
|
17
|
-
await context.writeBuildArtifact('plugins/
|
|
18
|
-
|
|
17
|
+
await context.writeBuildArtifact('plugins/operators/client.js', generateImportFile({
|
|
18
|
+
imports: components.imports.operators.client,
|
|
19
19
|
importPath: 'operators/client'
|
|
20
20
|
}));
|
|
21
|
-
await context.writeBuildArtifact('plugins/
|
|
22
|
-
|
|
21
|
+
await context.writeBuildArtifact('plugins/operators/server.js', generateImportFile({
|
|
22
|
+
imports: components.imports.operators.server,
|
|
23
23
|
importPath: 'operators/server'
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 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 writeActionImports from './writeActionImports.js';
|
|
16
|
+
import writeAuthImports from './writeAuthImports.js';
|
|
17
|
+
import writeBlockImports from './writeBlockImports.js';
|
|
18
|
+
import writeConnectionImports from './writeConnectionImports.js';
|
|
19
|
+
import writeIconImports from './writeIconImports.js';
|
|
20
|
+
import writeOperatorImports from './writeOperatorImports.js';
|
|
21
|
+
import writeStyleImports from './writeStyleImports.js';
|
|
22
|
+
async function writePluginImports({ components , context }) {
|
|
23
|
+
await writeActionImports({
|
|
24
|
+
components,
|
|
25
|
+
context
|
|
26
|
+
});
|
|
27
|
+
await writeAuthImports({
|
|
28
|
+
components,
|
|
29
|
+
context
|
|
30
|
+
});
|
|
31
|
+
await writeBlockImports({
|
|
32
|
+
components,
|
|
33
|
+
context
|
|
34
|
+
});
|
|
35
|
+
await writeConnectionImports({
|
|
36
|
+
components,
|
|
37
|
+
context
|
|
38
|
+
});
|
|
39
|
+
await writeIconImports({
|
|
40
|
+
components,
|
|
41
|
+
context
|
|
42
|
+
});
|
|
43
|
+
await writeOperatorImports({
|
|
44
|
+
components,
|
|
45
|
+
context
|
|
46
|
+
});
|
|
47
|
+
await writeStyleImports({
|
|
48
|
+
components,
|
|
49
|
+
context
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export default writePluginImports;
|
|
@@ -22,7 +22,7 @@ const template = `@import '@lowdefy/layout/style.less';
|
|
|
22
22
|
async function writeStyleImports({ components , context }) {
|
|
23
23
|
const templateFn = nunjucksFunction(template);
|
|
24
24
|
await context.writeBuildArtifact('plugins/styles.less', templateFn({
|
|
25
|
-
styles: components.styles
|
|
25
|
+
styles: components.imports.styles
|
|
26
26
|
}));
|
|
27
27
|
}
|
|
28
28
|
export default writeStyleImports;
|