@powerlines/plugin-env 0.16.115 → 0.16.117

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 (47) hide show
  1. package/dist/babel/plugin.cjs +2 -5
  2. package/dist/babel/plugin.mjs +2 -5
  3. package/dist/babel/plugin.mjs.map +1 -1
  4. package/dist/components/docs.cjs +1 -1
  5. package/dist/components/docs.mjs +1 -1
  6. package/dist/components/docs.mjs.map +1 -1
  7. package/dist/components/env-builtin.cjs +4 -3
  8. package/dist/components/env-builtin.d.cts.map +1 -1
  9. package/dist/components/env-builtin.d.mts.map +1 -1
  10. package/dist/components/env-builtin.mjs +4 -3
  11. package/dist/components/env-builtin.mjs.map +1 -1
  12. package/dist/helpers/automd-generator.cjs +1 -3
  13. package/dist/helpers/automd-generator.d.mts +1 -1
  14. package/dist/helpers/automd-generator.mjs +1 -3
  15. package/dist/helpers/automd-generator.mjs.map +1 -1
  16. package/dist/helpers/load.cjs +1 -3
  17. package/dist/helpers/load.d.cts +20 -1
  18. package/dist/helpers/load.d.cts.map +1 -1
  19. package/dist/helpers/load.d.mts +20 -1
  20. package/dist/helpers/load.d.mts.map +1 -1
  21. package/dist/helpers/load.mjs +1 -3
  22. package/dist/helpers/load.mjs.map +1 -1
  23. package/dist/helpers/persistence.cjs +11 -26
  24. package/dist/helpers/persistence.mjs +12 -27
  25. package/dist/helpers/persistence.mjs.map +1 -1
  26. package/dist/helpers/reflect.cjs +6 -15
  27. package/dist/helpers/reflect.mjs +6 -15
  28. package/dist/helpers/reflect.mjs.map +1 -1
  29. package/dist/helpers/template-helpers.cjs +1 -3
  30. package/dist/helpers/template-helpers.mjs +1 -3
  31. package/dist/helpers/template-helpers.mjs.map +1 -1
  32. package/dist/index.cjs +3 -3
  33. package/dist/index.mjs +2 -2
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/types/plugin.cjs +4 -26
  36. package/dist/types/plugin.d.mts +4 -4
  37. package/dist/types/plugin.mjs +4 -26
  38. package/dist/types/plugin.mjs.map +1 -1
  39. package/dist/types/runtime.d.cts +144 -0
  40. package/dist/types/runtime.d.cts.map +1 -1
  41. package/dist/types/runtime.d.mts +144 -0
  42. package/dist/types/runtime.d.mts.map +1 -1
  43. package/dist/types/runtime.mjs.map +1 -1
  44. package/package.json +13 -13
  45. package/dist/node_modules/.pnpm/@stryke_helpers@0.10.8/node_modules/@stryke/helpers/dist/get-unique.cjs +0 -14
  46. package/dist/node_modules/.pnpm/@stryke_helpers@0.10.8/node_modules/@stryke/helpers/dist/get-unique.mjs +0 -14
  47. package/dist/node_modules/.pnpm/@stryke_helpers@0.10.8/node_modules/@stryke/helpers/dist/get-unique.mjs.map +0 -1
@@ -1,7 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_types_plugin = require('../types/plugin.cjs');
4
- let _powerlines_plugin_babel_types_config = require("@powerlines/plugin-babel/types/config");
5
4
  let _babel_core = require("@babel/core");
6
5
  let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
7
6
  let _powerlines_plugin_babel_helpers_create_plugin = require("@powerlines/plugin-babel/helpers/create-plugin");
@@ -93,12 +92,11 @@ const envBabelPlugin = (_powerlines_plugin_babel_helpers_create_plugin.createBab
93
92
  }
94
93
  extractEnv.__type = [
95
94
  "node",
96
- () => _powerlines_plugin_babel_types_config.__ΩBabelPluginPass,
97
95
  "pass",
98
96
  "isInjectable",
99
97
  "isUsingBuiltin",
100
98
  "extractEnv",
101
- "P!2!n\"2#\"2$\"2%\"/&"
99
+ "P!2!!2\"\"2#\"2$\"/%"
102
100
  ];
