@powerlines/plugin-env 0.16.156 → 0.16.158

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 (109) hide show
  1. package/package.json +9 -9
  2. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  3. package/dist/babel/index.cjs +0 -4
  4. package/dist/babel/index.d.cts +0 -2
  5. package/dist/babel/index.d.mts +0 -2
  6. package/dist/babel/index.mjs +0 -3
  7. package/dist/babel/plugin.cjs +0 -130
  8. package/dist/babel/plugin.d.cts +0 -8
  9. package/dist/babel/plugin.d.cts.map +0 -1
  10. package/dist/babel/plugin.d.mts +0 -8
  11. package/dist/babel/plugin.d.mts.map +0 -1
  12. package/dist/babel/plugin.mjs +0 -129
  13. package/dist/babel/plugin.mjs.map +0 -1
  14. package/dist/components/docs.cjs +0 -111
  15. package/dist/components/docs.d.cts +0 -24
  16. package/dist/components/docs.d.cts.map +0 -1
  17. package/dist/components/docs.d.mts +0 -24
  18. package/dist/components/docs.d.mts.map +0 -1
  19. package/dist/components/docs.mjs +0 -109
  20. package/dist/components/docs.mjs.map +0 -1
  21. package/dist/components/env-builtin.cjs +0 -815
  22. package/dist/components/env-builtin.d.cts +0 -21
  23. package/dist/components/env-builtin.d.cts.map +0 -1
  24. package/dist/components/env-builtin.d.mts +0 -21
  25. package/dist/components/env-builtin.d.mts.map +0 -1
  26. package/dist/components/env-builtin.mjs +0 -811
  27. package/dist/components/env-builtin.mjs.map +0 -1
  28. package/dist/components/index.cjs +0 -9
  29. package/dist/components/index.d.cts +0 -3
  30. package/dist/components/index.d.mts +0 -3
  31. package/dist/components/index.mjs +0 -4
  32. package/dist/helpers/automd-generator.cjs +0 -32
  33. package/dist/helpers/automd-generator.d.cts +0 -14
  34. package/dist/helpers/automd-generator.d.cts.map +0 -1
  35. package/dist/helpers/automd-generator.d.mts +0 -14
  36. package/dist/helpers/automd-generator.d.mts.map +0 -1
  37. package/dist/helpers/automd-generator.mjs +0 -31
  38. package/dist/helpers/automd-generator.mjs.map +0 -1
  39. package/dist/helpers/create-reflection-resource.cjs +0 -23
  40. package/dist/helpers/create-reflection-resource.d.cts +0 -13
  41. package/dist/helpers/create-reflection-resource.d.cts.map +0 -1
  42. package/dist/helpers/create-reflection-resource.d.mts +0 -13
  43. package/dist/helpers/create-reflection-resource.d.mts.map +0 -1
  44. package/dist/helpers/create-reflection-resource.mjs +0 -23
  45. package/dist/helpers/create-reflection-resource.mjs.map +0 -1
  46. package/dist/helpers/index.cjs +0 -34
  47. package/dist/helpers/index.d.cts +0 -7
  48. package/dist/helpers/index.d.mts +0 -7
  49. package/dist/helpers/index.mjs +0 -8
  50. package/dist/helpers/load.cjs +0 -139
  51. package/dist/helpers/load.d.cts +0 -36
  52. package/dist/helpers/load.d.cts.map +0 -1
  53. package/dist/helpers/load.d.mts +0 -36
  54. package/dist/helpers/load.d.mts.map +0 -1
  55. package/dist/helpers/load.mjs +0 -136
  56. package/dist/helpers/load.mjs.map +0 -1
  57. package/dist/helpers/persistence.cjs +0 -308
  58. package/dist/helpers/persistence.d.cts +0 -84
  59. package/dist/helpers/persistence.d.cts.map +0 -1
  60. package/dist/helpers/persistence.d.mts +0 -84
  61. package/dist/helpers/persistence.d.mts.map +0 -1
  62. package/dist/helpers/persistence.mjs +0 -296
  63. package/dist/helpers/persistence.mjs.map +0 -1
  64. package/dist/helpers/reflect.cjs +0 -290
  65. package/dist/helpers/reflect.d.cts +0 -68
  66. package/dist/helpers/reflect.d.cts.map +0 -1
  67. package/dist/helpers/reflect.d.mts +0 -68
  68. package/dist/helpers/reflect.d.mts.map +0 -1
  69. package/dist/helpers/reflect.mjs +0 -281
  70. package/dist/helpers/reflect.mjs.map +0 -1
  71. package/dist/helpers/source-file-env.cjs +0 -59
  72. package/dist/helpers/source-file-env.d.cts +0 -9
  73. package/dist/helpers/source-file-env.d.cts.map +0 -1
  74. package/dist/helpers/source-file-env.d.mts +0 -9
  75. package/dist/helpers/source-file-env.d.mts.map +0 -1
  76. package/dist/helpers/source-file-env.mjs +0 -57
  77. package/dist/helpers/source-file-env.mjs.map +0 -1
  78. package/dist/helpers/template-helpers.cjs +0 -70
  79. package/dist/helpers/template-helpers.d.cts +0 -15
  80. package/dist/helpers/template-helpers.d.cts.map +0 -1
  81. package/dist/helpers/template-helpers.d.mts +0 -15
  82. package/dist/helpers/template-helpers.d.mts.map +0 -1
  83. package/dist/helpers/template-helpers.mjs +0 -69
  84. package/dist/helpers/template-helpers.mjs.map +0 -1
  85. package/dist/index.cjs +0 -241
  86. package/dist/index.d.cts +0 -17
  87. package/dist/index.d.cts.map +0 -1
  88. package/dist/index.d.mts +0 -17
  89. package/dist/index.d.mts.map +0 -1
  90. package/dist/index.mjs +0 -235
  91. package/dist/index.mjs.map +0 -1
  92. package/dist/types/index.cjs +0 -11
  93. package/dist/types/index.d.cts +0 -3
  94. package/dist/types/index.d.mts +0 -3
  95. package/dist/types/index.mjs +0 -4
  96. package/dist/types/plugin.cjs +0 -115
  97. package/dist/types/plugin.d.cts +0 -163
  98. package/dist/types/plugin.d.cts.map +0 -1
  99. package/dist/types/plugin.d.mts +0 -163
  100. package/dist/types/plugin.d.mts.map +0 -1
  101. package/dist/types/plugin.mjs +0 -110
  102. package/dist/types/plugin.mjs.map +0 -1
  103. package/dist/types/runtime.cjs +0 -535
  104. package/dist/types/runtime.d.cts +0 -934
  105. package/dist/types/runtime.d.cts.map +0 -1
  106. package/dist/types/runtime.d.mts +0 -934
  107. package/dist/types/runtime.d.mts.map +0 -1
  108. package/dist/types/runtime.mjs +0 -533
  109. package/dist/types/runtime.mjs.map +0 -1
