@powerlines/plugin-env 0.13.57 → 0.13.59
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.
- package/README.md +5 -1
- package/dist/config-BgxhYOhP.d.mts +1 -2
- package/dist/config-DO3dqNWo.d.cts +1 -2
- package/dist/create-reflection-resource-BQ5mItFl.d.mts +1 -2
- package/dist/create-reflection-resource-Cwclmcyo.d.cts +1 -2
- package/dist/create-reflection-resource-UtOwX4Ml.mjs +1 -2
- package/dist/docs-BDiEhcDa.mjs +1 -2
- package/dist/docs-BoZkRBO4.d.cts +1 -2
- package/dist/docs-BwK6pC_c.d.mts +1 -2
- package/dist/env-BpSAx122.d.mts +1 -2
- package/dist/env-D4MK9BWK.mjs +1 -2
- package/dist/env-Mgv4u8VY.d.cts +1 -2
- package/dist/index-DPDDjaRF.d.cts +1 -2
- package/dist/index-DZnZEdDI.d.mts +1 -2
- package/dist/index.mjs +1 -2
- package/dist/load-BZTlThWg.mjs +1 -2
- package/dist/load-C4lA54bJ.d.mts +1 -2
- package/dist/load-CN-Mm8-g.d.cts +1 -2
- package/dist/persistence-Br-YMVb1.mjs +1 -2
- package/dist/persistence-CeAmYbDK.d.cts +1 -2
- package/dist/persistence-DSKai3M7.d.mts +1 -2
- package/dist/plugin-CYiqhftf.d.cts +1 -2
- package/dist/plugin-CdupbOcS.d.mts +1 -2
- package/dist/plugin-Cx61c9gw.mjs +1 -2
- package/dist/reflect-biXSZqcW.d.mts +1 -2
- package/dist/reflect-gaw4hJ9H.d.cts +1 -2
- package/dist/runtime-BWa_ko5I.d.mts +1 -2
- package/dist/runtime-BYdaCpVq.d.cts +1 -2
- package/dist/source-file-CjFSCK1w.mjs +1 -2
- package/dist/source-file-env-BDFTs5WJ.mjs +1 -2
- package/dist/source-file-env-DonDJDV1.d.cts +1 -2
- package/dist/source-file-env-DzpWKluw.d.mts +1 -2
- package/dist/template-helpers-BaMJZc5X.d.cts +1 -2
- package/dist/template-helpers-CLrM_TtO.mjs +1 -2
- package/dist/template-helpers-LJwCi0e-.d.mts +1 -2
- package/dist/type-CnPIyotQ.d.mts +1 -2
- package/dist/type-D6dRgWJT.d.cts +1 -2
- package/dist/utilities-4S--uN0L.mjs +1 -2
- package/package.json +11 -11
- package/dist/config-BgxhYOhP.d.mts.map +0 -1
- package/dist/config-DO3dqNWo.d.cts.map +0 -1
- package/dist/create-reflection-resource-BQ5mItFl.d.mts.map +0 -1
- package/dist/create-reflection-resource-Cwclmcyo.d.cts.map +0 -1
- package/dist/create-reflection-resource-UtOwX4Ml.mjs.map +0 -1
- package/dist/docs-BDiEhcDa.mjs.map +0 -1
- package/dist/docs-BoZkRBO4.d.cts.map +0 -1
- package/dist/docs-BwK6pC_c.d.mts.map +0 -1
- package/dist/env-BpSAx122.d.mts.map +0 -1
- package/dist/env-D4MK9BWK.mjs.map +0 -1
- package/dist/env-Mgv4u8VY.d.cts.map +0 -1
- package/dist/index-DPDDjaRF.d.cts.map +0 -1
- package/dist/index-DZnZEdDI.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/load-BZTlThWg.mjs.map +0 -1
- package/dist/load-C4lA54bJ.d.mts.map +0 -1
- package/dist/load-CN-Mm8-g.d.cts.map +0 -1
- package/dist/persistence-Br-YMVb1.mjs.map +0 -1
- package/dist/persistence-CeAmYbDK.d.cts.map +0 -1
- package/dist/persistence-DSKai3M7.d.mts.map +0 -1
- package/dist/plugin-CYiqhftf.d.cts.map +0 -1
- package/dist/plugin-CdupbOcS.d.mts.map +0 -1
- package/dist/plugin-Cx61c9gw.mjs.map +0 -1
- package/dist/reflect-biXSZqcW.d.mts.map +0 -1
- package/dist/reflect-gaw4hJ9H.d.cts.map +0 -1
- package/dist/runtime-BWa_ko5I.d.mts.map +0 -1
- package/dist/runtime-BYdaCpVq.d.cts.map +0 -1
- package/dist/source-file-CjFSCK1w.mjs.map +0 -1
- package/dist/source-file-env-BDFTs5WJ.mjs.map +0 -1
- package/dist/source-file-env-DonDJDV1.d.cts.map +0 -1
- package/dist/source-file-env-DzpWKluw.d.mts.map +0 -1
- package/dist/template-helpers-BaMJZc5X.d.cts.map +0 -1
- package/dist/template-helpers-CLrM_TtO.mjs.map +0 -1
- package/dist/template-helpers-LJwCi0e-.d.mts.map +0 -1
- package/dist/type-CnPIyotQ.d.mts.map +0 -1
- package/dist/type-D6dRgWJT.d.cts.map +0 -1
- package/dist/utilities-4S--uN0L.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs-BDiEhcDa.mjs","names":["code","getContext","Show","splitProps","Link","SingleLineComment","SourceFile","MarkdownFile","props","children","preset","rest","nodeContext","meta","output","_$createComponent","_$mergeProps","header","MarkdownFileHeader","filetype","reference","when","Boolean","disableEslint","disableBiome","disablePrettier","variant","_$createIntrinsic","createContext","createNamedContext","useContext","MarkdownTableColumnContext","useMarkdownTableColumn","MarkdownTableContext","columns","data","useMarkdownTable","code","computed","Prose","Show","splitProps","titleCase","isUndefined","MarkdownTableContext","useMarkdownTable","MarkdownTable","props","children","data","columns","Object","keys","map","name","index","align","width","_$createComponent","Provider","value","when","Boolean","MarkdownTableColumn","tableContext","columnRef","find","c","indexRef","alignRef","widthRef","textLength","content","toString","length","repeat","MarkdownTableColumnHeader","rest","_$mergeProps","fallback","useDescriptions","code","Show","Heading","Link","usePowerlines","MarkdownFile","MarkdownTable","stringifyType","joinPaths","createReflectionResource","EnvDocs","context","reflection","_$createComponent","path","config","projectRoot","children","level","when","packageJson","name","href","title","_$createIntrinsic","data","getProperties","filter","property","getNameAsString","sort","a","b","localeCompare","map","reflectionProperty","trim","description","getDescription","type","getType","replaceAll","defaultValue","hasDefault","String","getDefaultValue","includes","required","isValueRequired"],"sources":["../../alloy/src/markdown/components/markdown-file.tsx","../../alloy/src/markdown/contexts/markdown-table.ts","../../alloy/src/markdown/components/markdown-table.tsx","../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, getContext, Show, splitProps } from \"@alloy-js/core\";\nimport { Link } from \"@alloy-js/markdown\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { ComponentProps, SourceFileHeaderProps } from \"../../types/components\";\n\nexport type MarkdownFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps;\n\n/**\n * A base component representing a Powerlines generated markdown source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function MarkdownFile(props: MarkdownFileProps) {\n const [{ children, preset }, rest] = splitProps(props, [\n \"children\",\n \"preset\"\n ]);\n\n const nodeContext = getContext()!;\n nodeContext.meta ??= {};\n nodeContext.meta.output = {\n preset\n };\n\n return (\n <SourceFile\n header={<MarkdownFileHeader />}\n {...rest}\n filetype=\"md\"\n reference={Link}>\n <Show when={Boolean(children)}>{children}</Show>\n </SourceFile>\n );\n}\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function MarkdownFileHeader(props: SourceFileHeaderProps) {\n const [\n {\n children,\n disableEslint = true,\n disableBiome = true,\n disablePrettier = false\n }\n ] = splitProps(props, [\n \"children\",\n \"disableEslint\",\n \"disableBiome\",\n \"disablePrettier\"\n ]);\n\n return (\n <>\n <Show when={Boolean(disableEslint)}>\n <SingleLineComment variant=\"markdown\">\n {\"eslint-disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disablePrettier)}>\n <SingleLineComment variant=\"markdown\">\n {\"prettier-ignore\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disableBiome)}>\n <SingleLineComment variant=\"markdown\">\n {\"biome-ignore lint: disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show\n when={\n Boolean(disableEslint) ||\n Boolean(disablePrettier) ||\n Boolean(disableBiome)\n }>\n <hbr />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment variant=\"markdown\">\n {code`Generated by Powerlines`}\n </SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"markdown\">\n {code`NOTE: Do not edit this file manually - it will be overwritten automatically by the \"storm prepare\" command`}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n","/* -------------------------------------------------------------------\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 type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"markdown-table-column\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n } as MarkdownTableContextInterface);\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n","/* -------------------------------------------------------------------\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, computed, Prose, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n MarkdownTableColumnContextInterface,\n MarkdownTableContext,\n useMarkdownTable\n} from \"../contexts/markdown-table\";\n\nexport interface MarkdownTableProps<\n T extends Record<string, any> = Record<string, any>\n> extends ComponentProps {\n data: T[];\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTable<\n T extends Record<string, any> = Record<string, any>\n>(props: MarkdownTableProps<T>) {\n const [{ children, data }] = splitProps(props, [\"children\", \"data\"]);\n\n const columns = computed(() =>\n Object.keys(data).map((name: string, index: number) => ({\n index,\n name,\n align: \"left\" as const,\n width: 20\n }))\n );\n\n return (\n <MarkdownTableContext.Provider value={{ columns: columns.value, data }}>\n <Show when={Boolean(children)}>{children}</Show>\n </MarkdownTableContext.Provider>\n );\n}\n\nexport type MarkdownTableColumnProps = ComponentProps &\n Partial<Pick<MarkdownTableColumnContextInterface, \"align\">> &\n Required<Pick<MarkdownTableColumnContextInterface, \"name\">> & {\n width?: number;\n };\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumn(props: MarkdownTableColumnProps) {\n const [{ children, width, align, name }] = splitProps(props, [\n \"children\",\n \"width\",\n \"align\",\n \"name\"\n ]);\n\n const tableContext = useMarkdownTable();\n const columnRef = computed(() =>\n tableContext?.columns.find(c => c.name === name)\n );\n\n const indexRef = computed(() => columnRef.value?.index ?? 0);\n const alignRef = computed(() => columnRef.value?.align ?? align ?? \"left\");\n const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);\n\n const textLength = computed(() => {\n const content = children ? children.toString() : \"\";\n\n return content.length;\n });\n\n return (\n <Prose>\n <Show when={indexRef.value === 0}>{\"|\"}</Show>\n <Show when={Boolean(children)}>\n <Prose>{code`${\n alignRef.value === \"left\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }${children}${\n alignRef.value === \"right\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }`}</Prose>\n </Show>\n {\"|\"}\n </Prose>\n );\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumnHeader(props: MarkdownTableColumnProps) {\n const [{ children, name }, rest] = splitProps(props, [\"children\", \"name\"]);\n\n return (\n <>\n <MarkdownTableColumn {...rest} name={name}>\n <Show\n fallback={titleCase(name, {\n useDescriptions: false\n })}\n when={!isUndefined(children)}>\n {children}\n </Show>\n </MarkdownTableColumn>\n </>\n );\n}\n","/* -------------------------------------------------------------------\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 { usePowerlines } from \"@powerlines/alloy/core/contexts/context\";\nimport { MarkdownFile } from \"@powerlines/alloy/markdown/components/markdown-file\";\nimport { MarkdownTable } from \"@powerlines/alloy/markdown/components/markdown-table\";\nimport { stringifyType } from \"@powerlines/deepkit/vendor/type\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { createReflectionResource } from \"../helpers/create-reflection-resource\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Generates the environment configuration markdown documentation for the Powerlines project.\n */\nexport function EnvDocs() {\n const context = usePowerlines<EnvPluginContext>();\n if (!context) {\n return null;\n }\n\n // Clean and recreate the output directories\n const reflection = createReflectionResource(context);\n\n return (\n <MarkdownFile\n path={joinPaths(\n context.config.projectRoot,\n \"docs\",\n \"generated\",\n \"env.md\"\n )}>\n <Heading level={1}>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 <hbr />\n <Heading level={2}>Environment Variables</Heading>\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 <hbr />\n <MarkdownTable\n data={\n reflection.data\n ?.getProperties()\n .filter(\n property => property.getNameAsString() !== \"__STORM_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":"ipBAiCA,SAAgBO,EAAaC,EAA0B,CACrD,GAAM,CAAC,CAAEC,WAAUC,UAAUC,GAAQR,EAAWK,EAAO,CACrD,WACA,SACD,CAAC,CAEII,EAAcX,GAAa,CAMjC,MALAW,GAAYC,OAAS,EAAE,CACvBD,EAAYC,KAAKC,OAAS,CACxBJ,SACD,CAEDK,EACGT,EAAUU,EAAA,CAAA,IACTC,QAAM,CAAA,OAAAF,EAAGG,EAAkB,EAAA,CAAA,EAAA,CACvBP,EAAI,CACRQ,SAAQ,KACRC,UAAWhB,EAAI,IAAAK,UAAA,CAAA,OAAAM,EACdb,EAAI,CAAA,IAACmB,MAAI,CAAA,MAAEC,EAAQb,GAAYA,WAAQ,CAAA,EAAA,CAAA,CAAA,CAW9C,SAAgBS,EAAmBV,EAA8B,CAC/D,GAAM,CACJ,CACEC,WACAc,gBAAgB,GAChBC,eAAe,GACfC,kBAAkB,KAElBtB,EAAWK,EAAO,CACpB,WACA,gBACA,eACA,kBACD,CAAC,CAEF,MAAA,CAAAO,EAEKb,EAAI,CAAA,IAACmB,MAAI,CAAA,MAAEC,EAAQC,GAAc,IAAAd,UAAA,CAAA,MAAA,CAAAM,EAC/BV,EAAiB,CAACqB,QAAO,WAAAjB,SACvB,iBAAgB,CAAA,CAAAkB,EAAA,MAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAAZ,EAIpBb,EAAI,CAAA,IAACmB,MAAI,CAAA,MAAEC,EAAQG,GAAgB,IAAAhB,UAAA,CAAA,MAAA,CAAAM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A,EAAAA,EAAAA,eAAoBJ,EAAmBK,SAAS,CAAC,CAC9CJ,MAAM,CACNK,WAAW,MAAO,QAAQ,CAC7BC,aAAcP,EAAmBQ,YAAY,CACzCC,OAAOT,EAAmBU,iBAAiB,CAAC,EAAEC,SAAS,IAAI,CACzDX,EAAmBU,iBAAiB,CACpC,KAAKV,EAAmBU,iBAAiB,CAAA,IAC3C,GACJE,SAAUZ,EAAmBa,iBAAiB,CAAG,GAAK,IACvD,EACD,EAAI,EAAE,EAAA,CAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs-BoZkRBO4.d.cts","names":[],"sources":["../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;;AA+BgB,iBAAA,OAAA,CAAA,CAAO,EAAA,eAAA,CAAA,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs-BwK6pC_c.d.mts","names":[],"sources":["../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;;AA+BgB,iBAAA,OAAA,CAAA,CAAO,EAAA,eAAA,CAAA,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-BpSAx122.d.mts","names":[],"sources":["../../alloy/src/types/components.ts","../../alloy/src/typescript/components/tsdoc.tsx","../../alloy/src/core/components/source-file.tsx","../../alloy/src/typescript/components/typescript-file.tsx","../../alloy/src/typescript/components/builtin-file.tsx","../../alloy/src/typescript/components/typescript-interface.tsx","../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;UA6GiB,cAAA;aACJ;;UAuBI,wBAAA;;;;;;KAOL,qBAAA,GAAwB,sBAE3B,MAAM;;;;UCkSE,gBAAA,SAAyB;;;;;;;;;;;;;;;;;;QAmBlC;;;;KClaI,iBAAA,GAAkB,kBAC5B;;;;AF2EF;AAwBA;EAOY,MAAA,CAAA,EEpGC,aFoGD;EAEG;;;;;;SE9FJ;ADgYX,CAAA;;;KEhYY,mBAAA,GAAsB,KAAK,iCACrC;WACW;YACC;EH0DG,MAAA,CAAA,EAAA,OAAA,GAAc,MAAA;EAwBd,GAAA,CAAA,EAAA,OAAA;AAOjB,CAAA;;;KIhHY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;;;AJgFP;AAwBA;EAOY,EAAA,EAAA,MAAA;EAEG;;;EAF2B,WAAA,CAAA,EAAA,MAAA;;;;ACoS1C;;;;;;UIvYiB,mCACL,sBAAsB,6BACxB,2BACN;cACU,cAAA,CAAA,gBAAgB;iBACb,QAAQ;;;;;;;iBC0BT,iBAAA,QACP,KAAK,oCAAiC;ANoC9B,UMuJA,eAAA,SAAwB,INtJpB,CMsJyB,gBNtJzB,EAAA,IAAA,CAAA,CAAA;EAuBJ,aAAA,CAAA,EMgIC,UNhID;AAOjB;;;;AAA0C,iBMmI1B,UAAA,CNnI0B,KAAA,EMmIR,eNnIQ,CAAA,EMmIO,UNnIP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-D4MK9BWK.mjs","names":["refkey","refkeyExternal","args","childrenArray","For","List","Prose","Show","splitProps","stringifyDefaultValue","isSetString","isUndefined","usePowerlines","TSDoc","props","children","heading","_$createIntrinsic","string","_$createComponent","when","_$memo","length","TSDocTag","tag","Boolean","width","TSDocParams","parameters","normalizeParametersForDoc","each","param","TSDocParam","name","optional","doc","some","p","TSDocTitle","rest","_$mergeProps","TSDocDomain","TSDocAlias","TSDocPermission","TSDocDefaultValue","value","TSDocRemarks","hardline","TSDocLink","TSDocExample","tsx","fenced","language","TSDocReadonly","TSDocInternal","TSDocIgnore","TSDocHidden","TSDocAttributesTags","title","alias","permission","domain","readonly","internal","ignore","hidden","defaultValue","TSDocParamName","TSDocParamDescription","TSDocReturns","TSDocThrows","TSDocModule","prefix","context","config","output","builtinPrefix","code","Scope","Show","SourceDirectoryContext","splitProps","useContext","useScope","getSourceDirectoryData","ImportStatements","PackageContext","SourceFileContext","TSModuleScope","useSourceFile","appendPath","isBoolean","isString","SingleLineComment","SourceFile","TypescriptFile","props","children","path","imports","tsx","header","rest","directoryContext","sdData","modulePath","scope","modules","add","pkg","addModule","export","addExport","_$createComponent","Provider","value","_$mergeProps","TypescriptFileHeader","TypescriptFileHeaderImports","filetype","disableEslint","disableBiome","disablePrettier","when","Boolean","_$createIntrinsic","variant","sourceFile","importedModules","size","Object","keys","length","entries","map","module","imported","filter","i","default","alias","name","join","records","splitProps","TSDocModule","TypescriptFile","TypescriptFileHeader","TypescriptFileHeaderImports","BuiltinFile","props","children","imports","id","description","tsx","rest","_$createComponent","_$mergeProps","header","name","meta","builtin","path","createContext","createNamedContext","useContext","ReflectionClassContext","useReflectionClass","context","Error","ReflectionPropertyContext","useReflectionProperty","ReflectionMethodContext","useReflectionMethod","ReflectionParameterContext","useReflectionParameter","childrenArray","code","computed","List","Show","splitProps","titleCase","isSetString","isString","isUndefined","useReflectionClass","useReflectionMethod","useReflectionProperty","TSDoc","TSDocAttributesTags","TSDocReflectionClass","props","children","rest","reflectionClass","title","reflection","getTitle","getName","alias","getAlias","domain","getDomain","permission","getPermission","readonly","isReadonly","internal","isInternal","ignore","isIgnored","hidden","isHidden","_$createComponent","_$mergeProps","heading","getDescription","when","value","length","_$memo","Boolean","TSDocReflectionProperty","context","TSDocReflectionMethod","String","undefined","computed","For","splitProps","InterfaceDeclaration","InterfaceMember","stringifyType","pascalCase","ReflectionClassContext","ReflectionPropertyContext","TSDocReflectionClass","TSDocReflectionProperty","TypeScriptInterface","props","name","reflection","rest","interfaceName","getName","properties","getProperties","filter","item","isIgnored","sort","a","b","isReadonly","getNameAsString","localeCompare","_$createComponent","Provider","value","children","_$mergeProps","each","doubleHardline","semicolon","prop","TypescriptInterfaceProperty","property","readonly","optional","isOptional","nullish","isNullable","type","getType","computed","Declaration","CoreDeclaration","createSymbolSlot","For","Name","Show","splitProps","createValueSymbol","ObjectExpression","ObjectProperty","TSSymbolFlags","TypeRefContext","useTSNamePolicy","stringifyDefaultValue","camelCase","pascalCase","isUndefined","ReflectionClassContext","ReflectionPropertyContext","TSDocReflectionClass","TSDocReflectionProperty","TypescriptObject","props","reflection","value","objectName","name","getName","objectType","type","properties","getProperties","filter","item","isIgnored","defaultValue","getNameAsString","getAlias","reduce","ret","alias","undefined","getDefaultValue","sort","a","b","isReadonly","localeCompare","TypeSymbolSlot","ValueTypeSymbolSlot","sym","refkeys","refkey","default","export","metadata","tsFlags","nullish","Nullish","None","firstSymbol","namePolicy","for","moveMembersTo","keyword","var","let","_$createComponent","children","when","Provider","override","symbol","_$memo","initializer","each","comma","doubleHardline","prop","TypescriptObjectProperty","property","_$createIntrinsic","code","computed","For","Show","splitProps","ClassDeclaration","ClassMethod","ElseIfClause","FunctionDeclaration","IfStatement","NewExpression","TypeDeclaration","VarDeclaration","usePowerlines","refkey","BuiltinFile","TSDoc","TSDocExample","TSDocLink","TSDocParam","TSDocRemarks","TSDocReturns","TSDocThrows","TypeScriptInterface","TypescriptObject","ReflectionClass","ReflectionKind","titleCase","isNull","defu","createReflectionResource","loadEnvFromContext","EnvTypeDefinition","props","defaultValue","reflection","context","_$createComponent","name","_$createIntrinsic","children","config","env","prefix","map","replace","join","ConfigPropertyConditional","sort","a","b","startsWith","localeCompare","toLowerCase","ConfigPropertyGet","property","index","condition","getNameAsString","when","_$memo","getAlias","length","each","joiner","alias","ConfigPropertySet","createEnvRefkey","envRefkey","envSerializerRefkey","EnvBuiltin","defaultConfig","rest","process","envInstance","result","kind","objectLiteral","description","types","data","undefined","reflectionGetProperties","getProperties","filter","isIgnored","reflectionSetProperties","isReadonly","_$mergeProps","id","imports","value","type","heading","initializer","args","target","Boolean","entryPath","async","parameters","optional","default","returnType","ender"],"sources":["../../alloy/src/helpers/refkey.ts","../../alloy/src/typescript/components/tsdoc.tsx","../../alloy/src/typescript/components/typescript-file.tsx","../../alloy/src/typescript/components/builtin-file.tsx","../../alloy/src/core/contexts/reflection.ts","../../alloy/src/typescript/components/tsdoc-reflection.tsx","../../alloy/src/typescript/components/typescript-interface.tsx","../../alloy/src/typescript/components/typescript-object.tsx","../src/components/env.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 { Refkey, refkey as refkeyExternal } from \"@alloy-js/core\";\n\n/**\n * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.\n *\n * @remarks\n * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`\n */\nexport function refkey(...args: unknown[]): Refkey {\n return refkeyExternal(\"powerlines\", ...args);\n}\n","/* -------------------------------------------------------------------\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 childrenArray,\n For,\n List,\n Prose,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { JSDocExampleProps, ParameterDescriptor } from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { usePowerlines } from \"../../core/contexts/context\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport interface TSDocProps extends ComponentProps {\n heading?: Children;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TSDoc(props: TSDocProps) {\n const [{ children, heading }] = splitProps(props, [\"children\", \"heading\"]);\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={!isUndefined(heading)}>\n {heading}\n <hbr />\n <Show\n when={\n !isUndefined(children) && childrenArray(() => children).length > 0\n }>\n <hbr />\n </Show>\n </Show>\n <Show\n when={\n !isUndefined(children) && childrenArray(() => children).length > 0\n }>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </align>\n <hbr />\n {` */`}\n <hbr />\n </>\n );\n}\n\nexport interface TSDocTagProps extends ComponentProps {\n tag: string;\n}\n\n/**\n * Create a TSDoc `@<props.tag>` tag.\n */\nexport function TSDocTag(props: TSDocTagProps) {\n const [{ children, tag }] = splitProps(props, [\"children\", \"tag\"]);\n\n return (\n <>\n {`@${tag} `}\n <Show when={Boolean(children)}>\n <align width={2}>\n <Prose>{children}</Prose>\n </align>\n </Show>\n <hbr />\n </>\n );\n}\n\nexport interface TSDocParamsProps {\n parameters: ParameterDescriptor[] | string[];\n}\n\n/**\n * A component that creates a TSDoc block with `@param` tags for each parameter.\n */\nexport function TSDocParams(props: TSDocParamsProps) {\n const parameters = normalizeParametersForDoc(props.parameters);\n\n return (\n <For each={parameters}>\n {param => (\n <TSDocParam name={param.name} optional={param.optional}>\n {param.doc}\n </TSDocParam>\n )}\n </For>\n );\n}\n\nfunction normalizeParametersForDoc(\n parameters: ParameterDescriptor[] | string[]\n): ParameterDescriptor[] {\n if (parameters.some(p => typeof p === \"string\")) {\n return [];\n }\n\n return parameters as ParameterDescriptor[];\n}\n\n/**\n * Create a TSDoc `@title` tag.\n */\nexport function TSDocTitle(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"title\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@domain` tag.\n */\nexport function TSDocDomain(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"domain\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@alias` tag.\n */\nexport function TSDocAlias(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"alias\">\n {children}\n </TSDocTag>\n );\n}\n\n/**\n * Create a TSDoc `@permission` tag.\n */\nexport function TSDocPermission(props: ComponentProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <TSDocTag {...rest} tag=\"permission\">\n {children}\n </TSDocTag>\n );\n}\n\nexport interface TSDocDefaultValueProps extends ComponentProps {\n value: any;\n}\n\n/**\n * Create a TSDoc `@defaultValue` tag.\n */\nexport function TSDocDefaultValue(props: TSDocDefaultValueProps) {\n return (\n <>\n {\"@defaultValue \"}\n <Show when={!isUndefined(props.value)}>\n <align width={2}>\n <Prose>{stringifyDefaultValue(props.value)}</Prose>\n </align>\n </Show>\n <hbr />\n </>\n );\n}\n\n/**\n * Create a TSDoc `@remarks` tag.\n */\nexport function TSDocRemarks(props: ComponentProps) {\n return (\n <>\n {\"@remarks \"}\n <hbr />\n <List hardline={true}>{childrenArray(() => props.children)}</List>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@see` tag.\n */\nexport function TSDocLink(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"see\" />;\n}\n\nexport interface TSDocExampleProps extends JSDocExampleProps {\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n}\n\n/**\n * Create a TSDoc `@example` tag.\n */\nexport function TSDocExample(props: TSDocExampleProps) {\n const [{ tsx, fenced = true, language, children }] = splitProps(props, [\n \"tsx\",\n \"fenced\",\n \"language\",\n \"children\"\n ]);\n\n return (\n <>\n {\"@example \"}\n <hbr />\n <Show when={fenced}>\n ```{language || (tsx ? \"tsx\" : \"ts\")}\n <hbr />\n </Show>\n {children}\n <Show when={fenced}>\n <hbr />\n ```\n </Show>\n </>\n );\n}\n\n/**\n * Create a TSDoc `@readonly` tag.\n */\nexport function TSDocReadonly() {\n return <TSDocTag tag=\"readonly\" />;\n}\n\n/**\n * Create a TSDoc `@internal` tag.\n */\nexport function TSDocInternal() {\n return <TSDocTag tag=\"internal\" />;\n}\n\n/**\n * Create a TSDoc `@ignore` tag.\n */\nexport function TSDocIgnore() {\n return <TSDocTag tag=\"ignore\" />;\n}\n\n/**\n * Create a TSDoc `@hidden` tag.\n */\nexport function TSDocHidden() {\n return <TSDocTag tag=\"hidden\" />;\n}\n\nexport interface TSDocAttributesTagsProps {\n title?: string;\n alias?: string[];\n permission?: string[];\n domain?: string;\n readonly?: boolean;\n internal?: boolean;\n ignore?: boolean;\n hidden?: boolean;\n defaultValue?: any;\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocAttributesTags(props: TSDocAttributesTagsProps) {\n const [\n {\n title,\n alias,\n permission,\n domain,\n readonly,\n internal,\n ignore,\n hidden,\n defaultValue\n }\n ] = splitProps(props, [\n \"title\",\n \"alias\",\n \"permission\",\n \"domain\",\n \"readonly\",\n \"internal\",\n \"ignore\",\n \"hidden\",\n \"defaultValue\"\n ]);\n\n return (\n <>\n <Show when={isSetString(title)}>\n <TSDocTitle>{title}</TSDocTitle>\n </Show>\n <Show when={!isUndefined(alias) && alias.length > 0}>\n <For each={alias ?? []}>\n {alias => <TSDocAlias>{alias}</TSDocAlias>}\n </For>\n </Show>\n <Show when={isSetString(domain)}>\n <TSDocDomain>{domain}</TSDocDomain>\n </Show>\n <Show when={!isUndefined(permission) && permission.length > 0}>\n <For each={permission ?? []}>\n {permission => <TSDocPermission>{permission}</TSDocPermission>}\n </For>\n </Show>\n <Show when={readonly === true}>\n <TSDocReadonly />\n </Show>\n <Show when={internal === true}>\n <TSDocInternal />\n </Show>\n <Show when={ignore === true}>\n <TSDocIgnore />\n </Show>\n <Show when={hidden === true}>\n <TSDocHidden />\n </Show>\n <Show when={!isUndefined(defaultValue)}>\n <TSDocDefaultValue value={defaultValue} />\n </Show>\n </>\n );\n}\n\nexport interface TSDocParamProps {\n name: Children;\n children?: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\n/**\n * Create a TSDoc parameter set off with `@param`.\n */\nexport function TSDocParam(props: TSDocParamProps) {\n return (\n <>\n {\"@param \"}\n <TSDocParamName\n name={props.name}\n optional={props.optional}\n defaultValue={props.defaultValue}\n />\n <TSDocParamDescription children={props.children} />\n </>\n );\n}\n\ninterface TSDocParamNameProps {\n name: Children;\n optional?: boolean;\n defaultValue?: Children;\n}\n\nfunction TSDocParamName(props: TSDocParamNameProps) {\n return (\n <>\n <Show when={props.optional}>{\"[\"}</Show>\n {props.name}\n <Show when={Boolean(props.defaultValue)}>={props.defaultValue}</Show>\n <Show when={props.optional}>{\"]\"}</Show>\n </>\n );\n}\n\ninterface TSDocParamDescriptionProps {\n children?: Children;\n}\n\nfunction TSDocParamDescription(props: TSDocParamDescriptionProps) {\n return (\n <Show when={Boolean(props.children)}>\n {\" - \"}\n <align width={2}>\n <Prose>{props.children}</Prose>\n </align>\n </Show>\n );\n}\n\n/**\n * Create a TSDoc `@returns` tag.\n */\nexport function TSDocReturns(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"returns\" />;\n}\n\n/**\n * Create a TSDoc `@throws` tag.\n */\nexport function TSDocThrows(props: ComponentProps) {\n return <TSDocTag {...props} tag=\"throws\" />;\n}\n\nexport interface TSDocModuleProps extends ComponentProps {\n /**\n * the prefix for the builtin module name\n *\n * @defaultValue \"storm\"\n */\n prefix?: string;\n\n /**\n * The name of the module\n *\n * @remarks\n * This will be used in the `@module` tag as well as the import path for the module, e.g. `storm:<name>`.\n *\n * @example\n * ```ts\n * import { MyModule } from \"storm:my-module\";\n * ```\n */\n name: Children;\n}\n\n/**\n * Generates a TSDoc `@module` tag for the given module name.\n */\nexport function TSDocModule(props: TSDocModuleProps) {\n const [{ children, name, prefix }] = splitProps(props, [\n \"children\",\n \"name\",\n \"prefix\"\n ]);\n\n const context = usePowerlines();\n\n return (\n <>\n /**\n <align string=\" * \">\n <hbr />\n <Show when={Boolean(children)}>\n <List hardline={true}>{childrenArray(() => children)}</List>\n <hbr />\n <hbr />\n </Show>\n {\"@module \"}\n {prefix || context?.config.output.builtinPrefix}:{name}\n </align>\n <hbr />\n {` */`}\n </>\n );\n}\n","/* -------------------------------------------------------------------\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 type { Children } from \"@alloy-js/core\";\nimport {\n code,\n Scope,\n Show,\n SourceDirectoryContext,\n splitProps,\n useContext,\n useScope\n} from \"@alloy-js/core\";\nimport {\n getSourceDirectoryData,\n ImportStatements,\n PackageContext,\n SourceFileContext,\n TSModuleScope,\n useSourceFile\n} from \"@alloy-js/typescript\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { isBoolean } from \"@stryke/type-checks/is-boolean\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport {\n ComponentProps,\n SourceFileHeaderProps,\n TypescriptFileImportItem,\n TypescriptFileImports\n} from \"../../types/components\";\n\nexport type TypescriptFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n header?: Children;\n imports?: TypescriptFileImports;\n export?: boolean | string;\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function TypescriptFile(props: TypescriptFileProps) {\n const [{ children, path, imports, tsx, header }, rest] = splitProps(props, [\n \"children\",\n \"path\",\n \"imports\",\n \"tsx\",\n \"header\"\n ]);\n\n const directoryContext = useContext(SourceDirectoryContext)!;\n const sdData = getSourceDirectoryData(directoryContext);\n\n const modulePath = appendPath(path, directoryContext.path);\n const scope = new TSModuleScope(modulePath, useScope());\n sdData.modules.add(scope);\n\n const pkg = useContext(PackageContext);\n if (pkg) {\n pkg.scope.addModule(scope);\n }\n\n if (props.export) {\n if (pkg) {\n if (isBoolean(props.export)) {\n pkg.scope.addExport(modulePath, scope);\n } else {\n pkg.scope.addExport(props.export, scope);\n }\n }\n }\n\n return (\n <SourceFileContext.Provider\n value={{\n scope\n }}>\n <Scope value={scope}>\n <SourceFile\n {...rest}\n path={modulePath}\n header={\n header ?? (\n <TypescriptFileHeader>\n <TypescriptFileHeaderImports imports={imports} scope={scope} />\n </TypescriptFileHeader>\n )\n }\n filetype={tsx ? \"tsx\" : \"typescript\"}>\n {children}\n </SourceFile>\n </Scope>\n </SourceFileContext.Provider>\n );\n}\n\nexport interface TypescriptFileHeaderProps extends SourceFileHeaderProps {\n header?: Children;\n}\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function TypescriptFileHeader(props: TypescriptFileHeaderProps) {\n const {\n header,\n disableEslint = true,\n disableBiome = true,\n disablePrettier = false,\n children\n } = props;\n\n return (\n <>\n <Show when={Boolean(header)}>\n {header}\n <hbr />\n </Show>\n <hbr />\n <Show when={Boolean(disableEslint)}>\n <SingleLineComment variant=\"slash-star\">\n {\"eslint-disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disablePrettier)}>\n <SingleLineComment variant=\"slash-star\">\n {\"prettier-ignore\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disableBiome)}>\n <SingleLineComment>{\"biome-ignore lint: disable\"}</SingleLineComment>\n <hbr />\n </Show>\n <Show\n when={\n Boolean(disableEslint) ||\n Boolean(disablePrettier) ||\n Boolean(disableBiome)\n }>\n <hbr />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment>{code`Generated by Powerlines`}</SingleLineComment>\n <hbr />\n <SingleLineComment>\n {code`NOTE: Do not edit this file manually - it will be overwritten automatically by the \"storm prepare\" command`}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n\nexport interface TypescriptFileHeaderImportsProps\n extends SourceFileHeaderProps {\n imports?: TypescriptFileImports;\n scope?: TSModuleScope;\n}\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function TypescriptFileHeaderImports(\n props: TypescriptFileHeaderImportsProps\n) {\n const { imports } = props;\n\n const sourceFile = useSourceFile();\n const scope = props.scope ?? sourceFile.scope;\n\n return (\n <Show\n when={\n scope.importedModules.size > 0 ||\n (!!imports && Object.keys(imports).length > 0)\n }>\n <Show when={!!imports && Object.keys(imports).length > 0}>\n {Object.entries(imports ?? {}).map(([module, imported]) => {\n return code`import ${\n imported === null\n ? \"\"\n : (\n imported.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(i => (i.alias ? i.alias : i.name))\n .join(\", \") +\n (imported.filter(i => !isString(i) && i.default).length > 0 &&\n imported.filter(i => isString(i) || !i.default).length > 0\n ? \", \"\n : \"\") +\n (imported.filter(i => isString(i) || !i.default).length > 0\n ? `{ ${imported\n .map(i =>\n isString(i)\n ? i\n : i.alias\n ? `${i.name} as ${i.alias}`\n : i.name\n )\n .join(\", \")} }`\n : \"\")\n } from \"${module}\";`;\n })}\n </Show>\n <Show when={scope.importedModules.size > 0}>\n <ImportStatements records={scope.importedModules} />\n </Show>\n <hbr />\n </Show>\n );\n}\n","/* -------------------------------------------------------------------\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 { splitProps } from \"@alloy-js/core\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, id, description, tsx }, rest] = splitProps(\n props,\n [\"children\", \"imports\", \"id\", \"description\", \"tsx\"]\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports imports={imports} />\n </TypescriptFileHeader>\n }\n meta={{\n builtin: {\n id\n }\n }}\n {...rest}\n path={`${id}${tsx ? \".tsx\" : \".ts\"}`}>\n {children}\n </TypescriptFile>\n );\n}\n","/* -------------------------------------------------------------------\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 type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\nimport {\n ReflectionClass,\n ReflectionMethod,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionOverrideInterface } from \"../../types/components\";\n\nexport interface ReflectionClassContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n reflection: ReflectionClass<T>;\n override?: ReflectionOverrideInterface<T>;\n}\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const ReflectionClassContext: ComponentContext<\n ReflectionClassContextInterface<any>\n> = createContext<ReflectionClassContextInterface<any>>();\n\n/**\n * Hook to access the Reflection context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>() {\n const context = useContext<ReflectionClassContextInterface<T>>(\n ReflectionClassContext\n )!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - ReflectionClass Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection property context used in template rendering.\n */\nexport const ReflectionPropertyContext: ComponentContext<ReflectionProperty> =\n createNamedContext<ReflectionProperty>(\"reflection-property\");\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionProperty() {\n const context = useContext<ReflectionProperty>(ReflectionPropertyContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Property Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection method context used in template rendering.\n */\nexport const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n createNamedContext<ReflectionMethod>(\"reflection-method\");\n\n/**\n * Hook to access the Reflection Method context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionMethod() {\n const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Method Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n createNamedContext<ReflectionParameter>(\"reflection-parameter\");\n\n/**\n * Hook to access the Reflection Parameter context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionParameter() {\n return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n}\n","/* -------------------------------------------------------------------\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 childrenArray,\n code,\n computed,\n List,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport {\n useReflectionClass,\n useReflectionMethod,\n useReflectionProperty\n} from \"../../core/contexts/reflection\";\nimport { TSDoc, TSDocAttributesTags, TSDocProps } from \"./tsdoc\";\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>(props: TSDocProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n const reflectionClass = useReflectionClass<T>();\n\n const title = computed(\n () =>\n reflectionClass.reflection.getTitle() ||\n titleCase(reflectionClass.reflection.getName())\n );\n const alias = computed(() => reflectionClass.reflection.getAlias());\n const domain = computed(() => reflectionClass.reflection.getDomain());\n const permission = computed(() => reflectionClass.reflection.getPermission());\n const readonly = computed(() => reflectionClass.reflection.isReadonly());\n const internal = computed(() => reflectionClass.reflection.isInternal());\n const ignore = computed(() => reflectionClass.reflection.isIgnored());\n const hidden = computed(() => reflectionClass.reflection.isHidden());\n\n if (!reflectionClass.reflection.getName()) {\n return null;\n }\n\n return (\n <TSDoc {...rest} heading={reflectionClass.reflection.getDescription()}>\n <Show\n when={\n isSetString(title.value) ||\n (!isUndefined(alias.value) && alias.value.length > 0) ||\n (!isUndefined(permission.value) && permission.value.length > 0) ||\n isSetString(domain.value) ||\n !isUndefined(readonly.value) ||\n !isUndefined(internal.value) ||\n !isUndefined(ignore.value) ||\n !isUndefined(hidden.value)\n }>\n <TSDocAttributesTags\n title={title.value}\n alias={alias.value}\n domain={domain.value}\n permission={permission.value}\n readonly={readonly.value}\n internal={internal.value}\n ignore={ignore.value}\n hidden={hidden.value}\n />\n </Show>\n <Show\n when={Boolean(children) && childrenArray(() => children).length > 0}>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocReflectionProperty(props: TSDocProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n const context = useReflectionProperty();\n\n return (\n <TSDoc heading={context.getDescription()} {...rest}>\n <TSDocAttributesTags\n title={context.getTitle()}\n alias={context.getAlias()}\n domain={context.getDomain()}\n permission={context.getPermission()}\n readonly={context.isReadonly()}\n internal={context.isInternal()}\n ignore={context.isIgnored()}\n hidden={context.isHidden()}\n />\n <Show\n when={Boolean(children) && childrenArray(() => children).length > 0}>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TSDocReflectionMethod(props: TSDocProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n const context = useReflectionMethod();\n\n return (\n <TSDoc\n heading={\n context.getDescription() ||\n (isString(context.getName())\n ? code`${String(context.getName())} method definition`\n : undefined)\n }\n {...rest}>\n <TSDocAttributesTags\n title={context.getTitle()}\n alias={context.getAlias()}\n domain={context.getDomain()}\n permission={context.getPermission()}\n readonly={context.isReadonly()}\n internal={context.isInternal()}\n ignore={context.isIgnored()}\n hidden={context.isHidden()}\n />\n <Show\n when={Boolean(children) && childrenArray(() => children).length > 0}>\n <List>{childrenArray(() => children)}</List>\n </Show>\n </TSDoc>\n );\n}\n","/* -------------------------------------------------------------------\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 { computed, For, splitProps } from \"@alloy-js/core\";\nimport {\n InterfaceDeclaration,\n InterfaceDeclarationProps,\n InterfaceMember,\n InterfaceMemberProps\n} from \"@alloy-js/typescript\";\nimport {\n ReflectionClass,\n ReflectionProperty,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport {\n ReflectionClassContext,\n ReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n TSDocReflectionClass,\n TSDocReflectionProperty\n} from \"./tsdoc-reflection\";\n\nexport interface TypeScriptInterfaceProps<\n T extends Record<string, any> = Record<string, any>\n> extends InterfaceDeclarationProps,\n ComponentProps {\n reflection: ReflectionClass<T>;\n defaultValue?: Partial<T>;\n}\n\nexport interface TypescriptInterfacePropertyProps\n extends Omit<InterfaceMemberProps, \"name\">,\n ComponentProps {\n property: ReflectionProperty;\n}\n\n/**\n * Generates a TypeScript interface for the given reflection class.\n */\nexport function TypeScriptInterface<\n T extends Record<string, any> = Record<string, any>\n>(props: TypeScriptInterfaceProps<T>) {\n const [{ name, reflection }, rest] = splitProps(props, [\n \"name\",\n \"reflection\"\n ]);\n\n const interfaceName = computed(() =>\n pascalCase(name || reflection.getName())\n );\n\n const properties = reflection\n .getProperties()\n .filter(item => !item.isIgnored())\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n );\n\n return (\n <ReflectionClassContext.Provider\n value={{\n reflection\n }}>\n <TSDocReflectionClass />\n <InterfaceDeclaration export={true} name={interfaceName.value} {...rest}>\n <For each={properties} doubleHardline={true} semicolon={true}>\n {prop => <TypescriptInterfaceProperty property={prop} />}\n </For>\n </InterfaceDeclaration>\n </ReflectionClassContext.Provider>\n );\n}\n\n/**\n * Generates a TypeScript interface property for the given reflection class.\n */\nexport function TypescriptInterfaceProperty(\n props: TypescriptInterfacePropertyProps\n) {\n const [{ property }, rest] = splitProps(props, [\"property\"]);\n\n return (\n <ReflectionPropertyContext.Provider value={property}>\n <TSDocReflectionProperty />\n <InterfaceMember\n name={property.getNameAsString()}\n readonly={property.isReadonly()}\n optional={property.isOptional()}\n nullish={property.isNullable()}\n type={stringifyType(property.getType())}\n {...rest}\n />\n </ReflectionPropertyContext.Provider>\n );\n}\n","/* -------------------------------------------------------------------\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 computed,\n Declaration as CoreDeclaration,\n createSymbolSlot,\n For,\n Name,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n createValueSymbol,\n ObjectExpression,\n ObjectProperty,\n TSSymbolFlags,\n TypeRefContext,\n useTSNamePolicy,\n VarDeclarationProps\n} from \"@alloy-js/typescript\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\nimport {\n ReflectionClass,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { pascalCase } from \"@stryke/string-format/pascal-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComputedRef } from \"@vue/reactivity\";\nimport {\n ReflectionClassContext,\n ReflectionPropertyContext\n} from \"../../core/contexts/reflection\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n TSDocReflectionClass,\n TSDocReflectionProperty\n} from \"./tsdoc-reflection\";\n\nexport interface TypescriptObjectProps<\n T extends Record<string, any> = Record<string, any>\n> extends VarDeclarationProps {\n reflection?: ComputedRef<ReflectionClass<T>>;\n defaultValue?: ComputedRef<Partial<T> | undefined>;\n}\n\nexport interface TypescriptObjectPropertyProps extends ComponentProps {\n property: ReflectionProperty;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n */\nexport function TypescriptObject<\n T extends Record<string, any> = Record<string, any>\n>(props: TypescriptObjectProps<T>) {\n if (!props.reflection?.value) {\n return null;\n }\n\n const objectName = computed(() =>\n camelCase(props.name || props.reflection!.value.getName())\n );\n const objectType = computed(\n () => props.type || pascalCase(props.reflection!.value.getName())\n );\n const properties = computed(() =>\n props\n .reflection!.value.getProperties()\n .filter(\n item =>\n !item.isIgnored() &&\n !isUndefined(\n props.defaultValue?.value?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(\n (props.defaultValue as Record<string, any>)?.value?.[alias]\n )\n ) {\n return (props.defaultValue as Record<string, any>)?.value?.[\n alias\n ];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )\n )\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) ||\n (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n )\n );\n\n const TypeSymbolSlot = createSymbolSlot();\n const ValueTypeSymbolSlot = createSymbolSlot();\n const sym = createValueSymbol(props.name, {\n refkeys: props.refkey,\n default: props.default,\n export: props.export,\n metadata: props.metadata,\n tsFlags: props.nullish ? TSSymbolFlags.Nullish : TSSymbolFlags.None,\n type: props.type ? TypeSymbolSlot.firstSymbol : undefined,\n namePolicy: useTSNamePolicy().for(\"variable\")\n });\n\n if (!props.type) {\n ValueTypeSymbolSlot.moveMembersTo(sym);\n }\n\n const keyword = props.var ? \"var\" : props.let ? \"let\" : \"const\";\n const type = props.type ? (\n <TypeRefContext>\n : <TypeSymbolSlot>{props.type}</TypeSymbolSlot>\n </TypeRefContext>\n ) : undefined;\n\n return (\n <Show when={!!props.reflection.value}>\n <ReflectionClassContext.Provider\n value={{\n reflection: props.reflection.value as ReflectionClass<any>,\n override: {\n name: objectName.value,\n type: objectType.value,\n defaultValue: props.defaultValue?.value\n }\n }}>\n <Show when={!!objectName.value && !!objectType.value}>\n <TSDocReflectionClass />\n <CoreDeclaration symbol={sym}>\n {props.export ? \"export \" : \"\"}\n {props.default ? \"default \" : \"\"}\n {keyword} <Name />\n {type} ={\" \"}\n <ValueTypeSymbolSlot>\n {props.initializer ?? props.children ?? (\n <ObjectExpression>\n <For\n each={properties.value ?? []}\n comma={true}\n doubleHardline={true}>\n {prop => <TypescriptObjectProperty property={prop} />}\n </For>\n </ObjectExpression>\n )}\n </ValueTypeSymbolSlot>\n </CoreDeclaration>\n </Show>\n <hbr />\n </ReflectionClassContext.Provider>\n </Show>\n );\n}\n\n/**\n * Generates a TypeScript object property for the given reflection class.\n */\nexport function TypescriptObjectProperty(props: TypescriptObjectPropertyProps) {\n const [{ property }] = splitProps(props, [\"property\"]);\n\n return (\n <ReflectionPropertyContext.Provider value={property}>\n <TSDocReflectionProperty />\n <ObjectProperty\n name={property.getNameAsString()}\n value={stringifyDefaultValue(property)}\n />\n <hbr />\n </ReflectionPropertyContext.Provider>\n );\n}\n","/* -------------------------------------------------------------------\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 { usePowerlines } from \"@powerlines/alloy/core/contexts/context\";\nimport { refkey } from \"@powerlines/alloy/helpers/refkey\";\nimport { ComponentProps } from \"@powerlines/alloy/types/components\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/alloy/typescript/components/builtin-file\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocLink,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns,\n TSDocThrows\n} from \"@powerlines/alloy/typescript/components/tsdoc\";\nimport {\n TypeScriptInterface,\n TypeScriptInterfaceProps\n} from \"@powerlines/alloy/typescript/components/typescript-interface\";\nimport { TypescriptObject } from \"@powerlines/alloy/typescript/components/typescript-object\";\nimport {\n ReflectionClass,\n ReflectionKind,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isNull } from \"@stryke/type-checks/is-null\";\nimport defu from \"defu\";\nimport { createReflectionResource } from \"../helpers/create-reflection-resource\";\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<TypeScriptInterfaceProps, \"name\">\n) {\n const [{ defaultValue, reflection }] = splitProps(props, [\n \"defaultValue\",\n \"reflection\"\n ]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n return (\n <>\n <TypeScriptInterface\n name=\" EnvBase\"\n extends={[\"EnvInterface\"]}\n defaultValue={defaultValue}\n reflection={reflection}\n export={true}\n />\n <hbr />\n <hbr />\n\n <TypeDeclaration name=\"Env\" export={true}>\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 </>\n );\n}\n\ninterface ConfigPropertyConditionalProps extends ComponentProps {\n context: EnvPluginContext | undefined;\n name: string;\n}\n\nfunction ConfigPropertyConditional(props: ConfigPropertyConditionalProps) {\n const [{ context, name }] = splitProps(props, [\"context\", \"name\"]);\n\n if (!context) {\n return null;\n }\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 | undefined;\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 if (!context) {\n return null;\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 if (!context) {\n return null;\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}\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 }, rest] = splitProps(props, [\"defaultConfig\"]);\n\n const context = usePowerlines<EnvPluginContext>();\n\n const defaultValue = computed(\n () => context && loadEnvFromContext(context, process.env)\n );\n const reflection = createReflectionResource(context);\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.data ?? undefined\n );\n\n return result;\n });\n\n const reflectionGetProperties = computed(\n () =>\n reflection.data\n ?.getProperties()\n .filter(property => !property.isIgnored())\n .sort((a, b) =>\n a.getNameAsString().localeCompare(b.getNameAsString())\n ) ?? []\n );\n\n const reflectionSetProperties = computed(\n () =>\n reflection.data\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 {...rest}\n id=\"env\"\n description=\"The Powerlines environment configuration module provides an interface to define environment configuration parameters.\"\n imports={defu(\n {\n \"@powerlines/deepkit/vendor/type\": [\n \"Type\",\n \"stringify\",\n \"serializer\",\n \"serializeFunction\",\n \"deserializeFunction\",\n \"ReflectionKind\",\n \"TemplateState\",\n \"Serializer\",\n \"TypeProperty\",\n \"TypePropertySignature\"\n ],\n \"@powerlines/plugin-env/types/runtime\": [{ name: \"EnvInterface\" }]\n },\n rest.imports ?? {}\n )}>\n <Show when={!isNull(reflection.data)}>\n <EnvTypeDefinition\n defaultValue={defaultValue.value}\n reflection={reflection.data!}\n />\n <hbr />\n <hbr />\n </Show>\n\n <TypescriptObject\n name=\"initialEnv\"\n type=\"Partial<EnvBase>\"\n defaultValue={defaultValue}\n reflection={envInstance}\n export={true}\n const={true}\n />\n <hbr />\n <hbr />\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={true}>\n <ClassMethod name=\"constructor\" public={true}>\n {code`\n 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`}\n </ClassMethod>\n </ClassDeclaration>\n <hbr />\n <hbr />\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={true}\n initializer={<NewExpression args={[]} target={\"EnvSerializer\"} />}\n />\n <hbr />\n <hbr />\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={true}\n const={true}\n initializer={\"serializeFunction<EnvBase>(envSerializer)\"}\n />\n <hbr />\n <hbr />\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={true}\n const={true}\n initializer={\"deserializeFunction<EnvBase>(envSerializer)\"}\n />\n <hbr />\n <hbr />\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={true}\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 <hbr />\n <hbr />\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 <hbr />\n <hbr />\n <hbr />\n\n <VarDeclaration\n refkey={envRefkey}\n name=\"env\"\n type=\"Env\"\n export={true}\n const={true}\n initializer={\n <>\n {code`createEnv(`}\n {defaultConfig || \"{}\"}\n {code` as Partial<Env>)`}\n </>\n }\n />\n </BuiltinFile>\n );\n}\n"],"mappings":"qsDA0BA,SAAgBA,EAAO,GAAGE,EAAyB,CACjD,OAAOD,GAAe,aAAc,GAAGC,EAAK,CCc9C,SAAgBW,EAAMC,EAAmB,CACvC,GAAM,CAAC,CAAEC,WAAUC,YAAaR,EAAWM,EAAO,CAAC,WAAY,UAAU,CAAC,CAE1E,MAAA,CAAA,MAAAG,EAAA,QAAA,CAGWC,OAAM,MAAA,IAAAH,UAAA,CAAA,MAAA,CAAAE,EAAA,MAAA,EAAA,CAAA,CAAAE,EAEVZ,EAAI,CAAA,IAACa,MAAI,CAAA,MAAE,CAACT,EAAYK,EAAQ,EAAA,IAAAD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EAAA,CAAA,CAAAA,EAAA,MAAA,EAAA,CAAA,CAAAF,EAOMzB,EAAc,CACbE,OAAQsD,GACR9B,KAAI,MACJsD,KAAI,MAAA,OACI,GAAI,MACL,GAAI,IACXE,aAAW,CAAA,MAAA,CAEN9F,CAAI,aACJuE,GAAiB,KACjBvE,CAAI,oBAAmB,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-Mgv4u8VY.d.cts","names":[],"sources":["../../alloy/src/types/components.ts","../../alloy/src/typescript/components/tsdoc.tsx","../../alloy/src/core/components/source-file.tsx","../../alloy/src/typescript/components/typescript-file.tsx","../../alloy/src/typescript/components/builtin-file.tsx","../../alloy/src/typescript/components/typescript-interface.tsx","../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;UA6GiB,cAAA;aACJ;;UAuBI,wBAAA;;;;;;KAOL,qBAAA,GAAwB,sBAE3B,MAAM;;;;UCkSE,gBAAA,SAAyB;;;;;;;;;;;;;;;;;;QAmBlC;;;;KClaI,iBAAA,GAAkB,kBAC5B;;;;AF2EF;AAwBA;EAOY,MAAA,CAAA,EEpGC,aFoGD;EAEG;;;;;;SE9FJ;ADgYX,CAAA;;;KEhYY,mBAAA,GAAsB,KAAK,iCACrC;WACW;YACC;EH0DG,MAAA,CAAA,EAAA,OAAA,GAAc,MAAA;EAwBd,GAAA,CAAA,EAAA,OAAA;AAOjB,CAAA;;;KIhHY,gBAAA,GAAmB,KAAK,+BAClC,KAAK;;;;;AJgFP;AAwBA;EAOY,EAAA,EAAA,MAAA;EAEG;;;EAF2B,WAAA,CAAA,EAAA,MAAA;;;;ACoS1C;;;;;;UIvYiB,mCACL,sBAAsB,6BACxB,2BACN;cACU,cAAA,CAAA,gBAAgB;iBACb,QAAQ;;;;;;;iBC0BT,iBAAA,QACP,KAAK,oCAAiC;ANoC9B,UMuJA,eAAA,SAAwB,INtJpB,CMsJyB,gBNtJzB,EAAA,IAAA,CAAA,CAAA;EAuBJ,aAAA,CAAA,EMgIC,UNhID;AAOjB;;;;AAA0C,iBMmI1B,UAAA,CNnI0B,KAAA,EMmIR,eNnIQ,CAAA,EMmIO,UNnIP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DPDDjaRF.d.cts","names":[],"sources":["../../plugin-plugin/src/types/plugin.ts","../../alloy/src/types/plugin.ts","../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KA4BY,wBAAA,GAA2B,QAAQ;EAAnC;;;;ACLZ;EAIY,aAAA,CAAA,EAAA,OAAA;EACO;;;;;EAEW,iBAAA,CAAA,EAAA,OAAA;CAAQ;;;UAPrB,kBAAA;UACP;;ADIE,KCDA,wBDCwB,CAAA,iBCAjB,aDAoB,GCAJ,aDAW,CAAA,GCC1C,MDD0C,CCCnC,QDDmC,CAAA,GAAA;iBCE7B,aAAa;;KAGlB,oCACO,gBAAgB,4CAEpB,mBAAmB,aAAa,yBAAyB;;;;;ADRxE;cEoCa,mBAAM,iBA8VlB,uBAAA,YA9VkB,WAAA,mBAAA,iBAAA,uBAAA,SAAA,uBAAA,OAAA;;;cCnBN,gBAAc,kCAAA,iBA6R1B,uBAAA,GA7R0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DZnZEdDI.d.mts","names":[],"sources":["../../plugin-plugin/src/types/plugin.ts","../../alloy/src/types/plugin.ts","../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KA4BY,wBAAA,GAA2B,QAAQ;EAAnC;;;;ACLZ;EAIY,aAAA,CAAA,EAAA,OAAA;EACO;;;;;EAEW,iBAAA,CAAA,EAAA,OAAA;CAAQ;;;UAPrB,kBAAA;UACP;;ADIE,KCDA,wBDCwB,CAAA,iBCAjB,aDAoB,GCAJ,aDAW,CAAA,GCC1C,MDD0C,CCCnC,QDDmC,CAAA,GAAA;iBCE7B,aAAa;;KAGlB,oCACO,gBAAgB,4CAEpB,mBAAmB,aAAa,yBAAyB;;;;;ADRxE;cEoCa,mBAAM,iBA8VlB,uBAAA,YA9VkB,WAAA,mBAAA,iBAAA,uBAAA,SAAA,uBAAA,OAAA;;;cCnBN,gBAAc,kCAAA,iBA6R1B,uBAAA,GA7R0B"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["isFunction","isSetObject","isSetString","isUndefined","SUPPORTED_COMMANDS","isPlugin","value","name","applyToEnvironment","dedupe","dependsOn","Array","isArray","every","isPluginConfig","command","handler","isPluginConfigObject","plugin","options","isPluginConfigTuple","length","isPluginHookFunction","isPluginHookObject","isPluginHook","getHookHandler","pluginHook","extractPluginHook","context","hook","undefined","normal","bind","order","isHookExternal","startsWith","isHookInternal","checkDedupe","plugins","some","p","addPluginHook","hooksList","map","push","computed","Output","OutputExternal","ref","Show","splitProps","replacePath","PowerlinesContext","props","children","context","basePath","rest","contextRef","basePathRef","value","workspaceConfig","workspaceRoot","_$createComponent","_$mergeProps","Provider","when","Boolean","flushJobsAsync","getContextForRenderNode","isPrintHook","renderTree","LogLevelLabel","isParentPath","replacePath","isSetString","getHookHandler","isPluginHook","isPluginHookFunction","isPluginHookObject","printer","Output","createAlloyPlugin","builder","options","result","prepare","_self$","enforce","order","Promise","resolve","call","render","tree","_$createComponent","context","basePath","workspaceConfig","workspaceRoot","children","writeTree","alloy","generateOutput","currentDirectory","root","Array","isArray","recurse","cwd","child","renderContext","meta","directory","kind","path","contents","push","sourceFile","Error","outputFile","builtin","id","log","TRACE","builtinsPath","filetype","preset","output","mode","printTree","entry","entryPath","typeDefinition","copyFile","sourcePath","undefined","writeOutput","sub","emitBuiltin","emitEntry","fs","existsSync","source","read","write","JSON","stringify","printWidth","tabWidth","useTabs","insertFinalNewLine","printDocToString","printTreeWorker","formatted","endsWith","doc","node","normalizedNode","split","flatMap","line","index","array","length","print","subtree","isFunction","isObject","isSetString","getPluginName","plugin","Array","isArray","length","$$name","name","undefined","isDuplicatePlugin","plugins","some","existing","filterPluginByFileId","context","fileId","code","id","fs","ids","addPluginFilter","pluginOrPlugins","filter","Error","foundIndex","findIndex","toLowerCase","LogLevelLabel","isFunction","chalk","getPluginName","resolvePluginFunction","context","plugin","Array","isArray","length","resolveBabelPlugin","code","id","log","TRACE","bold","cyanBright","undefined","transformAsync","LogLevelLabel","findFileExtension","findFileExtensionSafe","isParentPath","isSetObject","defu","isDuplicatePlugin","resolveBabelPlugin","plugin","options","name","config","undefined","transform","babel","configResolved","order","handler","devDependencies","plugins","presets","code","id","powerlinesPath","includes","log","TRACE","map","filter","_","arr","preset","Array","isArray","length","unshift","isTSX","result","highlightCode","ast","cloneInputAst","comments","sourceType","configFile","babelrc","envName","mode","caller","framework","filename","Boolean","Error","createAlloyPlugin","ReflectionClass","ReflectionKind","stringifyType","babel","LogLevelLabel","parseTypeDefinition","toArray","ENV_PREFIXES","existsSync","createDirectory","isParentPath","joinPaths","constantCase","defu","envBabelPlugin","EnvBuiltin","loadEnv","getEnvDefaultTypeDefinition","getEnvReflectionsPath","getEnvTypeReflectionsPath","getSecretsDefaultTypeDefinition","readEnvReflection","readEnvTypeReflection","readSecretsReflection","writeEnvReflection","writeEnvTypeReflection","reflectEnv","reflectSecrets","plugin","options","name","dependsOn","config","log","TRACE","env","types","prefix","transform","plugins","WARN","envDefaultTypeDefinition","file","secrets","secretsDefaultTypeDefinition","reduce","ret","formattedPrefix","includes","push","replace","configResolved","inject","projectType","parsed","used","injected","command","persistedMeta","checksum","meta","workspaceConfig","workspaceRoot","projectRoot","undefined","Error","getProperties","length","envWithAlias","filter","prop","getAlias","Object","entries","forEach","key","value","unprefixedKey","startsWith","slice","aliasKey","find","reverse","hasProperty","getProperty","setDefaultValue","kind","objectLiteral","typeName","description","render","_self$","_$createComponent","defaultConfig","docs","outputPath","reflection","envDocFile","fs","write","packageJson","property","getNameAsString","sort","a","b","localeCompare","map","reflectionProperty","trim","getDescription","replaceAll","getType","hasDefault","String","getDefaultValue","isValueRequired","join","buildEnd","reflectionPath"],"sources":["../../powerlines/src/plugin-utils/helpers.ts","../../alloy/src/core/components/output.tsx","../../alloy/src/create-plugin.tsx","../../plugin-babel/src/helpers/filters.ts","../../plugin-babel/src/helpers/options.ts","../../plugin-babel/src/index.ts","../src/index.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 { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { AnyFunction } from \"@stryke/types/base\";\nimport { SUPPORTED_COMMANDS } from \"../types/commands\";\nimport {\n PluginConfig,\n PluginConfigObject,\n PluginConfigTuple\n} from \"../types/config\";\nimport { PluginContext } from \"../types/context\";\nimport {\n BaseHookKeys,\n BaseHooksListItem,\n ExternalHookKeys,\n HookKeys\n} from \"../types/hooks\";\nimport { Plugin, PluginHook, PluginHookObject } from \"../types/plugin\";\nimport { ResolvedConfig } from \"../types/resolved\";\n\n/**\n * Type guard to check if an object is a {@link Plugin}\n *\n * @param value - The object to check\n * @returns True if the object is a {@link Plugin}, false otherwise\n */\nexport function isPlugin<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n>(value: unknown): value is Plugin<PluginContext<TResolvedConfig>> {\n return (\n isSetObject(value) &&\n \"name\" in value &&\n isSetString(value.name) &&\n (isUndefined(\n (value as Plugin<PluginContext<TResolvedConfig>>).applyToEnvironment\n ) ||\n (\"applyToEnvironment\" in value &&\n isFunction(value.applyToEnvironment))) &&\n (isUndefined((value as Plugin<PluginContext<TResolvedConfig>>).dedupe) ||\n (\"dedupe\" in value && isFunction(value.dedupe))) &&\n (isUndefined((value as Plugin<PluginContext<TResolvedConfig>>).dependsOn) ||\n (\"dependsOn\" in value &&\n Array.isArray(value.dependsOn) &&\n value.dependsOn.every(isPluginConfig))) &&\n SUPPORTED_COMMANDS.every(\n command =>\n isUndefined(\n (value as Plugin<PluginContext<TResolvedConfig>>)[command]\n ) ||\n (command in value &&\n (isFunction((value as Record<string, any>)[command]) ||\n (isSetObject((value as Record<string, any>)[command]) &&\n \"handler\" in (value as Record<string, any>)[command] &&\n isFunction((value as Record<string, any>)[command].handler))))\n )\n );\n}\n\n/**\n * Type guard to check if an object is a {@link PluginConfigObject}\n *\n * @param value - The object to check\n * @returns True if the object is a {@link PluginConfigObject}, false otherwise\n */\nexport function isPluginConfigObject(\n value: unknown\n): value is PluginConfigObject {\n return (\n isSetObject(value) &&\n \"plugin\" in value &&\n (((isSetString(value.plugin) || isFunction(value.plugin)) &&\n \"options\" in value &&\n isSetObject(value.options)) ||\n isPlugin(value.plugin))\n );\n}\n\n/**\n * Type guard to check if an object is a {@link PluginConfigTuple}\n *\n * @param value - The object to check\n * @returns True if the object is a {@link PluginConfigTuple}, false otherwise\n */\nexport function isPluginConfigTuple(\n value: unknown\n): value is PluginConfigTuple {\n return (\n Array.isArray(value) &&\n (value.length === 1 || value.length === 2) &&\n (((isSetString(value[0]) || isFunction(value[0])) &&\n value.length > 1 &&\n isSetObject(value[1])) ||\n isPlugin(value[0]))\n );\n}\n\n/**\n * Type guard to check if an object is a {@link PluginConfig}\n *\n * @param value - The object to check\n * @returns True if the object is a {@link PluginConfig}, false otherwise\n */\nexport function isPluginConfig(value: unknown): value is PluginConfig {\n return (\n isSetString(value) ||\n isFunction(value) ||\n isPlugin(value) ||\n isPluginConfigObject(value) ||\n isPluginConfigTuple(value)\n );\n}\n\n/**\n * Type guard to check if an value is a {@link PluginHook} function\n *\n * @param value - The value to check\n * @returns True if the value is a {@link PluginHook} function, false otherwise\n */\nexport function isPluginHookFunction(value: unknown): value is AnyFunction {\n return (\n isFunction(value) ||\n (isSetObject(value) && \"handler\" in value && isFunction(value.handler))\n );\n}\n\n/**\n * Type guard to check if an value is a {@link PluginHook} function\n *\n * @param value - The value to check\n * @returns True if the value is a {@link PluginHook} function, false otherwise\n */\nexport function isPluginHookObject(\n value: unknown\n): value is PluginHookObject<AnyFunction> {\n return isSetObject(value) && \"handler\" in value && isFunction(value.handler);\n}\n\n/**\n * Type guard to check if an object is a {@link PluginHook}\n *\n * @param value - The object to check\n * @returns True if the object is a {@link PluginHook}, false otherwise\n */\nexport function isPluginHook(value: unknown): value is PluginHook<AnyFunction> {\n return isPluginHookFunction(value) || isPluginHookObject(value);\n}\n\n/**\n * Extract the hook handler function from a plugin hook\n *\n * @param pluginHook - The plugin hook to extract the handler function from\n * @returns The hook handler function\n */\nexport function getHookHandler(\n pluginHook: PluginHook<AnyFunction>\n): AnyFunction {\n return isFunction(pluginHook) ? pluginHook : pluginHook.handler;\n}\n\n/**\n * Extract a plugin hook from a plugin\n *\n * @param context - The build context\n * @param plugin - The plugin to extract the hook from\n * @param hook - The name of the hook to extract\n * @returns The extracted hook, or undefined if the hook does not exist\n */\nexport function extractPluginHook<\n TContext extends PluginContext = PluginContext,\n TPlugin extends Plugin<TContext> = Plugin<TContext>\n>(context: TContext, plugin: TPlugin, hook: BaseHookKeys<TContext>) {\n const pluginHook = plugin[hook];\n if (!isPluginHook(pluginHook)) {\n return undefined;\n }\n\n return isFunction(pluginHook)\n ? {\n normal: pluginHook.bind(context)\n }\n : {\n [pluginHook.order ? pluginHook.order : \"normal\"]:\n pluginHook.handler.bind(context)\n };\n}\n\n/**\n * Check if a hook is external.\n *\n * @param hook - The name of the hook to check.\n * @returns True if the hook is external, false otherwise.\n */\nexport function isHookExternal(hook: HookKeys): hook is ExternalHookKeys {\n return (\n hook.startsWith(\"vite:\") ||\n hook.startsWith(\"esbuild:\") ||\n hook.startsWith(\"rolldown:\") ||\n hook.startsWith(\"rollup:\") ||\n hook.startsWith(\"webpack:\") ||\n hook.startsWith(\"rspack:\") ||\n hook.startsWith(\"farm:\")\n );\n}\n\n/**\n * Check if a hook is internal.\n *\n * @param hook - The name of the hook to check.\n * @returns True if the hook is external, false otherwise.\n */\nexport function isHookInternal(hook: HookKeys): hook is BaseHookKeys {\n return !isHookExternal(hook);\n}\n\n/**\n * Check if a plugin should be deduplicated.\n *\n * @param plugin - The plugin to check\n * @param plugins - The list of plugins to check against\n * @returns True if the plugin should be deduplicated, false otherwise\n */\nexport function checkDedupe<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig,\n TContext extends PluginContext<TResolvedConfig> =\n PluginContext<TResolvedConfig>\n>(plugin: Plugin<TContext>, plugins: Plugin<TContext>[]) {\n return (\n plugin.dedupe === false ||\n plugins.some(\n p =>\n p.dedupe !== false &&\n ((isFunction(p.dedupe) && p.dedupe(plugin)) || p.name === plugin.name)\n )\n );\n}\n\n/**\n * Add a plugin hook to the hooks list.\n *\n * @param context - The plugin context\n * @param plugin - The plugin to add the hook from\n * @param pluginHook - The plugin hook to add\n * @param hooksList - The list of hooks to add to\n */\nexport function addPluginHook<TContext extends PluginContext = PluginContext>(\n context: TContext,\n plugin: Plugin<TContext>,\n pluginHook: PluginHook<AnyFunction>,\n hooksList: BaseHooksListItem<TContext, BaseHookKeys<TContext>>[]\n) {\n if (\n !checkDedupe(\n plugin,\n hooksList.map(hook => hook.plugin)\n )\n ) {\n hooksList.push(\n isFunction(pluginHook)\n ? {\n plugin,\n handler: getHookHandler(pluginHook).bind(context)\n }\n : {\n plugin,\n ...pluginHook,\n handler: getHookHandler(pluginHook).bind(context)\n }\n );\n }\n}\n","/* -------------------------------------------------------------------\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 type { OutputProps as OutputPropsExternal } from \"@alloy-js/core\";\nimport {\n computed,\n Output as OutputExternal,\n ref,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport type { PluginContext } from \"powerlines/types/context\";\nimport { PowerlinesContext } from \"../contexts/context\";\n\nexport interface OutputProps<TContext extends PluginContext = PluginContext>\n extends OutputPropsExternal {\n /**\n * The current Powerlines process context.\n */\n context: TContext;\n}\n\n/**\n * Output component for rendering the Powerlines plugin's output files via templates.\n */\nexport function Output<TContext extends PluginContext = PluginContext>(\n props: OutputProps<TContext>\n) {\n const [{ children, context, basePath }, rest] = splitProps(props, [\n \"children\",\n \"context\",\n \"basePath\"\n ]);\n\n const contextRef = ref(context);\n const basePathRef = computed(() =>\n basePath\n ? replacePath(basePath, contextRef.value.workspaceConfig.workspaceRoot)\n : contextRef.value.workspaceConfig.workspaceRoot\n );\n\n return (\n <OutputExternal {...rest} basePath={basePathRef.value}>\n <PowerlinesContext.Provider value={{ ref: contextRef }}>\n <Show when={Boolean(contextRef.value)}>{children}</Show>\n </PowerlinesContext.Provider>\n </OutputExternal>\n );\n}\n","/* -------------------------------------------------------------------\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 flushJobsAsync,\n getContextForRenderNode,\n isPrintHook,\n RenderedTextTree,\n renderTree\n} from \"@alloy-js/core\";\nimport { PluginPluginAlloyOptions } from \"@powerlines/plugin-plugin/types/plugin\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport {\n getHookHandler,\n isPluginHook,\n isPluginHookFunction,\n isPluginHookObject\n} from \"powerlines/plugin-utils/helpers\";\nimport { PluginContext } from \"powerlines/types/context\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { Doc } from \"prettier\";\nimport { printer } from \"prettier/doc.js\";\nimport { Output } from \"./core/components/output\";\nimport { OutputDirectory, OutputFile } from \"./types/components\";\nimport { AlloyPluginBuilder, AlloyPluginOptions } from \"./types/plugin\";\n\n/**\n * Creates an Alloy plugin using a plugin builder function.\n *\n * @param builder - The Alloy plugin builder function.\n * @returns An object representing the Alloy plugin.\n */\nexport function createAlloyPlugin<\n TContext extends PluginContext = PluginContext\n>(builder: AlloyPluginBuilder<TContext>) {\n return <T extends TContext>(\n options: Parameters<typeof builder>[0] & AlloyPluginOptions\n ) => {\n const result = builder(options);\n\n return {\n ...result,\n async prepare() {\n if (\n isPluginHook(result.prepare) &&\n result.enforce !== \"post\" &&\n (isPluginHookFunction(result.prepare) ||\n (isPluginHookObject(result.prepare) &&\n result.prepare.order !== \"post\"))\n ) {\n await Promise.resolve(getHookHandler(result.prepare).call(this));\n }\n\n if (isPluginHook(result.render)) {\n const tree = renderTree(\n <Output<TContext>\n context={this}\n basePath={this.workspaceConfig.workspaceRoot}>\n {result.render.call(this)}\n </Output>\n );\n\n await writeTree(this, tree, options?.alloy);\n }\n\n if (\n isPluginHook(result.prepare) &&\n (result.enforce === \"post\" ||\n (isPluginHookObject(result.prepare) &&\n result.prepare.order === \"post\"))\n ) {\n await Promise.resolve(getHookHandler(result.prepare).call(this));\n }\n }\n } as Plugin<T>;\n };\n}\n\n/**\n * Writes the rendered output files to the virtual file system.\n *\n * @param context - The context of the current build.\n * @param tree - The rendered output files.\n */\nasync function writeTree<TContext extends PluginContext = PluginContext>(\n context: TContext,\n tree: RenderedTextTree,\n options: PluginPluginAlloyOptions = {}\n) {\n await flushJobsAsync();\n\n let result!: OutputDirectory;\n const generateOutput = async (\n currentDirectory: OutputDirectory | undefined,\n root: RenderedTextTree\n ) => {\n if (!Array.isArray(root)) {\n return;\n }\n\n const recurse = async (cwd: OutputDirectory | undefined) => {\n for (const child of root) {\n await generateOutput(cwd, child as RenderedTextTree);\n }\n };\n\n const renderContext = getContextForRenderNode(root);\n if (!renderContext) {\n return recurse(currentDirectory);\n }\n\n if (renderContext.meta?.directory) {\n const directory: OutputDirectory = {\n kind: \"directory\",\n path: renderContext.meta.directory.path,\n contents: []\n };\n\n if (currentDirectory) {\n currentDirectory.contents.push(directory);\n } else {\n result = directory;\n }\n\n await recurse(directory);\n } else if (renderContext.meta?.sourceFile) {\n if (!currentDirectory) {\n // This shouldn't happen if you're using the Output component.\n throw new Error(\n \"Source file doesn't have parent directory. Make sure you have used the Output component.\"\n );\n }\n\n let outputFile!: OutputFile;\n if (renderContext.meta?.builtin) {\n if (!renderContext.meta.builtin.id) {\n throw new Error(\n \"Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.\"\n );\n }\n\n context.log(\n LogLevelLabel.TRACE,\n `Rendering built-in runtime module with ID: ${renderContext.meta.builtin.id}`\n );\n\n outputFile = {\n kind: \"builtin\",\n id: renderContext.meta.builtin.id,\n path: replacePath(\n renderContext.meta.sourceFile.path,\n context.builtinsPath\n ),\n filetype: renderContext.meta.sourceFile.filetype,\n preset: renderContext.meta.output?.mode,\n contents: await printTree(context, root, options)\n };\n } else if (\n renderContext.meta?.entry ||\n isParentPath(context.entryPath, renderContext.meta.sourceFile.path)\n ) {\n context.log(\n LogLevelLabel.TRACE,\n `Rendering entry module at path: ${renderContext.meta.sourceFile.path}`\n );\n\n outputFile = {\n kind: \"entry\",\n typeDefinition: renderContext.meta.entry?.typeDefinition,\n path: renderContext.meta.sourceFile.path,\n filetype: renderContext.meta.sourceFile.filetype,\n preset: renderContext.meta.output?.mode,\n contents: await printTree(context, root, options)\n };\n } else {\n context.log(\n LogLevelLabel.TRACE,\n `Rendering source file at path: ${renderContext.meta.sourceFile.path}`\n );\n\n outputFile = {\n kind: \"file\",\n path: renderContext.meta.sourceFile.path,\n filetype: renderContext.meta.sourceFile.filetype,\n preset: renderContext.meta.output?.mode,\n contents: await printTree(context, root, options)\n };\n }\n\n currentDirectory.contents.push(outputFile);\n } else if (renderContext.meta?.copyFile) {\n if (!currentDirectory) {\n // This shouldn't happen if you're using the Output component.\n throw new Error(\n \"Copy file doesn't have parent directory. Make sure you have used the Output component.\"\n );\n }\n\n context.log(\n LogLevelLabel.TRACE,\n `Processing copy file operation from \"${\n renderContext.meta.copyFile.sourcePath\n }\" to \"${renderContext.meta.copyFile.path}\"`\n );\n\n if (!renderContext.meta.copyFile.sourcePath) {\n throw new Error(\n \"Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.\"\n );\n }\n\n if (!renderContext.meta.copyFile.path) {\n throw new Error(\n \"Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.\"\n );\n }\n\n currentDirectory.contents.push({\n kind: \"file\",\n path: renderContext.meta.copyFile.path,\n sourcePath: renderContext.meta.copyFile.sourcePath,\n preset: renderContext.meta.output?.preset\n });\n } else {\n await recurse(currentDirectory);\n }\n };\n\n await generateOutput(undefined, tree);\n\n const writeOutput = async (context: TContext, output: OutputDirectory) => {\n for (const sub of output.contents) {\n if (sub.kind === \"directory\") {\n await writeOutput(context, sub);\n } else if (sub.kind === \"builtin\") {\n await context.emitBuiltin(sub.contents, sub.id, sub.path);\n } else if (sub.kind === \"entry\") {\n await context.emitEntry(sub.contents, sub.path);\n } else if (sub.kind === \"file\") {\n if (\"sourcePath\" in sub && sub.sourcePath) {\n if (!context.fs.existsSync(sub.sourcePath)) {\n throw new Error(\n `Source file \"${sub.sourcePath}\" for copy operation does not exist.`\n );\n }\n\n const source = await context.fs.read(sub.sourcePath);\n if (!isSetString(source)) {\n throw new Error(\n `Source file \"${sub.sourcePath}\" for copy operation is empty.`\n );\n }\n\n await context.fs.write(sub.path, source);\n } else if (\"contents\" in sub && isSetString(sub.contents)) {\n await context.fs.write(sub.path, sub.contents);\n } else {\n throw new Error(\n `Unexpected output extracted from the render tree: \\n\\n${JSON.stringify(sub, null, 2)}`\n );\n }\n }\n }\n };\n\n await writeOutput(context, result);\n}\n\nasync function printTree<TContext extends PluginContext = PluginContext>(\n context: TContext,\n tree: RenderedTextTree,\n options: PluginPluginAlloyOptions = {}\n) {\n options.printWidth ??= 160;\n options.tabWidth ??= 2;\n options.useTabs ??= false;\n options.insertFinalNewLine ??= true;\n\n await flushJobsAsync();\n\n const result = printer.printDocToString(\n printTreeWorker(tree),\n options as printer.Options\n ).formatted;\n\n return options.insertFinalNewLine && !result.endsWith(\"\\n\")\n ? `${result}\\n`\n : result;\n}\n\nfunction printTreeWorker(tree: RenderedTextTree): Doc {\n const doc: Doc = [];\n for (const node of tree) {\n if (typeof node === \"string\") {\n const normalizedNode = node\n .split(/\\r?\\n/)\n .flatMap((line, index, array) =>\n index < array.length - 1 ? [line] : [line]\n );\n doc.push(normalizedNode);\n } else if (isPrintHook(node)) {\n doc.push(node.print!(node.subtree, printTreeWorker));\n } else {\n doc.push(printTreeWorker(node));\n }\n }\n\n return doc;\n}\n","/* -------------------------------------------------------------------\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 { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { Context } from \"powerlines/types\";\nimport {\n BabelTransformPlugin,\n BabelTransformPluginFilter,\n BabelTransformPluginOptions,\n ResolvedBabelTransformPluginOptions\n} from \"powerlines/types/babel\";\n\nexport function getPluginName(\n plugin: BabelTransformPluginOptions\n): string | undefined {\n return isSetString(plugin)\n ? plugin\n : Array.isArray(plugin) && plugin.length > 0\n ? getPluginName(plugin[0])\n : (plugin as BabelTransformPlugin).$$name ||\n (plugin as BabelTransformPlugin).name\n ? (plugin as BabelTransformPlugin).$$name ||\n (plugin as BabelTransformPlugin).name\n : undefined;\n}\n\n/**\n * Check if a Babel plugin is a duplicate of another plugin in the list.\n *\n * @param plugins - The list of existing Babel plugins.\n * @param plugin - The Babel plugin to check for duplicates.\n * @returns True if the plugin is a duplicate, false otherwise.\n */\nexport function isDuplicatePlugin(\n plugins: (ResolvedBabelTransformPluginOptions | undefined)[],\n plugin: BabelTransformPluginOptions\n): boolean {\n return !!(\n getPluginName(plugin) &&\n plugins.some(\n existing =>\n Array.isArray(existing) &&\n getPluginName(existing[0]) === getPluginName(plugin)\n )\n );\n}\n\n/**\n * Filters a Babel plugin by its runtime ID.\n *\n * @param context - The context in which the filter is applied.\n * @param fileId - The file ID to filter by.\n * @returns A filter function that checks if a plugin's ID matches the runtime ID.\n */\nexport function filterPluginByFileId<TContext extends Context = Context>(\n context: TContext,\n fileId: string\n): BabelTransformPluginFilter {\n return (code: string, id: string): boolean =>\n fileId !== id &&\n context.fs.ids[fileId] !== id &&\n fileId !== context.fs.ids[id] &&\n context.fs.ids[fileId] !== context.fs.ids[id];\n}\n\n/**\n * Adds a filter to a Babel plugin or a list of Babel plugins.\n *\n * @param context - The context in which the plugin is being added.\n * @param plugins - The Babel plugins to add the filter to.\n * @param filter - The filter function to apply to the plugins.\n * @param name - The name of the plugin to add the filter to.\n * @returns The updated list of Babel plugins with the filter applied.\n */\nexport function addPluginFilter(\n context: Context,\n plugins: BabelTransformPluginOptions[],\n filter: BabelTransformPluginFilter | null | undefined,\n name: string\n): BabelTransformPluginOptions[];\n\n/**\n * Adds a filter to a Babel plugin or a list of Babel plugins.\n *\n * @param context - The context in which the plugin is being added.\n * @param plugin - The Babel plugin to add the filter to.\n * @param filter - The filter function to apply to the plugin.\n * @returns The updated Babel plugin with the filter applied.\n */\nexport function addPluginFilter(\n context: Context,\n plugin: BabelTransformPlugin | BabelTransformPluginOptions,\n filter: NonNullable<BabelTransformPluginFilter>\n): BabelTransformPluginOptions;\n\n/**\n * Adds a filter to a Babel plugin or a list of Babel plugins.\n *\n * @param context - The context in which the plugin is being added.\n * @param pluginOrPlugins - The Babel plugin or plugins to add the filter to.\n * @param filter - The filter function to apply to the plugins.\n * @param name - The name of the plugin to add the filter to.\n * @returns The updated list of Babel plugins with the filter applied.\n */\nexport function addPluginFilter<\n T extends\n | BabelTransformPlugin\n | BabelTransformPluginOptions\n | BabelTransformPluginOptions[]\n>(\n context: Context,\n pluginOrPlugins: T,\n filter: NonNullable<BabelTransformPluginFilter>,\n name?: string\n): T extends BabelTransformPluginOptions[]\n ? BabelTransformPluginOptions[]\n : BabelTransformPluginOptions {\n if (\n !Array.isArray(pluginOrPlugins) ||\n (!pluginOrPlugins.some(plugin => Array.isArray(plugin)) &&\n pluginOrPlugins.length < 4 &&\n pluginOrPlugins.length > 0 &&\n (isSetString(pluginOrPlugins[0]) ||\n isFunction(pluginOrPlugins[0]) ||\n (pluginOrPlugins.length > 1 && isObject(pluginOrPlugins[1])) ||\n (pluginOrPlugins.length > 2 && isObject(pluginOrPlugins[2]))))\n ) {\n return Array.isArray(pluginOrPlugins)\n ? [\n pluginOrPlugins[0],\n pluginOrPlugins.length > 1 ? pluginOrPlugins[1] : {},\n {\n filter: (code, id) =>\n filter(code, id) &&\n (pluginOrPlugins.length < 2 ||\n !isFunction(pluginOrPlugins[2]) ||\n pluginOrPlugins[2]?.(code, id))\n }\n ]\n : [\n pluginOrPlugins,\n {},\n {\n filter\n }\n ];\n }\n\n if (!name) {\n throw new Error(\n \"No name was provided to \\`addPluginFilter\\`, could not find babel plugin without it.\"\n );\n }\n\n const foundIndex = pluginOrPlugins.findIndex(\n plugin => getPluginName(plugin)?.toLowerCase() === name.toLowerCase()\n );\n if (foundIndex > -1) {\n pluginOrPlugins[foundIndex] = addPluginFilter(\n context,\n pluginOrPlugins[foundIndex],\n filter,\n name\n );\n }\n\n return pluginOrPlugins;\n}\n","/* -------------------------------------------------------------------\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 { PluginOptions, PluginTarget } from \"@babel/core\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport chalk from \"chalk\";\nimport {\n BabelTransformPluginOptions,\n ResolvedBabelTransformPluginOptions\n} from \"powerlines/types/babel\";\nimport { Context } from \"powerlines/types/context\";\nimport { getPluginName } from \"./filters\";\n\nexport function resolvePluginFunction(\n context: Context,\n plugin:\n | any\n | PluginTarget\n | any[]\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | undefined]\n): BabelTransformPluginOptions {\n try {\n return Array.isArray(plugin) && plugin.length > 0 && plugin[0]\n ? isFunction(plugin[0])\n ? plugin[0](context)\n : plugin[0]\n : isFunction(plugin)\n ? plugin(context)\n : plugin;\n } catch {\n return plugin[0];\n }\n}\n\n/**\n * Resolve the [Babel](https://babeljs.io/) plugin.\n *\n * @param context - The context for the transformation.\n * @param code - The code to be transformed.\n * @param id - The ID of the source file.\n * @param plugin - The Babel plugin to resolve.\n * @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.\n */\nexport function resolveBabelPlugin(\n context: Context,\n code: string,\n id: string,\n plugin: BabelTransformPluginOptions\n): ResolvedBabelTransformPluginOptions | undefined {\n if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {\n if (\n plugin.length > 2 &&\n plugin[2] &&\n isFunction(plugin[2]) &&\n !plugin[2](code, id)\n ) {\n context.log(\n LogLevelLabel.TRACE,\n `Skipping filtered Babel plugin ${chalk.bold.cyanBright(\n getPluginName(plugin) || \"unnamed\"\n )} for ${id}`\n );\n\n return undefined;\n }\n\n return plugin.length > 2\n ? [resolvePluginFunction(context, plugin), plugin[1], plugin[2]]\n : [resolvePluginFunction(context, plugin), plugin[1], null];\n }\n\n return [resolvePluginFunction(context, plugin), {}, null];\n}\n","/* -------------------------------------------------------------------\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 { transformAsync } from \"@babel/core\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport {\n findFileExtension,\n findFileExtensionSafe\n} from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { ResolvedBabelTransformPluginOptions } from \"powerlines/types/babel\";\nimport { UserConfig } from \"powerlines/types/config\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { isDuplicatePlugin } from \"./helpers/filters\";\nimport { resolveBabelPlugin } from \"./helpers/options\";\nimport { BabelPluginContext, BabelPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\n/**\n * Babel plugin for Powerlines.\n *\n * @param options - The Babel plugin user configuration options.\n * @returns A Powerlines plugin that integrates Babel transformations.\n */\nexport const plugin = (\n options: BabelPluginOptions = {}\n): Plugin<BabelPluginContext> => {\n return {\n name: \"babel\",\n config() {\n if (!isSetObject(options)) {\n return undefined;\n }\n\n return {\n transform: { babel: options }\n } as Partial<UserConfig>;\n },\n configResolved: {\n order: \"pre\",\n handler() {\n this.devDependencies[\"@babel/core\"] = \"^7.28.4\";\n\n this.config.transform.babel = defu(this.config.transform.babel ?? {}, {\n plugins: [],\n presets: []\n });\n }\n },\n async transform(code: string, id: string) {\n if (\n isParentPath(id, this.powerlinesPath) ||\n code.includes(\"/* @storm-ignore */\") ||\n code.includes(\"/* @storm-disable */\")\n ) {\n this.log(\n LogLevelLabel.TRACE,\n `Skipping Babel transformation for: ${id}`\n );\n\n return { code, id };\n }\n\n this.log(LogLevelLabel.TRACE, `Babel transforming file: ${id}`);\n\n const plugins = this.config.transform.babel.plugins\n .map(plugin => resolveBabelPlugin(this, code, id, plugin))\n .filter(\n (plugin, _, arr) => plugin && !isDuplicatePlugin(arr, plugin)\n ) as ResolvedBabelTransformPluginOptions[];\n const presets = this.config.transform.babel.presets\n .map(preset => resolveBabelPlugin(this, code, id, preset))\n .filter(\n (preset, _, arr) => preset && !isDuplicatePlugin(arr, preset)\n ) as ResolvedBabelTransformPluginOptions[];\n\n if (\n Array.isArray(plugins) &&\n plugins.length === 0 &&\n Array.isArray(presets) &&\n presets.length === 0\n ) {\n return { code, id };\n }\n\n if (\n [\"ts\", \"cts\", \"mts\", \"tsx\"].includes(findFileExtensionSafe(id)) &&\n !isDuplicatePlugin(plugins, \"@babel/plugin-syntax-typescript\") &&\n !isDuplicatePlugin(presets, \"@babel/preset-typescript\")\n ) {\n plugins.unshift([\n \"@babel/plugin-syntax-typescript\",\n { isTSX: findFileExtension(id) === \".tsx\" }\n ]);\n }\n\n const result = await transformAsync(code, {\n highlightCode: true,\n code: true,\n ast: false,\n cloneInputAst: false,\n comments: true,\n sourceType: \"module\",\n configFile: false,\n babelrc: false,\n envName: this.config.mode,\n caller: {\n name: this.config.framework\n },\n ...(this.config.transform.babel ?? {}),\n filename: id,\n plugins: plugins\n .map(plugin => {\n return Array.isArray(plugin) && plugin.length >= 2\n ? [\n plugin[0],\n defu(plugin.length > 1 && plugin[1] ? plugin[1] : {}, {\n options\n })\n ]\n : plugin;\n })\n .filter(Boolean),\n presets: presets\n .map(preset => {\n return Array.isArray(preset) && preset.length >= 2\n ? [\n preset[0],\n defu(preset.length > 1 && preset[1] ? preset[1] : {}, {\n options\n })\n ]\n : preset;\n })\n .filter(Boolean)\n });\n if (!result?.code) {\n throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);\n }\n\n return { code: result.code, id };\n }\n } as Plugin<BabelPluginContext>;\n};\n\nexport default plugin;\n","/* -------------------------------------------------------------------\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 { createAlloyPlugin } from \"@powerlines/alloy/create-plugin\";\nimport {\n ReflectionClass,\n ReflectionKind,\n stringifyType\n} from \"@powerlines/deepkit/vendor/type\";\nimport babel from \"@powerlines/plugin-babel\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { ENV_PREFIXES } from \"@stryke/env/types\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory } from \"@stryke/fs/helpers\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport defu from \"defu\";\nimport { envBabelPlugin } from \"./babel/plugin\";\nimport { EnvBuiltin } from \"./components/env\";\nimport { loadEnv } from \"./helpers/load\";\nimport {\n getEnvDefaultTypeDefinition,\n getEnvReflectionsPath,\n getEnvTypeReflectionsPath,\n getSecretsDefaultTypeDefinition,\n readEnvReflection,\n readEnvTypeReflection,\n readSecretsReflection,\n writeEnvReflection,\n writeEnvTypeReflection\n} from \"./helpers/persistence\";\nimport { reflectEnv, reflectSecrets } from \"./helpers/reflect\";\nimport { EnvPluginContext, EnvPluginOptions } from \"./types/plugin\";\n\nexport * from \"./babel\";\nexport * from \"./components\";\nexport * from \"./helpers\";\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to inject environment variables into the source code.\n */\nexport const plugin = createAlloyPlugin<EnvPluginContext>(\n (options: EnvPluginOptions = {}) => {\n return {\n name: \"env\",\n dependsOn: [babel(options.babel)],\n async config() {\n this.log(\n LogLevelLabel.TRACE,\n \"Providing default configuration for the Powerlines `env` build plugin.\"\n );\n\n const config = {\n env: defu(options, {\n types: {} as TypeDefinitionParameter,\n prefix: []\n }),\n transform: {\n babel: {\n plugins: [envBabelPlugin]\n }\n }\n };\n\n if (config.env.types) {\n config.env.types = parseTypeDefinition(\n config.env.types\n ) as TypeDefinition;\n } else {\n this.log(\n LogLevelLabel.WARN,\n \"The `env.types` configuration parameter was not provided. Please ensure this is expected.\"\n );\n\n const envDefaultTypeDefinition =\n await getEnvDefaultTypeDefinition(this);\n config.env.types = parseTypeDefinition(\n `${envDefaultTypeDefinition.file}#${envDefaultTypeDefinition.name}`\n ) as TypeDefinition;\n }\n\n if (config.env.secrets) {\n config.env.secrets = parseTypeDefinition(\n config.env.secrets\n ) as TypeDefinition;\n } else {\n const secretsDefaultTypeDefinition =\n await getSecretsDefaultTypeDefinition(this);\n config.env.secrets = parseTypeDefinition(\n `${secretsDefaultTypeDefinition.file}#${\n secretsDefaultTypeDefinition.name\n }`\n ) as TypeDefinition;\n }\n\n config.env.prefix = toArray(\n (config.env.prefix ?? []) as string[]\n ).reduce(\n (ret: string[], prefix: string) => {\n const formattedPrefix = constantCase(prefix);\n if (!ret.includes(formattedPrefix)) {\n ret.push(formattedPrefix);\n }\n\n return ret;\n },\n [...ENV_PREFIXES, \"POWERLINES_\"] as string[]\n );\n\n config.env.prefix = config.env.prefix.reduce((ret, prefix) => {\n if (!ret.includes(prefix.replace(/_$/g, \"\"))) {\n ret.push(prefix.replace(/_$/g, \"\"));\n }\n return ret;\n }, [] as string[]);\n\n return config;\n },\n async configResolved() {\n this.log(\n LogLevelLabel.TRACE,\n `Environment plugin configuration has been resolved for the Powerlines project.`\n );\n\n this.config.env.inject ??= this.config.projectType === \"application\";\n this.env = defu(\n {\n parsed: await loadEnv(this, this.config.env)\n },\n this.env ?? {},\n {\n types: {\n env: {}\n },\n used: {\n env: {},\n secrets: {}\n },\n parsed: {},\n injected: {}\n }\n ) as EnvPluginContext[\"env\"];\n\n if (\n this.config.command !== \"prepare\" &&\n this.persistedMeta?.checksum === this.meta.checksum &&\n existsSync(getEnvTypeReflectionsPath(this, \"env\"))\n ) {\n this.log(\n LogLevelLabel.TRACE,\n `Skipping reflection initialization as the meta checksum has not changed.`\n );\n\n this.env.types.env = await readEnvTypeReflection(this, \"env\");\n\n if (existsSync(getEnvReflectionsPath(this, \"env\"))) {\n this.env.used.env = await readEnvReflection(this);\n }\n\n if (existsSync(getEnvTypeReflectionsPath(this, \"secrets\"))) {\n this.env.types.secrets = await readEnvTypeReflection(\n this,\n \"secrets\"\n );\n }\n\n if (existsSync(getEnvReflectionsPath(this, \"secrets\"))) {\n this.env.used.secrets = await readSecretsReflection(this);\n }\n } else {\n this.env.types.env = await reflectEnv(\n this,\n this.config.env.types?.file\n ? isParentPath(\n this.config.env.types?.file,\n this.workspaceConfig.workspaceRoot\n )\n ? this.config.env.types?.file\n : joinPaths(\n this.config.projectRoot,\n this.config.env.types?.file\n )\n : undefined,\n this.config.env.types?.name\n );\n if (!this.env.types.env) {\n throw new Error(\n \"Failed to find the environment configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.env, \"env\");\n\n this.env.types.secrets = await reflectSecrets(\n this,\n this.config.env.secrets?.file\n ? isParentPath(\n this.config.env.secrets?.file,\n this.workspaceConfig.workspaceRoot\n )\n ? this.config.env.secrets?.file\n : joinPaths(\n this.config.projectRoot,\n this.config.env.secrets?.file\n )\n : undefined,\n this.config.env.secrets?.name\n );\n if (!this.env.types.secrets) {\n throw new Error(\n \"Failed to find the secrets configuration type reflection in the context.\"\n );\n }\n\n await writeEnvTypeReflection(this, this.env.types.secrets, \"secrets\");\n\n this.log(\n LogLevelLabel.TRACE,\n `Resolved ${\n this.env.types.env.getProperties().length ?? 0\n } environment configuration parameters and ${\n this.env.types.secrets?.getProperties().length ?? 0\n } secret configuration parameters`\n );\n\n const envWithAlias = this.env.types.env\n .getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n Object.entries(await loadEnv(this, this.config.env)).forEach(\n ([key, value]) => {\n const unprefixedKey = this.config.env.prefix.reduce(\n (ret, prefix) => {\n if (key.replace(/_$/g, \"\").startsWith(prefix)) {\n return key.replace(/_$/g, \"\").slice(prefix.length);\n }\n return ret;\n },\n key\n );\n\n const aliasKey = envWithAlias.find(prop =>\n prop?.getAlias().reverse().includes(unprefixedKey)\n );\n if (this.env.types.env?.hasProperty(unprefixedKey) || aliasKey) {\n this.env.types.env\n .getProperty(unprefixedKey)\n .setDefaultValue(value);\n }\n }\n );\n\n this.env.used.env = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.env\n );\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n\n if (this.env.types.secrets) {\n await writeEnvTypeReflection(\n this,\n this.env.types.secrets,\n \"secrets\"\n );\n\n this.env.used.secrets = new ReflectionClass(\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters used by the ${\n this.config.name\n ? `${this.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n this.env.types.secrets\n );\n await writeEnvReflection(this, this.env.used.secrets, \"secrets\");\n }\n }\n },\n render() {\n this.log(\n LogLevelLabel.TRACE,\n `Preparing the Environment runtime artifacts for the Powerlines project.`\n );\n\n return <EnvBuiltin defaultConfig={this.config.env.defaultConfig} />;\n },\n async docs() {\n this.log(\n LogLevelLabel.TRACE,\n \"Writing Environment documentation for the Powerlines project artifacts.\"\n );\n\n // Clean and recreate the output directories\n const outputPath = joinPaths(\n this.config.projectRoot,\n \"docs\",\n \"generated\"\n );\n\n if (!existsSync(outputPath)) {\n await createDirectory(outputPath);\n }\n\n const reflection = await readEnvTypeReflection(this, \"env\");\n const envDocFile = joinPaths(outputPath, \"env.md\");\n\n this.log(\n LogLevelLabel.TRACE,\n `Documenting environment variables configuration in \"${envDocFile}\"`\n );\n\n await this.fs.write(\n envDocFile,\n `<!-- Generated by Powerlines -->\n\n # Environment variables configuration\n\n Below is a list of environment variables used by the [${\n this.packageJson.name\n }](https://www.npmjs.com/package/${\n this.packageJson.name\n }) package. These values can be updated in the \\`.env\\` file in the root of the project.\n\n ## Environment Configuration\n\n 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\n | Name | Description | Type | Default Value | Required |\n | ---- | ----------- | ---- | ------------- | :------: |\n ${reflection\n .getProperties()\n .filter(property => property.getNameAsString() !== \"__STORM_INJECTED__\")\n .sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString()))\n .map(reflectionProperty => {\n return `| ${reflectionProperty.getNameAsString().trim()} | ${(\n reflectionProperty\n .getDescription()\n ?.replaceAll(\"\\r\", \"\")\n ?.replaceAll(\"\\n\", \"\") ?? \"\"\n ).trim()} | ${stringifyType(reflectionProperty.getType())\n .trim()\n .replaceAll(\" | \", \", or \")} | ${\n reflectionProperty.hasDefault()\n ? String(reflectionProperty.getDefaultValue())?.includes('\"')\n ? reflectionProperty.getDefaultValue()\n : `\\`${reflectionProperty.getDefaultValue()}\\``\n : \"\"\n } | ${reflectionProperty.isValueRequired() ? \"\" : \"✔\"} |`;\n })\n .join(\"\\n\")}\n `\n );\n },\n async buildEnd() {\n const reflectionPath = getEnvReflectionsPath(this, \"env\");\n\n this.log(\n LogLevelLabel.TRACE,\n `Writing env reflection types to ${reflectionPath}.`\n );\n\n await writeEnvReflection(this, this.env.used.env, \"env\");\n }\n // vite: {\n // config(config: ViteUserConfig, env: ViteConfigEnv) {\n // this.log(\n // LogLevelLabel.TRACE,\n // \"Writing Vite environment variables configuration for the Powerlines project artifacts.\"\n // );\n\n // return {\n // envPrefix: this.config.env.prefix\n // };\n // }\n // }\n };\n }\n);\n\nexport default plugin;\n"],"mappings":"0kEAyIA,SAAgBsB,EAAqBhB,EAAsC,CACzE,OACEN,EAAWM,EAAM,EAChBL,EAAYK,EAAM,EAAI,YAAaA,GAASN,EAAWM,EAAMU,QAAS,CAU3E,SAAgBO,EACdjB,EACwC,CACxC,OAAOL,EAAYK,EAAM,EAAI,YAAaA,GAASN,EAAWM,EAAMU,QAAQ,CAS9E,SAAgBQ,EAAalB,EAAkD,CAC7E,OAAOgB,EAAqBhB,EAAM,EAAIiB,EAAmBjB,EAAM,CASjE,SAAgBmB,EACdC,EACa,CACb,OAAO1B,EAAW0B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ACd,mCAAmCqF,EAAc,GAClD,CAED,MAAM/F,EAAmB,KAAM,KAAKW,IAAIoB,KAAKpB,IAAK,MAAM,EAc3D,EAEJ,CAED,IAAA,GAAeP"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-BZTlThWg.mjs","names":["loadEnv","loadEnvBase","loadEnvFile","loadEnvFileBase","joinPaths","kebabCase","isSetObject","isSetString","loadConfig","defu","removeEnvPrefix","loadEnvFiles","options","mode","cwd","env","additionalFiles","length","additionalEnvFiles","Promise","all","map","additionalEnvFile","loadEnvDirectory","directory","cacheDir","packageJson","workspaceConfig","envResult","c12Result","name","envName","defaults","NAME","replace","namespace","MODE","ORG","organization","globalRc","dotenv","jitiOptions","fsCache","moduleCache","config","loadEnvFromContext","context","parsed","APP_NAME","APP_VERSION","version","BUILD_ID","meta","buildId","BUILD_TIMESTAMP","Date","timestamp","toISOString","BUILD_CHECKSUM","checksum","RELEASE_ID","releaseId","RELEASE_TAG","DEFAULT_LOCALE","locale","DEFAULT_TIMEZONE","timezone","LOG_LEVEL","logLevel","ERROR_URL","error","url","ORGANIZATION","PLATFORM","build","platform","DEBUG","STACKTRACE","ENVIRONMENT","environment","types","getProperties","reduce","ret","prop","getDefaultValue","project","workspace","projectRoot","cachePath","workspaceRoot","envPaths","process"],"sources":["../src/helpers/load.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 {\n loadEnv as loadEnvBase,\n loadEnvFile as loadEnvFileBase\n} from \"@stryke/env/load-env\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig } from \"c12\";\nimport defu from \"defu\";\nimport { WorkspaceConfig } from \"powerlines/types/config\";\nimport { EnvPluginContext, EnvPluginOptions } from \"../types/plugin\";\nimport { removeEnvPrefix } from \"./source-file-env\";\n\nasync function loadEnvFiles<TEnv extends DotenvParseOutput = DotenvParseOutput>(\n options: EnvPluginOptions,\n mode: string,\n cwd: string\n): Promise<TEnv> {\n let env = await loadEnvBase(cwd, mode);\n if (options.additionalFiles && options.additionalFiles?.length > 0) {\n const additionalEnvFiles = await Promise.all(\n options.additionalFiles.map(async additionalEnvFile =>\n loadEnvFileBase(additionalEnvFile, cwd)\n )\n );\n\n for (const additionalEnvFile of additionalEnvFiles) {\n env = defu(additionalEnvFile, env);\n }\n }\n\n return removeEnvPrefix(env) as TEnv;\n}\n\nasync function loadEnvDirectory<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(\n options: EnvPluginOptions,\n directory: string,\n mode: string,\n cacheDir: string,\n packageJson: PackageJson,\n workspaceConfig: WorkspaceConfig\n): Promise<TEnv> {\n const [envResult, c12Result] = await Promise.all([\n loadEnvFiles<TEnv>(options, mode, directory),\n loadConfig({\n cwd: directory,\n name: \"storm\",\n envName: mode,\n defaults: {\n NAME: packageJson.name?.replace(`@${workspaceConfig.namespace}/`, \"\"),\n MODE: mode,\n ORG: workspaceConfig.organization\n },\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jitiOptions: {\n fsCache: joinPaths(cacheDir, \"jiti\"),\n moduleCache: true\n }\n })\n ]);\n\n return defu(envResult as any, c12Result.config, workspaceConfig) as TEnv;\n}\n\n/**\n * Retrieves various dotenv configuration parameters from the context.\n *\n * @param context - The context to retrieve the dotenv configuration from.\n * @param parsed - The parsed dotenv configuration.\n * @returns An object containing the dotenv configuration.\n */\nexport function loadEnvFromContext(\n context: EnvPluginContext,\n parsed: DotenvParseOutput\n) {\n return defu(\n {\n APP_NAME: kebabCase(\n context.config.name ||\n context.packageJson.name?.replace(\n `/${context.workspaceConfig.namespace}`,\n \"\"\n )\n ),\n APP_VERSION: context.packageJson.version,\n BUILD_ID: context.meta.buildId,\n BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),\n BUILD_CHECKSUM: context.meta.checksum,\n RELEASE_ID: context.meta.releaseId,\n RELEASE_TAG: `${kebabCase(context.config.name)}@${context.packageJson.version}`,\n DEFAULT_LOCALE: context.workspaceConfig.locale,\n DEFAULT_TIMEZONE: context.workspaceConfig.timezone,\n LOG_LEVEL: context.config.logLevel,\n ERROR_URL: context.workspaceConfig.error?.url,\n ORGANIZATION: isSetString(context.workspaceConfig.organization)\n ? context.workspaceConfig.organization\n : context.workspaceConfig.organization?.name,\n PLATFORM: context.config.build.platform,\n MODE: context.workspaceConfig.mode,\n DEBUG: context.workspaceConfig.mode === \"development\",\n STACKTRACE: context.workspaceConfig.mode === \"development\",\n ENVIRONMENT: context.environment\n },\n isSetObject(context?.env?.types?.env)\n ? context.env.types.env?.getProperties().reduce(\n (ret, prop) => {\n ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();\n return ret;\n },\n {} as Record<string, any>\n )\n : {}\n );\n}\n\nexport async function loadEnv<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv> {\n const [project, workspace, config] = await Promise.all([\n loadEnvDirectory<TEnv>(\n options,\n context.config.projectRoot,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n options,\n context.workspaceConfig.workspaceRoot,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n options,\n context.envPaths.config,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n )\n ]);\n\n return defu(\n loadEnvFromContext(context, process.env),\n project,\n workspace,\n config\n ) as TEnv;\n}\n"],"mappings":"yZAkCA,eAAeW,EACbC,EACAC,EACAC,EACe,CACf,IAAIC,EAAM,MAAMd,EAAYa,EAAKD,EAAK,CACtC,GAAID,EAAQI,iBAAmBJ,EAAQI,iBAAiBC,OAAS,EAAG,CAClE,IAAMC,EAAqB,MAAMC,QAAQC,IACvCR,EAAQI,gBAAgBK,IAAI,KAAMC,IAChCnB,EAAgBmB,EAAmBR,EACrC,CACF,CAAC,CAED,IAAK,IAAMQ,KAAqBJ,EAC9BH,EAAMN,EAAKa,EAAmBP,EAAI,CAItC,OAAOL,EAAgBK,EAAI,CAG7B,eAAeQ,EAGbX,EACAY,EACAX,EACAY,EACAC,EACAC,EACe,CACf,GAAM,CAACC,EAAWC,GAAa,MAAMV,QAAQC,IAAI,CAC/CT,EAAmBC,EAASC,EAAMW,EAAU,CAC5ChB,EAAW,CACTM,IAAKU,EACLM,KAAM,QACNC,QAASlB,EACTmB,SAAU,CACRC,KAAMP,EAAYI,MAAMI,QAAQ,IAAIP,EAAgBQ,UAAS,GAAK,GAAG,CACrEC,KAAMvB,EACNwB,IAAKV,EAAgBW,aACtB,CACDC,SAAU,GACVb,YAAa,GACbc,OAAQ,GACRC,YAAa,CACXC,QAAStC,EAAUqB,EAAU,OAAO,CACpCkB,YAAa,GACf,CACD,CAAC,CACH,CAAC,CAEF,OAAOlC,EAAKmB,EAAkBC,EAAUe,OAAQjB,EAAgB,CAUlE,SAAgBkB,EACdC,EACAC,EACA,CACA,OAAOtC,EACL,CACEuC,SAAU3C,EACRyC,EAAQF,OAAOd,MACbgB,EAAQpB,YAAYI,MAAMI,QACxB,IAAIY,EAAQnB,gBAAgBQ,YAC5B,GAEN,CAAC,CACDc,YAAaH,EAAQpB,YAAYwB,QACjCC,SAAUL,EAAQM,KA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EX,EACAkC,EAAQ6C,SAAS/C,OACjBE,EAAQF,OAAO/B,KACfiC,EAAQ2C,UACR3C,EAAQpB,YACRoB,EAAQnB,gBACT,CACF,CAAC,CAEF,OAAOlB,EACLoC,EAAmBC,EAAS8C,QAAQ7E,IAAI,CACxCuE,EACAC,EACA3C,EACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-C4lA54bJ.d.mts","names":[],"sources":["../src/helpers/load.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;AAgGA;AACW,iBADK,kBAAA,CACL,OAAA,EAAA,gBAAA,EAAA,MAAA,EACD,iBADC,CAAA,EAAA;EACD,QAAA,EAAA,MAAA,GAAA,SAAA;EAAiB,WAAA,EAAA,MAAA,GAAA,SAAA;;EA0CL,eAAO,EAAA,MAAA;EACd,cAAA,EAAA,MAAA;EAAoB,UAAA,EAAA,MAAA;EACxB,WAAA,EAAA,MAAA;EAA2B,cAAA,EAAA,MAAA,GAAA,SAAA;EAA2B,gBAAA,EAAA,MAAA,GAAA,SAAA;EAAR,SAAA,EAAA,OAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,OAAA,GAAA,IAAA;EAAO,SAAA,EAAA,MAAA,GAAA,SAAA;;;;;;eA5CrC;;iBA0CL,qBACP,oBAAoB,4BACxB,2BAA2B,mBAAmB,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-CN-Mm8-g.d.cts","names":[],"sources":["../src/helpers/load.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAgGA;;;;iBAAgB,kBAAA,UACL,0BACD;EA0CY,QAAA,EAAO,MAAA,GAAA,SAAA;EACd,WAAA,EAAA,MAAA,GAAA,SAAA;EAAoB,QAAA,EAAA,MAAA;EACxB,eAAA,EAAA,MAAA;EAA2B,cAAA,EAAA,MAAA;EAA2B,UAAA,EAAA,MAAA;EAAR,WAAA,EAAA,MAAA;EAAO,cAAA,EAAA,MAAA,GAAA,SAAA;;;;;;;;;eA5CrC;;iBA0CL,qBACP,oBAAoB,4BACxB,2BAA2B,mBAAmB,QAAQ"}
|