103
101
  return { visitor: { MemberExpression: __assignType(function MemberExpression(path, pass) {
104
102
  if (path.get("object")?.get("property")?.isIdentifier({ name: "env" }) && path.get("object")?.get("object")?.isIdentifier({ name: "process" }) && path.get("property")?.isIdentifier()) {
@@ -129,10 +127,9 @@ const envBabelPlugin = (_powerlines_plugin_babel_helpers_create_plugin.createBab
129
127
  }, [
130
128
  () => _babel_core.NodePath,
131
129
  "path",
132
- () => _powerlines_plugin_babel_types_config.__ΩBabelPluginPass,
133
130
  "pass",
134
131
  "MemberExpression",
135
- "PP!7!2\"n#2$\"/%"
132
+ "PP!7!2\"!2#\"/$"
136
133
  ]) } };
137
134
  }, [
138
135
  "param0",
@@ -1,5 +1,4 @@
1
1
  import { __ΩEnvPluginContext } from "../types/plugin.mjs";
2
- import { __ΩBabelPluginPass } from "@powerlines/plugin-babel/types/config";
3
2
  import { NodePath } from "@babel/core";
4
3
  import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
5
4
  import { createBabelPlugin } from "@powerlines/plugin-babel/helpers/create-plugin";
@@ -91,12 +90,11 @@ const envBabelPlugin = (createBabelPlugin.Ω = [[() => __ΩEnvPluginContext, "n!
91
90
  }
92
91
  extractEnv.__type = [
93
92
  "node",
94
- () => __ΩBabelPluginPass,
95
93
  "pass",
96
94
  "isInjectable",
97
95
  "isUsingBuiltin",
98
96
  "extractEnv",
99
- "P!2!n\"2#\"2$\"2%\"/&"
97
+ "P!2!!2\"\"2#\"2$\"/%"
100
98
  ];
101
99
  return { visitor: { MemberExpression: __assignType(function MemberExpression(path, pass) {
102
100
  if (path.get("object")?.get("property")?.isIdentifier({ name: "env" }) && path.get("object")?.get("object")?.isIdentifier({ name: "process" }) && path.get("property")?.isIdentifier()) {
@@ -127,10 +125,9 @@ const envBabelPlugin = (createBabelPlugin.Ω = [[() => __ΩEnvPluginContext, "n!
127
125
  }, [
128
126
  () => NodePath,
129
127
  "path",
130
- () => __ΩBabelPluginPass,
131
128
  "pass",
132
129
  "MemberExpression",
133
- "PP!7!2\"n#2$\"/%"
130
+ "PP!7!2\"!2#\"/$"
134
131
  ]) } };
135
132
  }, [
136
133
  "param0",
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/babel/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { NodePath } from \"@babel/core\";\nimport * as t from \"@babel/types\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport { createBabelPlugin } from \"@powerlines/plugin-babel/helpers/create-plugin\";\nimport { addImport } from \"@powerlines/plugin-babel/helpers/module-helpers\";\nimport { BabelPluginPass } from \"@powerlines/plugin-babel/types/config\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/*\n * The Powerlines - Environment Configuration Babel Plugin\n *\n * @param babel - The Babel core module\n * @returns The Babel plugin object\n */\nexport const envBabelPlugin = createBabelPlugin<EnvPluginContext>(\n \"env\",\n ({ log, context }) => {\n function extractEnv(\n node: t.Identifier,\n pass: BabelPluginPass,\n isInjectable = false,\n isUsingBuiltin = false\n ) {\n const envTypesAliasProperties = context.env.types.env\n ?.getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n if (node.name) {\n const prefix = context.config.env.prefix.find(\n pre =>\n node.name &&\n node.name.startsWith(pre) &&\n (context.env.types.env?.hasProperty(\n node.name.replace(`${pre}_`, \"\")\n ) ||\n envTypesAliasProperties.some(prop =>\n prop.getAlias().includes(node.name.replace(`${pre}_`, \"\"))\n ))\n );\n\n let name = node.name;\n if (prefix) {\n name = node.name.replace(`${prefix}_`, \"\");\n }\n\n log(\n LogLevelLabel.TRACE,\n `Environment variable ${name} found in ${\n pass.filename || \"unknown file\"\n }.`\n );\n\n if (\n context.env.types.env?.hasProperty(name) ||\n envTypesAliasProperties.some(prop => prop.getAlias().includes(name))\n ) {\n const envProperty = context.env.types.env.hasProperty(name)\n ? context.env.types.env.getProperty(name)\n : envTypesAliasProperties.find(prop =>\n prop.getAlias().includes(name)\n );\n if (!envProperty || envProperty.isIgnored()) {\n return;\n }\n\n if (!context.env.used.env.hasProperty(name)) {\n log(\n LogLevelLabel.DEBUG,\n `Adding \"${name}\" environment variables found in \"${\n pass.filename || \"unknown file\"\n }\" to used environment configuration reflection object.`\n );\n\n context.env.used.env.addProperty(envProperty.property);\n }\n\n if (context.config.env.inject && isInjectable) {\n let value = context.env.parsed?.[name];\n if (value === undefined) {\n const prefix = context.config.env.prefix.find(pre => {\n return context.env.parsed[`${pre.replace(/_$/g, \"\")}_${name}`];\n });\n if (prefix) {\n value =\n context.env.parsed[`${prefix.replace(/_$/g, \"\")}_${name}`];\n }\n }\n\n value ??= envProperty.getDefaultValue();\n\n if (envProperty.isValueRequired() && value === undefined) {\n throw new Error(\n `Environment variable \\`${name}\\` is not defined in the .env configuration files`\n );\n }\n\n return stringifyDefaultValue(envProperty, value);\n }\n } else if (context.config.env.validate) {\n throw new Error(\n `The \"${name}\" environment variable is not defined in the \\`env\\` type definition, but is used in the source code file ${\n pass.filename ? pass.filename : \"unknown\"\n }.\n\n The following environment configuration names are defined in the \\`env\\` type definition: \\n${context.env.types.env\n ?.getPropertyNames()\n .sort((a, b) => String(a).localeCompare(String(b)))\n .map(\n typeDef =>\n ` - ${String(typeDef)} ${\n envTypesAliasProperties.some(\n prop =>\n prop.getNameAsString() === String(typeDef) &&\n prop.getAlias().length > 0\n )\n ? `(Alias: ${envTypesAliasProperties\n ?.find(\n prop => prop.getNameAsString() === String(typeDef)\n )\n ?.getAlias()\n .join(\", \")})`\n : \"\"\n }`\n )\n .join(\n \"\\n\"\n )} \\n\\nUsing the following env prefix: \\n${context.config.env.prefix\n .map(prefix => ` - ${prefix}`)\n .join(\n \"\\n\"\n )} \\n\\nPlease check your \\`env\\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \\n\\n`\n );\n } else if (pass.filename && isUsingBuiltin) {\n context.warn(\n `The \"${\n name\n }\" environment variable is used in the source code file ${\n pass.filename\n }, but is not defined in the \\`env\\` type definition. If this is intentional, you can ignore this warning. Otherwise, please check your \\`env\\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code.`\n );\n }\n }\n\n return undefined;\n }\n\n return {\n visitor: {\n MemberExpression(\n path: NodePath<t.MemberExpression>,\n pass: BabelPluginPass\n ) {\n if (\n path\n .get(\"object\")\n ?.get(\"property\")\n ?.isIdentifier({ name: \"env\" }) &&\n path\n .get(\"object\")\n ?.get(\"object\")\n ?.isIdentifier({ name: \"process\" }) &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // process.env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false, false);\n\n path.replaceWithSourceString(`env.${identifier.name}`);\n addImport(path, {\n module: `${context.config.framework || \"powerlines\"}:env`,\n name: \"env\",\n imported: \"env\"\n });\n } else if (\n path\n .get(\"object\")\n ?.get(\"property\")\n ?.isIdentifier({ name: \"env\" }) &&\n path.get(\"object\")?.get(\"object\")?.isMetaProperty() &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // import.meta.env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false, false);\n\n path.replaceWithSourceString(`env.${identifier.name}`);\n addImport(path, {\n module: `${context.config.framework || \"powerlines\"}:env`,\n name: \"env\",\n imported: \"env\"\n });\n } else if (\n path.get(\"object\")?.isIdentifier({ name: \"env\" }) &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false, true);\n }\n }\n }\n };\n }\n);\n"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A,KACL;AAEK,cAAA,YAAA,MAAA,OAAA,KAAA;;IAER;QAAA;EAAA;QAAA;EAAA;EAAA;EAAA;EAAA,CAAA,EACH,EACH"}
1
+ {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/babel/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { NodePath } from \"@babel/core\";\nimport * as t from \"@babel/types\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport { createBabelPlugin } from \"@powerlines/plugin-babel/helpers/create-plugin\";\nimport { addImport } from \"@powerlines/plugin-babel/helpers/module-helpers\";\nimport { BabelPluginPass } from \"@powerlines/plugin-babel/types/config\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/*\n * The Powerlines - Environment Configuration Babel Plugin\n *\n * @param babel - The Babel core module\n * @returns The Babel plugin object\n */\nexport const envBabelPlugin = createBabelPlugin<EnvPluginContext>(\n \"env\",\n ({ log, context }) => {\n function extractEnv(\n node: t.Identifier,\n pass: BabelPluginPass,\n isInjectable = false,\n isUsingBuiltin = false\n ) {\n const envTypesAliasProperties = context.env.types.env\n ?.getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n if (node.name) {\n const prefix = context.config.env.prefix.find(\n pre =>\n node.name &&\n node.name.startsWith(pre) &&\n (context.env.types.env?.hasProperty(\n node.name.replace(`${pre}_`, \"\")\n ) ||\n envTypesAliasProperties.some(prop =>\n prop.getAlias().includes(node.name.replace(`${pre}_`, \"\"))\n ))\n );\n\n let name = node.name;\n if (prefix) {\n name = node.name.replace(`${prefix}_`, \"\");\n }\n\n log(\n LogLevelLabel.TRACE,\n `Environment variable ${name} found in ${\n pass.filename || \"unknown file\"\n }.`\n );\n\n if (\n context.env.types.env?.hasProperty(name) ||\n envTypesAliasProperties.some(prop => prop.getAlias().includes(name))\n ) {\n const envProperty = context.env.types.env.hasProperty(name)\n ? context.env.types.env.getProperty(name)\n : envTypesAliasProperties.find(prop =>\n prop.getAlias().includes(name)\n );\n if (!envProperty || envProperty.isIgnored()) {\n return;\n }\n\n if (!context.env.used.env.hasProperty(name)) {\n log(\n LogLevelLabel.DEBUG,\n `Adding \"${name}\" environment variables found in \"${\n pass.filename || \"unknown file\"\n }\" to used environment configuration reflection object.`\n );\n\n context.env.used.env.addProperty(envProperty.property);\n }\n\n if (context.config.env.inject && isInjectable) {\n let value = context.env.parsed?.[name];\n if (value === undefined) {\n const prefix = context.config.env.prefix.find(pre => {\n return context.env.parsed[`${pre.replace(/_$/g, \"\")}_${name}`];\n });\n if (prefix) {\n value =\n context.env.parsed[`${prefix.replace(/_$/g, \"\")}_${name}`];\n }\n }\n\n value ??= envProperty.getDefaultValue();\n\n if (envProperty.isValueRequired() && value === undefined) {\n throw new Error(\n `Environment variable \\`${name}\\` is not defined in the .env configuration files`\n );\n }\n\n return stringifyDefaultValue(envProperty, value);\n }\n } else if (context.config.env.validate) {\n throw new Error(\n `The \"${name}\" environment variable is not defined in the \\`env\\` type definition, but is used in the source code file ${\n pass.filename ? pass.filename : \"unknown\"\n }.\n\n The following environment configuration names are defined in the \\`env\\` type definition: \\n${context.env.types.env\n ?.getPropertyNames()\n .sort((a, b) => String(a).localeCompare(String(b)))\n .map(\n typeDef =>\n ` - ${String(typeDef)} ${\n envTypesAliasProperties.some(\n prop =>\n prop.getNameAsString() === String(typeDef) &&\n prop.getAlias().length > 0\n )\n ? `(Alias: ${envTypesAliasProperties\n ?.find(\n prop => prop.getNameAsString() === String(typeDef)\n )\n ?.getAlias()\n .join(\", \")})`\n : \"\"\n }`\n )\n .join(\n \"\\n\"\n )} \\n\\nUsing the following env prefix: \\n${context.config.env.prefix\n .map(prefix => ` - ${prefix}`)\n .join(\n \"\\n\"\n )} \\n\\nPlease check your \\`env\\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \\n\\n`\n );\n } else if (pass.filename && isUsingBuiltin) {\n context.warn(\n `The \"${\n name\n }\" environment variable is used in the source code file ${\n pass.filename\n }, but is not defined in the \\`env\\` type definition. If this is intentional, you can ignore this warning. Otherwise, please check your \\`env\\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code.`\n );\n }\n }\n\n return undefined;\n }\n\n return {\n visitor: {\n MemberExpression(\n path: NodePath<t.MemberExpression>,\n pass: BabelPluginPass\n ) {\n if (\n path\n .get(\"object\")\n ?.get(\"property\")\n ?.isIdentifier({ name: \"env\" }) &&\n path\n .get(\"object\")\n ?.get(\"object\")\n ?.isIdentifier({ name: \"process\" }) &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // process.env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false, false);\n\n path.replaceWithSourceString(`env.${identifier.name}`);\n addImport(path, {\n module: `${context.config.framework || \"powerlines\"}:env`,\n name: \"env\",\n imported: \"env\"\n });\n } else if (\n path\n .get(\"object\")\n ?.get(\"property\")\n ?.isIdentifier({ name: \"env\" }) &&\n path.get(\"object\")?.get(\"object\")?.isMetaProperty() &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // import.meta.env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false, false);\n\n path.replaceWithSourceString(`env.${identifier.name}`);\n addImport(path, {\n module: `${context.config.framework || \"powerlines\"}:env`,\n name: \"env\",\n imported: \"env\"\n });\n } else if (\n path.get(\"object\")?.isIdentifier({ name: \"env\" }) &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false, true);\n }\n }\n }\n };\n }\n);\n"],"mappings":";;;;;;;;AAEA,SAAS,aAAY,IAAK,MAAC;;AAE1B,QAAU;;AA8BX,MAAO,kBAAA,kBAAA,IAAA,CAAA,OAAA,qBAAA,KAAA,CAAA,EAAA,kBAAA,OAAA,cAAA,EAAA,KAAA,cAAA;CACH,SAAM,WAAc,MAAA,MAAA,eAAA,OAAA,iBAAA,OAAA;EACpB,MAAS,0BAAU,QAAA,IAAA,MAAA,KACT,eAAU,CACZ,OAAA,cAAe,SAAA,KAAA,UAAA,CAAA,SAAA,GAAA;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;AACrB,MAAA,KAAA,MAAe;GACf,MAAA,SAAiB,QAAA,OAAA,IAAA,OAAA,KAAA,cAAA,QAAA,KAAA,QACjB,KAAA,KAAA,WAAA,IAAA,KACM,QAAA,IAAA,MAAuB,KAAG,YAAY,KAAM,KAAA,QAAA,GAAA,IAAA,IAAA,GAAA,CAAA,IAC9C,wBAAc,KAAA,cAAA,SAAA,KAAA,UAAA,CAAA,SAAA,KAAA,KAAA,QAAA,GAAA,IAAA,IAAA,GAAA,CAAA,EAAA;IAAA;IAAA;IAAA;IAAA,CAAA,CAAA,GAAA;IAAA;IAAA;IAAA;IAAA,CAAA,CAAA;GACf,IAAO,OAAO,KAAK;cAEb,QAAM,KAAA,KAAA,QAAA,GAAA,OAAA,IAAA,GAAA;AAEX,OAAK,cAAA,OAAA,wBAAA,KAAA,YAAA,KAAA,YAAA,eAAA,GAAA;AACH,OAAI,QAAO,IAAA,MAAA,KAAA,YAAA,KAAA,IACP,wBAAuB,KAAA,cAAA,SAAA,KAAA,UAAA,CAAA,SAAA,KAAA,EAAA;IAAA;IAAA;IAAA;IAAA,CAAA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AA,GAAA,QAAA,OAAA,aAAA,aAAA;IACK,MAAA;IACA,UAAA;IACC,CAAA;aAED,KAAA,IAAA,SAAA,EAAA,aAAA,EAAA,MAAA,OAAA,CAAA,IACA,KAAA,IAAA,WAAA,EAAA,cAAA,EAAA;GAEN,MAAA,aAAA,KAAA,IAAA,WAAA,EAAA;AACQ,OAAK,CAAA,WAAY,KACd;AAER,cAAA,YAAA,MAAA,OAAA,KAAA;;IAEA;QAAK;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA,EACV,EACJ;GACF;CAAC;CAAI;CAAA;CAAA,CAAA,CAAA"}
@@ -52,7 +52,7 @@ function EnvDocsFile(props) {
52
52
  _alloy_js_core.code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`,
53
53
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
54
54
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { get data() {
55
- return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
55
+ return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__" && !property.isHidden()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
56
56
  return {
57
57
  name: reflectionProperty.getNameAsString().trim(),
58
58
  description: (reflectionProperty.getDescription() ?? "").trim(),
@@ -50,7 +50,7 @@ function EnvDocsFile(props) {
50
50
  code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`,
51
51
  createComponent(Spacing, {}),
52
52
  createComponent(MarkdownTable, { get data() {
53
- return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
53
+ return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__" && !property.isHidden()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
54
54
  return {
55
55
  name: reflectionProperty.getNameAsString().trim(),
56
56
  description: (reflectionProperty.getDescription() ?? "").trim(),
@@ -1 +1 @@
1
- {"version":3,"file":"docs.mjs","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show } from \"@alloy-js/core\";\nimport { Heading, Link } from \"@alloy-js/markdown\";\nimport {\n ReflectionClass,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n MarkdownFile,\n MarkdownFileProps\n} from \"@powerlines/plugin-alloy/markdown/components/markdown-file\";\nimport { MarkdownTable } from \"@powerlines/plugin-alloy/markdown/components/markdown-table\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { getDocsOutputPath } from \"../helpers/docs-helper\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\nexport interface EnvDocsFileProps extends Partial<MarkdownFileProps> {\n /**\n * The heading level offset to apply to the generated documentation.\n *\n * @remarks\n * This is useful when nesting the documentation within other markdown files.\n *\n * @defaultValue 0\n */\n levelOffset?: number;\n\n reflection: ReflectionClass<any>;\n}\n\n/**\n * Generates the environment configuration markdown documentation for the Powerlines project.\n */\nexport function EnvDocsFile(props: EnvDocsFileProps) {\n const { levelOffset = 0, reflection, ...rest } = props;\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <MarkdownFile\n path={joinPaths(getDocsOutputPath(context), \"env.md\")}\n {...rest}>\n <Heading level={1 + levelOffset}>Environment Configuration</Heading>\n {code`Below is a list of environment variables used by the`}\n <Show when={!!context.packageJson.name}>\n <Link\n href={`https://www.npmjs.com/package/${context.packageJson.name}`}\n title={context.packageJson.name!}\n />\n </Show>\n {code`package. These values can be updated in the \\`.env\\` file in the root of the project.`}\n <Spacing />\n <Heading level={2 + levelOffset}>Environment Variables</Heading>\n <Spacing />\n {code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`}\n <Spacing />\n <MarkdownTable\n data={\n reflection\n ?.getProperties()\n .filter(\n property =>\n property.getNameAsString() !== \"__POWERLINES_INJECTED__\"\n )\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n )\n .map(reflectionProperty => {\n return {\n name: reflectionProperty.getNameAsString().trim(),\n description: (reflectionProperty.getDescription() ?? \"\").trim(),\n type: stringifyType(reflectionProperty.getType())\n .trim()\n .replaceAll(\" | \", \", or \"),\n defaultValue: reflectionProperty.hasDefault()\n ? String(reflectionProperty.getDefaultValue())?.includes('\"')\n ? reflectionProperty.getDefaultValue()\n : `\\`${reflectionProperty.getDefaultValue()}\\``\n : \"\",\n required: reflectionProperty.isValueRequired() ? \"\" : \"✔\"\n };\n }) ?? []\n }\n />\n </MarkdownFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;CA8CE,MAAA,EACF,cAAA,eAEE,GAAA,SACC;CACD,MAAA,UAAA,eAAA;AACF,QAAO,gBAAoB,cAAQ,WAAkB,EACnD,IAAM,OAAE;;cAIR,IAAM,WAAC;AACJ,SAAA;GAAA,gBAAA,SAAA;IACC,OAAM,IAAA;IACJ,UAAO;IACR,CAAA;GAAA,IAAO;GAAoD,gBAAO,MAAA;IAClE,IAAK,OAAM;AACX,YAAU,CAAC,CAAC,QAAQ,YAAY;;IAE/B,IAAE,WAAa;AACb,YAAO,gBAAQ,MAAgB;MAChC,IAAA,OAAA;AACG,cAAA,iCAAA,QAAA,YAAA;;MAEL,IAAS,QAAA;AACF,cAAO,QAAK,YAAa;;MAE5B,CAAC;;IAEL,CAAA;GAAA,IAAA;GAAA,gBAAA,SAAA,EAAA,CAAA;GAAA,gBAAA,SAAA;IACC,OAAK,IAAA;IACL,UAAE;IACH,CAAC;GAAE,gBAAkB,SAAA,EAAA,CAAA;GAAA,IAAA;GAAA,gBAAA,SAAA,EAAA,CAAA;GAAA,gBAAA,eAAA,EACpB,IAAI,OAAO;AACT,WAAI,YAAU,eAAA,CAAA,QAAA,aAAA,SAAA,iBAAA,KAAA,0BAAA,CAAA,MAAA,GAAA,MAAA,EAAA,iBAAA,CAAA,cAAA,EAAA,iBAAA,CAAA,CAAA,CAAA,KAAA,uBAAA;AACZ,YAAI;MACJ,MAAA,mBAAA,iBAAA,CAAA,MAAA;MACC,cAAa,mBAAA,gBAAA,IAAA,IAAA,MAAA;MACZ,MAAE,cAAkB,mBAAgB,SAAA,CAAA,CAAA,MAAiB,CAAA,WAAA,OAAA,QAAA;MACvD,cAAA,mBAAA,YAAA,GAAA,OAAA,mBAAA,iBAAA,CAAA,EAAA,SAAA,KAAA,GAAA,mBAAA,iBAAA,GAAA,KAAA,mBAAA,iBAAA,CAAA,MAAA;MACC,UAAI,mBAAsB,iBAAA,GAAA,KAAA;MAC1B;MACD,IAAI,EAAA;MAET,CAAC;GAAC;IAEN,CAAC,CAAC"}
1
+ {"version":3,"file":"docs.mjs","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show } from \"@alloy-js/core\";\nimport { Heading, Link } from \"@alloy-js/markdown\";\nimport {\n ReflectionClass,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport {\n MarkdownFile,\n MarkdownFileProps\n} from \"@powerlines/plugin-alloy/markdown/components/markdown-file\";\nimport { MarkdownTable } from \"@powerlines/plugin-alloy/markdown/components/markdown-table\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { getDocsOutputPath } from \"../helpers/docs-helper\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\nexport interface EnvDocsFileProps extends Partial<MarkdownFileProps> {\n /**\n * The heading level offset to apply to the generated documentation.\n *\n * @remarks\n * This is useful when nesting the documentation within other markdown files.\n *\n * @defaultValue 0\n */\n levelOffset?: number;\n\n reflection: ReflectionClass<any>;\n}\n\n/**\n * Generates the environment configuration markdown documentation for the Powerlines project.\n */\nexport function EnvDocsFile(props: EnvDocsFileProps) {\n const { levelOffset = 0, reflection, ...rest } = props;\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <MarkdownFile\n path={joinPaths(getDocsOutputPath(context), \"env.md\")}\n {...rest}>\n <Heading level={1 + levelOffset}>Environment Configuration</Heading>\n {code`Below is a list of environment variables used by the`}\n <Show when={!!context.packageJson.name}>\n <Link\n href={`https://www.npmjs.com/package/${context.packageJson.name}`}\n title={context.packageJson.name!}\n />\n </Show>\n {code`package. These values can be updated in the \\`.env\\` file in the root of the project.`}\n <Spacing />\n <Heading level={2 + levelOffset}>Environment Variables</Heading>\n <Spacing />\n {code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`}\n <Spacing />\n <MarkdownTable\n data={\n reflection\n ?.getProperties()\n .filter(\n property =>\n property.getNameAsString() !== \"__POWERLINES_INJECTED__\" &&\n !property.isHidden()\n )\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n )\n .map(reflectionProperty => {\n return {\n name: reflectionProperty.getNameAsString().trim(),\n description: (reflectionProperty.getDescription() ?? \"\").trim(),\n type: stringifyType(reflectionProperty.getType())\n .trim()\n .replaceAll(\" | \", \", or \"),\n defaultValue: reflectionProperty.hasDefault()\n ? String(reflectionProperty.getDefaultValue())?.includes('\"')\n ? reflectionProperty.getDefaultValue()\n : `\\`${reflectionProperty.getDefaultValue()}\\``\n : \"\",\n required: reflectionProperty.isValueRequired() ? \"\" : \"✔\"\n };\n }) ?? []\n }\n />\n </MarkdownFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;CA8CE,MAAA,EACF,cAAA,eAEE,GAAA,SACC;CACD,MAAA,UAAA,eAAA;AACF,QAAO,gBAAoB,cAAQ,WAAkB,EACnD,IAAM,OAAE;;cAIR,IAAM,WAAC;AACJ,SAAA;GAAA,gBAAA,SAAA;IACC,OAAM,IAAA;IACJ,UAAO;IACR,CAAA;GAAA,IAAO;GAAoD,gBAAO,MAAA;IAClE,IAAK,OAAM;AACX,YAAU,CAAC,CAAC,QAAQ,YAAY;;IAE/B,IAAE,WAAa;AACb,YAAO,gBAAQ,MAAgB;MAChC,IAAA,OAAA;AACG,cAAA,iCAAA,QAAA,YAAA;;MAEL,IAAS,QAAA;AACF,cAAO,QAAK,YAAa;;MAE5B,CAAC;;IAEL,CAAA;GAAA,IAAA;GAAA,gBAAA,SAAA,EAAA,CAAA;GAAA,gBAAA,SAAA;IACC,OAAK,IAAA;IACL,UAAE;IACH,CAAC;GAAE,gBAAkB,SAAA,EAAA,CAAA;GAAA,IAAA;GAAA,gBAAA,SAAA,EAAA,CAAA;GAAA,gBAAA,eAAA,EACpB,IAAI,OAAO;AACT,WAAI,YAAU,eAAA,CAAA,QAAA,aAAA,SAAA,iBAAA,KAAA,6BAAA,CAAA,SAAA,UAAA,CAAA,CAAA,MAAA,GAAA,MAAA,EAAA,iBAAA,CAAA,cAAA,EAAA,iBAAA,CAAA,CAAA,CAAA,KAAA,uBAAA;AACZ,YAAI;MACF,MAAG,mBAAkB,iBAAA,CAAA,MAAA;MACvB,cAAA,mBAAA,gBAAA,IAAA,IAAA,MAAA;MACC,MAAO,cAAM,mBAAA,SAAA,CAAA,CAAA,MAAA,CAAA,WAAA,OAAA,QAAA;MACZ,cAAE,mBAA+B,YAAG,GAAA,OAAiB,mBAAA,iBAAA,CAAA,EAAA,SAAA,KAAA,GAAA,mBAAA,iBAAA,GAAA,KAAA,mBAAA,iBAAA,CAAA,MAAA;MACvD,UAAA,mBAAA,iBAAA,GAAA,KAAA;MACC;MACD,IAAE,EAAA;MAEP,CAAC;GAAC;IAEN,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_helpers_load = require('../helpers/load.cjs');
4
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
5
4
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
+ let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
6
6
  let defu = require("defu");
7
7
  defu = require_runtime.__toESM(defu);
8
8
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
@@ -15,6 +15,7 @@ let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powe
15
15
  let _powerlines_plugin_alloy_typescript_components_interface_declaration = require("@powerlines/plugin-alloy/typescript/components/interface-declaration");
16
16
  let _powerlines_plugin_alloy_typescript_components_object_declaration = require("@powerlines/plugin-alloy/typescript/components/object-declaration");
17
17
  let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
18
+ let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
18
19
 
19
20
  //#region src/components/env-builtin.tsx
20
21
  /**
@@ -42,7 +43,7 @@ function EnvTypeDefinition(props) {
42
43
  "export": true,
43
44
  get children() {
44
45
  return _alloy_js_core.code` {
45
- [Key in keyof EnvBase as Key ${context.config.env.prefix.map((prefix) => `| \`${prefix.replace(/_$/g, "")}_\${Key}\``).join(" ")}]: EnvBase[Key];
46
+ [Key in keyof EnvBase as Key ${(0, _stryke_helpers_get_unique.getUnique)(context.config.env.prefix.map((prefix) => `| \`${prefix.replace(/_$/g, "")}_\${Key}\``)).join(" ")}]: EnvBase[Key];
46
47
  }
47
48
  `;
48
49
  }
@@ -52,7 +53,7 @@ function EnvTypeDefinition(props) {
52
53
  }
53
54
  function ConfigPropertyConditional(props) {
54
55
  const [{ context, name }] = (0, _alloy_js_core.splitProps)(props, ["context", "name"]);
55
- return _alloy_js_core.code`propertyName === "${name}" || propertyName.replace(/^(${context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
56
+ return _alloy_js_core.code`propertyName === "${name}" || propertyName.replace(/^(${(0, _stryke_helpers_get_unique.getUnique)(context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`)).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
56
57
  }
57
58
  function ConfigPropertyGet(props) {
58
59
  const [{ context, property, index }] = (0, _alloy_js_core.splitProps)(props, [
@@ -1 +1 @@
1
- {"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;;AAqEA;iBAAgB,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,yBAAA,YAAkC,QAAA;AAAA,UAkL/B,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;EAChB,UAAA,EAAY,eAAA;AAAA;;;;iBAUE,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA"}
1
+ {"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;;AAsEA;iBAAgB,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,yBAAA,YAAkC,QAAA;AAAA,UAqL/B,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;EAChB,UAAA,EAAY,eAAA;AAAA;;;;iBAUE,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;;AAqEA;iBAAgB,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,yBAAA,YAAkC,QAAA;AAAA,UAkL/B,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;EAChB,UAAA,EAAY,eAAA;AAAA;;;;iBAUE,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA"}
1
+ {"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;;AAsEA;iBAAgB,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,yBAAA,YAAkC,QAAA;AAAA,UAqL/B,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;EAChB,UAAA,EAAY,eAAA;AAAA;;;;iBAUE,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA"}
@@ -1,6 +1,6 @@
1
1
  import { loadEnvFromContext } from "../helpers/load.mjs";
2
- import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type";
3
2
  import { titleCase } from "@stryke/string-format/title-case";
3
+ import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type";
4
4
  import defu from "defu";
5
5
  import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
6
6
  import { For, Show, code, computed, splitProps } from "@alloy-js/core";
@@ -12,6 +12,7 @@ import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/buil
12
12
  import { InterfaceDeclaration } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
13
13
  import { ObjectDeclaration } from "@powerlines/plugin-alloy/typescript/components/object-declaration";
14
14
  import { TSDoc, TSDocExample, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
15
+ import { getUnique } from "@stryke/helpers/get-unique";
15
16
 
16
17
  //#region src/components/env-builtin.tsx
17
18
  /**
@@ -39,7 +40,7 @@ function EnvTypeDefinition(props) {
39
40
  "export": true,
40
41
  get children() {
41
42
  return code` {
42
- [Key in keyof EnvBase as Key ${context.config.env.prefix.map((prefix) => `| \`${prefix.replace(/_$/g, "")}_\${Key}\``).join(" ")}]: EnvBase[Key];
43
+ [Key in keyof EnvBase as Key ${getUnique(context.config.env.prefix.map((prefix) => `| \`${prefix.replace(/_$/g, "")}_\${Key}\``)).join(" ")}]: EnvBase[Key];
43
44
  }
44
45
  `;
45
46
  }
@@ -49,7 +50,7 @@ function EnvTypeDefinition(props) {
49
50
  }
50
51
  function ConfigPropertyConditional(props) {
51
52
  const [{ context, name }] = splitProps(props, ["context", "name"]);
52
- return code`propertyName === "${name}" || propertyName.replace(/^(${context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
53
+ return code`propertyName === "${name}" || propertyName.replace(/^(${getUnique(context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`)).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
53
54
  }
54
55
  function ConfigPropertyGet(props) {
55
56
  const [{ context, property, index }] = splitProps(props, [
@@ -1 +1 @@
1
- {"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ClassDeclaration,\n ClassMethod,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n NewExpression,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { InterfaceDeclarationProps } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { InterfaceDeclaration } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { ObjectDeclaration } from \"@powerlines/plugin-alloy/typescript/components/object-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition(\n props: Omit<InterfaceDeclarationProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`EnvBase\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration name=\"Env\" export>\n {code` {\n [Key in keyof EnvBase as Key ${context.config.env.prefix\n .map(prefix => `| \\`${prefix.replace(/_$/g, \"\")}_\\${Key}\\``)\n .join(\" \")}]: EnvBase[Key];\n}\n`}\n </TypeDeclaration>\n <Spacing />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n .join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n property: ReflectionProperty;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n reflection: ReflectionClass<any>;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\nconst envSerializerRefkey = refkey(\"EnvSerializer\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, reflection, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"reflection\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const envInstance = computed(() => {\n const result = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n description: `The initial environment configuration state for the ${titleCase(\n context?.config?.name\n )} project.`,\n types: []\n },\n reflection\n );\n\n result\n .getProperties()\n .filter(\n property => property.isRuntime() || property.getTags().runtime === true\n )\n .forEach(property => {\n result.removeProperty(property.getNameAsString());\n });\n\n return result;\n });\n\n const reflectionGetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n const reflectionSetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored() && !property.isReadonly())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@powerlines/deepkit/vendor/type\": [\n \"serializeFunction\",\n \"deserializeFunction\",\n \"ReflectionKind\",\n \"Serializer\",\n \"TemplateState\",\n \"Type\",\n \"TypeProperty\",\n \"TypePropertySignature\"\n ]\n },\n rest.imports ?? {}\n )}>\n <Show when={Boolean(reflection)}>\n <EnvTypeDefinition\n defaultValue={defaultValue}\n reflection={reflection}\n />\n <hbr />\n <hbr />\n </Show>\n\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<EnvBase>\"\n defaultValue={defaultValue}\n reflection={envInstance}\n export\n const\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n\n <TSDoc heading=\"The environment configuration serializer for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <ClassDeclaration\n refkey={envSerializerRefkey}\n name=\"EnvSerializer\"\n extends=\"Serializer\"\n export>\n <ClassMethod\n name=\"constructor\"\n public\n doc=\"Initializes a new instance of the `EnvSerializer` class.\">\n {code`super(\"env\");\n\n this.deserializeRegistry.register(\n ReflectionKind.boolean,\n (type: Type, state: TemplateState) => {\n state.addSetter(\n \\`typeof \\${state.accessor.toString()} !== \"boolean\" ? \\${state.accessor.toString()} === 1 || \\${state.accessor.toString()} === \"1\" || \\${state.accessor.toString()}.toLowerCase() === \"t\" || \\${state.accessor.toString()}.toLowerCase() === \"true\" || \\${state.accessor.toString()}.toLowerCase() === \"y\" || \\${state.accessor.toString()}.toLowerCase() === \"yes\" : \\${state.accessor.toString()}\\`\n );\n }\n ); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n\n <TSDoc heading=\"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n name=\"envSerializer\"\n export={false}\n const\n initializer={<NewExpression args={[]} target=\"EnvSerializer\" />}\n />\n <Spacing />\n\n <TSDoc heading=\"Serialize a environment configuration object to JSON data objects (not a JSON string).\">\n <TSDocRemarks>\n {`The resulting JSON object can be stringified using \\`JSON.stringify()\\`.`}\n </TSDocRemarks>\n <TSDocExample>{`const json = serializeEnv(env);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when serialization or validation fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"serializeEnv\"\n export\n const\n initializer={\"serializeFunction<EnvBase>(envSerializer)\"}\n />\n <Spacing />\n\n <TSDoc heading=\"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.\">\n <TSDocRemarks>\n {`Types that are already correct will be used as-is.`}\n </TSDocRemarks>\n <TSDocExample>{`const env = deserializeEnv(json);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when deserialization fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"deserializeEnv\"\n export\n const\n initializer=\"deserializeFunction<EnvBase>(envSerializer)\"\n />\n <Spacing />\n\n <TSDoc heading=\"Initializes the Powerlines environment configuration module.\">\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <TSDocParam name=\"environmentConfig\">\n {`The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`}\n </TSDocParam>\n <TSDocReturns>\n {`The initialized Powerlines configuration object.`}\n </TSDocReturns>\n </TSDoc>\n <Show when={Boolean(context?.entryPath)}>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n deserializeEnv({\n ...initialEnv,\n ...environmentConfig\n }) as Env,\n {\n get: (target: EnvBase, propertyName: string) => { `}\n <hbr />\n\n <For each={reflectionGetProperties}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: EnvBase, propertyName: string, newValue: any) => { `}\n <hbr />\n\n <For each={reflectionSetProperties} ender={code` else `}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export\n const\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n );\n `}\n />\n <Spacing />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,SAAE,kBAAA,OAAA;CACA,MAAM,CAAC,EACT,cACA,gBACO,WAAW,OAAO,CAAA,gBAAiB,aAAO,CAAO;CACxD,MAAQ,UAAC,eAA0C;AACnD,QAAO;EAAA,gBAAA,sBAAA;GACL,MAAA;GACA;GACO;GACT,UAAc;GACd,CAAA;EAAM,gBAAG,SAAuB,EAAA,CAAI;EAAE,gBAAkB,OAAO;GAC/D,SAAS;GACT,IAAO,WAAA;AACL,WAAK,gBAAA,cAAA,EACL,UAAY,iPACZ,CAAA;;GAEA,CAAA;EAAA,gBAAY,iBAAA;GACZ,MAAA;GACA,UAAA;GACA,IAAM,WAAW;AACb,WAAG,IAAA;mCACc,QAAA,OAAA,IAAA,OAAA,KAAA,WAAA,OAAA,OAAA,QAAA,OAAA,GAAA,CAAA,YAAA,CAAA,KAAA,IAAA,CAAA;;;;GAIrB,CAAA;EAAA,gBAAA,SAAA,EAAA,CAAA;EAAA;;AAMF,SAAS,0BAA0B,OAAwB;CACzD,MAAG,CAAA,EACD,SACA;AAEF,QAAM,IAAA,qBAAwB,KAAA,+BAAmB,QAAA,OAAA,IAAA,OAAA,MAAA,GAA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,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACA,UAAU;KACV,SAAK;KACL,MAAA;KACA,KAAK;KACL,aAAa,IAAC;KACf,CAAC;IAAE,gBAAkB,SAAC,EAAA,CAAA;IAAA,gBAAA,MAAA;KACrB,IAAE,OAAI;AACJ,aAAI,QAAU,SAAA;;KAEV;KACP,CAAC;IAAC;;EAEN,CAAC,CAAC"}
1
+ {"version":3,"file":"env-builtin.mjs","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n code,\n computed,\n For,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n ClassDeclaration,\n ClassMethod,\n ElseIfClause,\n FunctionDeclaration,\n IfStatement,\n NewExpression,\n TypeDeclaration,\n VarDeclaration\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/plugin-alloy/helpers/refkey\";\nimport { ComponentProps } from \"@powerlines/plugin-alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport type { InterfaceDeclarationProps } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { InterfaceDeclaration } from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport { ObjectDeclaration } from \"@powerlines/plugin-alloy/typescript/components/object-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport defu from \"defu\";\nimport { loadEnvFromContext } from \"../helpers/load\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration typescript definition for the Powerlines project.\n */\nexport function EnvTypeDefinition(\n props: Omit<InterfaceDeclarationProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <InterfaceDeclaration\n name=\" EnvBase\"\n defaultValue={defaultValue}\n reflection={reflection}\n export\n />\n <Spacing />\n <TSDoc heading=\"The environment configuration object with prefixed keys.\">\n <TSDocRemarks>\n {`The \\`Env\\` type extends the \\`EnvBase\\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration name=\"Env\" export>\n {code` {\n [Key in keyof EnvBase as Key ${getUnique(\n context.config.env.prefix.map(\n prefix => `| \\`${prefix.replace(/_$/g, \"\")}_\\${Key}\\``\n )\n ).join(\" \")}]: EnvBase[Key];\n}\n`}\n </TypeDeclaration>\n <Spacing />\n </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n return code`propertyName === \"${name}\" || propertyName.replace(/^(${getUnique(\n context.config.env.prefix\n .sort((a, b) =>\n a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)\n )\n .map(prefix => `${prefix.replace(/_$/, \"\")}_`)\n ).join(\"|\")})/g, \"\").toLowerCase().replace(/[\\\\s\\\\-_]+/g, \"\") === \"${name\n .toLowerCase()\n .replace(/[\\s\\-_]+/g, \"\")}\"`;\n}\n\ninterface ConfigPropertyProps extends ComponentProps {\n index: number;\n context: EnvPluginContext;\n property: ReflectionProperty;\n}\n\nfunction ConfigPropertyGet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`return target[\"${property.getNameAsString()}\"];`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nfunction ConfigPropertySet(props: ConfigPropertyProps) {\n const [{ context, property, index }] = splitProps(props, [\n \"context\",\n \"property\",\n \"index\"\n ]);\n\n return (\n <>\n {index === 0 ? (\n <IfStatement\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </IfStatement>\n ) : (\n <ElseIfClause\n condition={\n <>\n <ConfigPropertyConditional\n name={property.getNameAsString()}\n context={context}\n />\n <Show\n when={property.getAlias() && property.getAlias().length > 0}>\n {code` || `}\n <For each={property.getAlias()} joiner={code` || `}>\n {alias => (\n <ConfigPropertyConditional name={alias} context={context} />\n )}\n </For>\n </Show>\n </>\n }>\n {code`\n target[\"${property.getNameAsString()}\"] = newValue;\n return true;\n`}\n </ElseIfClause>\n )}\n </>\n );\n}\n\nexport interface EnvBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {\n defaultConfig?: Children;\n reflection: ReflectionClass<any>;\n}\n\nconst createEnvRefkey = refkey(\"createEnv\");\nconst envRefkey = refkey(\"env\");\nconst envSerializerRefkey = refkey(\"EnvSerializer\");\n\n/**\n * Generates the environment configuration module for the Powerlines project.\n */\nexport function EnvBuiltin(props: EnvBuiltinProps) {\n const [{ defaultConfig, reflection, children }, rest] = splitProps(props, [\n \"defaultConfig\",\n \"reflection\",\n \"children\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n\n const envInstance = computed(() => {\n const result = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n description: `The initial environment configuration state for the ${titleCase(\n context?.config?.name\n )} project.`,\n types: []\n },\n reflection\n );\n\n result\n .getProperties()\n .filter(\n property => property.isRuntime() || property.getTags().runtime === true\n )\n .forEach(property => {\n result.removeProperty(property.getNameAsString());\n });\n\n return result;\n });\n\n const reflectionGetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n const reflectionSetProperties = computed(\n () =>\n reflection\n ?.getProperties()\n .filter(property => !property.isIgnored() && !property.isReadonly())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n\n return (\n <BuiltinFile\n id=\"env\"\n description=\"The environment configuration module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@powerlines/deepkit/vendor/type\": [\n \"serializeFunction\",\n \"deserializeFunction\",\n \"ReflectionKind\",\n \"Serializer\",\n \"TemplateState\",\n \"Type\",\n \"TypeProperty\",\n \"TypePropertySignature\"\n ]\n },\n rest.imports ?? {}\n )}>\n <Show when={Boolean(reflection)}>\n <EnvTypeDefinition\n defaultValue={defaultValue}\n reflection={reflection}\n />\n <hbr />\n <hbr />\n </Show>\n\n <ObjectDeclaration\n name=\"initialEnv\"\n type=\"Partial<EnvBase>\"\n defaultValue={defaultValue}\n reflection={envInstance}\n export\n const\n doc=\"The initial environment configuration object values for the runtime.\"\n />\n <Spacing />\n\n <TSDoc heading=\"The environment configuration serializer for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <ClassDeclaration\n refkey={envSerializerRefkey}\n name=\"EnvSerializer\"\n extends=\"Serializer\"\n export>\n <ClassMethod\n name=\"constructor\"\n public\n doc=\"Initializes a new instance of the `EnvSerializer` class.\">\n {code`super(\"env\");\n\n this.deserializeRegistry.register(\n ReflectionKind.boolean,\n (type: Type, state: TemplateState) => {\n state.addSetter(\n \\`typeof \\${state.accessor.toString()} !== \"boolean\" ? \\${state.accessor.toString()} === 1 || \\${state.accessor.toString()} === \"1\" || \\${state.accessor.toString()}.toLowerCase() === \"t\" || \\${state.accessor.toString()}.toLowerCase() === \"true\" || \\${state.accessor.toString()}.toLowerCase() === \"y\" || \\${state.accessor.toString()}.toLowerCase() === \"yes\" : \\${state.accessor.toString()}\\`\n );\n }\n ); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n\n <TSDoc heading=\"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.\">\n <TSDocLink>\n {`https://deepkit.io/docs/serialization/serializers`}\n </TSDocLink>\n <TSDocLink>\n {`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}\n </TSDocLink>\n <TSDocRemarks>\n {`This serializer is used to serialize and deserialize the Powerlines environment configuration.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n name=\"envSerializer\"\n export={false}\n const\n initializer={<NewExpression args={[]} target=\"EnvSerializer\" />}\n />\n <Spacing />\n\n <TSDoc heading=\"Serialize a environment configuration object to JSON data objects (not a JSON string).\">\n <TSDocRemarks>\n {`The resulting JSON object can be stringified using \\`JSON.stringify()\\`.`}\n </TSDocRemarks>\n <TSDocExample>{`const json = serializeEnv(env);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when serialization or validation fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"serializeEnv\"\n export\n const\n initializer={\"serializeFunction<EnvBase>(envSerializer)\"}\n />\n <Spacing />\n\n <TSDoc heading=\"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.\">\n <TSDocRemarks>\n {`Types that are already correct will be used as-is.`}\n </TSDocRemarks>\n <TSDocExample>{`const env = deserializeEnv(json);`}</TSDocExample>\n <TSDocThrows>\n {`ValidationError when deserialization fails.`}\n </TSDocThrows>\n </TSDoc>\n <VarDeclaration\n name=\"deserializeEnv\"\n export\n const\n initializer=\"deserializeFunction<EnvBase>(envSerializer)\"\n />\n <Spacing />\n\n <TSDoc heading=\"Initializes the Powerlines environment configuration module.\">\n <TSDocRemarks>\n {`This function initializes the Powerlines environment configuration object.`}\n </TSDocRemarks>\n <TSDocParam name=\"environmentConfig\">\n {`The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`}\n </TSDocParam>\n <TSDocReturns>\n {`The initialized Powerlines configuration object.`}\n </TSDocReturns>\n </TSDoc>\n <Show when={Boolean(context?.entryPath)}>\n <FunctionDeclaration\n refkey={createEnvRefkey}\n async={false}\n export\n name=\"createEnv\"\n parameters={[\n {\n name: \"environmentConfig\",\n type: `Partial<Env>`,\n optional: false,\n default: \"{}\"\n }\n ]}\n returnType=\"Env\">\n {code`\n return new Proxy<Env>(\n deserializeEnv({\n ...initialEnv,\n ...environmentConfig\n }) as Env,\n {\n get: (target: EnvBase, propertyName: string) => { `}\n <hbr />\n\n <For each={reflectionGetProperties}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertyGet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n {code`\n return undefined;\n }, `}\n\n <Spacing />\n {code` set: (target: EnvBase, propertyName: string, newValue: any) => { `}\n <hbr />\n\n <For each={reflectionSetProperties} ender={code` else `}>\n {(property: ReflectionProperty, index: number) => (\n <ConfigPropertySet\n index={index}\n context={context}\n property={property}\n />\n )}\n </For>\n\n <hbr />\n {code`return false;\n }\n }\n );\n`}\n </FunctionDeclaration>\n </Show>\n <Spacing />\n <hbr />\n\n <TSDoc heading=\"The environment configuration object.\">\n <TSDocRemarks>\n {`This object provides access to the environment configuration parameters in the application runtime.`}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export\n const\n initializer={\n <>{code`createEnv(${defaultConfig || \"{}\"} as Partial<Env>);`}</>\n }\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isCI\"\n doc=\"Detect if the application is running in a continuous integration (CI) environment.\"\n initializer={code`Boolean(\n env.CI ||\n env.RUN_ID ||\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS || false\n );\n `}\n />\n <Spacing />\n\n <TSDoc heading=\"Detect the \\`mode\\` of the current runtime environment.\">\n <TSDocRemarks>\n {code`The \\`mode\\` is determined by the \\`MODE\\` environment variable, or falls back to the \\`NEXT_PUBLIC_VERCEL_ENV\\`, \\`NODE_ENV\\`, or defaults to \\`production\\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:\n - \\`production\\`\n - \\`test\\`\n - \\`development\\`\n `}\n </TSDocRemarks>\n </TSDoc>\n <VarDeclaration\n export\n const\n name=\"mode\"\n initializer={code`String(env.MODE) || \"production\"; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isProduction\"\n doc='Detect if the application is running in `\"production\"` mode'\n initializer={code`[\"prd\", \"prod\", \"production\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isTest\"\n doc='Detect if the application is running in `\"test\"` mode'\n initializer={code`[\"tst\", \"test\", \"testing\", \"stg\", \"stage\", \"staging\"].includes(mode.toLowerCase()) || env.TEST; `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDevelopment\"\n doc='Detect if the application is running in `\"development\"` mode'\n initializer={code`[\"dev\", \"development\"].includes(mode.toLowerCase()); `}\n />\n <Spacing />\n\n <VarDeclaration\n export\n const\n name=\"isDebug\"\n doc=\"Detect if the application is currently being debugged\"\n initializer={code`Boolean(isDevelopment && env.DEBUG); `}\n />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwCA,SAAS,kBAAyB,OAAM;CACxC,MAAQ,CAAC,EACT,cACA,gBACO,WAAE,OAAgB,CAAC,gBAAO,aAAkB,CAAK;CACxD,MAAO,UAAA,eAAA;AACL,QAAA;EAAA,gBAAW,sBAAA;GACX,MAAA;GACO;GACK;GACd,UAAS;GACT,CAAA;EAAM,gBAAG,SAAwB,EAAE,CAAC;EAAA,gBAAkB,OAAM;GAC5D,SAAO;GACL,IAAK,WAAA;AACL,WAAA,gBAAY,cAAA,EACZ,UAAS,iPACT,CAAA;;GAEA,CAAA;EAAA,gBAAY,iBAAA;GACZ,MAAA;GACA,UAAO;GACT,IAAQ,WAAW;AACb,WAAG,IAAA;mCACc,UAAA,QAAA,OAAA,IAAA,OAAA,KAAA,WAAA,OAAA,OAAA,QAAA,OAAA,GAAA,CAAA,YAAA,CAAA,CAAA,KAAA,IAAA,CAAA;;;;GAIrB,CAAA;EAAA,gBAAA,SAAA,EAAA,CAAA;EAAA;;AAMF,SAAS,0BAA0B,OAAwB;CACzD,MAAG,CAAA,EACD,SACA;AAEF,QAAM,IAAA,qBAAwB,KAAA,+BAAmB,UAAA,QAAA,OAAA,IAAA,OAAA,MAAA,GAAA,MAAA,EAAA,WAAA,EAAA,GAAA,KAAA,EAAA,WAAA,EAAA,GAAA,IAAA,EAAA,cAAA,EAAA,CAAA,CAAA,KAAA,WAAA,GAAA,OAAA,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AACR,aAAI,QAAQ,SAAA;;KAER;KACP,CAAC;IAAC;;EAEN,CAAC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let powerlines = require("powerlines");
4
3
  let _stryke_path_join_paths = require("@stryke/path/join-paths");
5
4
  let automd = require("automd");
6
5
 
@@ -23,10 +22,9 @@ const env = __assignType((context) => (0, automd.defineGenerator)({
23
22
  return { contents: await context.fs.read(envDocFile) || "" };
24
23
  }, ["generate", "P\"/!"])
25
24
  }), [
26
- () => powerlines.__ΩUnresolvedContext,
27
25
  "context",
28
26
  "",
29
- "Pn!2\"\"/#"
27
+ "P!2!\"/\""
30
28
  ]);
31
29
 
32
30
  //#endregion
@@ -1,5 +1,5 @@
1
- import { UnresolvedContext } from "powerlines";
2
1
  import * as _$automd from "automd";
2
+ import { UnresolvedContext } from "powerlines";
3
3
 
4
4
  //#region src/helpers/automd-generator.d.ts
5
5
  /**
@@ -1,4 +1,3 @@
1
- import { __ΩUnresolvedContext } from "powerlines";
2
1
  import { joinPaths } from "@stryke/path/join-paths";
3
2
  import { defineGenerator } from "automd";
4
3
 
@@ -21,10 +20,9 @@ const env = __assignType((context) => defineGenerator({
21
20
  return { contents: await context.fs.read(envDocFile) || "" };
22
21
  }, ["generate", "P\"/!"])
23
22
  }), [
24
- () => __ΩUnresolvedContext,
25
23
  "context",
26
24
  "",
27
- "Pn!2\"\"/#"
25
+ "P!2!\"/\""
28
26
  ]);
29
27
 
30
28
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"automd-generator.mjs","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { defineGenerator } from \"automd\";\nimport { UnresolvedContext } from \"powerlines\";\n\n/**\n * AutoMD generator to generate environment variable documentation\n *\n * @param context - The generator context.\n * @returns The generated documentation content.\n */\nexport const env = (context: UnresolvedContext) =>\n defineGenerator({\n name: \"env\",\n async generate() {\n const envDocFile = joinPaths(\n context.config.root,\n \"docs\",\n \"generated\",\n \"env.md\"\n );\n\n if (!context.fs.existsSync(envDocFile)) {\n return {\n contents: \"\"\n };\n }\n\n const contents = await context.fs.read(envDocFile);\n\n return {\n contents: contents || \"\"\n };\n }\n });\n"],"mappings":";;;;;AAEA,SAAS,aAAY,IAAK,MAAC;;AAE1B,QAAU;;;;;;;;AA2BX,MAAU,MAAS,cAAE,YAAA,gBAAA;CACjB,MAAE;CACF,UAAI,aAAmB,eAAA,WAAA;EACnB,MAAM,aAAA,UAAA,QAAA,OAAA,MAAA,QAAA,aAAA,SAAA;AACN,MAAC,CAAA,QAAU,GAAA,WAAA,WAAA,CACP,QAAG,EACR,UAAA;AAIC,SAAE,EACD,UAFM,MAAA,QAAA,GAAA,KAAA,WAAA,IAEN,IACH;;CAEL,CAAC,EAAE;OAAO;CAAkB;CAAe;CAAC;CAAW,CAAA"}
1
+ {"version":3,"file":"automd-generator.mjs","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { defineGenerator } from \"automd\";\nimport { UnresolvedContext } from \"powerlines\";\n\n/**\n * AutoMD generator to generate environment variable documentation\n *\n * @param context - The generator context.\n * @returns The generated documentation content.\n */\nexport const env = (context: UnresolvedContext) =>\n defineGenerator({\n name: \"env\",\n async generate() {\n const envDocFile = joinPaths(\n context.config.root,\n \"docs\",\n \"generated\",\n \"env.md\"\n );\n\n if (!context.fs.existsSync(envDocFile)) {\n return {\n contents: \"\"\n };\n }\n\n const contents = await context.fs.read(envDocFile);\n\n return {\n contents: contents || \"\"\n };\n }\n });\n"],"mappings":";;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AA2BX,MAAE,MAAgB,cAAA,YAAA,gBAAA;CACd,MAAM;CACN,UAAM,aAAW,eAAA,WAAA;EACf,MAAM,aAAa,UAAS,QAAA,OAAA,MAAA,QAAA,aAAA,SAAA;AAC1B,MAAA,CAAA,QAAQ,GAAO,WAAI,WAAA,CAClB,QAAK,EACL,UAAU,IACN;AAGL,SAAG,EACH,+CAAO,IACN;IACF,CAAC,YAAC,QAAA,CAAA;CACR,CAAC,EAAE;CAAC;CAAC;CAAA;CAAA,CAAA"}
@@ -2,7 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_types_plugin = require('../types/plugin.cjs');
4
4
  const require_helpers_source_file_env = require('./source-file-env.cjs');
5
- let powerlines = require("powerlines");
6
5
  let _stryke_path_join_paths = require("@stryke/path/join-paths");
7
6
  let _stryke_env_load_env = require("@stryke/env/load-env");
8
7
  let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
@@ -64,10 +63,9 @@ loadEnvDirectory.__type = [
64
63
  "mode",
65
64
  "cacheDir",
66
65
  "packageJson",
67
- () => powerlines.__ΩWorkspaceConfig,
68
66
  "workspaceConfig",
69
67
  "loadEnvDirectory",
70
- "Pn!2\"&2#&2$&2%!2&n'2(\"`/)"
68
+ "Pn!2\"&2#&2$&2%!2&!2'\"`/("
71
69
  ];
72
70
  /**
73
71
  * Retrieves various dotenv configuration parameters from the context.
@@ -9,7 +9,26 @@ import { DotenvParseOutput } from "@stryke/env/types";
9
9
  * @param parsed - The parsed dotenv configuration.
10
10
  * @returns An object containing the dotenv configuration.
11
11
  */
12
- declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): any;
12
+ declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): {
13
+ APP_NAME: string | undefined;
14
+ APP_VERSION: string | undefined;
15
+ BUILD_ID: string;
16
+ BUILD_TIMESTAMP: string;
17
+ BUILD_CHECKSUM: string;
18
+ RELEASE_ID: string;
19
+ RELEASE_TAG: string;
20
+ DEFAULT_LOCALE: string | undefined;
21
+ DEFAULT_TIMEZONE: string | undefined;
22
+ LOG_LEVEL: "error" | "warn" | "info" | "debug" | null;
23
+ ERROR_URL: string | undefined;
24
+ ORGANIZATION: string | undefined;
25
+ PLATFORM: "node" | "browser" | "neutral";
26
+ MODE: "test" | "development" | "production";
27
+ TEST: boolean;
28
+ DEBUG: boolean;
29
+ STACKTRACE: boolean;
30
+ ENVIRONMENT: string;
31
+ };
13
32
  declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
14
33
  //#endregion
15
34
  export { loadEnv, loadEnvFromContext };
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.cts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;AAgGA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA;AAAA,iBAkDY,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
1
+ {"version":3,"file":"load.d.cts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;AAgGA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA;;;;;;;;;;;;;;;;;;;;iBAkDY,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
@@ -9,7 +9,26 @@ import { DotenvParseOutput } from "@stryke/env/types";
9
9
  * @param parsed - The parsed dotenv configuration.
10
10
  * @returns An object containing the dotenv configuration.
11
11
  */
12
- declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): any;
12
+ declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): {
13
+ APP_NAME: string | undefined;
14
+ APP_VERSION: string | undefined;
15
+ BUILD_ID: string;
16
+ BUILD_TIMESTAMP: string;
17
+ BUILD_CHECKSUM: string;
18
+ RELEASE_ID: string;
19
+ RELEASE_TAG: string;
20
+ DEFAULT_LOCALE: string | undefined;
21
+ DEFAULT_TIMEZONE: string | undefined;
22
+ LOG_LEVEL: "error" | "warn" | "info" | "debug" | null;
23
+ ERROR_URL: string | undefined;
24
+ ORGANIZATION: string | undefined;
25
+ PLATFORM: "node" | "browser" | "neutral";
26
+ MODE: "test" | "development" | "production";
27
+ TEST: boolean;
28
+ DEBUG: boolean;
29
+ STACKTRACE: boolean;
30
+ ENVIRONMENT: string;
31
+ };
13
32
  declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
14
33
  //#endregion
15
34
  export { loadEnv, loadEnvFromContext };
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.mts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;AAgGA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA;AAAA,iBAkDY,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
1
+ {"version":3,"file":"load.d.mts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;AAgGA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA;;;;;;;;;;;;;;;;;;;;iBAkDY,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
@@ -1,6 +1,5 @@
1
1
  import { __ΩEnvPluginContext, __ΩEnvPluginOptions } from "../types/plugin.mjs";
2
2
  import { removeEnvPrefix } from "./source-file-env.mjs";
3
- import { __ΩWorkspaceConfig } from "powerlines";
4
3
  import { joinPaths } from "@stryke/path/join-paths";
5
4
  import { loadEnv as loadEnv$1, loadEnvFile } from "@stryke/env/load-env";
6
5
  import { kebabCase } from "@stryke/string-format/kebab-case";
@@ -61,10 +60,9 @@ loadEnvDirectory.__type = [
61
60
  "mode",
62
61
  "cacheDir",
63
62
  "packageJson",
64
- () => __ΩWorkspaceConfig,
65
63
  "workspaceConfig",
66
64
  "loadEnvDirectory",
67
- "Pn!2\"&2#&2$&2%!2&n'2(\"`/)"
65
+ "Pn!2\"&2#&2$&2%!2&!2'\"`/("
68
66
  ];
69
67
  /**
70
68
  * Retrieves various dotenv configuration parameters from the context.