@lowdefy/build 4.0.0-rc.0 → 4.0.0-rc.2

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.
Files changed (92) hide show
  1. package/dist/build/addDefaultPages/404.js +4 -4
  2. package/dist/build/addDefaultPages/addDefaultPages.js +1 -1
  3. package/dist/build/buildAuth/buildAuth.js +1 -1
  4. package/dist/build/buildAuth/buildAuthPlugins.js +1 -1
  5. package/dist/build/buildAuth/buildPageAuth.js +1 -1
  6. package/dist/build/buildAuth/getPageRoles.js +1 -1
  7. package/dist/build/buildAuth/getProtectedPages.js +1 -1
  8. package/dist/build/buildAuth/validateAuthConfig.js +1 -1
  9. package/dist/build/buildConnections.js +1 -1
  10. package/dist/build/buildImports/buildIconImports.js +11 -6
  11. package/dist/build/buildImports/buildImports.js +1 -1
  12. package/dist/build/buildImports/buildImportsDev.js +1 -1
  13. package/dist/build/buildImports/buildImportsProd.js +1 -1
  14. package/dist/build/buildImports/buildStyleImports.js +1 -1
  15. package/dist/build/buildImports/defaultIconsDev.js +2 -2
  16. package/dist/build/buildImports/defaultIconsProd.js +1 -1
  17. package/dist/build/buildMenu.js +2 -2
  18. package/dist/build/buildPages/buildBlock/buildBlock.js +1 -1
  19. package/dist/build/buildPages/buildBlock/buildEvents.js +1 -1
  20. package/dist/build/buildPages/buildBlock/buildRequests.js +1 -1
  21. package/dist/build/buildPages/buildBlock/buildSubBlocks.js +1 -1
  22. package/dist/build/buildPages/buildBlock/countBlockOperators.js +1 -1
  23. package/dist/build/buildPages/buildBlock/countBlockTypes.js +1 -1
  24. package/dist/build/buildPages/buildBlock/moveSkeletonBlocksToArea.js +9 -9
  25. package/dist/build/buildPages/buildBlock/moveSubBlocksToArea.js +1 -1
  26. package/dist/build/buildPages/buildBlock/setBlockId.js +1 -1
  27. package/dist/build/buildPages/buildBlock/validateBlock.js +1 -1
  28. package/dist/build/buildPages/buildPage.js +1 -1
  29. package/dist/build/buildPages/buildPages.js +1 -1
  30. package/dist/build/buildPages/buildTestPage.js +1 -1
  31. package/dist/build/buildRefs/buildRefs.js +1 -1
  32. package/dist/build/buildRefs/evaluateBuildOperators.js +1 -1
  33. package/dist/build/buildRefs/getConfigFile.js +1 -1
  34. package/dist/build/buildRefs/getKey.js +24 -0
  35. package/dist/build/buildRefs/getRefContent.js +1 -1
  36. package/dist/build/buildRefs/getRefPath.js +1 -1
  37. package/dist/build/buildRefs/getRefsFromFile.js +1 -1
  38. package/dist/build/buildRefs/getUserJavascriptFunction.js +1 -1
  39. package/dist/build/buildRefs/makeRefDefinition.js +1 -1
  40. package/dist/build/buildRefs/parseNunjucks.js +1 -1
  41. package/dist/build/buildRefs/parseRefContent.js +2 -7
  42. package/dist/build/buildRefs/populateRefs.js +1 -1
  43. package/dist/build/buildRefs/recursiveBuild.js +6 -2
  44. package/dist/build/buildRefs/runRefResolver.js +1 -1
  45. package/dist/build/buildRefs/runTransformer.js +1 -1
  46. package/dist/build/buildTypes.js +1 -1
  47. package/dist/build/cleanBuildDirectory.js +1 -1
  48. package/dist/build/copyPublicFolder.js +7 -4
  49. package/dist/build/testSchema.js +1 -1
  50. package/dist/build/updateServerPackageJson.js +1 -1
  51. package/dist/build/validateApp.js +1 -1
  52. package/dist/build/validateConfig.js +1 -1
  53. package/dist/build/writeApp.js +1 -1
  54. package/dist/build/writeAuth.js +1 -1
  55. package/dist/build/writeConfig.js +1 -1
  56. package/dist/build/writeConnections.js +1 -1
  57. package/dist/build/writeGlobal.js +1 -1
  58. package/dist/build/writeMenus.js +1 -1
  59. package/dist/build/writePages.js +1 -1
  60. package/dist/build/writePluginImports/generateImportFile.js +1 -1
  61. package/dist/build/writePluginImports/writeActionImports.js +1 -1
  62. package/dist/build/writePluginImports/writeAuthImports.js +1 -1
  63. package/dist/build/writePluginImports/writeBlockImports.js +1 -1
  64. package/dist/build/writePluginImports/writeConnectionImports.js +1 -1
  65. package/dist/build/writePluginImports/writeIconImports.js +1 -1
  66. package/dist/build/writePluginImports/writeOperatorImports.js +1 -1
  67. package/dist/build/writePluginImports/writePluginImports.js +1 -1
  68. package/dist/build/writePluginImports/writeStyleImports.js +1 -1
  69. package/dist/build/writeRequests.js +1 -1
  70. package/dist/build/writeTypes.js +1 -1
  71. package/dist/createContext.js +1 -1
  72. package/dist/defaultTypesMap.js +413 -398
  73. package/dist/index.js +1 -1
  74. package/dist/lowdefySchema.js +2 -2
  75. package/dist/scripts/generateDefaultTypes.js +2 -2
  76. package/dist/scripts/run.js +1 -1
  77. package/dist/test/buildRefs/testBuildRefsAsyncFunction.js +1 -1
  78. package/dist/test/buildRefs/testBuildRefsErrorResolver.js +1 -1
  79. package/dist/test/buildRefs/testBuildRefsNullResolver.js +1 -1
  80. package/dist/test/buildRefs/testBuildRefsParsingResolver.js +1 -1
  81. package/dist/test/buildRefs/testBuildRefsResolver.js +1 -1
  82. package/dist/test/buildRefs/testBuildRefsTransform.js +1 -1
  83. package/dist/test/buildRefs/testBuildRefsTransformIdentity.js +1 -1
  84. package/dist/test/testContext.js +1 -1
  85. package/dist/utils/countOperators.js +1 -1
  86. package/dist/utils/createCheckDuplicateId.js +1 -1
  87. package/dist/utils/createCounter.js +1 -1
  88. package/dist/utils/createPluginTypesMap.js +1 -1
  89. package/dist/utils/formatErrorMessage.js +1 -1
  90. package/dist/utils/readConfigFile.js +1 -1
  91. package/dist/utils/writeBuildArtifact.js +1 -1
  92. package/package.json +46 -46
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -19,7 +19,7 @@
19
19
  minHeight: '100vh'
