@powerlines/plugin-alloy 0.18.114 → 0.18.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/core/components/output.d.cts +3 -3
  2. package/dist/core/components/output.d.mts +1 -1
  3. package/dist/core/components/single-line-comment.d.cts +2 -2
  4. package/dist/core/components/single-line-comment.d.mts +2 -2
  5. package/dist/core/components/source-file.d.cts +3 -3
  6. package/dist/core/components/source-file.d.mts +3 -3
  7. package/dist/core/contexts/context.d.cts +2 -2
  8. package/dist/core/contexts/context.d.mts +2 -2
  9. package/dist/helpers/capnp.cjs +10 -10
  10. package/dist/helpers/capnp.d.cts +1 -1
  11. package/dist/helpers/capnp.d.mts +1 -1
  12. package/dist/helpers/capnp.mjs +6 -6
  13. package/dist/helpers/typescript.cjs +2 -2
  14. package/dist/helpers/typescript.mjs +1 -1
  15. package/dist/index.cjs +5 -9
  16. package/dist/index.d.cts +1 -1
  17. package/dist/index.d.mts +1 -1
  18. package/dist/index.mjs +4 -9
  19. package/dist/markdown/components/markdown-file.d.cts +3 -3
  20. package/dist/markdown/components/markdown-file.d.mts +3 -3
  21. package/dist/markdown/components/markdown-table.d.mts +4 -4
  22. package/dist/types/components.d.cts +2 -2
  23. package/dist/types/components.d.mts +2 -2
  24. package/dist/types/plugin.d.cts +2 -2
  25. package/dist/types/plugin.d.mts +2 -2
  26. package/dist/typescript/components/builtin-file.d.cts +2 -2
  27. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  28. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  29. package/dist/typescript/components/entry-file.d.cts +3 -3
  30. package/dist/typescript/components/entry-file.d.mts +1 -1
  31. package/dist/typescript/components/tsdoc-reflection.cjs +2 -2
  32. package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
  33. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  34. package/dist/typescript/components/tsdoc-reflection.mjs +2 -2
  35. package/dist/typescript/components/tsdoc.cjs +3 -3
  36. package/dist/typescript/components/tsdoc.d.mts +1 -1
  37. package/dist/typescript/components/tsdoc.mjs +2 -2
  38. package/dist/typescript/components/typescript-file.cjs +1 -1
  39. package/dist/typescript/components/typescript-file.mjs +1 -1
  40. package/dist/typescript/components/typescript-interface.cjs +2 -2
  41. package/dist/typescript/components/typescript-interface.d.cts +3 -3
  42. package/dist/typescript/components/typescript-interface.d.mts +4 -4
  43. package/dist/typescript/components/typescript-interface.mjs +2 -2
  44. package/dist/typescript/components/typescript-object.cjs +3 -3
  45. package/dist/typescript/components/typescript-object.d.cts +3 -3
  46. package/dist/typescript/components/typescript-object.d.mts +4 -4
  47. package/dist/typescript/components/typescript-object.mjs +2 -2
  48. package/package.json +4 -4
  49. package/dist/deepkit/src/utilities.cjs +0 -114
  50. package/dist/deepkit/src/utilities.mjs +0 -110
  51. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  52. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  53. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -6
  54. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -6
  55. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  56. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  57. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  58. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  59. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -4
  60. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -5
  61. package/dist/plugin-babel/src/helpers/options.cjs +0 -49
  62. package/dist/plugin-babel/src/helpers/options.mjs +0 -46
  63. package/dist/plugin-babel/src/index.cjs +0 -83
  64. package/dist/plugin-babel/src/index.mjs +0 -81
  65. package/dist/plugin-babel/src/types/plugin.d.cts +0 -12
  66. package/dist/plugin-babel/src/types/plugin.d.mts +0 -13
  67. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  68. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  69. package/dist/powerlines/src/lib/logger.cjs +0 -9
  70. package/dist/powerlines/src/lib/logger.mjs +0 -9
  71. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -13
  72. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -12
  73. package/dist/powerlines/src/types/api.d.cts +0 -104
  74. package/dist/powerlines/src/types/api.d.mts +0 -104
  75. package/dist/powerlines/src/types/babel.d.cts +0 -22
  76. package/dist/powerlines/src/types/babel.d.mts +0 -22
  77. package/dist/powerlines/src/types/build.d.cts +0 -185
  78. package/dist/powerlines/src/types/build.d.mts +0 -185
  79. package/dist/powerlines/src/types/commands.d.cts +0 -8
  80. package/dist/powerlines/src/types/commands.d.mts +0 -9
  81. package/dist/powerlines/src/types/config.d.cts +0 -435
  82. package/dist/powerlines/src/types/config.d.mts +0 -435
  83. package/dist/powerlines/src/types/context.d.cts +0 -514
  84. package/dist/powerlines/src/types/context.d.mts +0 -514
  85. package/dist/powerlines/src/types/fs.d.cts +0 -486
  86. package/dist/powerlines/src/types/fs.d.mts +0 -486
  87. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  88. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  89. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  90. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  91. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  92. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  93. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  94. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  95. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  96. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
