@powerlines/plugin-date 0.12.140 → 0.12.142

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 (204) hide show
  1. package/dist/index-CA4VvAY_.d.mts +1 -0
  2. package/dist/index-CmCelmEL.d.cts +1 -0
  3. package/dist/index.cjs +13844 -17
  4. package/dist/index.d.cts +40 -7
  5. package/dist/index.d.mts +40 -9
  6. package/dist/index.mjs +13800 -6
  7. package/dist/plugin-BUfZ6cT1.d.cts +4432 -0
  8. package/dist/plugin-CuNMs4r-.d.mts +4434 -0
  9. package/dist/plugin-DHXHjv16.cjs +0 -0
  10. package/dist/plugin-ufqFO5xS.mjs +1 -0
  11. package/dist/runtime-B7WoCmC4.mjs +1 -0
  12. package/dist/runtime-B8LVkjWB.d.cts +711 -0
  13. package/dist/runtime-CiYq8JJ6.d.mts +711 -0
  14. package/dist/runtime-D4zTdSwv.cjs +0 -0
  15. package/dist/types/index.cjs +3 -0
  16. package/dist/types/index.d.cts +3 -2
  17. package/dist/types/index.d.mts +3 -2
  18. package/dist/types/index.mjs +4 -0
  19. package/dist/types/plugin.cjs +1 -0
  20. package/dist/types/plugin.d.cts +1 -42
  21. package/dist/types/plugin.d.mts +1 -42
  22. package/dist/types/plugin.mjs +2 -0
  23. package/dist/types/runtime.cjs +1 -0
  24. package/dist/types/runtime.d.cts +1 -710
  25. package/dist/types/runtime.d.mts +1 -710
  26. package/dist/types/runtime.mjs +2 -0
  27. package/dist/types-BReKsBV6.mjs +1 -0
  28. package/dist/types-CBTc19th.cjs +0 -0
  29. package/package.json +3 -3
  30. package/dist/_virtual/rolldown_runtime.cjs +0 -37
  31. package/dist/_virtual/rolldown_runtime.mjs +0 -29
  32. package/dist/components/date-fns.cjs +0 -527
  33. package/dist/components/date-fns.d.cts +0 -13
  34. package/dist/components/date-fns.d.mts +0 -13
  35. package/dist/components/date-fns.mjs +0 -527
  36. package/dist/components/dayjs.cjs +0 -472
  37. package/dist/components/dayjs.d.cts +0 -13
  38. package/dist/components/dayjs.d.mts +0 -13
  39. package/dist/components/dayjs.mjs +0 -472
  40. package/dist/components/index.cjs +0 -4
  41. package/dist/components/index.d.mts +0 -4
  42. package/dist/components/index.mjs +0 -6
  43. package/dist/components/luxon.cjs +0 -476
  44. package/dist/components/luxon.d.cts +0 -13
  45. package/dist/components/luxon.d.mts +0 -13
  46. package/dist/components/luxon.mjs +0 -476
  47. package/dist/components/moment.cjs +0 -462
  48. package/dist/components/moment.d.cts +0 -13
  49. package/dist/components/moment.d.mts +0 -13
  50. package/dist/components/moment.mjs +0 -462
  51. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  52. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  53. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  54. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  55. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  56. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  57. package/dist/deepkit/src/capnp.cjs +0 -913
  58. package/dist/deepkit/src/capnp.mjs +0 -911
  59. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  60. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  61. package/dist/deepkit/src/reflect-type.cjs +0 -22
  62. package/dist/deepkit/src/reflect-type.mjs +0 -20
  63. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  64. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  65. package/dist/deepkit/src/transformer.cjs +0 -52
  66. package/dist/deepkit/src/transformer.mjs +0 -49
  67. package/dist/deepkit/src/transpile.cjs +0 -29
  68. package/dist/deepkit/src/transpile.mjs +0 -27
  69. package/dist/deepkit/src/types.d.cts +0 -10
  70. package/dist/deepkit/src/types.d.mts +0 -10
  71. package/dist/deepkit/src/utilities.cjs +0 -66
  72. package/dist/deepkit/src/utilities.mjs +0 -65
  73. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
  74. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
  75. package/dist/deepkit/src/vendor/type.cjs +0 -20
  76. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  77. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  78. package/dist/deepkit/src/vendor/type.mjs +0 -11
  79. package/dist/plugin-alloy/src/core/components/output.cjs +0 -38
  80. package/dist/plugin-alloy/src/core/components/output.mjs +0 -37
  81. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
  82. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
  83. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
  84. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
  85. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
  86. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
  87. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  88. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  89. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  90. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  91. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  92. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  93. package/dist/plugin-alloy/src/index.cjs +0 -90
  94. package/dist/plugin-alloy/src/index.mjs +0 -88
  95. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
  96. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
  97. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
  98. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
  99. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
  100. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  101. package/dist/plugin-alloy/src/types/components.d.mts +0 -4
  102. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  103. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
  104. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
  105. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -47
  106. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -46
  107. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -75
  108. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -73
  109. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -359
  110. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -350
  111. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -143
  112. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -140
  113. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -53
  114. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -52
  115. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
  116. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
  117. package/dist/plugin-automd/src/index.cjs +0 -101
  118. package/dist/plugin-automd/src/index.mjs +0 -98
  119. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  120. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  121. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  122. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  123. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  124. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  125. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  126. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  127. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  128. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  129. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  130. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  131. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  132. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  133. package/dist/plugin-babel/src/helpers/options.cjs +0 -50
  134. package/dist/plugin-babel/src/helpers/options.mjs +0 -47
  135. package/dist/plugin-babel/src/index.cjs +0 -91
  136. package/dist/plugin-babel/src/index.mjs +0 -89
  137. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  138. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  139. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  140. package/dist/plugin-env/src/babel/index.cjs +0 -1
  141. package/dist/plugin-env/src/babel/index.mjs +0 -3
  142. package/dist/plugin-env/src/babel/plugin.cjs +0 -121
  143. package/dist/plugin-env/src/babel/plugin.mjs +0 -119
  144. package/dist/plugin-env/src/components/docs.cjs +0 -9
  145. package/dist/plugin-env/src/components/docs.mjs +0 -11
  146. package/dist/plugin-env/src/components/env.cjs +0 -487
  147. package/dist/plugin-env/src/components/env.mjs +0 -484
  148. package/dist/plugin-env/src/components/index.cjs +0 -2
  149. package/dist/plugin-env/src/components/index.mjs +0 -4
  150. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  151. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  152. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  153. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  154. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  155. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  156. package/dist/plugin-env/src/helpers/load.cjs +0 -83
  157. package/dist/plugin-env/src/helpers/load.mjs +0 -80
  158. package/dist/plugin-env/src/helpers/persistence.cjs +0 -200
  159. package/dist/plugin-env/src/helpers/persistence.mjs +0 -189
  160. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  161. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  162. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  163. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  164. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  165. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  166. package/dist/plugin-env/src/index.cjs +0 -172
  167. package/dist/plugin-env/src/index.mjs +0 -170
  168. package/dist/plugin-env/src/types/plugin.d.cts +0 -151
  169. package/dist/plugin-env/src/types/plugin.d.mts +0 -153
  170. package/dist/plugin-env/src/types/runtime.d.cts +0 -792
  171. package/dist/plugin-env/src/types/runtime.d.mts +0 -792
  172. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
  173. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
  174. package/dist/powerlines/src/lib/entry.cjs +0 -12
  175. package/dist/powerlines/src/lib/entry.mjs +0 -14
  176. package/dist/powerlines/src/lib/logger.cjs +0 -41
  177. package/dist/powerlines/src/lib/logger.mjs +0 -39
  178. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
  179. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
  180. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  181. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  182. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
  183. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
  184. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  185. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  186. package/dist/powerlines/src/types/babel.d.cts +0 -22
  187. package/dist/powerlines/src/types/babel.d.mts +0 -22
  188. package/dist/powerlines/src/types/build.d.cts +0 -145
  189. package/dist/powerlines/src/types/build.d.mts +0 -147
  190. package/dist/powerlines/src/types/commands.d.cts +0 -8
  191. package/dist/powerlines/src/types/commands.d.mts +0 -9
  192. package/dist/powerlines/src/types/config.d.cts +0 -380
  193. package/dist/powerlines/src/types/config.d.mts +0 -381
  194. package/dist/powerlines/src/types/context.d.cts +0 -414
  195. package/dist/powerlines/src/types/context.d.mts +0 -416
  196. package/dist/powerlines/src/types/fs.d.cts +0 -486
  197. package/dist/powerlines/src/types/fs.d.mts +0 -486
  198. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  199. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  200. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  201. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  202. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  203. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  204. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
@@ -1,83 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_source_file_env = require('./source-file-env.cjs');
3
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
4
- let c12 = require("c12");
5
- let defu = require("defu");
6
- defu = require_rolldown_runtime.__toESM(defu);
7
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
8
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
9
- let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
10
- let __stryke_env_load_env = require("@stryke/env/load-env");
11
-
12
- //#region ../plugin-env/src/helpers/load.ts
13
- async function loadEnvFiles(options, mode, cwd) {
14
- let env = await (0, __stryke_env_load_env.loadEnv)(cwd, mode);
15
- if (options.additionalFiles && options.additionalFiles?.length > 0) {
16
- const additionalEnvFiles = await Promise.all(options.additionalFiles.map(async (additionalEnvFile) => (0, __stryke_env_load_env.loadEnvFile)(additionalEnvFile, cwd)));
17
- for (const additionalEnvFile of additionalEnvFiles) env = (0, defu.default)(additionalEnvFile, env);
18
- }
19
- return require_source_file_env.removeEnvPrefix(env);
20
- }
21
- async function loadEnvDirectory(options, directory, mode, cacheDir, packageJson, workspaceConfig) {
22
- const [envResult, c12Result] = await Promise.all([loadEnvFiles(options, mode, directory), (0, c12.loadConfig)({
23
- cwd: directory,
24
- name: "storm",
25
- envName: mode,
26
- defaults: {
27
- NAME: packageJson.name?.replace(`@${workspaceConfig.namespace}/`, ""),
28
- MODE: mode,
29
- ORG: workspaceConfig.organization
30
- },
31
- globalRc: true,
32
- packageJson: true,
33
- dotenv: true,
34
- jitiOptions: {
35
- fsCache: (0, __stryke_path_join_paths.joinPaths)(cacheDir, "jiti"),
36
- moduleCache: true
37
- }
38
- })]);
39
- return (0, defu.default)(envResult, c12Result.config, workspaceConfig);
40
- }
41
- /**
42
- * Retrieves various dotenv configuration parameters from the context.
43
- *
44
- * @param context - The context to retrieve the dotenv configuration from.
45
- * @param parsed - The parsed dotenv configuration.
46
- * @returns An object containing the dotenv configuration.
47
- */
48
- function loadEnvFromContext(context, parsed) {
49
- return (0, defu.default)({
50
- APP_NAME: (0, __stryke_string_format_kebab_case.kebabCase)(context.config.name || context.packageJson.name?.replace(`/${context.workspaceConfig.namespace}`, "")),
51
- APP_VERSION: context.packageJson.version,
52
- BUILD_ID: context.meta.buildId,
53
- BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),
54
- BUILD_CHECKSUM: context.meta.checksum,
55
- RELEASE_ID: context.meta.releaseId,
56
- RELEASE_TAG: `${(0, __stryke_string_format_kebab_case.kebabCase)(context.config.name)}@${context.packageJson.version}`,
57
- DEFAULT_LOCALE: context.workspaceConfig.locale,
58
- DEFAULT_TIMEZONE: context.workspaceConfig.timezone,
59
- LOG_LEVEL: context.config.logLevel,
60
- ERROR_URL: context.workspaceConfig.error?.url,
61
- ORGANIZATION: (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.organization) ? context.workspaceConfig.organization : context.workspaceConfig.organization?.name,
62
- PLATFORM: context.config.build.platform,
63
- MODE: context.workspaceConfig.mode,
64
- DEBUG: context.workspaceConfig.mode === "development",
65
- STACKTRACE: context.workspaceConfig.mode === "development",
66
- ENVIRONMENT: context.environment
67
- }, (0, __stryke_type_checks_is_set_object.isSetObject)(context?.env?.types?.env) ? context.env.types.env?.getProperties().reduce((ret, prop) => {
68
- ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();
69
- return ret;
70
- }, {}) : {});
71
- }
72
- async function loadEnv(context, options) {
73
- const [project, workspace, config] = await Promise.all([
74
- loadEnvDirectory(options, context.config.projectRoot, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig),
75
- loadEnvDirectory(options, context.workspaceConfig.workspaceRoot, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig),
76
- loadEnvDirectory(options, context.envPaths.config, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig)
77
- ]);
78
- return (0, defu.default)(loadEnvFromContext(context, process.env), project, workspace, config);
79
- }
80
-
81
- //#endregion
82
- exports.loadEnv = loadEnv;
83
- exports.loadEnvFromContext = loadEnvFromContext;
@@ -1,80 +0,0 @@
1
- import { removeEnvPrefix } from "./source-file-env.mjs";
2
- import { joinPaths } from "@stryke/path/join-paths";
3
- import { loadConfig } from "c12";
4
- import defu from "defu";
5
- import { isSetObject } from "@stryke/type-checks/is-set-object";
6
- import { isSetString } from "@stryke/type-checks/is-set-string";
7
- import { kebabCase } from "@stryke/string-format/kebab-case";
8
- import { loadEnv, loadEnvFile } from "@stryke/env/load-env";
9
-
10
- //#region ../plugin-env/src/helpers/load.ts
11
- async function loadEnvFiles(options, mode, cwd) {
12
- let env = await loadEnv(cwd, mode);
13
- if (options.additionalFiles && options.additionalFiles?.length > 0) {
14
- const additionalEnvFiles = await Promise.all(options.additionalFiles.map(async (additionalEnvFile) => loadEnvFile(additionalEnvFile, cwd)));
15
- for (const additionalEnvFile of additionalEnvFiles) env = defu(additionalEnvFile, env);
16
- }
17
- return removeEnvPrefix(env);
18
- }
19
- async function loadEnvDirectory(options, directory, mode, cacheDir, packageJson, workspaceConfig) {
20
- const [envResult, c12Result] = await Promise.all([loadEnvFiles(options, mode, directory), loadConfig({
21
- cwd: directory,
22
- name: "storm",
23
- envName: mode,
24
- defaults: {
25
- NAME: packageJson.name?.replace(`@${workspaceConfig.namespace}/`, ""),
26
- MODE: mode,
27
- ORG: workspaceConfig.organization
28
- },
29
- globalRc: true,
30
- packageJson: true,
31
- dotenv: true,
32
- jitiOptions: {
33
- fsCache: joinPaths(cacheDir, "jiti"),
34
- moduleCache: true
35
- }
36
- })]);
37
- return defu(envResult, c12Result.config, workspaceConfig);
38
- }
39
- /**
40
- * Retrieves various dotenv configuration parameters from the context.
41
- *
42
- * @param context - The context to retrieve the dotenv configuration from.
43
- * @param parsed - The parsed dotenv configuration.
44
- * @returns An object containing the dotenv configuration.
45
- */
46
- function loadEnvFromContext(context, parsed) {
47
- return defu({
48
- APP_NAME: kebabCase(context.config.name || context.packageJson.name?.replace(`/${context.workspaceConfig.namespace}`, "")),
49
- APP_VERSION: context.packageJson.version,
50
- BUILD_ID: context.meta.buildId,
51
- BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),
52
- BUILD_CHECKSUM: context.meta.checksum,
53
- RELEASE_ID: context.meta.releaseId,
54
- RELEASE_TAG: `${kebabCase(context.config.name)}@${context.packageJson.version}`,
55
- DEFAULT_LOCALE: context.workspaceConfig.locale,
56
- DEFAULT_TIMEZONE: context.workspaceConfig.timezone,
57
- LOG_LEVEL: context.config.logLevel,
58
- ERROR_URL: context.workspaceConfig.error?.url,
59
- ORGANIZATION: isSetString(context.workspaceConfig.organization) ? context.workspaceConfig.organization : context.workspaceConfig.organization?.name,
60
- PLATFORM: context.config.build.platform,
61
- MODE: context.workspaceConfig.mode,
62
- DEBUG: context.workspaceConfig.mode === "development",
63
- STACKTRACE: context.workspaceConfig.mode === "development",
64
- ENVIRONMENT: context.environment
65
- }, isSetObject(context?.env?.types?.env) ? context.env.types.env?.getProperties().reduce((ret, prop) => {
66
- ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();
67
- return ret;
68
- }, {}) : {});
69
- }
70
- async function loadEnv$1(context, options) {
71
- const [project, workspace, config] = await Promise.all([
72
- loadEnvDirectory(options, context.config.projectRoot, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig),
73
- loadEnvDirectory(options, context.workspaceConfig.workspaceRoot, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig),
74
- loadEnvDirectory(options, context.envPaths.config, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig)
75
- ]);
76
- return defu(loadEnvFromContext(context, process.env), project, workspace, config);
77
- }
78
-
79
- //#endregion
80
- export { loadEnv$1 as loadEnv, loadEnvFromContext };
@@ -1,200 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_type = require('../../../deepkit/src/vendor/type.cjs');
3
- const require_capnp = require('../../../deepkit/src/capnp.cjs');
4
- const require_reflection = require('../../../deepkit/schemas/reflection2.cjs');
5
- const require_resolve_reflections = require('../../../deepkit/src/resolve-reflections.cjs');
6
- const require_reflect = require('./reflect.cjs');
7
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
8
- let __stryke_capnp = require("@stryke/capnp");
9
- __stryke_capnp = require_rolldown_runtime.__toESM(__stryke_capnp);
10
- let __stryke_fs_buffer = require("@stryke/fs/buffer");
11
- let node_fs = require("node:fs");
12
- let __stryke_fs_resolve = require("@stryke/fs/resolve");
13
- let __stryke_type_checks_is_empty_object = require("@stryke/type-checks/is-empty-object");
14
-
15
- //#region ../plugin-env/src/helpers/persistence.ts
16
- /**
17
- * Resolves the runtime type definition file for the environment variables.
18
- *
19
- * @param context - The plugin context.
20
- * @returns The runtime type definition file for the environment variables.
21
- */
22
- async function resolveRuntimeTypeFile(context) {
23
- return (0, __stryke_fs_resolve.resolvePackage)("@powerlines/plugin-env/types/runtime", { paths: [context.workspaceConfig.workspaceRoot, (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot)] });
24
- }
25
- /**
26
- * Gets the default type definition for the environment variables.
27
- *
28
- * @param context - The plugin context.
29
- * @returns The default type definition for the environment variables.
30
- */
31
- async function getEnvDefaultTypeDefinition(context) {
32
- return {
33
- file: await resolveRuntimeTypeFile(context),
34
- name: "EnvInterface"
35
- };
36
- }
37
- /** Gets the default type definition for the environment secrets.
38
- *
39
- * @param context - The plugin context.
40
- * @returns The default type definition for the environment secrets.
41
- */
42
- async function getSecretsDefaultTypeDefinition(context) {
43
- return {
44
- file: await resolveRuntimeTypeFile(context),
45
- name: "SecretsInterface"
46
- };
47
- }
48
- /**
49
- * Gets the path to the environment type reflections.
50
- *
51
- * @param context - The plugin context.
52
- * @param name - The name of the type reflections.
53
- * @returns The path to the environment type reflections.
54
- */
55
- function getEnvTypeReflectionsPath(context, name = "env") {
56
- return (0, __stryke_path_join_paths.joinPaths)(require_resolve_reflections.getReflectionsPath(context), "env", `${name}-types.bin`);
57
- }
58
- /**
59
- * Reads the environment type reflection from the file system.
60
- *
61
- * @param context - The plugin context.
62
- * @param name - The name of the type reflections.
63
- * @returns The environment type reflection.
64
- */
65
- async function readEnvTypeReflection(context, name = "env") {
66
- const filePath = getEnvTypeReflectionsPath(context, name);
67
- if (!(0, node_fs.existsSync)(filePath)) {
68
- if (!context.env.types.env || (0, __stryke_type_checks_is_empty_object.isEmptyObject)(context.env.types.env)) {
69
- const reflection$1 = require_reflect.createEnvReflection(context);
70
- const message = new __stryke_capnp.Message();
71
- reflection$1.messageRoot = message.initRoot(require_reflection.SerializedTypes);
72
- reflection$1.dataBuffer = message.toArrayBuffer();
73
- context.env.types.env = reflection$1;
74
- await writeEnvTypeReflection(context, context.env.types.env, name);
75
- }
76
- return context.env.types.env;
77
- }
78
- const buffer = await (0, __stryke_fs_buffer.readFileBuffer)(filePath);
79
- const messageRoot = new __stryke_capnp.Message(buffer, false).getRoot(require_reflection.SerializedTypes);
80
- const reflection = (0, require_type.type_exports.resolveClassType)((0, require_type.type_exports.deserializeType)(require_capnp.convertFromCapnp(messageRoot.types)));
81
- context.env.types[name] = reflection;
82
- context.env.types[name].messageRoot = messageRoot;
83
- context.env.types[name].dataBuffer = buffer;
84
- return reflection;
85
- }
86
- /**
87
- * Writes the environment type reflection to the file system.
88
- *
89
- * @param context - The plugin context.
90
- * @param reflection - The environment type reflection to write.
91
- * @param name - The name of the type reflections.
92
- */
93
- async function writeEnvTypeReflection(context, reflection, name = "env") {
94
- const serialized = reflection.serializeType();
95
- const message = new __stryke_capnp.Message();
96
- require_capnp.convertToCapnp(serialized, message.initRoot(require_reflection.SerializedTypes)._initTypes(serialized.length));
97
- await (0, __stryke_fs_buffer.writeFileBuffer)(getEnvTypeReflectionsPath(context, name), message.toArrayBuffer());
98
- }
99
- function getEnvReflectionsPath(context, name) {
100
- return (0, __stryke_path_join_paths.joinPaths)(require_resolve_reflections.getReflectionsPath(context), "env", `${name}.bin`);
101
- }
102
- /**
103
- * Reads the environment reflection data from the file system.
104
- *
105
- * @param context - The plugin context.
106
- * @returns The environment reflection data.
107
- */
108
- async function readEnvReflection(context) {
109
- const filePath = getEnvReflectionsPath(context, "env");
110
- if (!(0, node_fs.existsSync)(filePath)) {
111
- if (!context.env.types.env) context.env.types.env = await readEnvTypeReflection(context, "env");
112
- if (!context.env.used.env || (0, __stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.env)) {
113
- const reflection$1 = require_reflect.createEnvReflection(context, {
114
- type: {
115
- kind: require_type.type_exports.ReflectionKind.objectLiteral,
116
- typeName: "Env",
117
- description: `An object containing the environment configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
118
- types: []
119
- },
120
- superReflection: context.env.types.env
121
- });
122
- reflection$1.name = "Env";
123
- const message = new __stryke_capnp.Message();
124
- reflection$1.messageRoot = message.initRoot(require_reflection.SerializedTypes);
125
- reflection$1.dataBuffer = message.toArrayBuffer();
126
- context.env.used.env = reflection$1;
127
- await writeEnvReflection(context, context.env.used.env, "env");
128
- }
129
- return context.env.used.env;
130
- }
131
- const buffer = await (0, __stryke_fs_buffer.readFileBuffer)(filePath);
132
- const messageRoot = new __stryke_capnp.Message(buffer, false).getRoot(require_reflection.SerializedTypes);
133
- const reflection = (0, require_type.type_exports.resolveClassType)((0, require_type.type_exports.deserializeType)(require_capnp.convertFromCapnp(messageRoot.types)));
134
- context.env.used.env = reflection;
135
- context.env.used.env.messageRoot = messageRoot;
136
- context.env.used.env.dataBuffer = buffer;
137
- return reflection;
138
- }
139
- /**
140
- * Reads the secret environment reflection data from the file system.
141
- *
142
- * @param context - The plugin context.
143
- * @returns The environment reflection data.
144
- */
145
- async function readSecretsReflection(context) {
146
- const filePath = getEnvReflectionsPath(context, "secrets");
147
- if (!(0, node_fs.existsSync)(filePath)) {
148
- if (!context.env.types.secrets) context.env.types.secrets = await readEnvTypeReflection(context, "secrets");
149
- if (!context.env.used.secrets || (0, __stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.secrets)) {
150
- const reflection$1 = require_reflect.createEnvReflection(context, {
151
- type: {
152
- kind: require_type.type_exports.ReflectionKind.objectLiteral,
153
- typeName: "Secrets",
154
- description: `An object containing the secret configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
155
- types: []
156
- },
157
- superReflection: context.env.types.secrets
158
- });
159
- reflection$1.name = "Secrets";
160
- const message = new __stryke_capnp.Message();
161
- reflection$1.messageRoot = message.initRoot(require_reflection.SerializedTypes);
162
- reflection$1.dataBuffer = message.toArrayBuffer();
163
- context.env.used.secrets = reflection$1;
164
- await writeEnvReflection(context, context.env.used.secrets, "secrets");
165
- }
166
- return context.env.used.secrets;
167
- }
168
- const buffer = await (0, __stryke_fs_buffer.readFileBuffer)(filePath);
169
- const messageRoot = new __stryke_capnp.Message(buffer, false).getRoot(require_reflection.SerializedTypes);
170
- const reflection = (0, require_type.type_exports.resolveClassType)((0, require_type.type_exports.deserializeType)(require_capnp.convertFromCapnp(messageRoot.types)));
171
- context.env.used.secrets = reflection;
172
- context.env.used.secrets.messageRoot = messageRoot;
173
- context.env.used.secrets.dataBuffer = buffer;
174
- return reflection;
175
- }
176
- /**
177
- * Writes the environment reflection data to the file system.
178
- *
179
- * @param context - The plugin context.
180
- * @param reflection - The reflection data to write.
181
- * @param name - The name of the reflection (either "env" or "secrets").
182
- */
183
- async function writeEnvReflection(context, reflection, name = "env") {
184
- const serialized = reflection.serializeType();
185
- const message = new __stryke_capnp.Message();
186
- require_capnp.convertToCapnp(serialized, message.initRoot(require_reflection.SerializedTypes)._initTypes(serialized.length));
187
- await (0, __stryke_fs_buffer.writeFileBuffer)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
188
- }
189
-
190
- //#endregion
191
- exports.getEnvDefaultTypeDefinition = getEnvDefaultTypeDefinition;
192
- exports.getEnvReflectionsPath = getEnvReflectionsPath;
193
- exports.getEnvTypeReflectionsPath = getEnvTypeReflectionsPath;
194
- exports.getSecretsDefaultTypeDefinition = getSecretsDefaultTypeDefinition;
195
- exports.readEnvReflection = readEnvReflection;
196
- exports.readEnvTypeReflection = readEnvTypeReflection;
197
- exports.readSecretsReflection = readSecretsReflection;
198
- exports.resolveRuntimeTypeFile = resolveRuntimeTypeFile;
199
- exports.writeEnvReflection = writeEnvReflection;
200
- exports.writeEnvTypeReflection = writeEnvTypeReflection;
@@ -1,189 +0,0 @@
1
- import { type_exports } from "../../../deepkit/src/vendor/type.mjs";
2
- import { convertFromCapnp, convertToCapnp } from "../../../deepkit/src/capnp.mjs";
3
- import { SerializedTypes } from "../../../deepkit/schemas/reflection2.mjs";
4
- import { getReflectionsPath } from "../../../deepkit/src/resolve-reflections.mjs";
5
- import { createEnvReflection } from "./reflect.mjs";
6
- import { joinPaths } from "@stryke/path/join-paths";
7
- import * as capnp from "@stryke/capnp";
8
- import { readFileBuffer, writeFileBuffer } from "@stryke/fs/buffer";
9
- import { existsSync } from "node:fs";
10
- import { resolvePackage } from "@stryke/fs/resolve";
11
- import { isEmptyObject } from "@stryke/type-checks/is-empty-object";
12
-
13
- //#region ../plugin-env/src/helpers/persistence.ts
14
- /**
15
- * Resolves the runtime type definition file for the environment variables.
16
- *
17
- * @param context - The plugin context.
18
- * @returns The runtime type definition file for the environment variables.
19
- */
20
- async function resolveRuntimeTypeFile(context) {
21
- return resolvePackage("@powerlines/plugin-env/types/runtime", { paths: [context.workspaceConfig.workspaceRoot, joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot)] });
22
- }
23
- /**
24
- * Gets the default type definition for the environment variables.
25
- *
26
- * @param context - The plugin context.
27
- * @returns The default type definition for the environment variables.
28
- */
29
- async function getEnvDefaultTypeDefinition(context) {
30
- return {
31
- file: await resolveRuntimeTypeFile(context),
32
- name: "EnvInterface"
33
- };
34
- }
35
- /** Gets the default type definition for the environment secrets.
36
- *
37
- * @param context - The plugin context.
38
- * @returns The default type definition for the environment secrets.
39
- */
40
- async function getSecretsDefaultTypeDefinition(context) {
41
- return {
42
- file: await resolveRuntimeTypeFile(context),
43
- name: "SecretsInterface"
44
- };
45
- }
46
- /**
47
- * Gets the path to the environment type reflections.
48
- *
49
- * @param context - The plugin context.
50
- * @param name - The name of the type reflections.
51
- * @returns The path to the environment type reflections.
52
- */
53
- function getEnvTypeReflectionsPath(context, name = "env") {
54
- return joinPaths(getReflectionsPath(context), "env", `${name}-types.bin`);
55
- }
56
- /**
57
- * Reads the environment type reflection from the file system.
58
- *
59
- * @param context - The plugin context.
60
- * @param name - The name of the type reflections.
61
- * @returns The environment type reflection.
62
- */
63
- async function readEnvTypeReflection(context, name = "env") {
64
- const filePath = getEnvTypeReflectionsPath(context, name);
65
- if (!existsSync(filePath)) {
66
- if (!context.env.types.env || isEmptyObject(context.env.types.env)) {
67
- const reflection$1 = createEnvReflection(context);
68
- const message = new capnp.Message();
69
- reflection$1.messageRoot = message.initRoot(SerializedTypes);
70
- reflection$1.dataBuffer = message.toArrayBuffer();
71
- context.env.types.env = reflection$1;
72
- await writeEnvTypeReflection(context, context.env.types.env, name);
73
- }
74
- return context.env.types.env;
75
- }
76
- const buffer = await readFileBuffer(filePath);
77
- const messageRoot = new capnp.Message(buffer, false).getRoot(SerializedTypes);
78
- const reflection = (0, type_exports.resolveClassType)((0, type_exports.deserializeType)(convertFromCapnp(messageRoot.types)));
79
- context.env.types[name] = reflection;
80
- context.env.types[name].messageRoot = messageRoot;
81
- context.env.types[name].dataBuffer = buffer;
82
- return reflection;
83
- }
84
- /**
85
- * Writes the environment type reflection to the file system.
86
- *
87
- * @param context - The plugin context.
88
- * @param reflection - The environment type reflection to write.
89
- * @param name - The name of the type reflections.
90
- */
91
- async function writeEnvTypeReflection(context, reflection, name = "env") {
92
- const serialized = reflection.serializeType();
93
- const message = new capnp.Message();
94
- convertToCapnp(serialized, message.initRoot(SerializedTypes)._initTypes(serialized.length));
95
- await writeFileBuffer(getEnvTypeReflectionsPath(context, name), message.toArrayBuffer());
96
- }
97
- function getEnvReflectionsPath(context, name) {
98
- return joinPaths(getReflectionsPath(context), "env", `${name}.bin`);
99
- }
100
- /**
101
- * Reads the environment reflection data from the file system.
102
- *
103
- * @param context - The plugin context.
104
- * @returns The environment reflection data.
105
- */
106
- async function readEnvReflection(context) {
107
- const filePath = getEnvReflectionsPath(context, "env");
108
- if (!existsSync(filePath)) {
109
- if (!context.env.types.env) context.env.types.env = await readEnvTypeReflection(context, "env");
110
- if (!context.env.used.env || isEmptyObject(context.env.used.env)) {
111
- const reflection$1 = createEnvReflection(context, {
112
- type: {
113
- kind: type_exports.ReflectionKind.objectLiteral,
114
- typeName: "Env",
115
- description: `An object containing the environment configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
116
- types: []
117
- },
118
- superReflection: context.env.types.env
119
- });
120
- reflection$1.name = "Env";
121
- const message = new capnp.Message();
122
- reflection$1.messageRoot = message.initRoot(SerializedTypes);
123
- reflection$1.dataBuffer = message.toArrayBuffer();
124
- context.env.used.env = reflection$1;
125
- await writeEnvReflection(context, context.env.used.env, "env");
126
- }
127
- return context.env.used.env;
128
- }
129
- const buffer = await readFileBuffer(filePath);
130
- const messageRoot = new capnp.Message(buffer, false).getRoot(SerializedTypes);
131
- const reflection = (0, type_exports.resolveClassType)((0, type_exports.deserializeType)(convertFromCapnp(messageRoot.types)));
132
- context.env.used.env = reflection;
133
- context.env.used.env.messageRoot = messageRoot;
134
- context.env.used.env.dataBuffer = buffer;
135
- return reflection;
136
- }
137
- /**
138
- * Reads the secret environment reflection data from the file system.
139
- *
140
- * @param context - The plugin context.
141
- * @returns The environment reflection data.
142
- */
143
- async function readSecretsReflection(context) {
144
- const filePath = getEnvReflectionsPath(context, "secrets");
145
- if (!existsSync(filePath)) {
146
- if (!context.env.types.secrets) context.env.types.secrets = await readEnvTypeReflection(context, "secrets");
147
- if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {
148
- const reflection$1 = createEnvReflection(context, {
149
- type: {
150
- kind: type_exports.ReflectionKind.objectLiteral,
151
- typeName: "Secrets",
152
- description: `An object containing the secret configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
153
- types: []
154
- },
155
- superReflection: context.env.types.secrets
156
- });
157
- reflection$1.name = "Secrets";
158
- const message = new capnp.Message();
159
- reflection$1.messageRoot = message.initRoot(SerializedTypes);
160
- reflection$1.dataBuffer = message.toArrayBuffer();
161
- context.env.used.secrets = reflection$1;
162
- await writeEnvReflection(context, context.env.used.secrets, "secrets");
163
- }
164
- return context.env.used.secrets;
165
- }
166
- const buffer = await readFileBuffer(filePath);
167
- const messageRoot = new capnp.Message(buffer, false).getRoot(SerializedTypes);
168
- const reflection = (0, type_exports.resolveClassType)((0, type_exports.deserializeType)(convertFromCapnp(messageRoot.types)));
169
- context.env.used.secrets = reflection;
170
- context.env.used.secrets.messageRoot = messageRoot;
171
- context.env.used.secrets.dataBuffer = buffer;
172
- return reflection;
173
- }
174
- /**
175
- * Writes the environment reflection data to the file system.
176
- *
177
- * @param context - The plugin context.
178
- * @param reflection - The reflection data to write.
179
- * @param name - The name of the reflection (either "env" or "secrets").
180
- */
181
- async function writeEnvReflection(context, reflection, name = "env") {
182
- const serialized = reflection.serializeType();
183
- const message = new capnp.Message();
184
- convertToCapnp(serialized, message.initRoot(SerializedTypes)._initTypes(serialized.length));
185
- await writeFileBuffer(getEnvReflectionsPath(context, name), message.toArrayBuffer());
186
- }
187
-
188
- //#endregion
189
- export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvTypeReflection };
@@ -1,125 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_type = require('../../../deepkit/src/vendor/type.cjs');
3
- const require_reflect_type = require('../../../deepkit/src/reflect-type.cjs');
4
- const require_persistence = require('./persistence.cjs');
5
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
6
- let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
7
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
8
-
9
- //#region ../plugin-env/src/helpers/reflect.ts
10
- function mergeEnvReflections(context, reflections) {
11
- return createEnvReflection(context, { type: (0, require_type.type_exports.merge)(reflections.map((reflection) => reflection.type)) });
12
- }
13
- function mergeSecretsReflections(context, reflections) {
14
- return createSecretsReflection(context, { type: (0, require_type.type_exports.merge)(reflections.map((reflection) => reflection.type)) });
15
- }
16
- var BaseEnv = class {
17
- APP_NAME;
18
- APP_VERSION;
19
- BUILD_ID;
20
- BUILD_TIMESTAMP;
21
- BUILD_CHECKSUM;
22
- RELEASE_ID;
23
- RELEASE_TAG;
24
- ORGANIZATION;
25
- PLATFORM = "neutral";
26
- MODE = "production";
27
- ENVIRONMENT;
28
- DEBUG = false;
29
- TEST = false;
30
- MINIMAL = false;
31
- NO_COLOR = false;
32
- FORCE_COLOR = false;
33
- FORCE_HYPERLINK = false;
34
- STACKTRACE = false;
35
- INCLUDE_ERROR_DATA = false;
36
- ERROR_URL;
37
- DEFAULT_TIMEZONE;
38
- DEFAULT_LOCALE;
39
- CI = false;
40
- };
41
- var BaseSecrets = class {
42
- ENCRYPTION_KEY;
43
- };
44
- function createEnvReflection(context, options = {}) {
45
- const parent = options.superReflection ?? new require_type.type_exports.ReflectionClass({
46
- kind: require_type.type_exports.ReflectionKind.class,
47
- description: `The base environment configuration definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
48
- classType: BaseEnv,
49
- types: [],
50
- implements: [{
51
- kind: require_type.type_exports.ReflectionKind.objectLiteral,
52
- typeName: "EnvInterface",
53
- description: `The environment configuration interface definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
54
- types: []
55
- }]
56
- });
57
- parent.name = "Env";
58
- const result = new require_type.type_exports.ReflectionClass(options.type ?? {
59
- kind: require_type.type_exports.ReflectionKind.objectLiteral,
60
- typeName: "Env",
61
- description: `A schema describing the list of available environment variables that can be used by the ${context.config.name ? `${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
62
- types: []
63
- }, parent);
64
- result.name = "Env";
65
- return result;
66
- }
67
- function createSecretsReflection(context, options = {}) {
68
- const parent = options.superReflection ?? new require_type.type_exports.ReflectionClass({
69
- kind: require_type.type_exports.ReflectionKind.class,
70
- description: `The base secrets configuration definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
71
- classType: BaseSecrets,
72
- types: [],
73
- implements: [{
74
- kind: require_type.type_exports.ReflectionKind.objectLiteral,
75
- typeName: "SecretsInterface",
76
- description: `The secrets configuration interface definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
77
- types: []
78
- }]
79
- });
80
- parent.name = "Secrets";
81
- const result = new require_type.type_exports.ReflectionClass(options.type ?? {
82
- kind: require_type.type_exports.ReflectionKind.objectLiteral,
83
- typeName: "Secrets",
84
- description: `A schema describing the list of available environment secrets that can be used by the ${context.config.name ? `${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
85
- types: []
86
- }, parent);
87
- result.name = "Secrets";
88
- return result;
89
- }
90
- async function reflectEnv(context, file, name) {
91
- let config;
92
- if (file) config = (0, require_type.type_exports.resolveClassType)(await require_reflect_type.reflectType(context, {
93
- file: !(0, __stryke_path_is_parent_path.isParentPath)(file, context.workspaceConfig.workspaceRoot) ? (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, file) : file,
94
- name
95
- }, { skipNodeModulesBundle: true }));
96
- const defaultConfigType = await require_reflect_type.reflectType(context, await require_persistence.getEnvDefaultTypeDefinition(context));
97
- return mergeEnvReflections(context, [
98
- await require_persistence.readEnvTypeReflection(context, "env"),
99
- config,
100
- (0, require_type.type_exports.resolveClassType)(defaultConfigType)
101
- ].filter(Boolean));
102
- }
103
- async function reflectSecrets(context, file, name) {
104
- let config;
105
- if (file) config = (0, require_type.type_exports.resolveClassType)(await require_reflect_type.reflectType(context, {
106
- file: !(0, __stryke_path_is_parent_path.isParentPath)(file, context.workspaceConfig.workspaceRoot) ? (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, file) : file,
107
- name
108
- }, { skipNodeModulesBundle: true }));
109
- const defaultSecretsType = await require_reflect_type.reflectType(context, await require_persistence.getSecretsDefaultTypeDefinition(context));
110
- return mergeSecretsReflections(context, [
111
- await require_persistence.readSecretsReflection(context),
112
- config,
113
- (0, require_type.type_exports.resolveClassType)(defaultSecretsType)
114
- ].filter(Boolean));
115
- }
116
-
117
- //#endregion
118
- exports.BaseEnv = BaseEnv;
119
- exports.BaseSecrets = BaseSecrets;
120
- exports.createEnvReflection = createEnvReflection;
121
- exports.createSecretsReflection = createSecretsReflection;
122
- exports.mergeEnvReflections = mergeEnvReflections;
123
- exports.mergeSecretsReflections = mergeSecretsReflections;
124
- exports.reflectEnv = reflectEnv;
125
- exports.reflectSecrets = reflectSecrets;