@powerlines/plugin-env 0.16.63 → 0.16.65

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.
@@ -9,6 +9,7 @@ let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plug
9
9
  let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
10
10
  let _powerlines_plugin_alloy_markdown_components_markdown_file = require("@powerlines/plugin-alloy/markdown/components/markdown-file");
11
11
  let _powerlines_plugin_alloy_markdown_components_markdown_table = require("@powerlines/plugin-alloy/markdown/components/markdown-table");
12
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
12
13
 
13
14
  //#region src/components/docs.tsx
14
15
  /**
@@ -17,28 +18,42 @@ let _powerlines_plugin_alloy_markdown_components_markdown_table = require("@powe
17
18
  function EnvDocsFile(props) {
18
19
  const { levelOffset = 0, reflection, ...rest } = props;
19
20
  const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
20
- return <_powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile path={(0, _stryke_path_join.joinPaths)(require_helpers_docs_helper.getDocsOutputPath(context), "env.md")} {...rest}>
21
- <_alloy_js_markdown.Heading level={1 + levelOffset}>Environment Configuration</_alloy_js_markdown.Heading>
22
- {_alloy_js_core.code`Below is a list of environment variables used by the`}
23
- <_alloy_js_core.Show when={!!context.packageJson.name}>
24
- <_alloy_js_markdown.Link href={`https://www.npmjs.com/package/${context.packageJson.name}`} title={context.packageJson.name} />
25
- </_alloy_js_core.Show>
26
- {_alloy_js_core.code`package. These values can be updated in the \`.env\` file in the root of the project.`}
27
- <_powerlines_plugin_alloy_core_components_spacing.Spacing />
28
- <_alloy_js_markdown.Heading level={2 + levelOffset}>Environment Variables</_alloy_js_markdown.Heading>
29
- <_powerlines_plugin_alloy_core_components_spacing.Spacing />
30
- {_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.`}
31
- <_powerlines_plugin_alloy_core_components_spacing.Spacing />
32
- <_powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable data={reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
33
- return {
34
- name: reflectionProperty.getNameAsString().trim(),
35
- description: (reflectionProperty.getDescription() ?? "").trim(),
36
- type: (0, _powerlines_deepkit_vendor_type.stringifyType)(reflectionProperty.getType()).trim().replaceAll(" | ", ", or "),
37
- defaultValue: reflectionProperty.hasDefault() ? String(reflectionProperty.getDefaultValue())?.includes("\"") ? reflectionProperty.getDefaultValue() : `\`${reflectionProperty.getDefaultValue()}\`` : "",
38
- required: reflectionProperty.isValueRequired() ? "" : "✔"
39
- };
40
- }) ?? []} />
41
- </_powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile>;
21
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile, {
22
+ path: (0, _stryke_path_join.joinPaths)(require_helpers_docs_helper.getDocsOutputPath(context), "env.md"),
23
+ ...rest,
24
+ children: [
25
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_markdown.Heading, {
26
+ level: 1 + levelOffset,
27
+ children: "Environment Configuration"
28
+ }),
29
+ _alloy_js_core.code`Below is a list of environment variables used by the`,
30
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
31
+ when: !!context.packageJson.name,
32
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_markdown.Link, {
33
+ href: `https://www.npmjs.com/package/${context.packageJson.name}`,
34
+ title: context.packageJson.name
35
+ })
36
+ }),
37
+ _alloy_js_core.code`package. These values can be updated in the \`.env\` file in the root of the project.`,
38
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
39
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_markdown.Heading, {
40
+ level: 2 + levelOffset,
41
+ children: "Environment Variables"
42
+ }),
43
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
44
+ _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.`,
45
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
46
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { data: reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
47
+ return {
48
+ name: reflectionProperty.getNameAsString().trim(),
49
+ description: (reflectionProperty.getDescription() ?? "").trim(),
50
+ type: (0, _powerlines_deepkit_vendor_type.stringifyType)(reflectionProperty.getType()).trim().replaceAll(" | ", ", or "),
51
+ defaultValue: reflectionProperty.hasDefault() ? String(reflectionProperty.getDefaultValue())?.includes("\"") ? reflectionProperty.getDefaultValue() : `\`${reflectionProperty.getDefaultValue()}\`` : "",
52
+ required: reflectionProperty.isValueRequired() ? "" : "✔"
53
+ };
54
+ }) ?? [] })
55
+ ]
56
+ });
42
57
  }
43
58
 
44
59
  //#endregion
@@ -7,6 +7,7 @@ import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
7
7
  import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
8
8
  import { MarkdownFile } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
9
9
  import { MarkdownTable } from "@powerlines/plugin-alloy/markdown/components/markdown-table";
10
+ import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
10
11
 
11
12
  //#region src/components/docs.tsx
12
13
  /**
@@ -15,28 +16,42 @@ import { MarkdownTable } from "@powerlines/plugin-alloy/markdown/components/mark
15
16
  function EnvDocsFile(props) {
16
17
  const { levelOffset = 0, reflection, ...rest } = props;
17
18
  const context = usePowerlines();
18
- return <MarkdownFile path={joinPaths(getDocsOutputPath(context), "env.md")} {...rest}>
19
- <Heading level={1 + levelOffset}>Environment Configuration</Heading>
20
- {code`Below is a list of environment variables used by the`}
21
- <Show when={!!context.packageJson.name}>
22
- <Link href={`https://www.npmjs.com/package/${context.packageJson.name}`} title={context.packageJson.name} />
23
- </Show>
24
- {code`package. These values can be updated in the \`.env\` file in the root of the project.`}
25
- <Spacing />
26
- <Heading level={2 + levelOffset}>Environment Variables</Heading>
27
- <Spacing />
28
- {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.`}
29
- <Spacing />
30
- <MarkdownTable data={reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
31
- return {
32
- name: reflectionProperty.getNameAsString().trim(),
33
- description: (reflectionProperty.getDescription() ?? "").trim(),
34
- type: stringifyType(reflectionProperty.getType()).trim().replaceAll(" | ", ", or "),
35
- defaultValue: reflectionProperty.hasDefault() ? String(reflectionProperty.getDefaultValue())?.includes("\"") ? reflectionProperty.getDefaultValue() : `\`${reflectionProperty.getDefaultValue()}\`` : "",
36
- required: reflectionProperty.isValueRequired() ? "" : "✔"
37
- };
38
- }) ?? []} />
39
- </MarkdownFile>;
19
+ return /* @__PURE__ */ jsxs(MarkdownFile, {
20
+ path: joinPaths(getDocsOutputPath(context), "env.md"),
21
+ ...rest,
22
+ children: [
23
+ /* @__PURE__ */ jsx(Heading, {
24
+ level: 1 + levelOffset,
25
+ children: "Environment Configuration"
26
+ }),
27
+ code`Below is a list of environment variables used by the`,
28
+ /* @__PURE__ */ jsx(Show, {
29
+ when: !!context.packageJson.name,
30
+ children: /* @__PURE__ */ jsx(Link, {
31
+ href: `https://www.npmjs.com/package/${context.packageJson.name}`,
32
+ title: context.packageJson.name
33
+ })
34
+ }),
35
+ code`package. These values can be updated in the \`.env\` file in the root of the project.`,
36
+ /* @__PURE__ */ jsx(Spacing, {}),
37
+ /* @__PURE__ */ jsx(Heading, {
38
+ level: 2 + levelOffset,
39
+ children: "Environment Variables"
40
+ }),
41
+ /* @__PURE__ */ jsx(Spacing, {}),
42
+ 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.`,
43
+ /* @__PURE__ */ jsx(Spacing, {}),
44
+ /* @__PURE__ */ jsx(MarkdownTable, { data: reflection?.getProperties().filter((property) => property.getNameAsString() !== "__POWERLINES_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
45
+ return {
46
+ name: reflectionProperty.getNameAsString().trim(),
47
+ description: (reflectionProperty.getDescription() ?? "").trim(),
48
+ type: stringifyType(reflectionProperty.getType()).trim().replaceAll(" | ", ", or "),
49
+ defaultValue: reflectionProperty.hasDefault() ? String(reflectionProperty.getDefaultValue())?.includes("\"") ? reflectionProperty.getDefaultValue() : `\`${reflectionProperty.getDefaultValue()}\`` : "",
50
+ required: reflectionProperty.isValueRequired() ? "" : "✔"
51
+ };
52
+ }) ?? [] })
53
+ ]
54
+ });
40
55
  }
41
56
 
42
57
  //#endregion
@@ -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":";;;;;;;;;;;;;;AAoDA,SAAgB,YAAY,OAAyB;CACnD,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS;CAEjD,MAAM,UAAU,eAAiC;AAEjD,QACE,CAAC,aACC,MAAM,UAAU,kBAAkB,QAAQ,EAAE,SAAS,MACjD,MAAM;MACV,CAAC,QAAQ,OAAO,IAAI,aAAa,yBAAyB,EAAE,QAAQ;OACnE,IAAI,uDAAuD;MAC5D,CAAC,KAAK,MAAM,CAAC,CAAC,QAAQ,YAAY,MAAM;QACtC,CAAC,KACC,MAAM,iCAAiC,QAAQ,YAAY,QAC3D,OAAO,QAAQ,YAAY,QAC3B;MACJ,EAAE,KAAK;OACN,IAAI,wFAAwF;MAC7F,CAAC,UAAU;MACX,CAAC,QAAQ,OAAO,IAAI,aAAa,qBAAqB,EAAE,QAAQ;MAChE,CAAC,UAAU;OACV,IAAI,ySAAyS;MAC9S,CAAC,UAAU;MACX,CAAC,cACC,MACE,YACI,eAAe,CAChB,QACC,aACE,SAAS,iBAAiB,KAAK,0BAClC,CACA,MAAM,GAAG,MACR,EAAE,iBAAiB,CAAC,cAAc,EAAE,iBAAiB,CAAC,CACvD,CACA,KAAI,uBAAsB;AACzB,SAAO;GACL,MAAM,mBAAmB,iBAAiB,CAAC,MAAM;GACjD,cAAc,mBAAmB,gBAAgB,IAAI,IAAI,MAAM;GAC/D,MAAM,cAAc,mBAAmB,SAAS,CAAC,CAC9C,MAAM,CACN,WAAW,OAAO,QAAQ;GAC7B,cAAc,mBAAmB,YAAY,GACzC,OAAO,mBAAmB,iBAAiB,CAAC,EAAE,SAAS,KAAI,GACzD,mBAAmB,iBAAiB,GACpC,KAAK,mBAAmB,iBAAiB,CAAC,MAC5C;GACJ,UAAU,mBAAmB,iBAAiB,GAAG,KAAK;GACvD;GACD,IAAI,EAAE,IAEZ;IACJ,EAAE"}
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":";;;;;;;;;;;;;;;AAoDA,SAAgB,YAAY,OAAyB;CACnD,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS;CAEjD,MAAM,UAAU,eAAiC;AAEjD,QACE,qBAAC,cAAD;EACE,MAAM,UAAU,kBAAkB,QAAQ,EAAE,SAAS;EACrD,GAAI;YAFN;GAGE,oBAAC,SAAD;IAAS,OAAO,IAAI;cAAa;IAAmC;GACnE,IAAI;GACL,oBAAC,MAAD;IAAM,MAAM,CAAC,CAAC,QAAQ,YAAY;cAChC,oBAAC,MAAD;KACE,MAAM,iCAAiC,QAAQ,YAAY;KAC3D,OAAO,QAAQ,YAAY;KAC3B;IACG;GACN,IAAI;GACL,oBAAC,SAAD,EAAW;GACX,oBAAC,SAAD;IAAS,OAAO,IAAI;cAAa;IAA+B;GAChE,oBAAC,SAAD,EAAW;GACV,IAAI;GACL,oBAAC,SAAD,EAAW;GACX,oBAAC,eAAD,EACE,MACE,YACI,eAAe,CAChB,QACC,aACE,SAAS,iBAAiB,KAAK,0BAClC,CACA,MAAM,GAAG,MACR,EAAE,iBAAiB,CAAC,cAAc,EAAE,iBAAiB,CAAC,CACvD,CACA,KAAI,uBAAsB;AACzB,WAAO;KACL,MAAM,mBAAmB,iBAAiB,CAAC,MAAM;KACjD,cAAc,mBAAmB,gBAAgB,IAAI,IAAI,MAAM;KAC/D,MAAM,cAAc,mBAAmB,SAAS,CAAC,CAC9C,MAAM,CACN,WAAW,OAAO,QAAQ;KAC7B,cAAc,mBAAmB,YAAY,GACzC,OAAO,mBAAmB,iBAAiB,CAAC,EAAE,SAAS,KAAI,GACzD,mBAAmB,iBAAiB,GACpC,KAAK,mBAAmB,iBAAiB,CAAC,MAC5C;KACJ,UAAU,mBAAmB,iBAAiB,GAAG,KAAK;KACvD;KACD,IAAI,EAAE,EAEZ;GACW"}