20
20
  },
21
21
  properties: {
22
- status: 404,
22
+ status: 'info',
23
23
  title: '404',
24
24
  subTitle: 'Sorry, the page you are visiting does not exist.'
25
25
  },
@@ -41,10 +41,10 @@
41
41
  params: {
42
42
  home: true
43
43
  }
44
- },
44
+ }
45
45
  ]
46
46
  }
47
- },
47
+ }
48
48
  ]
49
49
  }
50
50
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -14,12 +14,14 @@
14
14
  limitations under the License.
15
15
  */ const iconPackages = {
16
16
  'react-icons/ai': /"(Ai[A-Z0-9]\w*)"/gm,
17
- 'react-icons/bs': /"(Bs[A-Z0-9]\w*)"/gm,
18
17
  'react-icons/bi': /"(Bi[A-Z0-9]\w*)"/gm,
18
+ 'react-icons/bs': /"(Bs[A-Z0-9]\w*)"/gm,
19
+ 'react-icons/cg': /"(Cg[A-Z0-9]\w*)"/gm,
20
+ 'react-icons/ci': /"(Ci[A-Z0-9]\w*)"/gm,
19
21
  'react-icons/di': /"(Di[A-Z0-9]\w*)"/gm,
20
- 'react-icons/fi': /"(Fi[A-Z0-9]\w*)"/gm,
21
- 'react-icons/fc': /"(Fc[A-Z0-9]\w*)"/gm,
22
22
  'react-icons/fa': /"(Fa[A-Z0-9]\w*)"/gm,
23
+ 'react-icons/fc': /"(Fc[A-Z0-9]\w*)"/gm,
24
+ 'react-icons/fi': /"(Fi[A-Z0-9]\w*)"/gm,
23
25
  'react-icons/gi': /"(Gi[A-Z0-9]\w*)"/gm,
24
26
  'react-icons/go': /"(Go[A-Z0-9]\w*)"/gm,
25
27
  'react-icons/gr': /"(Gr[A-Z0-9]\w*)"/gm,
@@ -29,11 +31,14 @@
29
31
  'react-icons/io5': /"(Io[A-Z0-9]\w*)"/gm,
30
32
  'react-icons/md': /"(Md[A-Z0-9]\w*)"/gm,
31
33
  'react-icons/ri': /"(Ri[A-Z0-9]\w*)"/gm,
34
+ 'react-icons/rx': /"(Rx[A-Z0-9]\w*)"/gm,
32
35
  'react-icons/si': /"(Si[A-Z0-9]\w*)"/gm,
36
+ 'react-icons/sl': /"(Sl[A-Z0-9]\w*)"/gm,
37
+ 'react-icons/tb': /"(Tb[A-Z0-9]\w*)"/gm,
38
+ 'react-icons/tfi': /"(Tfi[A-Z0-9]\w*)"/gm,
33
39
  'react-icons/ti': /"(Ti[A-Z0-9]\w*)"/gm,
34
40
  'react-icons/vsc': /"(Vsc[A-Z0-9]\w*)"/gm,
35
- 'react-icons/wi': /"(Wi[A-Z0-9]\w*)"/gm,
36
- 'react-icons/cg': /"(Cg[A-Z0-9]\w*)"/gm
41
+ 'react-icons/wi': /"(Wi[A-Z0-9]\w*)"/gm
37
42
  };
