@powerlines/plugin-alloy 0.25.35 → 0.25.37
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/dist/typescript/components/typescript-file.cjs +4 -15
- package/dist/typescript/components/typescript-file.d.cts.map +1 -1
- package/dist/typescript/components/typescript-file.d.mts.map +1 -1
- package/dist/typescript/components/typescript-file.mjs +4 -15
- package/dist/typescript/components/typescript-file.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -77,7 +77,7 @@ function TypescriptFile(props) {
|
|
|
77
77
|
* @returns The rendered source file header.
|
|
78
78
|
*/
|
|
79
79
|
function TypescriptFileHeader(props) {
|
|
80
|
-
const { header, hashbang, disableEslint = true, disableBiome = true,
|
|
80
|
+
const { header, hashbang, disableEslint = true, disableBiome = true, children } = props;
|
|
81
81
|
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
82
82
|
return [
|
|
83
83
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
@@ -108,17 +108,6 @@ function TypescriptFileHeader(props) {
|
|
|
108
108
|
}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
109
109
|
}
|
|
110
110
|
}),
|
|
111
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
112
|
-
get when() {
|
|
113
|
-
return Boolean(disablePrettier);
|
|
114
|
-
},
|
|
115
|
-
get children() {
|
|
116
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
|
|
117
|
-
variant: "slash-star",
|
|
118
|
-
children: "prettier-ignore"
|
|
119
|
-
}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
120
|
-
}
|
|
121
|
-
}),
|
|
122
111
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
123
112
|
get when() {
|
|
124
113
|
return Boolean(disableBiome);
|
|
@@ -129,7 +118,7 @@ function TypescriptFileHeader(props) {
|
|
|
129
118
|
}),
|
|
130
119
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
131
120
|
get when() {
|
|
132
|
-
return Boolean(disableEslint) || Boolean(
|
|
121
|
+
return Boolean(disableEslint) || Boolean(disableBiome);
|
|
133
122
|
},
|
|
134
123
|
get children() {
|
|
135
124
|
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
@@ -189,7 +178,7 @@ function TypescriptFileHeaderImports(props) {
|
|
|
189
178
|
get ender() {
|
|
190
179
|
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
191
180
|
},
|
|
192
|
-
children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`
|
|
181
|
+
children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module}";`
|
|
193
182
|
});
|
|
194
183
|
}
|
|
195
184
|
}),
|
|
@@ -206,7 +195,7 @@ function TypescriptFileHeaderImports(props) {
|
|
|
206
195
|
get ender() {
|
|
207
196
|
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
208
197
|
},
|
|
209
|
-
children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
|
|
198
|
+
children: ([module, importItem]) => require_core_helpers_code.code`import ${importItem === null ? "" : (0, _stryke_type_checks_is_string.isString)(importItem) ? importItem : `${importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !(0, _stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => (0, _stryke_type_checks_is_string.isString)(i) || !i.default).map((i) => (0, _stryke_type_checks_is_string.isString)(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
|
|
210
199
|
});
|
|
211
200
|
}
|
|
212
201
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-file.d.cts","names":[],"sources":["../../../src/typescript/components/typescript-file.tsx"],"mappings":";;;;;;KAsDY,mBAAA,GAAsB,IAAA,CAAK,iBAAA,gBACrC,cAAA;EACE,QAAA,GAAW,QAAA;EACX,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,qBAAA;EACV,cAAA,GAAiB,qBAAA;EACjB,MAAA;EACA,GAAA;AAAA;;;;;;;iBASY,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA;AAAA,UAgExC,yBAAA,SAAkC,qBAAA;EACjD,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"typescript-file.d.cts","names":[],"sources":["../../../src/typescript/components/typescript-file.tsx"],"mappings":";;;;;;KAsDY,mBAAA,GAAsB,IAAA,CAAK,iBAAA,gBACrC,cAAA;EACE,QAAA,GAAW,QAAA;EACX,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,qBAAA;EACV,cAAA,GAAiB,qBAAA;EACjB,MAAA;EACA,GAAA;AAAA;;;;;;;iBASY,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA;AAAA,UAgExC,yBAAA,SAAkC,qBAAA;EACjD,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;AAAA,UAuDpD,gCAAA,SAAyC,qBAAA;EACxD,OAAA,GAAU,qBAAA;EACV,cAAA,GAAiB,qBAAA;EACjB,KAAA,GAAQ,aAAA;AAAA;;;;;;;iBASM,2BAAA,CACd,KAAA,EAAO,gCAAA,GAAgC,QAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-file.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-file.tsx"],"mappings":";;;;;;KAsDY,mBAAA,GAAsB,IAAA,CAAK,iBAAA,gBACrC,cAAA;EACE,QAAA,GAAW,QAAA;EACX,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,qBAAA;EACV,cAAA,GAAiB,qBAAA;EACjB,MAAA;EACA,GAAA;AAAA;;;;;;;iBASY,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA;AAAA,UAgExC,yBAAA,SAAkC,qBAAA;EACjD,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"typescript-file.d.mts","names":[],"sources":["../../../src/typescript/components/typescript-file.tsx"],"mappings":";;;;;;KAsDY,mBAAA,GAAsB,IAAA,CAAK,iBAAA,gBACrC,cAAA;EACE,QAAA,GAAW,QAAA;EACX,MAAA,GAAS,QAAA;EACT,OAAA,GAAU,qBAAA;EACV,cAAA,GAAiB,qBAAA;EACjB,MAAA;EACA,GAAA;AAAA;;;;;;;iBASY,cAAA,CAAe,KAAA,EAAO,mBAAA,GAAmB,QAAA;AAAA,UAgExC,yBAAA,SAAkC,qBAAA;EACjD,MAAA,GAAS,QAAA;EACT,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,oBAAA,CAAqB,KAAA,EAAO,yBAAA,GAAyB,QAAA;AAAA,UAuDpD,gCAAA,SAAyC,qBAAA;EACxD,OAAA,GAAU,qBAAA;EACV,cAAA,GAAiB,qBAAA;EACjB,KAAA,GAAQ,aAAA;AAAA;;;;;;;iBASM,2BAAA,CACd,KAAA,EAAO,gCAAA,GAAgC,QAAA;AAAA"}
|
|
@@ -75,7 +75,7 @@ function TypescriptFile(props) {
|
|
|
75
75
|
* @returns The rendered source file header.
|
|
76
76
|
*/
|
|
77
77
|
function TypescriptFileHeader(props) {
|
|
78
|
-
const { header, hashbang, disableEslint = true, disableBiome = true,
|
|
78
|
+
const { header, hashbang, disableEslint = true, disableBiome = true, children } = props;
|
|
79
79
|
const context = usePowerlinesSafe();
|
|
80
80
|
return [
|
|
81
81
|
createComponent(Show, {
|
|
@@ -106,17 +106,6 @@ function TypescriptFileHeader(props) {
|
|
|
106
106
|
}), createIntrinsic("hbr", {})];
|
|
107
107
|
}
|
|
108
108
|
}),
|
|
109
|
-
createComponent(Show, {
|
|
110
|
-
get when() {
|
|
111
|
-
return Boolean(disablePrettier);
|
|
112
|
-
},
|
|
113
|
-
get children() {
|
|
114
|
-
return [createComponent(SingleLineComment, {
|
|
115
|
-
variant: "slash-star",
|
|
116
|
-
children: "prettier-ignore"
|
|
117
|
-
}), createIntrinsic("hbr", {})];
|
|
118
|
-
}
|
|
119
|
-
}),
|
|
120
109
|
createComponent(Show, {
|
|
121
110
|
get when() {
|
|
122
111
|
return Boolean(disableBiome);
|
|
@@ -127,7 +116,7 @@ function TypescriptFileHeader(props) {
|
|
|
127
116
|
}),
|
|
128
117
|
createComponent(Show, {
|
|
129
118
|
get when() {
|
|
130
|
-
return Boolean(disableEslint) || Boolean(
|
|
119
|
+
return Boolean(disableEslint) || Boolean(disableBiome);
|
|
131
120
|
},
|
|
132
121
|
get children() {
|
|
133
122
|
return createIntrinsic("hbr", {});
|
|
@@ -187,7 +176,7 @@ function TypescriptFileHeaderImports(props) {
|
|
|
187
176
|
get ender() {
|
|
188
177
|
return createIntrinsic("hbr", {});
|
|
189
178
|
},
|
|
190
|
-
children: ([module, importItem]) => code$1`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module}";`
|
|
179
|
+
children: ([module, importItem]) => code$1`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module}";`
|
|
191
180
|
});
|
|
192
181
|
}
|
|
193
182
|
}),
|
|
@@ -204,7 +193,7 @@ function TypescriptFileHeaderImports(props) {
|
|
|
204
193
|
get ender() {
|
|
205
194
|
return createIntrinsic("hbr", {});
|
|
206
195
|
},
|
|
207
|
-
children: ([module, importItem]) => code$1`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
|
|
196
|
+
children: ([module, importItem]) => code$1`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
|
|
208
197
|
});
|
|
209
198
|
}
|
|
210
199
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-file.mjs","names":[],"sources":["../../../src/typescript/components/typescript-file.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 type { Children } from \"@alloy-js/core\";\nimport {\n computed,\n For,\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 { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isBoolean } from \"@stryke/type-checks/is-boolean\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { code } from \"../../core/helpers/code\";\nimport {\n ComponentProps,\n SourceFileHeaderProps,\n TypescriptFileImportItem,\n TypescriptFileImports\n} from \"../../types/components\";\n\nexport type TypescriptFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n hashbang?: Children | true;\n header?: Children;\n imports?: TypescriptFileImports;\n builtinImports?: 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 [\n { children, path, imports, builtinImports, tsx, header, hashbang },\n rest\n ] = splitProps(props, [\n \"children\",\n \"path\",\n \"imports\",\n \"builtinImports\",\n \"tsx\",\n \"header\",\n \"hashbang\"\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 hashbang={hashbang}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n scope={scope}\n />\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 hashbang?: Children | true;\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 hashbang,\n disableEslint = true,\n disableBiome = true,\n disablePrettier = false,\n children\n } = props;\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show when={Boolean(hashbang)}>\n {hashbang === true\n ? code`#!/usr/bin/env ${\n context?.config.mode === \"development\"\n ? \"-S NODE_OPTIONS=--enable-source-maps\"\n : \"\"\n } node`\n : hashbang}\n <hbr />\n </Show>\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 {children}\n <hbr />\n </Show>\n <SingleLineComment>{`Generated by ${\n titleCase(context?.config?.framework) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment>{getFileHeaderWarning(context!)}</SingleLineComment>\n <hbr />\n </>\n );\n}\n\nexport interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {\n imports?: TypescriptFileImports;\n builtinImports?: 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: importProps, builtinImports: builtinImportsProps } = props;\n\n const context = usePowerlinesSafe();\n const sourceFile = useSourceFile();\n\n const scope = props.scope ?? sourceFile.scope;\n\n const imports = computed(() => {\n return Object.fromEntries(\n Object.entries(importProps ?? {}).map(([module, importItem]) => [\n module,\n Array.isArray(importItem)\n ? getUniqueBy(importItem, i => (isString(i) ? i : i.alias || i.name))\n : importItem\n ])\n );\n });\n const builtinImports = computed(() => {\n return Object.fromEntries(\n Object.entries(builtinImportsProps ?? {}).map(([module, importItem]) => [\n module,\n Array.isArray(importItem)\n ? getUniqueBy(importItem, i => (isString(i) ? i : i.alias || i.name))\n : importItem\n ])\n );\n });\n\n return (\n <Show\n when={\n scope.importedModules.size > 0 ||\n (!!imports.value && Object.keys(imports.value).length > 0) ||\n (!!builtinImports.value && Object.keys(builtinImports.value).length > 0)\n }>\n <Show when={!!imports.value && Object.keys(imports.value).length > 0}>\n <For\n each={Object.entries(imports.value ?? {})}\n hardline\n ender={<hbr />}>\n {([module, importItem]) =>\n code`import ${\n importItem === null\n ? \"\"\n : isString(importItem)\n ? importItem\n : `${\n (\n importItem.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(i => (i.alias ? i.alias : i.name))\n .join(\", \") +\n (importItem.filter(i => !isString(i) && i.default)\n .length > 0 &&\n importItem.filter(i => isString(i) || !i.default).length >\n 0\n ? \", \"\n : \"\") +\n (importItem.filter(i => isString(i) || !i.default)\n .length > 0\n ? `{ ${importItem\n .filter(i => isString(i) || !i.default)\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 }`\n } from \"${module}\";`\n }\n </For>\n </Show>\n <Show\n when={\n builtinImports.value && Object.keys(builtinImports.value).length > 0\n }>\n <For\n each={Object.entries(\n (builtinImports.value ?? {}) as Record<\n string,\n null | Array<TypescriptFileImportItem | string>\n >\n )}\n hardline\n ender={<hbr />}>\n {([module, importItem]) =>\n code`import ${\n importItem === null\n ? \"\"\n : isString(importItem)\n ? importItem\n : `${\n (\n importItem.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(i => (i.alias ? i.alias : i.name))\n .join(\", \") +\n (importItem.filter(i => !isString(i) && i.default)\n .length > 0 &&\n importItem.filter(i => isString(i) || !i.default).length >\n 0\n ? \", \"\n : \"\") +\n (importItem.filter(i => isString(i) || !i.default)\n .length > 0\n ? `{ ${importItem\n .filter(i => isString(i) || !i.default)\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 }`\n } from \"${\n module.includes(\":\")\n ? module\n : `${context?.config?.framework || \"powerlines\"}:${module}`\n }\";`\n }\n </For>\n </Show>\n <Show when={scope.importedModules.size > 0}>\n <ImportStatements records={scope.importedModules} />\n </Show>\n <hbr />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,eAAA,OAAA;CACd,MAAA,CAAA,EACA,UACA,MACA,yBAEF,KACE,QACE,YACA,QAAS,WAAQ,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA;CACnB,MAAE,mBAAU,WAAqB,uBAAA;CACjC,MAAE,SAAA,uBAAiB,iBAAqB;CACxC,MAAE,aAAiB,WAAQ,MAAA,iBAAA,KAAA;CAC3B,MAAM,QAAE,IAAO,cAAA,YAAA,UAAA,CAAA;AACf,QAAC,QAAA,IAAA,MAAA;;AAED,KAAA,IACE,KAAC,MAAK,UAAU,MAAA;AAElB,KAAE,MAAM,QACN;MAAA,IACF,KAAA,UAAA,MAAA,OAAA,CACK,KAAA,MAAS,UAAA,YAAsB,MAAA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CAAA,KAAA,MAAA,SAAA,EAAA,GAAA,IAAA,EAAA,QAAA,GAAA,EAAA,KAAA,MAAA,EAAA,UAAA,EAAA,KAAA,CAAA,KAAA,KAAA,CAAA,MAAA,MAAA,SAAA,OAAA;OACrB,CAAC;;KAEL,CAAA;IAAA,gBAAA,MAAA;KACF,IAAA,OAAA;AACD,aAAA,WAAA,CAAA,CAAA,eAAA,MAAA,EAAA,IAAA,OAAA,KAAA,eAAA,MAAA,CAAA,SAAA;;KAEA,IAAO,WAAO;AACZ,aAAO,gBAAQ,KAAmB;OAChC,IAAM,OAAA;AACA,eAAO,OAAC,QAAU,eAAA,SAAA,EAAA,CAAA;;OAEpB,UAAA;OACL,IAAA,QAAA;AACF,eAAA,gBAAA,OAAA,EAAA,CAAA;;;OAGI,CAAA;;KAEH,CAAA;IAAI,gBAAC,MAAA;KACH,IAAA,OAAM;AACJ,aAAC,MAAQ,gBAAoB,OAAC;;KAEjC,IAAA,WAAA;AACA,aAAU,gBAAkB,kBAAc,EACxC,IAAA,UAAA;AACK,cAAE,MAAO;SAEb,CAAA;;KAEH,CAAC;IAAE,gBAAe,OAAA,EAAA,CAAA;IAAA;;EAEtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"typescript-file.mjs","names":[],"sources":["../../../src/typescript/components/typescript-file.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 type { Children } from \"@alloy-js/core\";\nimport {\n computed,\n For,\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 { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isBoolean } from \"@stryke/type-checks/is-boolean\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { code } from \"../../core/helpers/code\";\nimport {\n ComponentProps,\n SourceFileHeaderProps,\n TypescriptFileImportItem,\n TypescriptFileImports\n} from \"../../types/components\";\n\nexport type TypescriptFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n hashbang?: Children | true;\n header?: Children;\n imports?: TypescriptFileImports;\n builtinImports?: 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 [\n { children, path, imports, builtinImports, tsx, header, hashbang },\n rest\n ] = splitProps(props, [\n \"children\",\n \"path\",\n \"imports\",\n \"builtinImports\",\n \"tsx\",\n \"header\",\n \"hashbang\"\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 hashbang={hashbang}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n scope={scope}\n />\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 hashbang?: Children | true;\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 hashbang,\n disableEslint = true,\n disableBiome = true,\n children\n } = props;\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show when={Boolean(hashbang)}>\n {hashbang === true\n ? code`#!/usr/bin/env ${\n context?.config.mode === \"development\"\n ? \"-S NODE_OPTIONS=--enable-source-maps\"\n : \"\"\n } node`\n : hashbang}\n <hbr />\n </Show>\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(disableBiome)}>\n <SingleLineComment>{\"biome-ignore lint: disable\"}</SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disableEslint) || Boolean(disableBiome)}>\n <hbr />\n </Show>\n <Show when={Boolean(children)}>\n {children}\n <hbr />\n </Show>\n <SingleLineComment>{`Generated by ${\n titleCase(context?.config?.framework) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment>{getFileHeaderWarning(context!)}</SingleLineComment>\n <hbr />\n </>\n );\n}\n\nexport interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {\n imports?: TypescriptFileImports;\n builtinImports?: 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: importProps, builtinImports: builtinImportsProps } = props;\n\n const context = usePowerlinesSafe();\n const sourceFile = useSourceFile();\n\n const scope = props.scope ?? sourceFile.scope;\n\n const imports = computed(() => {\n return Object.fromEntries(\n Object.entries(importProps ?? {}).map(([module, importItem]) => [\n module,\n Array.isArray(importItem)\n ? getUniqueBy(importItem, i => (isString(i) ? i : i.alias || i.name))\n : importItem\n ])\n );\n });\n const builtinImports = computed(() => {\n return Object.fromEntries(\n Object.entries(builtinImportsProps ?? {}).map(([module, importItem]) => [\n module,\n Array.isArray(importItem)\n ? getUniqueBy(importItem, i => (isString(i) ? i : i.alias || i.name))\n : importItem\n ])\n );\n });\n\n return (\n <Show\n when={\n scope.importedModules.size > 0 ||\n (!!imports.value && Object.keys(imports.value).length > 0) ||\n (!!builtinImports.value && Object.keys(builtinImports.value).length > 0)\n }>\n <Show when={!!imports.value && Object.keys(imports.value).length > 0}>\n <For\n each={Object.entries(imports.value ?? {})}\n hardline\n ender={<hbr />}>\n {([module, importItem]) =>\n code`import ${\n importItem === null\n ? \"\"\n : isString(importItem)\n ? importItem\n : `${\n (\n importItem.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(\n i =>\n `${i.type ? \"type \" : \"\"}${\n i.alias ? i.alias : i.name\n }`\n )\n .join(\", \") +\n (importItem.filter(i => !isString(i) && i.default)\n .length > 0 &&\n importItem.filter(i => isString(i) || !i.default).length >\n 0\n ? \", \"\n : \"\") +\n (importItem.filter(i => isString(i) || !i.default)\n .length > 0\n ? `{ ${importItem\n .filter(i => isString(i) || !i.default)\n .map(i =>\n isString(i)\n ? i\n : `${i.type ? \"type \" : \"\"}${\n i.alias ? `${i.name} as ${i.alias}` : i.name\n }`\n )\n .join(\", \")} }`\n : \"\")\n }`\n } from \"${module}\";`\n }\n </For>\n </Show>\n <Show\n when={\n builtinImports.value && Object.keys(builtinImports.value).length > 0\n }>\n <For\n each={Object.entries(\n (builtinImports.value ?? {}) as Record<\n string,\n null | Array<TypescriptFileImportItem | string>\n >\n )}\n hardline\n ender={<hbr />}>\n {([module, importItem]) =>\n code`import ${\n importItem === null\n ? \"\"\n : isString(importItem)\n ? importItem\n : `${\n (\n importItem.filter(\n i => !isString(i) && i.default\n ) as TypescriptFileImportItem[]\n )\n .map(\n i =>\n `${i.type ? \"type \" : \"\"}${\n i.alias ? i.alias : i.name\n }`\n )\n .join(\", \") +\n (importItem.filter(i => !isString(i) && i.default)\n .length > 0 &&\n importItem.filter(i => isString(i) || !i.default).length >\n 0\n ? \", \"\n : \"\") +\n (importItem.filter(i => isString(i) || !i.default)\n .length > 0\n ? `{ ${importItem\n .filter(i => isString(i) || !i.default)\n .map(i =>\n isString(i)\n ? i\n : `${i.type ? \"type \" : \"\"}${\n i.alias ? `${i.name} as ${i.alias}` : i.name\n }`\n )\n .join(\", \")} }`\n : \"\")\n }`\n } from \"${\n module.includes(\":\")\n ? module\n : `${context?.config?.framework || \"powerlines\"}:${module}`\n }\";`\n }\n </For>\n </Show>\n <Show when={scope.importedModules.size > 0}>\n <ImportStatements records={scope.importedModules} />\n </Show>\n <hbr />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,eAAA,OAAA;CACd,MAAA,CAAA,EACA,UACA,MACA,yBAEF,KACE,QACE,YACA,QAAS,WAAQ,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA;CACnB,MAAE,mBAAU,WAAqB,uBAAA;CACjC,MAAE,SAAA,uBAAiB,iBAAqB;CACxC,MAAE,aAAiB,WAAQ,MAAA,iBAAA,KAAA;CAC3B,MAAM,QAAE,IAAO,cAAA,YAAA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C,IAAM,UAAO;AACb,cAAA,MAAA;SAEC,CAAC;;KAEL,CAAC;IAAE,gBAAkB,OAAC,EAAA,CAAA;IAAA;;EAE1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-alloy",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.37",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various Alloy framework components and helper utilities.",
|
|
6
6
|
"repository": {
|
|
@@ -809,8 +809,8 @@
|
|
|
809
809
|
"@alloy-js/json": "0.23.0-dev.2",
|
|
810
810
|
"@alloy-js/markdown": "0.23.0-dev.1",
|
|
811
811
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
812
|
-
"@powerlines/deepkit": "^0.6.
|
|
813
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
812
|
+
"@powerlines/deepkit": "^0.6.130",
|
|
813
|
+
"@powerlines/plugin-babel": "^0.12.353",
|
|
814
814
|
"@storm-software/config-tools": "1.189.28",
|
|
815
815
|
"@stryke/capnp": "^0.12.84",
|
|
816
816
|
"@stryke/convert": "^0.6.54",
|
|
@@ -823,14 +823,14 @@
|
|
|
823
823
|
"@stryke/types": "^0.10.53",
|
|
824
824
|
"@stryke/unique-id": "^0.3.69",
|
|
825
825
|
"defu": "^6.1.4",
|
|
826
|
-
"powerlines": "^0.41.
|
|
826
|
+
"powerlines": "^0.41.16",
|
|
827
827
|
"prettier": "^3.8.1",
|
|
828
828
|
"unctx": "^2.5.0"
|
|
829
829
|
},
|
|
830
830
|
"devDependencies": {
|
|
831
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
831
|
+
"@powerlines/plugin-plugin": "^0.12.302",
|
|
832
832
|
"@types/node": "^25.5.0"
|
|
833
833
|
},
|
|
834
834
|
"publishConfig": { "access": "public" },
|
|
835
|
-
"gitHead": "
|
|
835
|
+
"gitHead": "8ec4099f9a0e88d76e36c20562958c28c12fdca0"
|
|
836
836
|
}
|