@lowdefy/build 0.0.0-alpha.6 → 0.0.0-experimental-20231123101256
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 +201 -0
- package/dist/build/addDefaultPages/404.js +50 -0
- package/dist/build/addDefaultPages/addDefaultPages.js +43 -0
- package/dist/build/addKeys.js +90 -0
- package/dist/build/buildApp.js +40 -0
- package/dist/build/buildAuth/buildAuth.js +46 -0
- package/dist/build/buildAuth/buildAuthPlugins.js +71 -0
- package/dist/build/buildAuth/buildPageAuth.js +50 -0
- package/dist/build/buildAuth/getPageRoles.js +33 -0
- package/dist/build/buildAuth/getProtectedPages.js +28 -0
- package/dist/build/buildAuth/validateAuthConfig.js +64 -0
- package/dist/build/buildConnections.js +46 -0
- package/dist/build/buildImports/buildIconImports.js +90 -0
- package/dist/build/buildImports/buildImports.js +30 -0
- package/dist/build/buildImports/buildImportsDev.js +106 -0
- package/dist/build/buildImports/buildImportsProd.js +54 -0
- package/dist/build/buildImports/buildStyleImports.js +25 -0
- package/dist/build/buildImports/defaultIconsDev.js +584 -0
- package/dist/build/buildImports/defaultIconsProd.js +21 -0
- package/dist/build/buildMenu.js +118 -0
- package/dist/build/buildPages/buildBlock/buildBlock.js +35 -0
- package/dist/build/buildPages/buildBlock/buildEvents.js +76 -0
- package/dist/build/buildPages/buildBlock/buildRequests.js +51 -0
- package/dist/build/buildPages/buildBlock/buildSubBlocks.js +30 -0
- package/dist/build/buildPages/buildBlock/countBlockOperators.js +31 -0
- 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 +25 -0
- package/dist/build/buildPages/buildBlock/setBlockId.js +20 -0
- package/dist/build/buildPages/buildBlock/validateBlock.js +38 -0
- package/dist/build/buildPages/buildPage.js +45 -0
- package/dist/build/buildPages/buildPages.js +31 -0
- package/dist/build/buildPages/buildTestPage.js +46 -0
- package/dist/build/buildRefs/buildRefs.js +32 -0
- package/dist/build/buildRefs/evaluateBuildOperators.js +34 -0
- package/dist/build/buildRefs/getConfigFile.js +28 -0
- package/dist/build/buildRefs/getKey.js +24 -0
- package/dist/build/buildRefs/getRefContent.js +44 -0
- package/dist/build/buildRefs/getRefPath.js +30 -0
- package/dist/build/buildRefs/getRefsFromFile.js +37 -0
- package/dist/build/buildRefs/getUserJavascriptFunction.js +25 -0
- package/dist/build/buildRefs/makeRefDefinition.js +37 -0
- package/dist/build/buildRefs/parseNunjucks.js +20 -0
- package/dist/build/buildRefs/parseRefContent.js +37 -0
- package/dist/build/buildRefs/populateRefs.js +43 -0
- package/dist/build/buildRefs/recursiveBuild.js +85 -0
- package/dist/build/buildRefs/runRefResolver.js +33 -0
- package/dist/build/buildRefs/runTransformer.js +30 -0
- package/dist/build/buildTypes.js +124 -0
- package/dist/build/cleanBuildDirectory.js +19 -0
- package/dist/build/copyPublicFolder.js +26 -0
- package/dist/build/testSchema.js +32 -0
- package/dist/build/updateServerPackageJson.js +45 -0
- package/dist/build/validateConfig.js +30 -0
- package/dist/build/writeApp.js +19 -0
- package/dist/build/writeAuth.js +19 -0
- package/dist/build/writeConfig.js +19 -0
- package/dist/build/writeConnections.js +26 -0
- package/dist/build/writeGlobal.js +25 -0
- package/dist/build/writeMaps.js +26 -0
- package/dist/build/writeMenus.js +22 -0
- package/dist/build/writePages.js +26 -0
- package/dist/build/writePluginImports/generateImportFile.js +31 -0
- package/dist/build/writePluginImports/writeActionImports.js +22 -0
- package/dist/build/writePluginImports/writeAuthImports.js +34 -0
- package/dist/build/writePluginImports/writeBlockImports.js +22 -0
- package/dist/build/writePluginImports/writeConnectionImports.js +22 -0
- 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 +34 -0
- package/dist/build/writeRequests.js +32 -0
- package/dist/build/writeTypes.js +19 -0
- package/dist/createContext.js +58 -0
- package/dist/defaultTypesMap.js +2125 -0
- package/dist/index.js +149 -1
- package/dist/lowdefySchema.js +873 -0
- package/dist/scripts/generateDefaultTypes.js +91 -0
- package/dist/scripts/run.js +33 -0
- package/dist/test/buildRefs/testBuildRefsAsyncFunction.js +22 -0
- package/dist/test/buildRefs/testBuildRefsErrorResolver.js +18 -0
- package/dist/test/buildRefs/testBuildRefsNullResolver.js +19 -0
- package/dist/test/buildRefs/testBuildRefsParsingResolver.js +39 -0
- package/dist/test/buildRefs/testBuildRefsResolver.js +23 -0
- package/dist/test/buildRefs/testBuildRefsTransform.js +25 -0
- package/dist/test/buildRefs/testBuildRefsTransformIdentity.js +21 -0
- package/dist/test/testContext.js +56 -0
- package/dist/utils/countOperators.js +30 -0
- package/dist/utils/createCheckDuplicateId.js +31 -0
- package/dist/utils/createCounter.js +33 -0
- package/dist/utils/createPluginTypesMap.js +113 -0
- package/dist/utils/formatErrorMessage.js +56 -0
- package/dist/utils/makeId.js +23 -0
- package/dist/utils/readConfigFile.js +27 -0
- package/dist/utils/writeBuildArtifact.js +23 -0
- package/package.json +77 -35
- package/dist/1.index.js +0 -1
- package/dist/270.index.js +0 -2
- package/dist/270.index.js.LICENSE.txt +0 -45
- package/dist/271.index.js +0 -1
- package/dist/279.index.js +0 -1
- package/dist/319.index.js +0 -1
- package/dist/377.index.js +0 -1
- package/dist/449.index.js +0 -1
- package/dist/5.index.js +0 -2
- package/dist/5.index.js.LICENSE.txt +0 -1
- package/dist/564.index.js +0 -1
- package/dist/641.index.js +0 -1
- package/dist/648.index.js +0 -1
- package/dist/655.index.js +0 -1
- package/dist/747.index.js +0 -1
- package/dist/903.index.js +0 -1
- package/dist/904.index.js +0 -1
- package/dist/remoteEntry.js +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2023 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 path from 'path';
|
|
16
|
+
import { writeFile } from '@lowdefy/node-utils';
|
|
17
|
+
function createWriteBuildArtifact({ directories }) {
|
|
18
|
+
async function writeBuildArtifact(filePath, content) {
|
|
19
|
+
await writeFile(path.join(directories.build, filePath), content);
|
|
20
|
+
}
|
|
21
|
+
return writeBuildArtifact;
|
|
22
|
+
}
|
|
23
|
+
export default createWriteBuildArtifact;
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/build",
|
|
3
|
-
"version": "0.0.0-
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.0-experimental-20231123101256",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"lowdefy"
|
|
9
|
+
],
|
|
7
10
|
"bugs": {
|
|
8
11
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
9
12
|
},
|
|
@@ -15,49 +18,88 @@
|
|
|
15
18
|
{
|
|
16
19
|
"name": "Gerrie van Wyk",
|
|
17
20
|
"url": "https://github.com/Gervwyk"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Johann Möller",
|
|
24
|
+
"url": "https://github.com/JohannMoller"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Sandile Memela",
|
|
28
|
+
"url": "https://github.com/sah-memela"
|
|
18
29
|
}
|
|
19
30
|
],
|
|
20
31
|
"repository": {
|
|
21
32
|
"type": "git",
|
|
22
33
|
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
23
34
|
},
|
|
24
|
-
"
|
|
35
|
+
"type": "module",
|
|
36
|
+
"bin": {
|
|
37
|
+
"lowdefy-build": "./dist/scripts/run.js"
|
|
38
|
+
},
|
|
39
|
+
"exports": {
|
|
40
|
+
".": "./dist/index.js",
|
|
41
|
+
"./buildTestPage": "./dist/build/buildPages/buildTestPage.js"
|
|
42
|
+
},
|
|
25
43
|
"files": [
|
|
26
44
|
"dist/*"
|
|
27
45
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "yarn webpack",
|
|
30
|
-
"clean": "rm -rf dist",
|
|
31
|
-
"npm-publish": "npm publish --access public",
|
|
32
|
-
"prepare": "yarn build",
|
|
33
|
-
"prepublishOnly": "yarn build",
|
|
34
|
-
"test": "jest --coverage",
|
|
35
|
-
"webpack": "webpack --config webpack.config.js",
|
|
36
|
-
"version:prerelease": "yarn version prerelease",
|
|
37
|
-
"version:patch": "yarn version patch",
|
|
38
|
-
"version:minor": "yarn version minor",
|
|
39
|
-
"version:major": "yarn version major"
|
|
40
|
-
},
|
|
41
46
|
"dependencies": {
|
|
42
|
-
"@lowdefy/
|
|
43
|
-
"@lowdefy/
|
|
44
|
-
"@lowdefy/
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
47
|
+
"@lowdefy/ajv": "0.0.0-experimental-20231123101256",
|
|
48
|
+
"@lowdefy/blocks-basic": "0.0.0-experimental-20231123101256",
|
|
49
|
+
"@lowdefy/blocks-loaders": "0.0.0-experimental-20231123101256",
|
|
50
|
+
"@lowdefy/helpers": "0.0.0-experimental-20231123101256",
|
|
51
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20231123101256",
|
|
52
|
+
"@lowdefy/nunjucks": "0.0.0-experimental-20231123101256",
|
|
53
|
+
"@lowdefy/operators": "0.0.0-experimental-20231123101256",
|
|
54
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20231123101256",
|
|
55
|
+
"ajv": "8.12.0",
|
|
56
|
+
"json5": "2.2.3",
|
|
57
|
+
"yaml": "2.3.4",
|
|
58
|
+
"yargs": "17.7.2"
|
|
51
59
|
},
|
|
52
60
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
61
|
+
"@jest/globals": "28.1.3",
|
|
62
|
+
"@lowdefy/actions-core": "0.0.0-experimental-20231123101256",
|
|
63
|
+
"@lowdefy/actions-pdf-make": "0.0.0-experimental-20231123101256",
|
|
64
|
+
"@lowdefy/blocks-aggrid": "0.0.0-experimental-20231123101256",
|
|
65
|
+
"@lowdefy/blocks-algolia": "0.0.0-experimental-20231123101256",
|
|
66
|
+
"@lowdefy/blocks-antd": "0.0.0-experimental-20231123101256",
|
|
67
|
+
"@lowdefy/blocks-color-selectors": "0.0.0-experimental-20231123101256",
|
|
68
|
+
"@lowdefy/blocks-echarts": "0.0.0-experimental-20231123101256",
|
|
69
|
+
"@lowdefy/blocks-google-maps": "0.0.0-experimental-20231123101256",
|
|
70
|
+
"@lowdefy/blocks-markdown": "0.0.0-experimental-20231123101256",
|
|
71
|
+
"@lowdefy/blocks-qr": "0.0.0-experimental-20231123101256",
|
|
72
|
+
"@lowdefy/connection-axios-http": "0.0.0-experimental-20231123101256",
|
|
73
|
+
"@lowdefy/connection-elasticsearch": "0.0.0-experimental-20231123101256",
|
|
74
|
+
"@lowdefy/connection-google-sheets": "0.0.0-experimental-20231123101256",
|
|
75
|
+
"@lowdefy/connection-knex": "0.0.0-experimental-20231123101256",
|
|
76
|
+
"@lowdefy/connection-mongodb": "0.0.0-experimental-20231123101256",
|
|
77
|
+
"@lowdefy/connection-redis": "0.0.0-experimental-20231123101256",
|
|
78
|
+
"@lowdefy/connection-sendgrid": "0.0.0-experimental-20231123101256",
|
|
79
|
+
"@lowdefy/connection-stripe": "0.0.0-experimental-20231123101256",
|
|
80
|
+
"@lowdefy/operators-change-case": "0.0.0-experimental-20231123101256",
|
|
81
|
+
"@lowdefy/operators-diff": "0.0.0-experimental-20231123101256",
|
|
82
|
+
"@lowdefy/operators-moment": "0.0.0-experimental-20231123101256",
|
|
83
|
+
"@lowdefy/operators-mql": "0.0.0-experimental-20231123101256",
|
|
84
|
+
"@lowdefy/operators-nunjucks": "0.0.0-experimental-20231123101256",
|
|
85
|
+
"@lowdefy/operators-uuid": "0.0.0-experimental-20231123101256",
|
|
86
|
+
"@lowdefy/operators-yaml": "0.0.0-experimental-20231123101256",
|
|
87
|
+
"@lowdefy/plugin-auth0": "0.0.0-experimental-20231123101256",
|
|
88
|
+
"@lowdefy/plugin-aws": "0.0.0-experimental-20231123101256",
|
|
89
|
+
"@lowdefy/plugin-csv": "0.0.0-experimental-20231123101256",
|
|
90
|
+
"@lowdefy/plugin-next-auth": "0.0.0-experimental-20231123101256",
|
|
91
|
+
"@swc/cli": "0.1.63",
|
|
92
|
+
"@swc/core": "1.3.99",
|
|
93
|
+
"@swc/jest": "0.2.29",
|
|
94
|
+
"jest": "28.1.3"
|
|
95
|
+
},
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public"
|
|
98
|
+
},
|
|
99
|
+
"scripts": {
|
|
100
|
+
"build": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && node dist/scripts/generateDefaultTypes.js",
|
|
101
|
+
"clean": "rm -rf dist",
|
|
102
|
+
"start": "node dist/scripts/run.js",
|
|
103
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
62
104
|
}
|
|
63
|
-
}
|
|
105
|
+
}
|
package/dist/1.index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=1,exports.ids=[1],exports.modules={6001:(e,t,r)=>{"use strict";r.r(t),r.d(t,{NIL:()=>U,parse:()=>v,stringify:()=>l,v1:()=>h,v3:()=>I,v4:()=>w,v5:()=>b,validate:()=>f,version:()=>A});var n=r(6417),s=r.n(n);const o=new Uint8Array(256);let i=o.length;function c(){return i>o.length-16&&(s().randomFillSync(o),i=0),o.slice(i,i+=16)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,f=function(e){return"string"==typeof e&&a.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).substr(1));const l=function(e,t=0){const r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!f(r))throw TypeError("Stringified UUID is invalid");return r};let d,p,y=0,g=0;const h=function(e,t,r){let n=t&&r||0;const s=t||new Array(16);let o=(e=e||{}).node||d,i=void 0!==e.clockseq?e.clockseq:p;if(null==o||null==i){const t=e.random||(e.rng||c)();null==o&&(o=d=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==i&&(i=p=16383&(t[6]<<8|t[7]))}let a=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:g+1;const u=a-y+(f-g)/1e4;if(u<0&&void 0===e.clockseq&&(i=i+1&16383),(u<0||a>y)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=a,g=f,p=i,a+=122192928e5;const h=(1e4*(268435455&a)+f)%4294967296;s[n++]=h>>>24&255,s[n++]=h>>>16&255,s[n++]=h>>>8&255,s[n++]=255&h;const v=a/4294967296*1e4&268435455;s[n++]=v>>>8&255,s[n++]=255&v,s[n++]=v>>>24&15|16,s[n++]=v>>>16&255,s[n++]=i>>>8|128,s[n++]=255&i;for(let e=0;e<6;++e)s[n+e]=o[e];return t||l(s)},v=function(e){if(!f(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function m(e,t,r){function n(e,n,s,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=v(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let i=new Uint8Array(16+e.length);if(i.set(n),i.set(e,n.length),i=r(i),i[6]=15&i[6]|t,i[8]=63&i[8]|128,s){o=o||0;for(let e=0;e<16;++e)s[o+e]=i[e];return s}return l(i)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}const I=m("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),s().createHash("md5").update(e).digest()})),w=function(e,t,r){const n=(e=e||{}).random||(e.rng||c)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return l(n)},b=m("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),s().createHash("sha1").update(e).digest()})),U="00000000-0000-0000-0000-000000000000",A=function(e){if(!f(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}}};
|