@@ -1,109 +0,0 @@
1
- import { __ΩEnvPluginContext } from "../types/plugin.mjs";
2
- import { stringifyType } from "@powerlines/deepkit/vendor/type";
3
- import { getDocsOutputPath } from "powerlines/plugin-utils";
4
- import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
5
- import { Show, code } from "@alloy-js/core";
6
- import { Link } from "@alloy-js/markdown";
7
- import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
8
- import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
9
- import { Heading } from "@powerlines/plugin-alloy/markdown/components/heading";
10
- import { MarkdownFile } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
11
- import { MarkdownTable } from "@powerlines/plugin-alloy/markdown/components/markdown-table";
12
- import { joinPaths } from "@stryke/path/join";
13
-
14
- //#region src/components/docs.tsx
15
- const __ΩPartial = [
16
- "T",
17
- "Partial",
18
- "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
19
- ];
20
- function __assignType(fn, args) {
21
- fn.__type = args;
22
- return fn;
23
- }
24
- const __ΩEnvDocsFileProps = [
25
- () => __ΩPartial,
26
- "levelOffset",
27
- 0,
28
- "The heading level offset to apply to the generated documentation.",
29
- "reflection",
30
- "EnvDocsFileProps",
31
- "P!o!\"'4\"8>#?$!4%Mw&y"
32
- ];
33
- /**
34
- * Generates the environment configuration markdown documentation for the Powerlines project.
35
- */
36
- function EnvDocsFile(props) {
37
- const { levelOffset = 0, reflection, ...rest } = props;
38
- const context = (usePowerlines.Ω = [[() => __ΩEnvPluginContext, "n!"]], usePowerlines());
39
- return createComponent(MarkdownFile, mergeProps({ get path() {
40
- return joinPaths(getDocsOutputPath(context.config.root), "env.md");
41
- } }, rest, { get children() {
42
- return [
43
- createComponent(Heading, {
44
- level: 1 + levelOffset,
45
- children: "Environment Configuration"
46
- }),
47
- code`Below is a list of environment variables used by the`,
48
- createComponent(Show, {
49
- get when() {
50
- return !!context.packageJson.name;
51
- },
52
- get children() {
53
- return createComponent(Link, {
54
- get href() {
55
- return `https://www.npmjs.com/package/${context.packageJson.name}`;
56
- },
57
- get title() {
58
- return context.packageJson.name;
59
- }
60
- });
61
- }
62
- }),
63
- code`package. These values can be updated in the \`.env\` file in the root of the project.`,
64
- createComponent(Spacing, {}),
65
- createComponent(Heading, {
66
- level: 2 + levelOffset,
67
- children: "Environment Variables"
68
- }),
69
- createComponent(Spacing, {}),
70
- 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.`,
71
- createComponent(Spacing, {}),
72
- createComponent(MarkdownTable, { get data() {
73
- return reflection?.getProperties().filter(__assignType((property) => !property.isHidden() && !property.isIgnored() && !property.isReadonly() && !property.isInternal(), [
74
- "property",
75
- "",
76
- "P\"2!\"/\""
77
- ])).sort(__assignType((a, b) => a.getNameAsString().localeCompare(b.getNameAsString()), [
78
- "a",
79
- "b",
80
- "",
81
- "P\"2!\"2\"\"/#"
82
- ])).map(__assignType((reflectionProperty) => {
83
- return {
84
- name: reflectionProperty.getNameAsString().trim(),
85
- description: (reflectionProperty.getDescription() ?? "").trim(),
86
- type: stringifyType(reflectionProperty.getType()).trim().replaceAll(/\s*(?:\||&)\s*/g, ", or "),
87
- defaultValue: reflectionProperty.hasDefault() ? String(reflectionProperty.getDefaultValue())?.includes("\"") ? reflectionProperty.getDefaultValue() : `\`${reflectionProperty.getDefaultValue()}\`` : "",
88
- required: reflectionProperty.isValueRequired() ? "" : "✔"
89
- };
90
- }, [
91
- "reflectionProperty",
92
- "",
93
- "P\"2!\"/\""
94
- ])) ?? [];
95
- } })
96
- ];
97
- } }));
98
- }
99
- EnvDocsFile.__type = [
100
- () => __ΩEnvDocsFileProps,
101
- "props",
102
- "EnvDocsFile",
103
- "Generates the environment configuration markdown documentation for the Powerlines project.",
104
- "Pn!2\"\"/#?$"
105
- ];
106
-
107
- //#endregion
108
- export { EnvDocsFile, __ΩEnvDocsFileProps };
109
- //# sourceMappingURL=docs.mjs.map
@@ -1 +0,0 @@
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 { 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 { Heading } from \"@powerlines/plugin-alloy/markdown/components/heading\";\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 \"powerlines/plugin-utils\";\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.config.root), \"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.`}\n <Spacing />\n <MarkdownTable\n data={\n reflection\n ?.getProperties()\n .filter(\n property =>\n !property.isHidden() &&\n !property.isIgnored() &&\n !property.isReadonly() &&\n !property.isInternal()\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(/\\s*(?:\\||&)\\s*/g, \", 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":";;;;;;;;;;;;;;;;;;;AAIA,SAAM,aAAS,IAAW,MAAM;AAC/B,IAAG,SAAU;AACb,QAAQ;;;;;;;;;;;;;;AAkCT,SAAM,YAAA,OAAA;CACJ,MAAG,EACF,cAAA,GACC,YACA,GAAA,SACF;;AAEA,QAAA,gBAAY,cAAoB,WAAA,EAClC,IAAA,OAAA;;IAGG,EAAA,MAAA,EACD,IAAA,WAAA;AACI,SAAC;GAAA,gBAAqB,SAAO;IAC3B,OAAE,IAAA;;IAEH,CAAC;GAAA,IAAA;GAA2C,gBAAA,MAAA;;AAE1C,YAAA,CAAA,CAAA,QAAA,YAAA;;IAEH,IAAM,WAAU;AACZ,YAAK,gBAAA,MAAA;MACR,IAAQ,OAAQ;AACX,cAAS,iCAAgC,QAAQ,YAAI;;MAExD,IAAA,QAAA;AACK,cAAG,QAAY,YAAU;;MAE9B,CAAA;;IAEF,CAAA;GAAA,IAAK;GAAsF,gBAAA,SA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