38
43
  function getConfigIcons({ components , icons , regex }) {
39
44
  [
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -578,7 +578,7 @@
578
578
  'AiOutlineYoutube',
579
579
  'AiOutlineYuque',
580
580
  'AiOutlineZoomIn',
581
- 'AiOutlineZoomOut',
581
+ 'AiOutlineZoomOut'
582
582
  ]
583
583
  };
584
584
  export default defaultIconsDev;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -26,7 +26,7 @@ function buildDefaultMenu({ components , context }) {
26
26
  pageId: page.pageId,
27
27
  auth: page.auth
28
28
  })).filter((page)=>page.pageId !== '404')
29
- },
29
+ }
30
30
  ];
31
31
  return menus;
32
32
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -13,16 +13,16 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import { set, type } from '@lowdefy/helpers';
16
- function recMoveSkeletonBlocksToArea(block1, blockId, pageId) {
17
- if (!type.isNone(block1.blocks)) {
18
- if (!type.isArray(block1.blocks)) {
19
- throw new Error(`Skeleton blocks at ${blockId} on page ${pageId} is not an array. Received ${JSON.stringify(block1.blocks)}`);
16
+ function recMoveSkeletonBlocksToArea(block, blockId, pageId) {
17
+ if (!type.isNone(block.blocks)) {
18
+ if (!type.isArray(block.blocks)) {
19
+ throw new Error(`Skeleton blocks at ${blockId} on page ${pageId} is not an array. Received ${JSON.stringify(block.blocks)}`);
20
20
  }
21
- set(block1, 'areas.content.blocks', block1.blocks);
22
- delete block1.blocks;
21
+ set(block, 'areas.content.blocks', block.blocks);
22
+ delete block.blocks;
23
23
  }
24
- Object.keys(block1.areas || {}).forEach((area)=>{
25
- block1.areas[area].blocks.forEach((block, i)=>{
24
+ Object.keys(block.areas || {}).forEach((area)=>{
25
+ block.areas[area].blocks.forEach((block, i)=>{
26
26
  recMoveSkeletonBlocksToArea(block, `${blockId}.areas.${area}.${i}.blocks`, pageId);
27
27
  });
28
28
  });
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -0,0 +1,24 @@
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 { get } from '@lowdefy/helpers';
16
+ function getKey({ input , refDef }) {
17
+ if (refDef.key) {
18
+ return get(input, refDef.key, {
19
+ default: null
20
+ });
21
+ }
22
+ return input;
23
+ }
24
+ export default getKey;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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,7 +12,7 @@
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
- */ /* eslint-disable no-param-reassign */ import { get, type } from '@lowdefy/helpers';
15
+ */ /* eslint-disable no-param-reassign */ import { type } from '@lowdefy/helpers';
16
16
  import { getFileExtension, getFileSubExtension } from '@lowdefy/node-utils';
17
17
  import JSON5 from 'json5';
18
18
  import YAML from 'yaml';
@@ -32,11 +32,6 @@ function parseRefContent({ content , refDef }) {
32
32
  content = JSON5.parse(content);
33
33
  }
34
34
  }
35
- if (refDef.key) {
36
- content = get(content, refDef.key, {
37
- default: null
38
- });
39
- }
40
35
  return content;
41
36
  }
42
37
  export default parseRefContent;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -13,6 +13,7 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import evaluateBuildOperators from './evaluateBuildOperators.js';
16
+ import getKey from './getKey.js';
16
17
  import getRefContent from './getRefContent.js';
17
18
  import getRefsFromFile from './getRefsFromFile.js';
18
19
  import populateRefs from './populateRefs.js';
@@ -57,7 +58,10 @@ async function recursiveParseFile({ context , refDef , count , referencedFrom }
57
58
  input: transformedFile,
58
59
  refDef: parsedRefDef
59
60
  });
60
- parsedFiles[newRefDef.id] = evaluatedOperators;
61
+ parsedFiles[newRefDef.id] = getKey({
62
+ input: evaluatedOperators,
63
+ refDef: parsedRefDef
64
+ });
61
65
  }
62
66
  return populateRefs({
63
67
  toPopulate: fileContentBuiltRefs,
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -14,10 +14,13 @@
14
14
  limitations under the License.
15
15
  */ import path from 'path';
16
16
  import fs from 'fs';
17
- import { copyDirectory } from '@lowdefy/node-utils';
17
+ import { cleanDirectory, copyFileOrDirectory } from '@lowdefy/node-utils';
18
18
  async function copyPublicFolder({ context }) {
19
19
  if (context.directories.config === context.directories.server) return;
20
- if (!fs.existsSync(path.resolve(context.directories.config, 'public'))) return;
21
- await copyDirectory(path.resolve(context.directories.config, 'public'), path.resolve(context.directories.server, 'public'));
20
+ await cleanDirectory(path.resolve(context.directories.server, 'public'));
21
+ await copyFileOrDirectory(path.resolve(context.directories.server, 'public_default'), path.resolve(context.directories.server, 'public'));
22
+ if (fs.existsSync(path.resolve(context.directories.config, 'public'))) {
23
+ await copyFileOrDirectory(path.resolve(context.directories.config, 'public'), path.resolve(context.directories.server, 'public'));
24
+ }
22
25
  }
23
26
  export default copyPublicFolder;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 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.