@common-stack/rollup-vite-utils 6.0.2-alpha.2 → 6.0.6-alpha.104

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 (181) hide show
  1. package/lib/config-schema.cjs +111 -0
  2. package/lib/config-schema.cjs.map +1 -0
  3. package/lib/config-schema.js +111 -0
  4. package/lib/config-schema.js.map +1 -0
  5. package/lib/constants/constants.cjs +2 -1
  6. package/lib/constants/constants.cjs.map +1 -1
  7. package/lib/constants/constants.d.ts +1 -0
  8. package/lib/constants/constants.js +2 -1
  9. package/lib/constants/constants.js.map +1 -1
  10. package/lib/default-config.json.cjs +42 -4
  11. package/lib/default-config.json.cjs.map +1 -1
  12. package/lib/default-config.json.js +42 -4
  13. package/lib/default-config.json.js.map +1 -1
  14. package/lib/index.cjs +1 -1
  15. package/lib/index.d.ts +0 -1
  16. package/lib/index.js +1 -1
  17. package/lib/interfaces/rollup.d.ts +1 -0
  18. package/lib/preStartup/configLoader/configLoader.cjs +38 -6
  19. package/lib/preStartup/configLoader/configLoader.cjs.map +1 -1
  20. package/lib/preStartup/configLoader/configLoader.d.ts +3 -3
  21. package/lib/preStartup/configLoader/configLoader.js +38 -6
  22. package/lib/preStartup/configLoader/configLoader.js.map +1 -1
  23. package/lib/preStartup/configLoader/index.cjs +1 -1
  24. package/lib/preStartup/configLoader/index.cjs.map +1 -1
  25. package/lib/preStartup/configLoader/index.js +1 -1
  26. package/lib/preStartup/configLoader/index.js.map +1 -1
  27. package/lib/preStartup/copyIfVersionChanged.cjs +8 -2
  28. package/lib/preStartup/copyIfVersionChanged.cjs.map +1 -1
  29. package/lib/preStartup/copyIfVersionChanged.js +8 -2
  30. package/lib/preStartup/copyIfVersionChanged.js.map +1 -1
  31. package/lib/rollup/index.d.ts +1 -0
  32. package/lib/rollup/modifyLibFiles/extractGraphQLQueries.cjs +39 -10
  33. package/lib/rollup/modifyLibFiles/extractGraphQLQueries.cjs.map +1 -1
  34. package/lib/rollup/modifyLibFiles/extractGraphQLQueries.js +39 -10
  35. package/lib/rollup/modifyLibFiles/extractGraphQLQueries.js.map +1 -1
  36. package/lib/rollup/modifyLibFiles/fixtures/compute1/TestComponent.d.ts +6 -0
  37. package/lib/rollup/modifyLibFiles/fixtures/compute1/TestDeferComponent.d.ts +10 -0
  38. package/lib/rollup/modifyLibFiles/handleComponentOrDialog.cjs +214 -141
  39. package/lib/rollup/modifyLibFiles/handleComponentOrDialog.cjs.map +1 -1
  40. package/lib/rollup/modifyLibFiles/handleComponentOrDialog.d.ts +21 -0
  41. package/lib/rollup/modifyLibFiles/handleComponentOrDialog.js +214 -141
  42. package/lib/rollup/modifyLibFiles/handleComponentOrDialog.js.map +1 -1
  43. package/lib/rollup/modifyLibFiles/handleImportPaths.cjs +24 -0
  44. package/lib/rollup/modifyLibFiles/handleImportPaths.cjs.map +1 -0
  45. package/lib/rollup/modifyLibFiles/handleImportPaths.d.ts +3 -0
  46. package/lib/rollup/modifyLibFiles/handleImportPaths.js +24 -0
  47. package/lib/rollup/modifyLibFiles/handleImportPaths.js.map +1 -0
  48. package/lib/rollup/modifyLibFiles/handleLoaderReturn.cjs +86 -0
  49. package/lib/rollup/modifyLibFiles/handleLoaderReturn.cjs.map +1 -0
  50. package/lib/rollup/modifyLibFiles/handleLoaderReturn.d.ts +11 -0
  51. package/lib/rollup/modifyLibFiles/handleLoaderReturn.js +86 -0
  52. package/lib/rollup/modifyLibFiles/handleLoaderReturn.js.map +1 -0
  53. package/lib/rollup/modifyLibFiles/handleLoaderReturn.test.d.ts +1 -0
  54. package/lib/rollup/modifyLibFiles/handleWrappers.cjs +2 -5
  55. package/lib/rollup/modifyLibFiles/handleWrappers.cjs.map +1 -1
  56. package/lib/rollup/modifyLibFiles/handleWrappers.js +2 -5
  57. package/lib/rollup/modifyLibFiles/handleWrappers.js.map +1 -1
  58. package/lib/rollup/modifyLibFiles/utils.cjs +7 -7
  59. package/lib/rollup/modifyLibFiles/utils.cjs.map +1 -1
  60. package/lib/rollup/modifyLibFiles/utils.d.ts +1 -1
  61. package/lib/rollup/modifyLibFiles/utils.js +7 -7
  62. package/lib/rollup/modifyLibFiles/utils.js.map +1 -1
  63. package/lib/rollup/rollupPluginGenerateJson.cjs +2 -3
  64. package/lib/rollup/rollupPluginGenerateJson.cjs.map +1 -1
  65. package/lib/rollup/rollupPluginGenerateJson.js +2 -3
  66. package/lib/rollup/rollupPluginGenerateJson.js.map +1 -1
  67. package/lib/rollup/rollupPluginModifyLibFiles.cjs +25 -11
  68. package/lib/rollup/rollupPluginModifyLibFiles.cjs.map +1 -1
  69. package/lib/rollup/rollupPluginModifyLibFiles.js +25 -11
  70. package/lib/rollup/rollupPluginModifyLibFiles.js.map +1 -1
  71. package/lib/rollup/rollupPluginModifyLibFiles.test.d.ts +1 -0
  72. package/lib/rollup/rollupPluginUpdateFromConfig.cjs +122 -0
  73. package/lib/rollup/rollupPluginUpdateFromConfig.cjs.map +1 -0
  74. package/lib/rollup/rollupPluginUpdateFromConfig.d.ts +1 -0
  75. package/lib/rollup/rollupPluginUpdateFromConfig.js +122 -0
  76. package/lib/rollup/rollupPluginUpdateFromConfig.js.map +1 -0
  77. package/lib/utils/deepMerge.cjs +61 -0
  78. package/lib/utils/deepMerge.cjs.map +1 -0
  79. package/lib/utils/deepMerge.d.ts +1 -0
  80. package/lib/utils/deepMerge.js +61 -0
  81. package/lib/utils/deepMerge.js.map +1 -0
  82. package/lib/utils/getAllCDECodeConfig.cjs +18 -0
  83. package/lib/utils/getAllCDECodeConfig.cjs.map +1 -0
  84. package/lib/utils/getAllCDECodeConfig.d.ts +1 -0
  85. package/lib/utils/getAllCDECodeConfig.js +18 -0
  86. package/lib/utils/getAllCDECodeConfig.js.map +1 -0
  87. package/lib/utils/index.d.ts +1 -0
  88. package/lib/utils/parseUtility.d.ts +3 -0
  89. package/lib/utils/setupConfig.cjs +6 -65
  90. package/lib/utils/setupConfig.cjs.map +1 -1
  91. package/lib/utils/setupConfig.d.ts +1 -2
  92. package/lib/utils/setupConfig.js +6 -65
  93. package/lib/utils/setupConfig.js.map +1 -1
  94. package/lib/utils/utils.cjs +29 -1
  95. package/lib/utils/utils.cjs.map +1 -1
  96. package/lib/utils/utils.d.ts +1 -0
  97. package/lib/utils/utils.js +29 -1
  98. package/lib/utils/utils.js.map +1 -1
  99. package/lib/utils/verifyConfig.cjs +13 -0
  100. package/lib/utils/verifyConfig.cjs.map +1 -0
  101. package/lib/utils/verifyConfig.d.ts +2 -0
  102. package/lib/utils/verifyConfig.js +13 -0
  103. package/lib/utils/verifyConfig.js.map +1 -0
  104. package/lib/utils/withErrorHandleUtil.cjs +3 -7
  105. package/lib/utils/withErrorHandleUtil.cjs.map +1 -1
  106. package/lib/utils/withErrorHandleUtil.js +3 -7
  107. package/lib/utils/withErrorHandleUtil.js.map +1 -1
  108. package/lib/vite-wrappers/custom-routes.cjs +44 -0
  109. package/lib/vite-wrappers/custom-routes.cjs.map +1 -0
  110. package/lib/vite-wrappers/custom-routes.d.ts +2 -0
  111. package/lib/vite-wrappers/custom-routes.js +44 -0
  112. package/lib/vite-wrappers/custom-routes.js.map +1 -0
  113. package/lib/vite-wrappers/generators/clientLoaderGenerator.cjs +159 -0
  114. package/lib/vite-wrappers/generators/clientLoaderGenerator.cjs.map +1 -0
  115. package/lib/vite-wrappers/generators/clientLoaderGenerator.d.ts +17 -0
  116. package/lib/vite-wrappers/generators/clientLoaderGenerator.js +159 -0
  117. package/lib/vite-wrappers/generators/clientLoaderGenerator.js.map +1 -0
  118. package/lib/vite-wrappers/generators/clientLoaderGenerator.test.d.ts +1 -0
  119. package/lib/vite-wrappers/generators/generateHasConfiguration.cjs +20 -0
  120. package/lib/vite-wrappers/generators/generateHasConfiguration.cjs.map +1 -0
  121. package/lib/vite-wrappers/generators/generateHasConfiguration.d.ts +10 -0
  122. package/lib/vite-wrappers/generators/generateHasConfiguration.js +20 -0
  123. package/lib/vite-wrappers/generators/generateHasConfiguration.js.map +1 -0
  124. package/lib/vite-wrappers/generators/generateHasPermission.cjs +29 -0
  125. package/lib/vite-wrappers/generators/generateHasPermission.cjs.map +1 -0
  126. package/lib/vite-wrappers/generators/generateHasPermission.d.ts +9 -0
  127. package/lib/vite-wrappers/generators/generateHasPermission.js +29 -0
  128. package/lib/vite-wrappers/generators/generateHasPermission.js.map +1 -0
  129. package/lib/vite-wrappers/generators/generateHasPermission.test.d.ts +1 -0
  130. package/lib/vite-wrappers/generators/loaderGenerator.cjs +157 -0
  131. package/lib/vite-wrappers/generators/loaderGenerator.cjs.map +1 -0
  132. package/lib/vite-wrappers/generators/loaderGenerator.d.ts +36 -0
  133. package/lib/vite-wrappers/generators/loaderGenerator.js +157 -0
  134. package/lib/vite-wrappers/generators/loaderGenerator.js.map +1 -0
  135. package/lib/vite-wrappers/generators/loaderGenerator.test.d.ts +1 -0
  136. package/lib/vite-wrappers/generators/serverQueryLoaderGenerator.cjs +40 -0
  137. package/lib/vite-wrappers/generators/serverQueryLoaderGenerator.cjs.map +1 -0
  138. package/lib/vite-wrappers/generators/serverQueryLoaderGenerator.d.ts +10 -0
  139. package/lib/vite-wrappers/generators/serverQueryLoaderGenerator.js +40 -0
  140. package/lib/vite-wrappers/generators/serverQueryLoaderGenerator.js.map +1 -0
  141. package/lib/vite-wrappers/generators/serverQueryLoaderGenerator.test.d.ts +1 -0
  142. package/lib/vite-wrappers/generators/utils/pickConfig.cjs +15 -0
  143. package/lib/vite-wrappers/generators/utils/pickConfig.cjs.map +1 -0
  144. package/lib/vite-wrappers/generators/utils/pickConfig.d.ts +10 -0
  145. package/lib/vite-wrappers/generators/utils/pickConfig.js +15 -0
  146. package/lib/vite-wrappers/generators/utils/pickConfig.js.map +1 -0
  147. package/lib/vite-wrappers/generators/utils/resourceParams.cjs +58 -0
  148. package/lib/vite-wrappers/generators/utils/resourceParams.cjs.map +1 -0
  149. package/lib/vite-wrappers/generators/utils/resourceParams.d.ts +12 -0
  150. package/lib/vite-wrappers/generators/utils/resourceParams.js +58 -0
  151. package/lib/vite-wrappers/generators/utils/resourceParams.js.map +1 -0
  152. package/lib/vite-wrappers/generators/utils/resourceParams.test.d.ts +1 -0
  153. package/lib/vite-wrappers/helpers/componentReplacement.cjs +12 -0
  154. package/lib/vite-wrappers/helpers/componentReplacement.cjs.map +1 -0
  155. package/lib/vite-wrappers/helpers/componentReplacement.d.ts +2 -0
  156. package/lib/vite-wrappers/helpers/componentReplacement.js +12 -0
  157. package/lib/vite-wrappers/helpers/componentReplacement.js.map +1 -0
  158. package/lib/vite-wrappers/icon-switch.cjs +20 -6
  159. package/lib/vite-wrappers/icon-switch.cjs.map +1 -1
  160. package/lib/vite-wrappers/icon-switch.d.ts +1 -1
  161. package/lib/vite-wrappers/icon-switch.js +20 -6
  162. package/lib/vite-wrappers/icon-switch.js.map +1 -1
  163. package/lib/vite-wrappers/index.d.ts +3 -0
  164. package/lib/vite-wrappers/json-wrappers.cjs +105 -13
  165. package/lib/vite-wrappers/json-wrappers.cjs.map +1 -1
  166. package/lib/vite-wrappers/json-wrappers.d.ts +33 -0
  167. package/lib/vite-wrappers/json-wrappers.js +105 -13
  168. package/lib/vite-wrappers/json-wrappers.js.map +1 -1
  169. package/lib/vite-wrappers/wrapperComponent.cjs +210 -132
  170. package/lib/vite-wrappers/wrapperComponent.cjs.map +1 -1
  171. package/lib/vite-wrappers/wrapperComponent.d.ts +11 -2
  172. package/lib/vite-wrappers/wrapperComponent.js +209 -131
  173. package/lib/vite-wrappers/wrapperComponent.js.map +1 -1
  174. package/package.json +7 -5
  175. package/lib/interfaces/types.d.ts +0 -59
  176. package/lib/vite-wrappers/loaderGenerator.cjs +0 -245
  177. package/lib/vite-wrappers/loaderGenerator.cjs.map +0 -1
  178. package/lib/vite-wrappers/loaderGenerator.d.ts +0 -18
  179. package/lib/vite-wrappers/loaderGenerator.js +0 -245
  180. package/lib/vite-wrappers/loaderGenerator.js.map +0 -1
  181. /package/lib/{vite-wrappers/loaderGenerator.test.d.ts → rollup/modifyLibFiles/handleComponentOrDialog.test.d.ts} +0 -0
@@ -0,0 +1,111 @@
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});const schema = {
2
+ type: "object",
3
+ properties: {
4
+ commonPaths: { type: "object" },
5
+ copyOperations: {
6
+ type: "array",
7
+ items: {
8
+ type: "object",
9
+ properties: {
10
+ packageName: { type: "string" },
11
+ destPath: { type: "string" },
12
+ generateModule: { type: "boolean" }
13
+ },
14
+ required: ["packageName", "destPath", "generateModule"],
15
+ additionalProperties: false
16
+ }
17
+ },
18
+ i18n: {
19
+ type: "object",
20
+ properties: {
21
+ enabled: { type: "boolean" },
22
+ fallbackLng: { type: "string" },
23
+ supportedLngs: {
24
+ type: "array",
25
+ items: { type: "string" }
26
+ },
27
+ defaultNS: { type: "string" },
28
+ react: {
29
+ type: "object",
30
+ properties: {
31
+ useSuspense: { type: "boolean" }
32
+ },
33
+ },
34
+ backend: {
35
+ type: "object",
36
+ properties: {
37
+ loadPath: { type: "string" },
38
+ loadServerPath: { type: "string" }
39
+ },
40
+ },
41
+ packages: {
42
+ type: "array",
43
+ items: { type: "string" }
44
+ }
45
+ },
46
+ },
47
+ modules: {
48
+ type: "array",
49
+ items: {
50
+ oneOf: [
51
+ { type: "string" },
52
+ {
53
+ type: "array",
54
+ items: [
55
+ { type: "string" },
56
+ {
57
+ type: "object",
58
+ properties: {
59
+ version: { type: "string" }
60
+ },
61
+ required: ["version"],
62
+ additionalProperties: false
63
+ }
64
+ ],
65
+ "minItems": 2,
66
+ "maxItems": 2,
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ paths: {
72
+ type: "object",
73
+ properties: {
74
+ lifecycleMiddleware: { type: "string" }
75
+ },
76
+ },
77
+ buildConfig: {
78
+ type: "object",
79
+ properties: {
80
+ __CLIENT__: { type: "boolean" },
81
+ __SERVER__: { type: "boolean" },
82
+ __DEV__: { type: "boolean" },
83
+ __TEST__: { type: "boolean" },
84
+ __CDN_URL__: { type: "string" },
85
+ __GRAPHQL_URL__: { type: "string" },
86
+ __DEBUGGING__: { type: "boolean" },
87
+ __SSR__: { type: "boolean" },
88
+ __API_URL__: { type: "string" },
89
+ __FRONTEND_BUILD_DIR__: { type: "string" },
90
+ __WEB_DEV_SERVER_PORT__: { type: "integer" },
91
+ __GRAPHQL_ENDPOINT__: { type: "string" },
92
+ __LOCAL_SERVER_HOST__: { type: "string" },
93
+ __BACKEND_URL__: { type: "string" }
94
+ },
95
+ },
96
+ viteConfig: {
97
+ type: "object",
98
+ properties: {
99
+ ssr: {
100
+ type: "object",
101
+ properties: {
102
+ noExternal: {
103
+ type: "array",
104
+ items: { type: "string" }
105
+ }
106
+ },
107
+ }
108
+ },
109
+ }
110
+ },
111
+ };exports.default=schema;//# sourceMappingURL=config-schema.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-schema.cjs","sources":["../src/config-schema.js"],"sourcesContent":["const schema = {\n type: \"object\",\n properties: {\n commonPaths: { type: \"object\" },\n copyOperations: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n packageName: { type: \"string\" },\n destPath: { type: \"string\" },\n generateModule: { type: \"boolean\" }\n },\n required: [\"packageName\", \"destPath\", \"generateModule\"],\n additionalProperties: false\n }\n },\n i18n: {\n type: \"object\",\n properties: {\n enabled: { type: \"boolean\" },\n fallbackLng: { type: \"string\" },\n supportedLngs: {\n type: \"array\",\n items: { type: \"string\" }\n },\n defaultNS: { type: \"string\" },\n react: {\n type: \"object\",\n properties: {\n useSuspense: { type: \"boolean\" }\n },\n },\n backend: {\n type: \"object\",\n properties: {\n loadPath: { type: \"string\" },\n loadServerPath: { type: \"string\" }\n },\n },\n packages: {\n type: \"array\",\n items: { type: \"string\" }\n }\n },\n },\n modules: {\n type: \"array\",\n items: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: [\n { type: \"string\" },\n {\n type: \"object\",\n properties: {\n version: { type: \"string\" }\n },\n required: [\"version\"],\n additionalProperties: false\n }\n ],\n \"minItems\": 2,\n \"maxItems\": 2,\n }\n ]\n }\n },\n paths: {\n type: \"object\",\n properties: {\n lifecycleMiddleware: { type: \"string\" }\n },\n },\n buildConfig: {\n type: \"object\",\n properties: {\n __CLIENT__: { type: \"boolean\" },\n __SERVER__: { type: \"boolean\" },\n __DEV__: { type: \"boolean\" },\n __TEST__: { type: \"boolean\" },\n __CDN_URL__: { type: \"string\" },\n __GRAPHQL_URL__: { type: \"string\" },\n __DEBUGGING__: { type: \"boolean\" },\n __SSR__: { type: \"boolean\" },\n __API_URL__: { type: \"string\" },\n __FRONTEND_BUILD_DIR__: { type: \"string\" },\n __WEB_DEV_SERVER_PORT__: { type: \"integer\" },\n __GRAPHQL_ENDPOINT__: { type: \"string\" },\n __LOCAL_SERVER_HOST__: { type: \"string\" },\n __BACKEND_URL__: { type: \"string\" }\n },\n },\n viteConfig: {\n type: \"object\",\n properties: {\n ssr: {\n type: \"object\",\n properties: {\n noExternal: {\n type: \"array\",\n items: { type: \"string\" }\n }\n },\n }\n },\n }\n },\n};\n\nexport default schema;\n"],"names":[],"mappings":"sEAAK,MAAC,MAAM,GAAG;AACf,EAAE,IAAI,EAAE,QAAQ;AAChB,EAAE,UAAU,EAAE;AACd,IAAI,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACnC,IAAI,cAAc,EAAE;AACpB,MAAM,IAAI,EAAE,OAAO;AACnB,MAAM,KAAK,EAAE;AACb,QAAQ,IAAI,EAAE,QAAQ;AACtB,QAAQ,UAAU,EAAE;AACpB,UAAU,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACzC,UAAU,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACtC,UAAU,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;AAC7C,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,aAAa,EAAE,UAAU,EAAE,gBAAgB,CAAC;AAC/D,QAAQ,oBAAoB,EAAE,KAAK;AACnC,OAAO;AACP,KAAK;AACL,IAAI,IAAI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,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC3C,OAAO;AACP,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,IAAI,EAAE,QAAQ;AACpB,MAAM,UAAU,EAAE;AAClB,QAAQ,GAAG,EAAE;AACb,UAAU,IAAI,EAAE,QAAQ;AACxB,UAAU,UAAU,EAAE;AACtB,YAAY,UAAU,EAAE;AACxB,cAAc,IAAI,EAAE,OAAO;AAC3B,cAAc,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACvC,aAAa;AACb,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH"}
@@ -0,0 +1,111 @@
1
+ const schema = {
2
+ type: "object",
3
+ properties: {
4
+ commonPaths: { type: "object" },
5
+ copyOperations: {
6
+ type: "array",
7
+ items: {
8
+ type: "object",
9
+ properties: {
10
+ packageName: { type: "string" },
11
+ destPath: { type: "string" },
12
+ generateModule: { type: "boolean" }
13
+ },
14
+ required: ["packageName", "destPath", "generateModule"],
15
+ additionalProperties: false
16
+ }
17
+ },
18
+ i18n: {
19
+ type: "object",
20
+ properties: {
21
+ enabled: { type: "boolean" },
22
+ fallbackLng: { type: "string" },
23
+ supportedLngs: {
24
+ type: "array",
25
+ items: { type: "string" }
26
+ },
27
+ defaultNS: { type: "string" },
28
+ react: {
29
+ type: "object",
30
+ properties: {
31
+ useSuspense: { type: "boolean" }
32
+ },
33
+ },
34
+ backend: {
35
+ type: "object",
36
+ properties: {
37
+ loadPath: { type: "string" },
38
+ loadServerPath: { type: "string" }
39
+ },
40
+ },
41
+ packages: {
42
+ type: "array",
43
+ items: { type: "string" }
44
+ }
45
+ },
46
+ },
47
+ modules: {
48
+ type: "array",
49
+ items: {
50
+ oneOf: [
51
+ { type: "string" },
52
+ {
53
+ type: "array",
54
+ items: [
55
+ { type: "string" },
56
+ {
57
+ type: "object",
58
+ properties: {
59
+ version: { type: "string" }
60
+ },
61
+ required: ["version"],
62
+ additionalProperties: false
63
+ }
64
+ ],
65
+ "minItems": 2,
66
+ "maxItems": 2,
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ paths: {
72
+ type: "object",
73
+ properties: {
74
+ lifecycleMiddleware: { type: "string" }
75
+ },
76
+ },
77
+ buildConfig: {
78
+ type: "object",
79
+ properties: {
80
+ __CLIENT__: { type: "boolean" },
81
+ __SERVER__: { type: "boolean" },
82
+ __DEV__: { type: "boolean" },
83
+ __TEST__: { type: "boolean" },
84
+ __CDN_URL__: { type: "string" },
85
+ __GRAPHQL_URL__: { type: "string" },
86
+ __DEBUGGING__: { type: "boolean" },
87
+ __SSR__: { type: "boolean" },
88
+ __API_URL__: { type: "string" },
89
+ __FRONTEND_BUILD_DIR__: { type: "string" },
90
+ __WEB_DEV_SERVER_PORT__: { type: "integer" },
91
+ __GRAPHQL_ENDPOINT__: { type: "string" },
92
+ __LOCAL_SERVER_HOST__: { type: "string" },
93
+ __BACKEND_URL__: { type: "string" }
94
+ },
95
+ },
96
+ viteConfig: {
97
+ type: "object",
98
+ properties: {
99
+ ssr: {
100
+ type: "object",
101
+ properties: {
102
+ noExternal: {
103
+ type: "array",
104
+ items: { type: "string" }
105
+ }
106
+ },
107
+ }
108
+ },
109
+ }
110
+ },
111
+ };export{schema as default};//# sourceMappingURL=config-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-schema.js","sources":["../src/config-schema.js"],"sourcesContent":["const schema = {\n type: \"object\",\n properties: {\n commonPaths: { type: \"object\" },\n copyOperations: {\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n packageName: { type: \"string\" },\n destPath: { type: \"string\" },\n generateModule: { type: \"boolean\" }\n },\n required: [\"packageName\", \"destPath\", \"generateModule\"],\n additionalProperties: false\n }\n },\n i18n: {\n type: \"object\",\n properties: {\n enabled: { type: \"boolean\" },\n fallbackLng: { type: \"string\" },\n supportedLngs: {\n type: \"array\",\n items: { type: \"string\" }\n },\n defaultNS: { type: \"string\" },\n react: {\n type: \"object\",\n properties: {\n useSuspense: { type: \"boolean\" }\n },\n },\n backend: {\n type: \"object\",\n properties: {\n loadPath: { type: \"string\" },\n loadServerPath: { type: \"string\" }\n },\n },\n packages: {\n type: \"array\",\n items: { type: \"string\" }\n }\n },\n },\n modules: {\n type: \"array\",\n items: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: [\n { type: \"string\" },\n {\n type: \"object\",\n properties: {\n version: { type: \"string\" }\n },\n required: [\"version\"],\n additionalProperties: false\n }\n ],\n \"minItems\": 2,\n \"maxItems\": 2,\n }\n ]\n }\n },\n paths: {\n type: \"object\",\n properties: {\n lifecycleMiddleware: { type: \"string\" }\n },\n },\n buildConfig: {\n type: \"object\",\n properties: {\n __CLIENT__: { type: \"boolean\" },\n __SERVER__: { type: \"boolean\" },\n __DEV__: { type: \"boolean\" },\n __TEST__: { type: \"boolean\" },\n __CDN_URL__: { type: \"string\" },\n __GRAPHQL_URL__: { type: \"string\" },\n __DEBUGGING__: { type: \"boolean\" },\n __SSR__: { type: \"boolean\" },\n __API_URL__: { type: \"string\" },\n __FRONTEND_BUILD_DIR__: { type: \"string\" },\n __WEB_DEV_SERVER_PORT__: { type: \"integer\" },\n __GRAPHQL_ENDPOINT__: { type: \"string\" },\n __LOCAL_SERVER_HOST__: { type: \"string\" },\n __BACKEND_URL__: { type: \"string\" }\n },\n },\n viteConfig: {\n type: \"object\",\n properties: {\n ssr: {\n type: \"object\",\n properties: {\n noExternal: {\n type: \"array\",\n items: { type: \"string\" }\n }\n },\n }\n },\n }\n },\n};\n\nexport default schema;\n"],"names":[],"mappings":"AAAK,MAAC,MAAM,GAAG;AACf,EAAE,IAAI,EAAE,QAAQ;AAChB,EAAE,UAAU,EAAE;AACd,IAAI,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACnC,IAAI,cAAc,EAAE;AACpB,MAAM,IAAI,EAAE,OAAO;AACnB,MAAM,KAAK,EAAE;AACb,QAAQ,IAAI,EAAE,QAAQ;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Q,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;AACpC,QAAQ,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACvC,QAAQ,sBAAsB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AAClD,QAAQ,uBAAuB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;AACpD,QAAQ,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AAChD,QAAQ,qBAAqB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACjD,QAAQ,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC3C,OAAO;AACP,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,IAAI,EAAE,QAAQ;AACpB,MAAM,UAAU,EAAE;AAClB,QAAQ,GAAG,EAAE;AACb,UAAU,IAAI,EAAE,QAAQ;AACxB,UAAU,UAAU,EAAE;AACtB,YAAY,UAAU,EAAE;AACxB,cAAc,IAAI,EAAE,OAAO;AAC3B,cAAc,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;AACvC,aAAa;AACb,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH"}
@@ -1,4 +1,5 @@
1
1
  'use strict';const MODULES_JS = 'modules.js';
2
2
  const MODULES_TS = 'module.ts';
3
3
  const SYNC_META_JSON = 'sync-meta.json';
4
- const QUERY_PARAMS_GENERATOR = 'queryParamsGenerator';exports.MODULES_JS=MODULES_JS;exports.MODULES_TS=MODULES_TS;exports.QUERY_PARAMS_GENERATOR=QUERY_PARAMS_GENERATOR;exports.SYNC_META_JSON=SYNC_META_JSON;//# sourceMappingURL=constants.cjs.map
4
+ const QUERY_PARAMS_GENERATOR = 'queryParamsGenerator';
5
+ const SEARCH_QUERY_PARAMS_GENERATOR = `${QUERY_PARAMS_GENERATOR}_`;exports.MODULES_JS=MODULES_JS;exports.MODULES_TS=MODULES_TS;exports.QUERY_PARAMS_GENERATOR=QUERY_PARAMS_GENERATOR;exports.SEARCH_QUERY_PARAMS_GENERATOR=SEARCH_QUERY_PARAMS_GENERATOR;exports.SYNC_META_JSON=SYNC_META_JSON;//# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sources":["../../src/constants/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"aAIO,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,UAAU,GAAG,YAAY;AAC/B,MAAM,cAAc,GAAG,iBAAiB;AACxC,MAAM,sBAAsB,GAAG"}
1
+ {"version":3,"file":"constants.cjs","sources":["../../src/constants/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"aAIO,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,UAAU,GAAG,YAAY;AAC/B,MAAM,cAAc,GAAG,iBAAiB;AACxC,MAAM,sBAAsB,GAAG,uBAAuB;AAChD,MAAA,6BAA6B,GAAG,CAAG,EAAA,sBAAsB"}
@@ -5,3 +5,4 @@ export declare const MODULES_JS = "modules.js";
5
5
  export declare const MODULES_TS = "module.ts";
6
6
  export declare const SYNC_META_JSON = "sync-meta.json";
7
7
  export declare const QUERY_PARAMS_GENERATOR = "queryParamsGenerator";
8
+ export declare const SEARCH_QUERY_PARAMS_GENERATOR = "queryParamsGenerator_";
@@ -1,4 +1,5 @@
1
1
  const MODULES_JS = 'modules.js';
2
2
  const MODULES_TS = 'module.ts';
3
3
  const SYNC_META_JSON = 'sync-meta.json';
4
- const QUERY_PARAMS_GENERATOR = 'queryParamsGenerator';export{MODULES_JS,MODULES_TS,QUERY_PARAMS_GENERATOR,SYNC_META_JSON};//# sourceMappingURL=constants.js.map
4
+ const QUERY_PARAMS_GENERATOR = 'queryParamsGenerator';
5
+ const SEARCH_QUERY_PARAMS_GENERATOR = `${QUERY_PARAMS_GENERATOR}_`;export{MODULES_JS,MODULES_TS,QUERY_PARAMS_GENERATOR,SEARCH_QUERY_PARAMS_GENERATOR,SYNC_META_JSON};//# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../src/constants/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"AAIO,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,UAAU,GAAG,YAAY;AAC/B,MAAM,cAAc,GAAG,iBAAiB;AACxC,MAAM,sBAAsB,GAAG"}
1
+ {"version":3,"file":"constants.js","sources":["../../src/constants/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"AAIO,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,UAAU,GAAG,YAAY;AAC/B,MAAM,cAAc,GAAG,iBAAiB;AACxC,MAAM,sBAAsB,GAAG,uBAAuB;AAChD,MAAA,6BAA6B,GAAG,CAAG,EAAA,sBAAsB"}
@@ -9,23 +9,61 @@ var copyOperations = [
9
9
  generateModule: true
10
10
  }
11
11
  ];
12
+ var i18n = {
13
+ enabled: true,
14
+ fallbackLng: "en",
15
+ supportedLngs: [
16
+ "en",
17
+ "es"
18
+ ],
19
+ defaultNS: "common",
20
+ react: {
21
+ useSuspense: false
22
+ },
23
+ backend: {
24
+ loadPath: "/cdm-locales/{{lng}}/{{ns}}.json",
25
+ loadServerPath: "./public/cdm-locales/{{lng}}/{{ns}}.json"
26
+ },
27
+ packages: [
28
+ ]
29
+ };
12
30
  var modules = [
13
31
  "@adminide-stack/platform-browser"
14
32
  ];
15
33
  var uiFramework = "antui";
16
34
  var paths = {
17
- permissionWrapper: "@adminide-stack/platform-browser/lib/components/Permission/WithPermission.js",
18
- configurationWrapper: "@adminide-stack/platform-browser/lib/components/Configuration/WithConfiguration.js",
35
+ configPermissionWrapper: "@adminide-stack/platform-browser/lib/components/Permission/WithConfigPermission.js",
19
36
  authMiddlware: "@adminide-stack/user-auth0-client/lib/auth/authValidatorMiddleware.js",
37
+ configurationMiddleware: "@adminide-stack/platform-client/lib/middleware/configurationMiddleware.js",
38
+ permissionMiddleware: "@adminide-stack/platform-client/lib/middleware/permissionMiddleware.js",
20
39
  lifecycleMiddleware: "@adminide-stack/platform-client/lib/middleware/lifecycleMiddleware.js",
40
+ lifecycleStatusMiddleware: "@adminide-stack/platform-client/lib/middleware/lifecycleStatusMiddleware.js",
21
41
  middlewareExec: "@common-stack/frontend-stack-react/lib/tools/loaderWithMiddleware.js",
22
42
  clientMiddlewareExec: "@common-stack/frontend-stack-react/lib/tools/clientLoaderWithMiddleware.js",
23
43
  withErrorHandlerUtil: "@common-stack/rollup-vite-utils/lib/utils/withErrorHandleUtil.js"
24
44
  };
45
+ var buildConfig = {
46
+ __CLIENT__: false,
47
+ __SERVER__: true,
48
+ __DEV__: "$.env.DEV|false",
49
+ __TEST__: "$.env.TEST|false",
50
+ __CDN_URL__: "$.env.CDN_URL|''",
51
+ __GRAPHQL_URL__: "$.env.GRAPHQL_URL|'http://localhost:8080/graphql'",
52
+ __DEBUGGING__: "$.env.DEBUGGING|false",
53
+ __SSR__: "$.env.SSR|true",
54
+ __API_URL__: "$.env.GRAPHQL_URL|'http://localhost:8080/graphql'",
55
+ __FRONTEND_BUILD_DIR__: "$.env.FRONTEND_BUILD_DIR|'./dist/client'",
56
+ __WEB_DEV_SERVER_PORT__: "$.env.CLIENT_URL.url.port|'3000'",
57
+ __GRAPHQL_ENDPOINT__: "$.env.GRAPHQL_URL.url.pathname|'/graphql'",
58
+ __LOCAL_SERVER_HOST__: "$.env.CLIENT_URL.url.hostname|'localhost'",
59
+ __BACKEND_URL__: "$.env.BACKEND_URL|'http://localhost:8080'"
60
+ };
25
61
  var defaultConfig = {
26
62
  commonPaths: commonPaths,
27
63
  copyOperations: copyOperations,
64
+ i18n: i18n,
28
65
  modules: modules,
29
66
  uiFramework: uiFramework,
30
- paths: paths
31
- };exports.commonPaths=commonPaths;exports.copyOperations=copyOperations;exports.default=defaultConfig;exports.modules=modules;exports.paths=paths;exports.uiFramework=uiFramework;//# sourceMappingURL=default-config.json.cjs.map
67
+ paths: paths,
68
+ buildConfig: buildConfig
69
+ };exports.buildConfig=buildConfig;exports.commonPaths=commonPaths;exports.copyOperations=copyOperations;exports.default=defaultConfig;exports.i18n=i18n;exports.modules=modules;exports.paths=paths;exports.uiFramework=uiFramework;//# sourceMappingURL=default-config.json.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-config.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"default-config.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,23 +9,61 @@ var copyOperations = [
9
9
  generateModule: true
10
10
  }
11
11
  ];
12
+ var i18n = {
13
+ enabled: true,
14
+ fallbackLng: "en",
15
+ supportedLngs: [
16
+ "en",
17
+ "es"
18
+ ],
19
+ defaultNS: "common",
20
+ react: {
21
+ useSuspense: false
22
+ },
23
+ backend: {
24
+ loadPath: "/cdm-locales/{{lng}}/{{ns}}.json",
25
+ loadServerPath: "./public/cdm-locales/{{lng}}/{{ns}}.json"
26
+ },
27
+ packages: [
28
+ ]
29
+ };
12
30
  var modules = [
13
31
  "@adminide-stack/platform-browser"
14
32
  ];
15
33
  var uiFramework = "antui";
16
34
  var paths = {
17
- permissionWrapper: "@adminide-stack/platform-browser/lib/components/Permission/WithPermission.js",
18
- configurationWrapper: "@adminide-stack/platform-browser/lib/components/Configuration/WithConfiguration.js",
35
+ configPermissionWrapper: "@adminide-stack/platform-browser/lib/components/Permission/WithConfigPermission.js",
19
36
  authMiddlware: "@adminide-stack/user-auth0-client/lib/auth/authValidatorMiddleware.js",
37
+ configurationMiddleware: "@adminide-stack/platform-client/lib/middleware/configurationMiddleware.js",
38
+ permissionMiddleware: "@adminide-stack/platform-client/lib/middleware/permissionMiddleware.js",
20
39
  lifecycleMiddleware: "@adminide-stack/platform-client/lib/middleware/lifecycleMiddleware.js",
40
+ lifecycleStatusMiddleware: "@adminide-stack/platform-client/lib/middleware/lifecycleStatusMiddleware.js",
21
41
  middlewareExec: "@common-stack/frontend-stack-react/lib/tools/loaderWithMiddleware.js",
22
42
  clientMiddlewareExec: "@common-stack/frontend-stack-react/lib/tools/clientLoaderWithMiddleware.js",
23
43
  withErrorHandlerUtil: "@common-stack/rollup-vite-utils/lib/utils/withErrorHandleUtil.js"
24
44
  };
45
+ var buildConfig = {
46
+ __CLIENT__: false,
47
+ __SERVER__: true,
48
+ __DEV__: "$.env.DEV|false",
49
+ __TEST__: "$.env.TEST|false",
50
+ __CDN_URL__: "$.env.CDN_URL|''",
51
+ __GRAPHQL_URL__: "$.env.GRAPHQL_URL|'http://localhost:8080/graphql'",
52
+ __DEBUGGING__: "$.env.DEBUGGING|false",
53
+ __SSR__: "$.env.SSR|true",
54
+ __API_URL__: "$.env.GRAPHQL_URL|'http://localhost:8080/graphql'",
55
+ __FRONTEND_BUILD_DIR__: "$.env.FRONTEND_BUILD_DIR|'./dist/client'",
56
+ __WEB_DEV_SERVER_PORT__: "$.env.CLIENT_URL.url.port|'3000'",
57
+ __GRAPHQL_ENDPOINT__: "$.env.GRAPHQL_URL.url.pathname|'/graphql'",
58
+ __LOCAL_SERVER_HOST__: "$.env.CLIENT_URL.url.hostname|'localhost'",
59
+ __BACKEND_URL__: "$.env.BACKEND_URL|'http://localhost:8080'"
60
+ };
25
61
  var defaultConfig = {
26
62
  commonPaths: commonPaths,
27
63
  copyOperations: copyOperations,
64
+ i18n: i18n,
28
65
  modules: modules,
29
66
  uiFramework: uiFramework,
30
- paths: paths
31
- };export{commonPaths,copyOperations,defaultConfig as default,modules,paths,uiFramework};//# sourceMappingURL=default-config.json.js.map
67
+ paths: paths,
68
+ buildConfig: buildConfig
69
+ };export{buildConfig,commonPaths,copyOperations,defaultConfig as default,i18n,modules,paths,uiFramework};//# sourceMappingURL=default-config.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-config.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"default-config.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var wrapperComponent=require('./vite-wrappers/wrapperComponent.cjs'),jsonWrappers=require('./vite-wrappers/json-wrappers.cjs'),rollupPluginGenerateJson=require('./rollup/rollupPluginGenerateJson.cjs'),rollupPluginModifyLibFiles=require('./rollup/rollupPluginModifyLibFiles.cjs'),rollupPluginAddJsExtension=require('./rollup/rollupPluginAddJsExtension.cjs'),pluginIgnore=require('./rollup/pluginIgnore.cjs'),copyIfVersionChanged=require('./preStartup/copyIfVersionChanged.cjs');require('./preStartup/configLoader/index.cjs');var i18nInternationalizationPlugin=require('./vite-plugins/i18n-internationalization-plugin.cjs'),vitePluginVirutalImports=require('./vite-plugins/vite-plugin-virutal-imports.cjs'),utils=require('./utils/utils.cjs'),withErrorHandleUtil=require('./utils/withErrorHandleUtil.cjs'),setupConfig=require('./utils/setupConfig.cjs'),configLoader=require('./preStartup/configLoader/configLoader.cjs'),envLoader=require('./preStartup/configLoader/envLoader.cjs');exports.getRootPath=wrapperComponent.getRootPath;exports.wrapRouteComponent=wrapperComponent.wrapRouteComponent;exports.defineRoutesConfig=jsonWrappers.defineRoutesConfig;exports.loadRoutesConfig=jsonWrappers.loadRoutesConfig;exports.resolvePathsUsingPackages=jsonWrappers.resolvePathsUsingPackages;exports.d=rollupPluginGenerateJson;exports.k=rollupPluginModifyLibFiles;exports.l=rollupPluginAddJsExtension;exports.m=pluginIgnore;exports.copyIfVersionChanged=copyIfVersionChanged.copyIfVersionChanged;exports.i18nInternationalizationPlugin=i18nInternationalizationPlugin.i18nInternationalizationPlugin;exports.virtualImportsPlugin=vitePluginVirutalImports.virtualImportsPlugin;exports.findPackageDir=utils.findPackageDir;exports.generateBackendModulesFile=utils.generateBackendModulesFile;exports.generateModulesFile=utils.generateModulesFile;exports.getMetadata=utils.getMetadata;exports.getPackageVersion=utils.getPackageVersion;exports.updateMetadata=utils.updateMetadata;exports.writeBackendModuleFile=utils.writeBackendModuleFile;exports.writeModuleFile=utils.writeModuleFile;exports.withErrorHandler=withErrorHandleUtil.withErrorHandler;exports.deepMerge=setupConfig.deepMerge;exports.setupConfig=setupConfig.setupConfig;exports.performCopyOperations=configLoader.performCopyOperations;exports.resolveConfigPaths=configLoader.resolveConfigPaths;exports.loadEnvConfig=envLoader.loadEnvConfig;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var wrapperComponent=require('./vite-wrappers/wrapperComponent.cjs'),jsonWrappers=require('./vite-wrappers/json-wrappers.cjs'),customRoutes=require('./vite-wrappers/custom-routes.cjs'),resourceParams=require('./vite-wrappers/generators/utils/resourceParams.cjs'),pickConfig=require('./vite-wrappers/generators/utils/pickConfig.cjs'),rollupPluginGenerateJson=require('./rollup/rollupPluginGenerateJson.cjs'),rollupPluginModifyLibFiles=require('./rollup/rollupPluginModifyLibFiles.cjs'),rollupPluginAddJsExtension=require('./rollup/rollupPluginAddJsExtension.cjs'),pluginIgnore=require('./rollup/pluginIgnore.cjs'),rollupPluginUpdateFromConfig=require('./rollup/rollupPluginUpdateFromConfig.cjs'),copyIfVersionChanged=require('./preStartup/copyIfVersionChanged.cjs');require('./preStartup/configLoader/index.cjs');var i18nInternationalizationPlugin=require('./vite-plugins/i18n-internationalization-plugin.cjs'),vitePluginVirutalImports=require('./vite-plugins/vite-plugin-virutal-imports.cjs'),utils=require('./utils/utils.cjs'),withErrorHandleUtil=require('./utils/withErrorHandleUtil.cjs'),setupConfig=require('./utils/setupConfig.cjs'),verifyConfig=require('./utils/verifyConfig.cjs'),configLoader=require('./preStartup/configLoader/configLoader.cjs'),envLoader=require('./preStartup/configLoader/envLoader.cjs');exports.getRootPath=wrapperComponent.getRootPath;exports.wrapRouteComponent=wrapperComponent.wrapRouteComponent;exports.defineRoutesConfig=jsonWrappers.defineRoutesConfig;exports.getHash=jsonWrappers.getHash;exports.loadRoutesConfig=jsonWrappers.loadRoutesConfig;exports.resolvePathsUsingPackages=jsonWrappers.resolvePathsUsingPackages;exports.createDummyFile=customRoutes.createDummyFile;exports.generateRoute=customRoutes.generateRoute;exports.resolveResourceParamsPlaceholders=resourceParams.resolveResourceParamsPlaceholders;exports.pickValues=pickConfig.pickValues;exports.d=rollupPluginGenerateJson;exports.k=rollupPluginModifyLibFiles;exports.l=rollupPluginAddJsExtension;exports.m=pluginIgnore;exports.updateFromConfig=rollupPluginUpdateFromConfig.updateFromConfig;exports.copyIfVersionChanged=copyIfVersionChanged.copyIfVersionChanged;exports.i18nInternationalizationPlugin=i18nInternationalizationPlugin.i18nInternationalizationPlugin;exports.virtualImportsPlugin=vitePluginVirutalImports.virtualImportsPlugin;exports.findPackageDir=utils.findPackageDir;exports.generateBackendModulesFile=utils.generateBackendModulesFile;exports.generateModulesFile=utils.generateModulesFile;exports.getMetadata=utils.getMetadata;exports.getPackageVersion=utils.getPackageVersion;exports.resolveModulesPath=utils.resolveModulesPath;exports.updateMetadata=utils.updateMetadata;exports.writeBackendModuleFile=utils.writeBackendModuleFile;exports.writeModuleFile=utils.writeModuleFile;exports.withErrorHandler=withErrorHandleUtil.withErrorHandler;exports.setupConfig=setupConfig.setupConfig;exports.verifyConfigSchema=verifyConfig.verifyConfigSchema;exports.performCopyOperations=configLoader.performCopyOperations;exports.resolveConfigPaths=configLoader.resolveConfigPaths;exports.loadEnvConfig=envLoader.loadEnvConfig;//# sourceMappingURL=index.cjs.map
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './interfaces/types';
2
1
  export * from './vite-wrappers';
3
2
  export * from './rollup';
4
3
  export * from './preStartup';
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export{getRootPath,wrapRouteComponent}from'./vite-wrappers/wrapperComponent.js';export{defineRoutesConfig,loadRoutesConfig,resolvePathsUsingPackages}from'./vite-wrappers/json-wrappers.js';import*as rollupPluginGenerateJson from'./rollup/rollupPluginGenerateJson.js';export{rollupPluginGenerateJson as d };import*as rollupPluginModifyLibFiles from'./rollup/rollupPluginModifyLibFiles.js';export{rollupPluginModifyLibFiles as k };import*as rollupPluginAddJsExtension from'./rollup/rollupPluginAddJsExtension.js';export{rollupPluginAddJsExtension as l };import*as pluginIgnore from'./rollup/pluginIgnore.js';export{pluginIgnore as m };export{copyIfVersionChanged}from'./preStartup/copyIfVersionChanged.js';import'./preStartup/configLoader/index.js';export{i18nInternationalizationPlugin}from'./vite-plugins/i18n-internationalization-plugin.js';export{virtualImportsPlugin}from'./vite-plugins/vite-plugin-virutal-imports.js';export{findPackageDir,generateBackendModulesFile,generateModulesFile,getMetadata,getPackageVersion,updateMetadata,writeBackendModuleFile,writeModuleFile}from'./utils/utils.js';export{withErrorHandler}from'./utils/withErrorHandleUtil.js';export{deepMerge,setupConfig}from'./utils/setupConfig.js';export{performCopyOperations,resolveConfigPaths}from'./preStartup/configLoader/configLoader.js';export{loadEnvConfig}from'./preStartup/configLoader/envLoader.js';//# sourceMappingURL=index.js.map
1
+ export{getRootPath,wrapRouteComponent}from'./vite-wrappers/wrapperComponent.js';export{defineRoutesConfig,getHash,loadRoutesConfig,resolvePathsUsingPackages}from'./vite-wrappers/json-wrappers.js';export{createDummyFile,generateRoute}from'./vite-wrappers/custom-routes.js';export{resolveResourceParamsPlaceholders}from'./vite-wrappers/generators/utils/resourceParams.js';export{pickValues}from'./vite-wrappers/generators/utils/pickConfig.js';import*as rollupPluginGenerateJson from'./rollup/rollupPluginGenerateJson.js';export{rollupPluginGenerateJson as d };import*as rollupPluginModifyLibFiles from'./rollup/rollupPluginModifyLibFiles.js';export{rollupPluginModifyLibFiles as k };import*as rollupPluginAddJsExtension from'./rollup/rollupPluginAddJsExtension.js';export{rollupPluginAddJsExtension as l };import*as pluginIgnore from'./rollup/pluginIgnore.js';export{pluginIgnore as m };export{updateFromConfig}from'./rollup/rollupPluginUpdateFromConfig.js';export{copyIfVersionChanged}from'./preStartup/copyIfVersionChanged.js';import'./preStartup/configLoader/index.js';export{i18nInternationalizationPlugin}from'./vite-plugins/i18n-internationalization-plugin.js';export{virtualImportsPlugin}from'./vite-plugins/vite-plugin-virutal-imports.js';export{findPackageDir,generateBackendModulesFile,generateModulesFile,getMetadata,getPackageVersion,resolveModulesPath,updateMetadata,writeBackendModuleFile,writeModuleFile}from'./utils/utils.js';export{withErrorHandler}from'./utils/withErrorHandleUtil.js';export{setupConfig}from'./utils/setupConfig.js';export{verifyConfigSchema}from'./utils/verifyConfig.js';export{performCopyOperations,resolveConfigPaths}from'./preStartup/configLoader/configLoader.js';export{loadEnvConfig}from'./preStartup/configLoader/envLoader.js';//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ export type QueryInfo = Record<string, string>;
@@ -1,16 +1,48 @@
1
1
  'use strict';var copyIfVersionChanged=require('../copyIfVersionChanged.cjs');function resolvePath(config, path) {
2
2
  if (typeof path === 'string' && path.startsWith('$.')) {
3
- return path.split('.').slice(1).reduce((o, p) => (o ? o[p] : undefined), config);
3
+ const parts = path.split('.').slice(1); // Remove the leading '$.'
4
+ if (parts[0] === 'env') {
5
+ const [envVar, defaultValue] = parts[1].split('|'); // Support default value with |
6
+ const envValue = process.env[envVar];
7
+ if (!envValue && !defaultValue) {
8
+ throw new Error(`Environment variable ${envVar} is not provided`);
9
+ }
10
+ const resolvedValue = envValue || defaultValue; // Use envValue or defaultValue if provided
11
+ if (parts[2] === 'url') {
12
+ try {
13
+ const url = new URL(resolvedValue);
14
+ if (parts[3] === 'pathname') {
15
+ return url.pathname;
16
+ }
17
+ if (parts[3] === 'port') {
18
+ return url.port || '80'; // Default to port 80 if not specified
19
+ }
20
+ return resolvedValue; // If no specific part, return the full URL
21
+ }
22
+ catch (error) {
23
+ throw new Error(`Invalid URL provided in environment variable ${envVar}`);
24
+ }
25
+ }
26
+ return resolvedValue; // Return the environment variable or the default value
27
+ }
28
+ // Handle regular config path resolution
29
+ const result = parts.reduce((o, p) => {
30
+ if (o === undefined || o[p] === undefined) {
31
+ throw new Error(`Config value for path $.${parts.join('.')} is not provided`);
32
+ }
33
+ return o[p];
34
+ }, config);
35
+ return result;
4
36
  }
5
- return path;
37
+ return path; // Return the path if it's a normal string
6
38
  }
7
39
  function resolveConfigPaths(config) {
8
40
  return {
9
41
  ...config,
10
- copyOperations: config.copyOperations.map(op => ({
42
+ copyOperations: config.copyOperations.map((op) => ({
11
43
  ...op,
12
- destPath: resolvePath(config, op.destPath)
13
- }))
44
+ destPath: resolvePath(config, op.destPath),
45
+ })),
14
46
  };
15
47
  }
16
48
  async function performCopyOperations(config) {
@@ -24,4 +56,4 @@ async function performCopyOperations(config) {
24
56
  console.error(`Error in copy process for ${operation.packageName}:`, err);
25
57
  }
26
58
  }
27
- }exports.performCopyOperations=performCopyOperations;exports.resolveConfigPaths=resolveConfigPaths;//# sourceMappingURL=configLoader.cjs.map
59
+ }exports.performCopyOperations=performCopyOperations;exports.resolveConfigPaths=resolveConfigPaths;exports.resolvePath=resolvePath;//# sourceMappingURL=configLoader.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"configLoader.cjs","sources":["../../../src/preStartup/configLoader/configLoader.ts"],"sourcesContent":[null],"names":["copyIfVersionChanged"],"mappings":"6EAEA,SAAS,WAAW,CAAC,MAAM,EAAE,IAAI,EAAA;AAC7B,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACnD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;KACpF;AACD,IAAA,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAM,EAAA;IAC9B,OAAO;AACH,QAAA,GAAG,MAAM;QACT,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK;AAC7C,YAAA,GAAG,EAAE;YACL,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC;AAC7C,SAAA,CAAC,CAAC;KACN,CAAC;AACN,CAAC;AAID,eAAe,qBAAqB,CAAC,MAAM,EAAA;AACvC,IAAA,MAAM,cAAc,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAClD,IAAA,KAAK,MAAM,SAAS,IAAI,cAAc,CAAC,cAAc,EAAE;AACnD,QAAA,IAAI;AACA,YAAA,MAAMA,yCAAoB,CACtB,SAAS,CAAC,WAAW,EACrB,cAAc,CAAC,WAAW,CAAC,OAAO,EAClC,SAAS,CAAC,QAAQ,EAClB,SAAS,CAAC,cAAc,EACxB,SAAS,CAAC,YAAY,EACtB,cAAc,CAAC,OAAO,EACtB,cAAc,CAAC,cAAc,CAChC,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,CAAA,mBAAA,EAAsB,SAAS,CAAC,WAAW,CAA0B,wBAAA,CAAA,CAAC,CAAC;SACtF;QAAC,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAA6B,0BAAA,EAAA,SAAS,CAAC,WAAW,CAAG,CAAA,CAAA,EAAE,GAAG,CAAC,CAAC;SAC7E;KACJ;AACL"}
1
+ {"version":3,"file":"configLoader.cjs","sources":["../../../src/preStartup/configLoader/configLoader.ts"],"sourcesContent":[null],"names":["copyIfVersionChanged"],"mappings":"6EAEgB,SAAA,WAAW,CAAC,MAAM,EAAE,IAAI,EAAA;AACpC,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACnD,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA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any): any;
2
- declare function performCopyOperations(config: any): Promise<void>;
3
- export { resolveConfigPaths, performCopyOperations };
1
+ export declare function resolvePath(config: any, path: any): any;
2
+ export declare function resolveConfigPaths(config: any): any;
3
+ export declare function performCopyOperations(config: any): Promise<void>;
@@ -1,16 +1,48 @@
1
1
  import {copyIfVersionChanged}from'../copyIfVersionChanged.js';function resolvePath(config, path) {
2
2
  if (typeof path === 'string' && path.startsWith('$.')) {
3
- return path.split('.').slice(1).reduce((o, p) => (o ? o[p] : undefined), config);
3
+ const parts = path.split('.').slice(1); // Remove the leading '$.'
4
+ if (parts[0] === 'env') {
5
+ const [envVar, defaultValue] = parts[1].split('|'); // Support default value with |
6
+ const envValue = process.env[envVar];
7
+ if (!envValue && !defaultValue) {
8
+ throw new Error(`Environment variable ${envVar} is not provided`);
9
+ }
10
+ const resolvedValue = envValue || defaultValue; // Use envValue or defaultValue if provided
11
+ if (parts[2] === 'url') {
12
+ try {
13
+ const url = new URL(resolvedValue);
14
+ if (parts[3] === 'pathname') {
15
+ return url.pathname;
16
+ }
17
+ if (parts[3] === 'port') {
18
+ return url.port || '80'; // Default to port 80 if not specified
19
+ }
20
+ return resolvedValue; // If no specific part, return the full URL
21
+ }
22
+ catch (error) {
23
+ throw new Error(`Invalid URL provided in environment variable ${envVar}`);
24
+ }
25
+ }
26
+ return resolvedValue; // Return the environment variable or the default value
27
+ }
28
+ // Handle regular config path resolution
29
+ const result = parts.reduce((o, p) => {
30
+ if (o === undefined || o[p] === undefined) {
31
+ throw new Error(`Config value for path $.${parts.join('.')} is not provided`);
32
+ }
33
+ return o[p];
34
+ }, config);
35
+ return result;
4
36
  }
5
- return path;
37
+ return path; // Return the path if it's a normal string
6
38
  }
7
39
  function resolveConfigPaths(config) {
8
40
  return {
9
41
  ...config,
10
- copyOperations: config.copyOperations.map(op => ({
42
+ copyOperations: config.copyOperations.map((op) => ({
11
43
  ...op,
12
- destPath: resolvePath(config, op.destPath)
13
- }))
44
+ destPath: resolvePath(config, op.destPath),
45
+ })),
14
46
  };
15
47
  }
16
48
  async function performCopyOperations(config) {
@@ -24,4 +56,4 @@ async function performCopyOperations(config) {
24
56
  console.error(`Error in copy process for ${operation.packageName}:`, err);
25
57
  }
26
58
  }
27
- }export{performCopyOperations,resolveConfigPaths};//# sourceMappingURL=configLoader.js.map
59
+ }export{performCopyOperations,resolveConfigPaths,resolvePath};//# sourceMappingURL=configLoader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"configLoader.js","sources":["../../../src/preStartup/configLoader/configLoader.ts"],"sourcesContent":[null],"names":[],"mappings":"8DAEA,SAAS,WAAW,CAAC,MAAM,EAAE,IAAI,EAAA;AAC7B,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACnD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;KACpF;AACD,IAAA,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAM,EAAA;IAC9B,OAAO;AACH,QAAA,GAAG,MAAM;QACT,cAAc,EAAE,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK;AAC7C,YAAA,GAAG,EAAE;YACL,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC;AAC7C,SAAA,CAAC,CAAC;KACN,CAAC;AACN,CAAC;AAID,eAAe,qBAAqB,CAAC,MAAM,EAAA;AACvC,IAAA,MAAM,cAAc,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAClD,IAAA,KAAK,MAAM,SAAS,IAAI,cAAc,CAAC,cAAc,EAAE;AACnD,QAAA,IAAI;AACA,YAAA,MAAM,oB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C;AAC7C,SAAA,CAAC,CAAC;KACN,CAAC;AACN,CAAC;AAEM,eAAe,qBAAqB,CAAC,MAAM,EAAA;AAC9C,IAAA,MAAM,cAAc,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAClD,IAAA,KAAK,MAAM,SAAS,IAAI,cAAc,CAAC,cAAc,EAAE;AACnD,QAAA,IAAI;AACA,YAAA,MAAM,oBAAoB,CACtB,SAAS,CAAC,WAAW,EACrB,cAAc,CAAC,WAAW,CAAC,OAAO,EAClC,SAAS,CAAC,QAAQ,EAClB,SAAS,CAAC,cAAc,EACxB,SAAS,CAAC,YAAY,EACtB,cAAc,CAAC,OAAO,EACtB,cAAc,CAAC,cAAc,CAChC,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,CAAA,mBAAA,EAAsB,SAAS,CAAC,WAAW,CAA0B,wBAAA,CAAA,CAAC,CAAC;SACtF;QAAC,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAA6B,0BAAA,EAAA,SAAS,CAAC,WAAW,CAAG,CAAA,CAAA,EAAE,GAAG,CAAC,CAAC;SAC7E;KACJ;AACL"}
@@ -1 +1 @@
1
- 'use strict';var node=require('@remix-run/node');require('fs-extra'),require('path'),require('semver'),require('dotenv-esm');node.installGlobals();//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var node=require('@remix-run/node');require('fs-extra'),require('path'),require('semver'),require('fs'),require('ajv'),require('dotenv-esm');node.installGlobals();//# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/preStartup/configLoader/index.ts"],"sourcesContent":[null],"names":["installGlobals"],"mappings":"6HAKAA,mBAAc,EAAE"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/preStartup/configLoader/index.ts"],"sourcesContent":[null],"names":["installGlobals"],"mappings":"0JAKAA,mBAAc,EAAE"}
@@ -1 +1 @@
1
- import {installGlobals}from'@remix-run/node';import'fs-extra';import'path';import'semver';import'dotenv-esm';installGlobals();//# sourceMappingURL=index.js.map
1
+ import {installGlobals}from'@remix-run/node';import'fs-extra';import'path';import'semver';import'fs';import'ajv';import'dotenv-esm';installGlobals();//# sourceMappingURL=index.js.map