@@ -1,7 +1,7 @@
1
- import { PluginContext } from "../../powerlines/src/types/context.cjs";
2
1
  import { MetaItem } from "../contexts/context.cjs";
3
- import * as _alloy_js_core9 from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
4
3
  import { OutputProps as OutputProps$1 } from "@alloy-js/core";
4
+ import { PluginContext } from "powerlines/types/context";
5
5
 
6
6
  //#region src/core/components/output.d.ts
7
7
  interface OutputProps<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> extends OutputProps$1 {
@@ -17,7 +17,7 @@ interface OutputProps<TContext extends PluginContext = PluginContext, TMeta exte
17
17
  /**
18
18
  * Output component for rendering the Powerlines plugin's output files via templates.
19
19
  */
20
- declare function Output<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(props: OutputProps<TContext, TMeta>): _alloy_js_core9.Children;
20
+ declare function Output<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>>(props: OutputProps<TContext, TMeta>): _alloy_js_core0.Children;
21
21
  declare type __ΩOutputProps = any[];
22
22
  //#endregion
23
23
  export { Output, OutputProps, __ΩOutputProps };
@@ -1,7 +1,7 @@
1
- import { PluginContext } from "../../powerlines/src/types/context.mjs";
2
1
  import { MetaItem } from "../contexts/context.mjs";
3
2
  import * as _alloy_js_core16 from "@alloy-js/core";
4
3
  import { OutputProps as OutputProps$1 } from "@alloy-js/core";
4
+ import { PluginContext } from "powerlines/types/context";
5
5
 
6
6
  //#region src/core/components/output.d.ts
7
7
  interface OutputProps<TContext extends PluginContext = PluginContext, TMeta extends Record<string, MetaItem> = Record<string, MetaItem>> extends OutputProps$1 {
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core13 from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
3
 
4
4
  //#region src/core/components/single-line-comment.d.ts
5
5
  type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown";
@@ -15,7 +15,7 @@ interface SingleLineCommentProps extends ComponentProps {
15
15
  * A single line comment block. The children are rendered as a prose element, which means that they
16
16
  * are broken into multiple lines
17
17
  */
18
- declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core13.Children;
18
+ declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core0.Children;
19
19
  declare type __ΩSingleLineCommentVariant = any[];
20
20
  declare type __ΩSingleLineCommentProps = any[];
21
21
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
- import * as _alloy_js_core13 from "@alloy-js/core";
2
+ import * as _alloy_js_core15 from "@alloy-js/core";
3
3
 
4
4
  //#region src/core/components/single-line-comment.d.ts
5
5
  type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown";
@@ -15,7 +15,7 @@ interface SingleLineCommentProps extends ComponentProps {
15
15
  * A single line comment block. The children are rendered as a prose element, which means that they
16
16
  * are broken into multiple lines
17
17
  */
18
- declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core13.Children;
18
+ declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core15.Children;
19
19
  declare type __ΩSingleLineCommentVariant = any[];
20
20
  declare type __ΩSingleLineCommentProps = any[];
21
21
  //#endregion
@@ -1,7 +1,7 @@
1
- import { StoragePreset } from "../../powerlines/src/types/fs.cjs";
2
1
  import { ComponentProps } from "../../types/components.cjs";
3
- import * as _alloy_js_core4 from "@alloy-js/core";
2
+ import * as _alloy_js_core3 from "@alloy-js/core";
4
3
  import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
4
+ import { StoragePreset } from "powerlines/types/fs";
5
5
 
6
6
  //#region src/core/components/source-file.d.ts
7
7
  type SourceFileProps = SourceFileProps$1 & ComponentProps & {
@@ -26,7 +26,7 @@ type SourceFileProps = SourceFileProps$1 & ComponentProps & {
26
26
  * @param props - The properties for the source file.
27
27
  * @returns The rendered source file component.
28
28
  */
29
- declare function SourceFile(props: SourceFileProps): _alloy_js_core4.Children;
29
+ declare function SourceFile(props: SourceFileProps): _alloy_js_core3.Children;
30
30
  declare type __ΩSourceFileProps = any[];
31
31
  //#endregion
32
32
  export { SourceFile, SourceFileProps, __ΩSourceFileProps };
@@ -1,7 +1,7 @@
1
- import { StoragePreset } from "../../powerlines/src/types/fs.mjs";
2
1
  import { ComponentProps } from "../../types/components.mjs";
3
- import * as _alloy_js_core12 from "@alloy-js/core";
2
+ import * as _alloy_js_core14 from "@alloy-js/core";
4
3
  import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
4
+ import { StoragePreset } from "powerlines/types/fs";
5
5
 
6
6
  //#region src/core/components/source-file.d.ts
7
7
  type SourceFileProps = SourceFileProps$1 & ComponentProps & {
@@ -26,7 +26,7 @@ type SourceFileProps = SourceFileProps$1 & ComponentProps & {
26
26
  * @param props - The properties for the source file.
27
27
  * @returns The rendered source file component.
28
28
  */
29
- declare function SourceFile(props: SourceFileProps): _alloy_js_core12.Children;
29
+ declare function SourceFile(props: SourceFileProps): _alloy_js_core14.Children;
30
30
  declare type __ΩSourceFileProps = any[];
31
31
  //#endregion
32
32
  export { SourceFile, SourceFileProps, __ΩSourceFileProps };
@@ -1,6 +1,6 @@
1
- import { StoragePreset } from "../../powerlines/src/types/fs.cjs";
2
- import { PluginContext } from "../../powerlines/src/types/context.cjs";
3
1
  import { ComponentContext } from "@alloy-js/core";
2
+ import { PluginContext } from "powerlines/types/context";
3
+ import { StoragePreset } from "powerlines/types/fs";
4
4
 
5
5
  //#region src/core/contexts/context.d.ts
6
6
  interface MetaItem {
@@ -1,6 +1,6 @@
1
- import { StoragePreset } from "../../powerlines/src/types/fs.mjs";
2
- import { PluginContext } from "../../powerlines/src/types/context.mjs";
3
1
  import { ComponentContext } from "@alloy-js/core";
2
+ import { PluginContext } from "powerlines/types/context";
3
+ import { StoragePreset } from "powerlines/types/fs";
4
4
 
5
5
  //#region src/core/contexts/context.d.ts
6
6
  interface MetaItem {
@@ -1,28 +1,28 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_utilities = require('../deepkit/src/utilities.cjs');
3
- const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
4
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
5
- let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
6
- let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
7
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
2
+ let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
8
3
  let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
9
4
  let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
10
6
  let defu = require("defu");
11
7
  defu = require_rolldown_runtime.__toESM(defu);
8
+ let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
12
9
  let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
13
10
  let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
14
11
  let __powerlines_deepkit_vendor_core = require("@powerlines/deepkit/vendor/core");
15
12
  let __stryke_capnp_compile = require("@stryke/capnp/compile");
16
13
  let __stryke_capnp_helpers = require("@stryke/capnp/helpers");
17
14
  let __stryke_convert_to_array = require("@stryke/convert/to-array");
15
+ let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
18
16
  let __stryke_json = require("@stryke/json");
19
17
  let __stryke_path_join = require("@stryke/path/join");
20
18
  let __stryke_string_format_get_words = require("@stryke/string-format/get-words");
21
19
  let __stryke_type_checks_is_bigint = require("@stryke/type-checks/is-bigint");
20
+ let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
22
21
  let __stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
23
22
  let node_buffer = require("node:buffer");
24
23
  let node_child_process = require("node:child_process");
25
24
  let node_util = require("node:util");
25
+ let powerlines_lib_utilities_file_header = require("powerlines/lib/utilities/file-header");
26
26
 
27
27
  //#region src/helpers/capnp.ts
28
28
  /**
@@ -95,7 +95,7 @@ function isVoidType(type) {
95
95
  * @returns A string representation of the Cap'n Proto primitive type.
96
96
  */
97
97
  function getCapnpUnionTypes(type) {
98
- return require_utilities.getUnionTypes(type);
98
+ return (0, __powerlines_deepkit_utilities.getUnionTypes)(type);
99
99
  }
100
100
  /**
101
101
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
@@ -118,7 +118,7 @@ async function generateCapnpId() {
118
118
  }
119
119
  async function generateCapnp(context, reflection, options) {
120
120
  return `${(await generateCapnpId()).trim()};
121
- ${require_file_header.getBaseFileHeader(context).replace(/^\r*\n*/g, "").replaceAll("//", "#")}
121
+ ${(0, powerlines_lib_utilities_file_header.getBaseFileHeader)(context).replace(/^\r*\n*/g, "").replaceAll("//", "#")}
122
122
  ${reflection.getMethods().length === 0 ? generateCapnpStruct(reflection, options) : generateCapnpInterface(reflection, options)}
123
123
  `.trim();
124
124
  }
@@ -187,7 +187,7 @@ function generateCapnpMethodSchema(reflection, indexCounter) {
187
187
  if (!methodName) throw new Error(`Cannot generate Cap'n Proto schema for method without a name - Parent interface: ${reflection.reflectionClass.getName()}`);
188
188
  return `${(0, __stryke_string_format_camel_case.camelCase)(methodName)} @${indexCounter()} (${reflection.getParameters().map((param) => {
189
189
  return `${(0, __stryke_string_format_camel_case.camelCase)(param.getName())} :${generateCapnpPrimitive(param.getType())}${param.hasDefault() ? ` = ${stringifyCapnpDefaultValue(param)}` : ""}`;
190
- }).join(", ")})${isVoidType(reflection.getReturnType()) ? "" : ` -> (${require_utilities.kindToName(reflection.getReturnType().kind)}: ${generateCapnpPrimitive(reflection.getReturnType())})`}; # ${(reflection.getDescription() || `The ${(0, __stryke_string_format_title_case.titleCase)(reflection.reflectionClass.getTitle() || reflection.reflectionClass.getName())} interface ${(0, __stryke_string_format_title_case.titleCase)(methodName)} method.`).replaceAll("\n", ". ")}`;
190
+ }).join(", ")})${isVoidType(reflection.getReturnType()) ? "" : ` -> (${(0, __powerlines_deepkit_utilities.kindToName)(reflection.getReturnType().kind)}: ${generateCapnpPrimitive(reflection.getReturnType())})`}; # ${(reflection.getDescription() || `The ${(0, __stryke_string_format_title_case.titleCase)(reflection.reflectionClass.getTitle() || reflection.reflectionClass.getName())} interface ${(0, __stryke_string_format_title_case.titleCase)(methodName)} method.`).replaceAll("\n", ". ")}`;
191
191
  }
192
192
  function generateCapnpPropertyComment(reflection) {
193
193
  const result = (0, __stryke_string_format_get_words.getWords)(reflection.getDescription() || `A schema property for ${(0, __stryke_string_format_title_case.titleCase)(reflection.getTitle() || reflection.getNameAsString())} field.`, { relaxed: true }).reduce((ret, word) => {
@@ -207,7 +207,7 @@ ${generateCapnpPropertyComment(reflection)}`;
207
207
  else if (getCapnpUnionTypes(reflection.type).filter((type) => type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal && ((0, __stryke_type_checks_is_string.isString)(type.literal) || (0, __stryke_type_checks_is_number.isNumber)(type.literal))).length === 1) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${formatEnumName(reflection.getNameAsString())}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
208
208
  ${generateCapnpPropertyComment(reflection)}`;
209
209
  else return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} :union {
210
- ${getCapnpUnionTypes(reflection.type).map((type) => ` ${require_utilities.kindToName(type.kind)} @${indexCounter()} :${generateCapnpPrimitive(type)};`).join("\n")}
210
+ ${getCapnpUnionTypes(reflection.type).map((type) => ` ${(0, __powerlines_deepkit_utilities.kindToName)(type.kind)} @${indexCounter()} :${generateCapnpPrimitive(type)};`).join("\n")}
211
211
  }
212
212
  ${generateCapnpPropertyComment(reflection)}`;
213
213
  else if (reflection.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.array) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :List(${generateCapnpPrimitive(reflection.getSubType())})${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
@@ -1,4 +1,4 @@
1
- import { Context, PluginContext } from "../powerlines/src/types/context.cjs";
1
+ import { Context, PluginContext } from "powerlines/types/context";
2
2
  import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionProperty, Type, TypeEnum, TypeUnion } from "@powerlines/deepkit/vendor/type";
3
3
  import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
4
 
@@ -1,5 +1,5 @@
1
- import { Context, PluginContext } from "../powerlines/src/types/context.mjs";
2
1
  import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionProperty, Type, TypeEnum, TypeUnion } from "@powerlines/deepkit/vendor/type";
2
+ import { Context, PluginContext } from "powerlines/types/context";
3
3
  import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
4
 
5
5
  //#region src/helpers/capnp.d.ts
@@ -1,26 +1,26 @@
1
- import { getUnionTypes, kindToName } from "../deepkit/src/utilities.mjs";
2
- import { getBaseFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
3
- import { ReflectionKind, memberNameToString } from "@powerlines/deepkit/vendor/type";
4
- import { getUniqueBy } from "@stryke/helpers/get-unique";
5
- import { isNull } from "@stryke/type-checks/is-null";
6
- import { isString } from "@stryke/type-checks/is-string";
1
+ import { getUnionTypes, kindToName } from "@powerlines/deepkit/utilities";
7
2
  import { isUndefined } from "@stryke/type-checks/is-undefined";
8
3
  import { titleCase } from "@stryke/string-format/title-case";
4
+ import { isString } from "@stryke/type-checks/is-string";
9
5
  import defu from "defu";
6
+ import { ReflectionKind, memberNameToString } from "@powerlines/deepkit/vendor/type";
10
7
  import { pascalCase } from "@stryke/string-format/pascal-case";
11
8
  import { camelCase } from "@stryke/string-format/camel-case";
12
9
  import { getClassName } from "@powerlines/deepkit/vendor/core";
13
10
  import { capnpc } from "@stryke/capnp/compile";
14
11
  import { resolveOptions } from "@stryke/capnp/helpers";
15
12
  import { toArray } from "@stryke/convert/to-array";
13
+ import { getUniqueBy } from "@stryke/helpers/get-unique";
16
14
  import { StormJSON } from "@stryke/json";
17
15
  import { joinPaths } from "@stryke/path/join";
18
16
  import { getWords } from "@stryke/string-format/get-words";
19
17
  import { isBigInt } from "@stryke/type-checks/is-bigint";
18
+ import { isNull } from "@stryke/type-checks/is-null";
20
19
  import { isNumber } from "@stryke/type-checks/is-number";
21
20
  import { Buffer } from "node:buffer";
22
21
  import { exec } from "node:child_process";
23
22
  import { promisify } from "node:util";
23
+ import { getBaseFileHeader } from "powerlines/lib/utilities/file-header";
24
24
 
25
25
  //#region src/helpers/capnp.ts
26
26
  /**
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_utilities = require('../deepkit/src/utilities.cjs');
2
+ let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
3
3
  let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
4
4
  let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
5
  let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
@@ -34,7 +34,7 @@ export const ${(0, __stryke_string_format_camel_case.camelCase)(options.override
34
34
  * @ignored` : ""}${item.isHidden() ? `
35
35
  * @hidden` : ""}
36
36
  */
37
- ${item.getNameAsString()}: ${require_utilities.stringifyValue(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
37
+ ${item.getNameAsString()}: ${(0, __powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
38
38
  if ((0, __stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
39
39
  return ret;
40
40
  }, void 0) ?? item.getDefaultValue())}`).join(", \n")}
@@ -1,4 +1,4 @@
1
- import { stringifyValue } from "../deepkit/src/utilities.mjs";
1
+ import { stringifyValue } from "@powerlines/deepkit/utilities";
2
2
  import { isUndefined } from "@stryke/type-checks/is-undefined";
3
3
  import { titleCase } from "@stryke/string-format/title-case";
4
4
  import { camelCase } from "@stryke/string-format/camel-case";
package/dist/index.cjs CHANGED
@@ -1,13 +1,14 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
3
  const require_core_components_output = require('./core/components/output.cjs');
4
- const require_index = require('./plugin-babel/src/index.cjs');
5
4
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
5
  let __alloy_js_core = require("@alloy-js/core");
7
6
  let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
8
- let __stryke_json_storm_json = require("@stryke/json/storm-json");
9
7
  let __alloy_js_babel_preset = require("@alloy-js/babel-preset");
10
8
  __alloy_js_babel_preset = require_rolldown_runtime.__toESM(__alloy_js_babel_preset);
9
+ let __powerlines_plugin_babel = require("@powerlines/plugin-babel");
10
+ __powerlines_plugin_babel = require_rolldown_runtime.__toESM(__powerlines_plugin_babel);
11
+ let __stryke_json_storm_json = require("@stryke/json/storm-json");
11
12
 
12
13
  //#region src/index.tsx
13
14
  /**
@@ -18,7 +19,7 @@ __alloy_js_babel_preset = require_rolldown_runtime.__toESM(__alloy_js_babel_pres
18
19
  */
19
20
  const plugin = (options = {}) => {
20
21
  return [
21
- require_index.default(),
22
+ (0, __powerlines_plugin_babel.default)(),
22
23
  {
23
24
  name: "alloy:config",
24
25
  config() {
@@ -35,12 +36,7 @@ const plugin = (options = {}) => {
35
36
  ]] } },
36
37
  build: {
37
38
  inputOptions: { transform: { jsx: "preserve" } },
38
- external: [
39
- "@alloy-js/core",
40
- "@alloy-js/typescript",
41
- "@alloy-js/json",
42
- "@alloy-js/markdown"
43
- ]
39
+ external: [/^@?powerlines\//, /^@alloy-js\//]
44
40
  }
45
41
  };
46
42
  },
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
1
  import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.cjs";
2
+ import { Plugin } from "powerlines/types/plugin";
3
3
 
4
4
  //#region src/index.d.ts
5
5
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
1
  import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.mjs";
2
+ import { Plugin } from "powerlines/types/plugin";
3
3
 
4
4
  //#region src/index.d.ts
5
5
 
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Output as Output$1 } from "./core/components/output.mjs";
2
- import src_default$1 from "./plugin-babel/src/index.mjs";
3
2
  import { createComponent } from "@alloy-js/core/jsx-runtime";
4
3
  import { renderAsync, traverseOutput } from "@alloy-js/core";
5
4
  import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
6
- import { StormJSON } from "@stryke/json/storm-json";
7
5
  import alloyPreset from "@alloy-js/babel-preset";
6
+ import babel from "@powerlines/plugin-babel";
7
+ import { StormJSON } from "@stryke/json/storm-json";
8
8
 
9
9
  //#region src/index.tsx
10
10
  /**
@@ -15,7 +15,7 @@ import alloyPreset from "@alloy-js/babel-preset";
15
15
  */
16
16
  const plugin = (options = {}) => {
17
17
  return [
18
- src_default$1(),
18
+ babel(),
19
19
  {
20
20
  name: "alloy:config",
21
21
  config() {
@@ -32,12 +32,7 @@ const plugin = (options = {}) => {
32
32
  ]] } },
33
33
  build: {
34
34
  inputOptions: { transform: { jsx: "preserve" } },
35
- external: [
36
- "@alloy-js/core",
37
- "@alloy-js/typescript",
38
- "@alloy-js/json",
39
- "@alloy-js/markdown"
40
- ]
35
+ external: [/^@?powerlines\//, /^@alloy-js\//]
41
36
  }
42
37
  };
43
38
  },
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
2
2
  import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
3
- import * as _alloy_js_core14 from "@alloy-js/core";
3
+ import * as _alloy_js_core4 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-file.d.ts
6
6
  type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
@@ -10,14 +10,14 @@ type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
10
10
  * @param props - The properties for the source file.
11
11
  * @returns The rendered source file component.
12
12
  */
13
- declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core14.Children;
13
+ declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core4.Children;
14
14
  /**
15
15
  * Renders the header for a Powerlines Typescript source file.
16
16
  *
17
17
  * @param props - The properties for the source file header.
18
18
  * @returns The rendered source file header.
19
19
  */
20
- declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core14.Children;
20
+ declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core4.Children;
21
21
  declare type __ΩMarkdownFileProps = any[];
22
22
  //#endregion
23
23
  export { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps };
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, SourceFileHeaderProps } from "../../types/components.mjs";
2
2
  import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
3
- import * as _alloy_js_core14 from "@alloy-js/core";
3
+ import * as _alloy_js_core12 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-file.d.ts
6
6
  type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
@@ -10,14 +10,14 @@ type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
10
10
  * @param props - The properties for the source file.
11
11
  * @returns The rendered source file component.
12
12
  */
13
- declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core14.Children;
13
+ declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core12.Children;
14
14
  /**
15
15
  * Renders the header for a Powerlines Typescript source file.
16
16
  *
17
17
  * @param props - The properties for the source file header.
18
18
  * @returns The rendered source file header.
19
19
  */
20
- declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core14.Children;
20
+ declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core12.Children;
21
21
  declare type __ΩMarkdownFileProps = any[];
22
22
  //#endregion
23
23
  export { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps };
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from "../../types/components.mjs";
2
2
  import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
3
- import * as _alloy_js_core9 from "@alloy-js/core";
3
+ import * as _alloy_js_core8 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-table.d.ts
6
6
  interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
@@ -9,18 +9,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
9
9
  /**
10
10
  * Component that provides a context for rendering markdown tables.
11
11
  */
12
- declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core9.Children;
12
+ declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core8.Children;
13
13
  type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
14
14
  width?: number;
15
15
  };
16
16
  /**
17
17
  * Component that provides a context for rendering markdown tables.
18
18
  */
19
- declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core9.Children;
19
+ declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core8.Children;
20
20
  /**
21
21
  * Component that provides a context for rendering markdown tables.
22
22
  */
23
- declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core9.Children;
23
+ declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core8.Children;
24
24
  declare type __ΩMarkdownTableProps = any[];
25
25
  declare type __ΩMarkdownTableColumnProps = any[];
26
26
  //#endregion
@@ -1,7 +1,7 @@
1
- import { StoragePreset } from "../powerlines/src/types/fs.cjs";
2
- import { ResolvedEntryTypeDefinition } from "../powerlines/src/types/resolved.cjs";
3
1
  import { Children, Context } from "@alloy-js/core";
2
+ import { StoragePreset } from "powerlines/types/fs";
4
3
  import { SourceFileContext } from "@alloy-js/typescript";
4
+ import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
5
5
 
6
6
  //#region src/types/components.d.ts
7
7
  interface CopyOutputFile {
@@ -1,7 +1,7 @@
1
- import { StoragePreset } from "../powerlines/src/types/fs.mjs";
2
- import { ResolvedEntryTypeDefinition } from "../powerlines/src/types/resolved.mjs";
3
1
  import { Children, Context } from "@alloy-js/core";
4
2
  import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
3
+ import { StoragePreset } from "powerlines/types/fs";
4
+ import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
5
5
 
6
6
  //#region src/types/components.d.ts
7
7
  interface CopyOutputFile {
@@ -1,6 +1,6 @@
1
- import { PluginContext } from "../powerlines/src/types/context.cjs";
2
- import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.cjs";
3
1
  import { Children, PrintTreeOptions } from "@alloy-js/core";
2
+ import { PluginContext } from "powerlines/types/context";
3
+ import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types/plugin";
4
4
 
5
5
  //#region src/types/plugin.d.ts
6
6
  type AlloyPluginOptions = Partial<PrintTreeOptions> & {
@@ -1,6 +1,6 @@
1
- import { PluginContext } from "../powerlines/src/types/context.mjs";
2
- import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.mjs";
3
1
  import { Children, PrintTreeOptions } from "@alloy-js/core";
2
+ import { PluginContext } from "powerlines/types/context";
3
+ import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types/plugin";
4
4
 
5
5
  //#region src/types/plugin.d.ts
6
6
  type AlloyPluginOptions = Partial<PrintTreeOptions> & {
@@ -1,6 +1,6 @@
1
1
  import { TSDocModuleProps } from "./tsdoc.cjs";
2
2
  import { TypescriptFileProps } from "./typescript-file.cjs";
3
- import * as _alloy_js_core5 from "@alloy-js/core";
3
+ import * as _alloy_js_core6 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/builtin-file.d.ts
6
6
  type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
@@ -28,7 +28,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
28
28
  * @param props - The properties for the source file.
29
29
  * @returns The rendered source file component.
30
30
  */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core5.Children;
31
+ declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core6.Children;
32
32
  declare type __ΩBuiltinFileProps = any[];
33
33
  //#endregion
34
34
  export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core1 from "@alloy-js/core";
1
+ import * as _alloy_js_core16 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core1.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core16.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core8 from "@alloy-js/core";
1
+ import * as _alloy_js_core11 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core8.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core11.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,6 +1,6 @@
1
- import { ResolvedEntryTypeDefinition } from "../../powerlines/src/types/resolved.cjs";
2
1
  import { TypescriptFileProps } from "./typescript-file.cjs";
3
- import * as _alloy_js_core16 from "@alloy-js/core";
2
+ import * as _alloy_js_core9 from "@alloy-js/core";
3
+ import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
6
6
  type EntryFileProps = TypescriptFileProps & {
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core16.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core9.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFile, EntryFileProps, __ΩEntryFileProps };
@@ -1,6 +1,6 @@
1
- import { ResolvedEntryTypeDefinition } from "../../powerlines/src/types/resolved.mjs";
2
1
  import { TypescriptFileProps } from "./typescript-file.mjs";
3
2
  import * as _alloy_js_core6 from "@alloy-js/core";
3
+ import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
6
6
  type EntryFileProps = TypescriptFileProps & {
@@ -3,10 +3,10 @@ const require_typescript_components_tsdoc = require('./tsdoc.cjs');
3
3
  const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
4
4
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
5
  let __alloy_js_core = require("@alloy-js/core");
6
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
7
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
8
6
  let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
7
+ let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
9
8
  let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
10
10
 
11
11
  //#region src/typescript/components/tsdoc-reflection.tsx
12
12
  /**
@@ -1,18 +1,18 @@
1
1
  import { TSDocProps } from "./tsdoc.cjs";
2
- import * as _alloy_js_core6 from "@alloy-js/core";
2
+ import * as _alloy_js_core13 from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/components/tsdoc-reflection.d.ts
5
5
  /**
6
6
  * Generates a TypeScript interface property for the given reflection class.
7
7
  */
8
- declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core6.Children;
8
+ declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core13.Children;
9
9
  /**
10
10
  * Generates a TypeScript interface property for the given reflection class.
11
11
  */
12
- declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core6.Children;
12
+ declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core13.Children;
13
13
  /**
14
14
  * Generates a TypeScript interface property for the given reflection class.
15
15
  */
16
- declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core6.Children;
16
+ declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core13.Children;
17
17
  //#endregion
18
18
  export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };