@lowdefy/build 4.7.3 → 5.1.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/addDefaultPages/404.js +8 -2
- package/dist/build/buildApi/buildRoutine/validateStep.js +7 -5
- package/dist/build/buildApi/validateEndpoint.js +6 -5
- package/dist/build/buildConnections.js +6 -0
- package/dist/build/buildImports/buildIconImports.js +5 -1
- package/dist/build/buildImports/buildImportsDev.js +1 -6
- package/dist/build/buildImports/buildImportsProd.js +1 -6
- package/dist/build/buildImports/validateIconImports.js +65 -0
- package/dist/build/buildJs/jsMapParser.js +5 -2
- package/dist/build/buildPages/buildBlock/buildBlock.js +12 -4
- package/dist/build/buildPages/buildBlock/buildEvents.js +34 -1
- package/dist/build/buildPages/buildBlock/buildRequests.js +7 -5
- package/dist/build/buildPages/buildBlock/buildSubBlocks.js +9 -9
- package/dist/build/buildPages/buildBlock/countBlockOperators.js +1 -1
- package/dist/build/buildPages/buildBlock/moveAreasToSlots.js +31 -0
- package/dist/build/buildPages/buildBlock/{moveSkeletonBlocksToArea.js → moveSkeletonBlocksToSlot.js} +8 -8
- package/dist/build/buildPages/buildBlock/{moveSubBlocksToArea.js → moveSubBlocksToSlot.js} +3 -3
- package/dist/build/buildPages/buildBlock/normalizeClassAndStyles.js +124 -0
- package/dist/build/buildPages/buildBlock/normalizeLayout.js +68 -0
- package/dist/build/buildPages/buildBlock/setBlockId.js +7 -1
- package/dist/build/buildPages/buildBlock/validateSlots.js +34 -0
- package/dist/build/buildPages/buildPage.js +23 -1
- package/dist/build/buildRefs/addLineNumbers.js +76 -0
- package/dist/build/{buildImports/buildStyleImports.js → buildRefs/getLineNumber.js} +4 -10
- package/dist/build/buildRefs/getRefContent.js +9 -1
- package/dist/build/buildRefs/parseRefContent.js +4 -66
- package/dist/build/buildTypes.js +4 -2
- package/dist/build/cleanBuildDirectory.js +3 -1
- package/dist/build/collectPageContent.js +57 -0
- package/dist/build/jit/buildPageJit.js +14 -3
- package/dist/build/jit/extractIconData.js +16 -1
- package/dist/build/jit/pageContentKeys.js +1 -0
- package/dist/build/jit/shallowBuild.js +24 -0
- package/dist/build/jit/stripPageContent.js +29 -0
- package/dist/build/jit/writePageJit.js +9 -1
- package/dist/build/testSchema.js +3 -0
- package/dist/build/writePluginImports/collectBlockSourceContent.js +65 -0
- package/dist/build/writePluginImports/writeActionSchemaMap.js +1 -1
- package/dist/build/writePluginImports/writeBlockSchemaMap.js +45 -7
- package/dist/build/writePluginImports/writeGlobalsCss.js +155 -0
- package/dist/build/writePluginImports/writeOperatorSchemaMap.js +1 -1
- package/dist/build/writePluginImports/writePluginImports.js +7 -2
- package/dist/build/writeTheme.js +28 -0
- package/dist/createContext.js +2 -0
- package/dist/defaultTypesMap.js +1803 -829
- package/dist/index.js +16 -0
- package/dist/lowdefySchema.js +100 -0
- package/dist/scripts/generateDefaultTypes.js +6 -10
- package/dist/test-utils/runBuild.js +3 -0
- package/dist/test-utils/runBuildForSnapshots.js +5 -2
- package/dist/test-utils/testContext.js +2 -1
- package/dist/utils/createHandleWarning.js +3 -0
- package/dist/utils/createPluginTypesMap.js +5 -9
- package/dist/utils/validateId.js +24 -0
- package/package.json +48 -47
- package/dist/build/writePluginImports/writeStyleImports.js +0 -34
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import buildLogger from './build/buildLogger.js';
|
|
|
30
30
|
import buildMenu from './build/buildMenu.js';
|
|
31
31
|
import buildPages from './build/full/buildPages.js';
|
|
32
32
|
import buildRefs from './build/buildRefs/buildRefs.js';
|
|
33
|
+
import collectPageContent from './build/collectPageContent.js';
|
|
33
34
|
import buildTypes from './build/buildTypes.js';
|
|
34
35
|
import cleanBuildDirectory from './build/cleanBuildDirectory.js';
|
|
35
36
|
import copyPublicFolder from './build/copyPublicFolder.js';
|
|
@@ -42,6 +43,7 @@ import writeConfig from './build/writeConfig.js';
|
|
|
42
43
|
import writeConnections from './build/writeConnections.js';
|
|
43
44
|
import writeApi from './build/writeApi.js';
|
|
44
45
|
import writeGlobal from './build/writeGlobal.js';
|
|
46
|
+
import writeTheme from './build/writeTheme.js';
|
|
45
47
|
import writeJs from './build/buildJs/writeJs.js';
|
|
46
48
|
import writeLogger from './build/writeLogger.js';
|
|
47
49
|
import writeMaps from './build/writeMaps.js';
|
|
@@ -141,6 +143,16 @@ async function build(options) {
|
|
|
141
143
|
components,
|
|
142
144
|
context
|
|
143
145
|
});
|
|
146
|
+
// Collect page content strings for Tailwind to scan
|
|
147
|
+
context.tailwindContentMap = new Map();
|
|
148
|
+
for (const page of components.pages ?? []){
|
|
149
|
+
const content = collectPageContent([
|
|
150
|
+
page
|
|
151
|
+
]);
|
|
152
|
+
if (content) {
|
|
153
|
+
context.tailwindContentMap.set(page.pageId, content);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
144
156
|
// Check if there are any collected errors before writing
|
|
145
157
|
logCollectedErrors(context);
|
|
146
158
|
// Write steps - only if no errors
|
|
@@ -179,6 +191,10 @@ async function build(options) {
|
|
|
179
191
|
components,
|
|
180
192
|
context
|
|
181
193
|
});
|
|
194
|
+
await writeTheme({
|
|
195
|
+
components,
|
|
196
|
+
context
|
|
197
|
+
});
|
|
182
198
|
await writeLogger({
|
|
183
199
|
components,
|
|
184
200
|
context
|
package/dist/lowdefySchema.js
CHANGED
|
@@ -613,6 +613,38 @@ export default {
|
|
|
613
613
|
type: 'Block "style" should be an object.'
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
|
+
class: {
|
|
617
|
+
oneOf: [
|
|
618
|
+
{
|
|
619
|
+
type: 'string'
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
type: 'array',
|
|
623
|
+
items: {
|
|
624
|
+
type: 'string'
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
type: 'object',
|
|
629
|
+
additionalProperties: {
|
|
630
|
+
oneOf: [
|
|
631
|
+
{
|
|
632
|
+
type: 'string'
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
type: 'array',
|
|
636
|
+
items: {
|
|
637
|
+
type: 'string'
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
errorMessage: {
|
|
645
|
+
type: 'Block "class" should be a string, array of strings, or object.'
|
|
646
|
+
}
|
|
647
|
+
},
|
|
616
648
|
visible: {},
|
|
617
649
|
loading: {},
|
|
618
650
|
blocks: {
|
|
@@ -740,6 +772,25 @@ export default {
|
|
|
740
772
|
}
|
|
741
773
|
}
|
|
742
774
|
}
|
|
775
|
+
},
|
|
776
|
+
shortcut: {
|
|
777
|
+
anyOf: [
|
|
778
|
+
{
|
|
779
|
+
type: 'string',
|
|
780
|
+
errorMessage: {
|
|
781
|
+
type: 'Event "shortcut" should be a string.'
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
type: 'array',
|
|
786
|
+
items: {
|
|
787
|
+
type: 'string'
|
|
788
|
+
},
|
|
789
|
+
errorMessage: {
|
|
790
|
+
type: 'Event "shortcut" should be a string or array of strings.'
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
]
|
|
743
794
|
}
|
|
744
795
|
}
|
|
745
796
|
}
|
|
@@ -750,6 +801,31 @@ export default {
|
|
|
750
801
|
type: 'Block "events" should be an object.'
|
|
751
802
|
}
|
|
752
803
|
},
|
|
804
|
+
slots: {
|
|
805
|
+
type: 'object',
|
|
806
|
+
patternProperties: {
|
|
807
|
+
'^.*$': {
|
|
808
|
+
type: 'object',
|
|
809
|
+
properties: {
|
|
810
|
+
blocks: {
|
|
811
|
+
type: 'array',
|
|
812
|
+
items: {
|
|
813
|
+
$ref: '#/definitions/block'
|
|
814
|
+
},
|
|
815
|
+
errorMessage: {
|
|
816
|
+
type: 'Block "slots.{slotKey}.blocks" should be an array.'
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
errorMessage: {
|
|
821
|
+
type: 'Block "slots.{slotKey}" should be an object.'
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
errorMessage: {
|
|
826
|
+
type: 'Block "slots" should be an object.'
|
|
827
|
+
}
|
|
828
|
+
},
|
|
753
829
|
areas: {
|
|
754
830
|
type: 'object',
|
|
755
831
|
patternProperties: {
|
|
@@ -1380,6 +1456,30 @@ export default {
|
|
|
1380
1456
|
}
|
|
1381
1457
|
}
|
|
1382
1458
|
},
|
|
1459
|
+
theme: {
|
|
1460
|
+
type: 'object',
|
|
1461
|
+
additionalProperties: false,
|
|
1462
|
+
properties: {
|
|
1463
|
+
antd: {
|
|
1464
|
+
type: 'object'
|
|
1465
|
+
},
|
|
1466
|
+
tailwind: {
|
|
1467
|
+
type: 'object'
|
|
1468
|
+
},
|
|
1469
|
+
darkMode: {
|
|
1470
|
+
type: 'string',
|
|
1471
|
+
enum: [
|
|
1472
|
+
'system',
|
|
1473
|
+
'light',
|
|
1474
|
+
'dark'
|
|
1475
|
+
],
|
|
1476
|
+
description: 'Dark mode behavior. "system" follows OS preference (default), "light" forces light mode, "dark" forces dark mode.'
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
errorMessage: {
|
|
1480
|
+
type: 'App "theme" should be an object.'
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1383
1483
|
plugins: {
|
|
1384
1484
|
type: 'array',
|
|
1385
1485
|
items: {
|
|
@@ -20,10 +20,9 @@ const defaultPackages = [
|
|
|
20
20
|
'@lowdefy/actions-core',
|
|
21
21
|
'@lowdefy/actions-pdf-make',
|
|
22
22
|
'@lowdefy/blocks-aggrid',
|
|
23
|
-
'@lowdefy/blocks-algolia',
|
|
24
23
|
'@lowdefy/blocks-antd',
|
|
25
24
|
'@lowdefy/blocks-basic',
|
|
26
|
-
'@lowdefy/blocks-
|
|
25
|
+
'@lowdefy/blocks-diff',
|
|
27
26
|
'@lowdefy/blocks-echarts',
|
|
28
27
|
'@lowdefy/blocks-google-maps',
|
|
29
28
|
'@lowdefy/blocks-loaders',
|
|
@@ -42,7 +41,7 @@ const defaultPackages = [
|
|
|
42
41
|
'@lowdefy/operators-diff',
|
|
43
42
|
'@lowdefy/operators-js',
|
|
44
43
|
'@lowdefy/operators-jsonata',
|
|
45
|
-
'@lowdefy/operators-
|
|
44
|
+
'@lowdefy/operators-dayjs',
|
|
46
45
|
'@lowdefy/operators-mql',
|
|
47
46
|
'@lowdefy/operators-nunjucks',
|
|
48
47
|
'@lowdefy/operators-uuid',
|
|
@@ -62,6 +61,7 @@ async function generateDefaultTypesMap() {
|
|
|
62
61
|
events: {},
|
|
63
62
|
providers: {}
|
|
64
63
|
},
|
|
64
|
+
blockMetas: {},
|
|
65
65
|
blocks: {},
|
|
66
66
|
connections: {},
|
|
67
67
|
icons: {},
|
|
@@ -69,13 +69,9 @@ async function generateDefaultTypesMap() {
|
|
|
69
69
|
client: {},
|
|
70
70
|
server: {}
|
|
71
71
|
},
|
|
72
|
-
requests: {}
|
|
73
|
-
styles: {
|
|
74
|
-
packages: {},
|
|
75
|
-
blocks: {}
|
|
76
|
-
}
|
|
72
|
+
requests: {}
|
|
77
73
|
};
|
|
78
|
-
|
|
74
|
+
for (const packageName of defaultPackages){
|
|
79
75
|
const { default: types } = await import(`${packageName}/types`);
|
|
80
76
|
const version = packageFile.devDependencies[packageName] || packageFile.dependencies[packageName];
|
|
81
77
|
createPluginTypesMap({
|
|
@@ -84,7 +80,7 @@ async function generateDefaultTypesMap() {
|
|
|
84
80
|
packageName,
|
|
85
81
|
version
|
|
86
82
|
});
|
|
87
|
-
}
|
|
83
|
+
}
|
|
88
84
|
await writeFile(path.resolve(process.cwd(), './dist/defaultTypesMap.js'), `const defaultTypesMap = ${JSON.stringify(defaultTypesMap, null, 2)};
|
|
89
85
|
|
|
90
86
|
export default defaultTypesMap;
|
|
@@ -48,6 +48,9 @@ import path from 'path';
|
|
|
48
48
|
ScrollTo: {
|
|
49
49
|
package: '@lowdefy/actions-core'
|
|
50
50
|
},
|
|
51
|
+
SetDarkMode: {
|
|
52
|
+
package: '@lowdefy/actions-core'
|
|
53
|
+
},
|
|
51
54
|
SetFocus: {
|
|
52
55
|
package: '@lowdefy/actions-core'
|
|
53
56
|
},
|
|
@@ -538,8 +541,8 @@ import path from 'path';
|
|
|
538
541
|
_uuid: {
|
|
539
542
|
package: '@lowdefy/operators-uuid'
|
|
540
543
|
},
|
|
541
|
-
|
|
542
|
-
package: '@lowdefy/operators-
|
|
544
|
+
_dayjs: {
|
|
545
|
+
package: '@lowdefy/operators-dayjs'
|
|
543
546
|
},
|
|
544
547
|
_regex: {
|
|
545
548
|
package: '@lowdefy/operators-js'
|
|
@@ -24,7 +24,8 @@ function testContext({ writeBuildArtifact, configDirectory, readConfigFile, logg
|
|
|
24
24
|
const context = {
|
|
25
25
|
stage: 'test',
|
|
26
26
|
directories: {
|
|
27
|
-
config: configDirectory || ''
|
|
27
|
+
config: configDirectory || '',
|
|
28
|
+
server: ''
|
|
28
29
|
},
|
|
29
30
|
typeCounters: {
|
|
30
31
|
actions: createCounter(),
|
|
@@ -35,6 +35,9 @@ function createHandleWarning({ context }) {
|
|
|
35
35
|
const dedupKey = warning.source ?? warning.message;
|
|
36
36
|
if (context.seenSourceLines?.has(dedupKey)) return;
|
|
37
37
|
context.seenSourceLines?.add(dedupKey);
|
|
38
|
+
if (context.warnings) {
|
|
39
|
+
context.warnings.push(warning);
|
|
40
|
+
}
|
|
38
41
|
context.logger.warn(warning);
|
|
39
42
|
};
|
|
40
43
|
}
|
|
@@ -95,19 +95,15 @@ function createPluginTypesMap({ packageName, packageTypes, typePrefix = '', type
|
|
|
95
95
|
typePrefix,
|
|
96
96
|
version
|
|
97
97
|
});
|
|
98
|
-
if (type.isObject(packageTypes.styles)) {
|
|
99
|
-
Object.entries(packageTypes.styles).forEach(([blockType, styles])=>{
|
|
100
|
-
if (blockType === 'default') {
|
|
101
|
-
typesMap.styles.packages[packageName] = styles;
|
|
102
|
-
} else {
|
|
103
|
-
typesMap.styles.blocks[`${typePrefix}${blockType}`] = styles;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
98
|
if (type.isObject(packageTypes.icons)) {
|
|
108
99
|
Object.entries(packageTypes.icons).forEach(([blockType, icons])=>{
|
|
109
100
|
typesMap.icons[`${typePrefix}${blockType}`] = icons;
|
|
110
101
|
});
|
|
111
102
|
}
|
|
103
|
+
if (type.isObject(packageTypes.blockMetas)) {
|
|
104
|
+
Object.entries(packageTypes.blockMetas).forEach(([blockType, meta])=>{
|
|
105
|
+
typesMap.blockMetas[`${typePrefix}${blockType}`] = meta;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
112
108
|
}
|
|
113
109
|
export default createPluginTypesMap;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { ConfigError } from '@lowdefy/errors';
|
|
16
|
+
const validIdPattern = /^[A-Za-z0-9\-_/:]+$/;
|
|
17
|
+
function validateId({ id, field, location, configKey }) {
|
|
18
|
+
if (!validIdPattern.test(id)) {
|
|
19
|
+
throw new ConfigError(`${field} "${id}"${location ? ` at ${location}` : ''} contains invalid characters. IDs must only contain A-Z, a-z, 0-9, "-", "_", "/", and ":".`, {
|
|
20
|
+
configKey
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export default validateId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/build",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -45,15 +45,16 @@
|
|
|
45
45
|
"dist/*"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@lowdefy/ajv": "
|
|
49
|
-
"@lowdefy/
|
|
50
|
-
"@lowdefy/blocks-
|
|
51
|
-
"@lowdefy/
|
|
52
|
-
"@lowdefy/
|
|
53
|
-
"@lowdefy/
|
|
54
|
-
"@lowdefy/
|
|
55
|
-
"@lowdefy/
|
|
56
|
-
"@lowdefy/operators
|
|
48
|
+
"@lowdefy/ajv": "5.1.0",
|
|
49
|
+
"@lowdefy/block-utils": "5.1.0",
|
|
50
|
+
"@lowdefy/blocks-basic": "5.1.0",
|
|
51
|
+
"@lowdefy/blocks-loaders": "5.1.0",
|
|
52
|
+
"@lowdefy/errors": "5.1.0",
|
|
53
|
+
"@lowdefy/helpers": "5.1.0",
|
|
54
|
+
"@lowdefy/node-utils": "5.1.0",
|
|
55
|
+
"@lowdefy/nunjucks": "5.1.0",
|
|
56
|
+
"@lowdefy/operators": "5.1.0",
|
|
57
|
+
"@lowdefy/operators-js": "5.1.0",
|
|
57
58
|
"ajv": "8.12.0",
|
|
58
59
|
"json5": "2.2.3",
|
|
59
60
|
"yaml": "2.3.4",
|
|
@@ -61,41 +62,40 @@
|
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
64
|
"@jest/globals": "28.1.3",
|
|
64
|
-
"@lowdefy/actions-core": "
|
|
65
|
-
"@lowdefy/actions-pdf-make": "
|
|
66
|
-
"@lowdefy/blocks-aggrid": "
|
|
67
|
-
"@lowdefy/blocks-
|
|
68
|
-
"@lowdefy/blocks-
|
|
69
|
-
"@lowdefy/blocks-
|
|
70
|
-
"@lowdefy/blocks-
|
|
71
|
-
"@lowdefy/blocks-
|
|
72
|
-
"@lowdefy/blocks-
|
|
73
|
-
"@lowdefy/
|
|
74
|
-
"@lowdefy/connection-
|
|
75
|
-
"@lowdefy/connection-
|
|
76
|
-
"@lowdefy/connection-
|
|
77
|
-
"@lowdefy/connection-
|
|
78
|
-
"@lowdefy/connection-
|
|
79
|
-
"@lowdefy/connection-
|
|
80
|
-
"@lowdefy/connection-
|
|
81
|
-
"@lowdefy/connection-
|
|
82
|
-
"@lowdefy/
|
|
83
|
-
"@lowdefy/operators-
|
|
84
|
-
"@lowdefy/operators-
|
|
85
|
-
"@lowdefy/operators-
|
|
86
|
-
"@lowdefy/operators-
|
|
87
|
-
"@lowdefy/operators-
|
|
88
|
-
"@lowdefy/operators-
|
|
89
|
-
"@lowdefy/operators-
|
|
90
|
-
"@lowdefy/
|
|
91
|
-
"@lowdefy/plugin-
|
|
92
|
-
"@lowdefy/plugin-
|
|
93
|
-
"@lowdefy/plugin-
|
|
94
|
-
"@
|
|
95
|
-
"@swc/
|
|
96
|
-
"@swc/
|
|
97
|
-
"@
|
|
98
|
-
"@lowdefy/logger": "4.7.3",
|
|
65
|
+
"@lowdefy/actions-core": "5.1.0",
|
|
66
|
+
"@lowdefy/actions-pdf-make": "5.1.0",
|
|
67
|
+
"@lowdefy/blocks-aggrid": "5.1.0",
|
|
68
|
+
"@lowdefy/blocks-antd": "5.1.0",
|
|
69
|
+
"@lowdefy/blocks-diff": "5.1.0",
|
|
70
|
+
"@lowdefy/blocks-echarts": "5.1.0",
|
|
71
|
+
"@lowdefy/blocks-google-maps": "5.1.0",
|
|
72
|
+
"@lowdefy/blocks-markdown": "5.1.0",
|
|
73
|
+
"@lowdefy/blocks-qr": "5.1.0",
|
|
74
|
+
"@lowdefy/connection-axios-http": "5.1.0",
|
|
75
|
+
"@lowdefy/connection-elasticsearch": "5.1.0",
|
|
76
|
+
"@lowdefy/connection-test": "5.1.0",
|
|
77
|
+
"@lowdefy/connection-google-sheets": "5.1.0",
|
|
78
|
+
"@lowdefy/connection-knex": "5.1.0",
|
|
79
|
+
"@lowdefy/connection-mongodb": "5.1.0",
|
|
80
|
+
"@lowdefy/connection-redis": "5.1.0",
|
|
81
|
+
"@lowdefy/connection-sendgrid": "5.1.0",
|
|
82
|
+
"@lowdefy/connection-stripe": "5.1.0",
|
|
83
|
+
"@lowdefy/operators-change-case": "5.1.0",
|
|
84
|
+
"@lowdefy/operators-diff": "5.1.0",
|
|
85
|
+
"@lowdefy/operators-jsonata": "5.1.0",
|
|
86
|
+
"@lowdefy/operators-dayjs": "5.1.0",
|
|
87
|
+
"@lowdefy/operators-mql": "5.1.0",
|
|
88
|
+
"@lowdefy/operators-nunjucks": "5.1.0",
|
|
89
|
+
"@lowdefy/operators-uuid": "5.1.0",
|
|
90
|
+
"@lowdefy/operators-yaml": "5.1.0",
|
|
91
|
+
"@lowdefy/plugin-auth0": "5.1.0",
|
|
92
|
+
"@lowdefy/plugin-aws": "5.1.0",
|
|
93
|
+
"@lowdefy/plugin-csv": "5.1.0",
|
|
94
|
+
"@lowdefy/plugin-next-auth": "5.1.0",
|
|
95
|
+
"@swc/cli": "0.8.0",
|
|
96
|
+
"@swc/core": "1.15.18",
|
|
97
|
+
"@swc/jest": "0.2.39",
|
|
98
|
+
"@lowdefy/logger": "5.1.0",
|
|
99
99
|
"jest": "28.1.3",
|
|
100
100
|
"pino": "8.16.2"
|
|
101
101
|
},
|
|
@@ -103,9 +103,10 @@
|
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
106
|
-
"build": "swc src --out-dir dist --config-file ../../.swcrc --
|
|
106
|
+
"build": "swc src --out-dir dist --config-file ../../.swcrc --cli-config-file ../../.swc-cli.json && node dist/scripts/generateDefaultTypes.js",
|
|
107
107
|
"clean": "rm -rf dist",
|
|
108
108
|
"start": "node dist/scripts/run.js",
|
|
109
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
109
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
110
|
+
"test:u": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=snapshots -- -u"
|
|
110
111
|
}
|
|
111
112
|
}
|
|
@@ -1,34 +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 fs from 'fs';
|
|
16
|
-
import path from 'path';
|
|
17
|
-
import { nunjucksFunction } from '@lowdefy/nunjucks';
|
|
18
|
-
const template = `@import '@lowdefy/layout/style.less';
|
|
19
|
-
@import '@lowdefy/client/style.less';
|
|
20
|
-
{% for style in styles -%}
|
|
21
|
-
@import '{{ style }}';
|
|
22
|
-
{% endfor -%}
|
|
23
|
-
{% if importUserStyles %}
|
|
24
|
-
@import '../../public/styles.less';
|
|
25
|
-
{% endif %}
|
|
26
|
-
`;
|
|
27
|
-
async function writeStyleImports({ components, context }) {
|
|
28
|
-
const templateFn = nunjucksFunction(template);
|
|
29
|
-
await context.writeBuildArtifact('plugins/styles.less', templateFn({
|
|
30
|
-
styles: components.imports.styles,
|
|
31
|
-
importUserStyles: fs.existsSync(path.join(context.directories.config, 'public/styles.less'))
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
export default writeStyleImports;
|