@powerlines/plugin-alloy 0.25.24 → 0.25.26

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 (190) hide show
  1. package/README.md +14 -16
  2. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
  3. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  4. package/dist/core/components/index.cjs +1 -0
  5. package/dist/core/components/output.cjs +9 -8
  6. package/dist/core/components/output.d.cts +2 -3
  7. package/dist/core/components/output.d.cts.map +1 -1
  8. package/dist/core/components/output.d.mts +2 -3
  9. package/dist/core/components/output.d.mts.map +1 -1
  10. package/dist/core/components/single-line-comment.cjs +6 -5
  11. package/dist/core/components/single-line-comment.d.cts +2 -2
  12. package/dist/core/components/single-line-comment.d.cts.map +1 -1
  13. package/dist/core/components/single-line-comment.d.mts +2 -2
  14. package/dist/core/components/single-line-comment.d.mts.map +1 -1
  15. package/dist/core/components/source-file.cjs +14 -13
  16. package/dist/core/components/source-file.d.cts.map +1 -1
  17. package/dist/core/components/source-file.d.mts +2 -2
  18. package/dist/core/components/source-file.d.mts.map +1 -1
  19. package/dist/core/components/spacing.cjs +6 -5
  20. package/dist/core/components/spacing.d.cts.map +1 -1
  21. package/dist/core/components/spacing.d.mts +2 -2
  22. package/dist/core/components/spacing.d.mts.map +1 -1
  23. package/dist/core/contexts/context.cjs +5 -4
  24. package/dist/core/contexts/context.d.cts +0 -1
  25. package/dist/core/contexts/context.d.cts.map +1 -1
  26. package/dist/core/contexts/context.d.mts +0 -1
  27. package/dist/core/contexts/context.d.mts.map +1 -1
  28. package/dist/core/contexts/index.cjs +1 -0
  29. package/dist/core/contexts/meta.cjs +5 -4
  30. package/dist/core/contexts/meta.d.cts.map +1 -1
  31. package/dist/core/contexts/meta.d.mts.map +1 -1
  32. package/dist/core/contexts/reflection.cjs +11 -10
  33. package/dist/core/contexts/reflection.d.cts.map +1 -1
  34. package/dist/core/contexts/reflection.d.mts.map +1 -1
  35. package/dist/core/helpers/code.cjs +4 -3
  36. package/dist/core/helpers/code.d.cts +0 -1
  37. package/dist/core/helpers/code.d.cts.map +1 -1
  38. package/dist/core/helpers/code.d.mts +0 -1
  39. package/dist/core/helpers/code.d.mts.map +1 -1
  40. package/dist/core/helpers/index.cjs +1 -0
  41. package/dist/core/index.cjs +1 -0
  42. package/dist/core/index.d.cts +0 -3
  43. package/dist/core/index.d.mts +0 -3
  44. package/dist/helpers/capnp.cjs +65 -64
  45. package/dist/helpers/capnp.d.cts +0 -1
  46. package/dist/helpers/capnp.d.cts.map +1 -1
  47. package/dist/helpers/capnp.d.mts +0 -1
  48. package/dist/helpers/capnp.d.mts.map +1 -1
  49. package/dist/helpers/capnp.mjs +3 -3
  50. package/dist/helpers/create-builtin.cjs +4 -3
  51. package/dist/helpers/create-builtin.d.cts.map +1 -1
  52. package/dist/helpers/create-builtin.d.mts.map +1 -1
  53. package/dist/helpers/index.cjs +1 -0
  54. package/dist/helpers/refkey.cjs +4 -3
  55. package/dist/helpers/refkey.d.cts +0 -1
  56. package/dist/helpers/refkey.d.cts.map +1 -1
  57. package/dist/helpers/refkey.d.mts +0 -1
  58. package/dist/helpers/refkey.d.mts.map +1 -1
  59. package/dist/helpers/typescript.cjs +14 -13
  60. package/dist/helpers/typescript.d.cts.map +1 -1
  61. package/dist/helpers/typescript.d.mts.map +1 -1
  62. package/dist/index.cjs +8 -9
  63. package/dist/index.d.cts.map +1 -1
  64. package/dist/index.d.mts.map +1 -1
  65. package/dist/index.mjs +1 -2
  66. package/dist/markdown/components/front-matter.cjs +8 -7
  67. package/dist/markdown/components/front-matter.d.cts +2 -2
  68. package/dist/markdown/components/front-matter.d.cts.map +1 -1
  69. package/dist/markdown/components/front-matter.d.mts +2 -2
  70. package/dist/markdown/components/front-matter.d.mts.map +1 -1
  71. package/dist/markdown/components/index.cjs +1 -0
  72. package/dist/markdown/components/markdown-file.cjs +34 -33
  73. package/dist/markdown/components/markdown-file.d.cts +3 -3
  74. package/dist/markdown/components/markdown-file.d.cts.map +1 -1
  75. package/dist/markdown/components/markdown-file.d.mts +3 -3
  76. package/dist/markdown/components/markdown-file.d.mts.map +1 -1
  77. package/dist/markdown/components/markdown-table.cjs +26 -25
  78. package/dist/markdown/components/markdown-table.d.cts +4 -4
  79. package/dist/markdown/components/markdown-table.d.cts.map +1 -1
  80. package/dist/markdown/components/markdown-table.d.mts.map +1 -1
  81. package/dist/markdown/contexts/index.cjs +1 -0
  82. package/dist/markdown/contexts/markdown-table.cjs +7 -6
  83. package/dist/markdown/contexts/markdown-table.d.cts.map +1 -1
  84. package/dist/markdown/contexts/markdown-table.d.mts.map +1 -1
  85. package/dist/markdown/index.cjs +1 -0
  86. package/dist/markdown/index.d.cts +0 -2
  87. package/dist/markdown/index.d.mts +0 -2
  88. package/dist/render.cjs +10 -9
  89. package/dist/render.d.cts +0 -1
  90. package/dist/render.d.cts.map +1 -1
  91. package/dist/render.d.mts +0 -1
  92. package/dist/render.d.mts.map +1 -1
  93. package/dist/types/components.d.cts.map +1 -1
  94. package/dist/types/components.d.mts.map +1 -1
  95. package/dist/types/plugin.d.cts.map +1 -1
  96. package/dist/types/plugin.d.mts.map +1 -1
  97. package/dist/typescript/components/builtin-file.cjs +14 -13
  98. package/dist/typescript/components/builtin-file.d.cts +2 -2
  99. package/dist/typescript/components/builtin-file.d.cts.map +1 -1
  100. package/dist/typescript/components/builtin-file.d.mts +2 -2
  101. package/dist/typescript/components/builtin-file.d.mts.map +1 -1
  102. package/dist/typescript/components/class-declaration.cjs +57 -56
  103. package/dist/typescript/components/class-declaration.d.cts.map +1 -1
  104. package/dist/typescript/components/class-declaration.d.mts.map +1 -1
  105. package/dist/typescript/components/dynamic-import-statement.cjs +6 -5
  106. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  107. package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
  108. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  109. package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -1
  110. package/dist/typescript/components/entry-file.cjs +12 -11
  111. package/dist/typescript/components/entry-file.d.cts +2 -2
  112. package/dist/typescript/components/entry-file.d.cts.map +1 -1
  113. package/dist/typescript/components/entry-file.d.mts +2 -2
  114. package/dist/typescript/components/entry-file.d.mts.map +1 -1
  115. package/dist/typescript/components/index.cjs +1 -0
  116. package/dist/typescript/components/infrastructure-file.cjs +11 -10
  117. package/dist/typescript/components/infrastructure-file.d.cts +2 -2
  118. package/dist/typescript/components/infrastructure-file.d.cts.map +1 -1
  119. package/dist/typescript/components/infrastructure-file.d.mts +2 -2
  120. package/dist/typescript/components/infrastructure-file.d.mts.map +1 -1
  121. package/dist/typescript/components/interface-declaration.cjs +59 -58
  122. package/dist/typescript/components/interface-declaration.d.cts +2 -2
  123. package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
  124. package/dist/typescript/components/interface-declaration.d.mts +2 -2
  125. package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
  126. package/dist/typescript/components/interface-declaration.mjs +2 -2
  127. package/dist/typescript/components/object-declaration.cjs +40 -39
  128. package/dist/typescript/components/object-declaration.d.cts +3 -3
  129. package/dist/typescript/components/object-declaration.d.cts.map +1 -1
  130. package/dist/typescript/components/object-declaration.d.mts +3 -3
  131. package/dist/typescript/components/object-declaration.d.mts.map +1 -1
  132. package/dist/typescript/components/property-name.cjs +8 -7
  133. package/dist/typescript/components/property-name.d.cts +2 -2
  134. package/dist/typescript/components/property-name.d.cts.map +1 -1
  135. package/dist/typescript/components/property-name.d.mts +2 -2
  136. package/dist/typescript/components/property-name.d.mts.map +1 -1
  137. package/dist/typescript/components/record-expression.cjs +4 -3
  138. package/dist/typescript/components/record-expression.d.cts.map +1 -1
  139. package/dist/typescript/components/record-expression.d.mts.map +1 -1
  140. package/dist/typescript/components/tsdoc-reflection.cjs +74 -73
  141. package/dist/typescript/components/tsdoc-reflection.d.cts +7 -7
  142. package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
  143. package/dist/typescript/components/tsdoc-reflection.d.mts +7 -7
  144. package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -1
  145. package/dist/typescript/components/tsdoc.cjs +107 -106
  146. package/dist/typescript/components/tsdoc.d.cts.map +1 -1
  147. package/dist/typescript/components/tsdoc.d.mts.map +1 -1
  148. package/dist/typescript/components/tsdoc.mjs +2 -2
  149. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  150. package/dist/typescript/components/type-declaration.cjs +11 -10
  151. package/dist/typescript/components/type-declaration.d.cts +2 -2
  152. package/dist/typescript/components/type-declaration.d.cts.map +1 -1
  153. package/dist/typescript/components/type-declaration.d.mts +2 -2
  154. package/dist/typescript/components/type-declaration.d.mts.map +1 -1
  155. package/dist/typescript/components/type-declaration.mjs +1 -1
  156. package/dist/typescript/components/type-parameters.cjs +17 -16
  157. package/dist/typescript/components/type-parameters.d.cts.map +1 -1
  158. package/dist/typescript/components/type-parameters.d.mts.map +1 -1
  159. package/dist/typescript/components/typescript-file.cjs +63 -62
  160. package/dist/typescript/components/typescript-file.d.cts.map +1 -1
  161. package/dist/typescript/components/typescript-file.d.mts.map +1 -1
  162. package/dist/typescript/contexts/index.cjs +1 -0
  163. package/dist/typescript/contexts/lexical-scope.cjs +8 -7
  164. package/dist/typescript/contexts/lexical-scope.d.cts +2 -2
  165. package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -1
  166. package/dist/typescript/contexts/lexical-scope.d.mts +2 -2
  167. package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
  168. package/dist/typescript/contexts/member-scope.cjs +8 -7
  169. package/dist/typescript/contexts/member-scope.d.cts.map +1 -1
  170. package/dist/typescript/contexts/member-scope.d.mts.map +1 -1
  171. package/dist/typescript/helpers/get-call-signature-props.cjs +5 -4
  172. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -1
  173. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -1
  174. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -1
  175. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -1
  176. package/dist/typescript/helpers/index.cjs +1 -0
  177. package/dist/typescript/helpers/utilities.cjs +1 -0
  178. package/dist/typescript/helpers/utilities.d.cts.map +1 -1
  179. package/dist/typescript/helpers/utilities.d.mts.map +1 -1
  180. package/dist/typescript/index.cjs +1 -0
  181. package/dist/typescript/index.d.cts +0 -3
  182. package/dist/typescript/index.d.mts +0 -3
  183. package/dist/yaml/components/index.cjs +1 -0
  184. package/dist/yaml/components/yaml-file.cjs +34 -33
  185. package/dist/yaml/components/yaml-file.d.cts.map +1 -1
  186. package/dist/yaml/components/yaml-file.d.mts.map +1 -1
  187. package/dist/yaml/index.cjs +1 -0
  188. package/dist/yaml/index.d.cts +0 -1
  189. package/dist/yaml/index.d.mts +0 -1
  190. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"code.d.mts","names":[],"sources":["../../../src/core/helpers/code.ts"],"sourcesContent":[],"mappings":";;;;;;AA0CA;;;;;;;;;;;;;;;;;;;;iBAAgB,IAAA,WACJ,wCACQ,aACjB"}
1
+ {"version":3,"file":"code.d.mts","names":[],"sources":["../../../src/core/helpers/code.ts"],"mappings":";;;;;AA0CA;;;;;;;;;;;;;;;;;;;;iBAAgB,IAAA,CACd,QAAA,EAAU,oBAAA,KACP,aAAA,EAAe,QAAA,KACjB,QAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_core_helpers_code = require('./code.cjs');
2
3
 
3
4
  exports.code = require_core_helpers_code.code;
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_core_contexts_context = require('./contexts/context.cjs');
2
3
  const require_core_contexts_meta = require('./contexts/meta.cjs');
3
4
  const require_core_contexts_reflection = require('./contexts/reflection.cjs');
@@ -1,12 +1,9 @@
1
1
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.cjs";
2
2
  import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.cjs";
3
3
  import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.cjs";
4
- import "./contexts/index.cjs";
5
4
  import { Output, OutputProps, __ΩOutputProps } from "./components/output.cjs";
6
5
  import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./components/single-line-comment.cjs";
7
6
  import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./components/source-file.cjs";
8
7
  import { Spacing, SpacingProps, __ΩSpacingProps } from "./components/spacing.cjs";
9
- import "./components/index.cjs";
10
8
  import { code } from "./helpers/code.cjs";
11
- import "./helpers/index.cjs";
12
9
  export { MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩMetaItem, __ΩOutputProps, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,12 +1,9 @@
1
1
  import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./contexts/context.mjs";
2
2
  import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./contexts/meta.mjs";
3
3
  import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./contexts/reflection.mjs";
4
- import "./contexts/index.mjs";
5
4
  import { Output, OutputProps, __ΩOutputProps } from "./components/output.mjs";
6
5
  import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./components/single-line-comment.mjs";
7
6
  import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./components/source-file.mjs";
8
7
  import { Spacing, SpacingProps, __ΩSpacingProps } from "./components/spacing.mjs";
9
- import "./components/index.mjs";
10
8
  import { code } from "./helpers/code.mjs";
11
- import "./helpers/index.mjs";
12
9
  export { MetaContext, MetaItem, Output, OutputProps, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩMetaItem, __ΩOutputProps, __ΩReflectionClassContextInterface, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps, code, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
@@ -1,24 +1,25 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
3
  let defu = require("defu");
3
- defu = require_rolldown_runtime.__toESM(defu);
4
- let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
5
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
6
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
7
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
8
- let __powerlines_deepkit_vendor_core = require("@powerlines/deepkit/vendor/core");
9
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
10
- let __stryke_capnp_compile = require("@stryke/capnp/compile");
11
- let __stryke_capnp_helpers = require("@stryke/capnp/helpers");
12
- let __stryke_convert_to_array = require("@stryke/convert/to-array");
13
- let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
14
- let __stryke_json = require("@stryke/json");
15
- let __stryke_path_join = require("@stryke/path/join");
16
- let __stryke_string_format_get_words = require("@stryke/string-format/get-words");
17
- let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
18
- let __stryke_type_checks_is_bigint = require("@stryke/type-checks/is-bigint");
19
- let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
20
- let __stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
21
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
4
+ defu = require_runtime.__toESM(defu);
5
+ let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
6
+ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
7
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
8
+ let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
9
+ let _powerlines_deepkit_vendor_core = require("@powerlines/deepkit/vendor/core");
10
+ let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
11
+ let _stryke_capnp_compile = require("@stryke/capnp/compile");
12
+ let _stryke_capnp_helpers = require("@stryke/capnp/helpers");
13
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
14
+ let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
15
+ let _stryke_json = require("@stryke/json");
16
+ let _stryke_path_join = require("@stryke/path/join");
17
+ let _stryke_string_format_get_words = require("@stryke/string-format/get-words");
18
+ let _stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
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");
21
+ let _stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
22
+ let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
22
23
  let node_buffer = require("node:buffer");
23
24
  let node_child_process = require("node:child_process");
24
25
  let node_util = require("node:util");
@@ -37,15 +38,15 @@ async function compile(context, options = {}) {
37
38
  ts: true,
38
39
  js: false,
39
40
  dts: false,
40
- schemas: (0, __stryke_path_join.joinPaths)(context.artifactsPath, "schemas"),
41
+ schemas: (0, _stryke_path_join.joinPaths)(context.artifactsPath, "schemas"),
41
42
  tsconfig: context.tsconfig,
42
43
  projectRoot: context.config.root,
43
44
  workspaceRoot: context.workspaceConfig.workspaceRoot,
44
45
  tty: true
45
46
  });
46
- const resolvedOptions = await (0, __stryke_capnp_helpers.resolveOptions)(opts);
47
- if (!resolvedOptions) throw new Error(`✖ No Cap'n Proto schema files found in the specified source paths: ${(0, __stryke_convert_to_array.toArray)(opts.schemas).join(", ")}.`);
48
- return (0, __stryke_capnp_compile.capnpc)(resolvedOptions);
47
+ const resolvedOptions = await (0, _stryke_capnp_helpers.resolveOptions)(opts);
48
+ if (!resolvedOptions) throw new Error(`✖ No Cap'n Proto schema files found in the specified source paths: ${(0, _stryke_convert_to_array.toArray)(opts.schemas).join(", ")}.`);
49
+ return (0, _stryke_capnp_compile.capnpc)(resolvedOptions);
49
50
  }
50
51
  /**
51
52
  * Converts any {@link ReflectionProperty} or {@link ReflectionParameter}'s value to string representation.
@@ -65,7 +66,7 @@ function stringifyCapnpDefaultValue(property, value) {
65
66
  * @returns A string representation of the value.
66
67
  */
67
68
  function stringifyCapnpValue(type, value) {
68
- return type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal && (0, __stryke_type_checks_is_string.isString)(type.literal) ? `"${String(value)}"` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum ? `${(0, __stryke_string_format_camel_case.camelCase)(String(value))}` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.array ? __stryke_json.StormJSON.stringify(value) : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.object || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral ? __stryke_json.StormJSON.stringify(value).replaceAll("{", "(").replaceAll("}", ")") : String(value);
69
+ return type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.string || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.literal && (0, _stryke_type_checks_is_string.isString)(type.literal) ? `"${String(value)}"` : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.enum ? `${(0, _stryke_string_format_camel_case.camelCase)(String(value))}` : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.array ? _stryke_json.StormJSON.stringify(value) : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.object || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral ? _stryke_json.StormJSON.stringify(value).replaceAll("{", "(").replaceAll("}", ")") : String(value);
69
70
  }
70
71
  /**
71
72
  * Converts a ReflectionProperty's default value to a Cap'n Proto schema string representation.
@@ -74,10 +75,10 @@ function stringifyCapnpValue(type, value) {
74
75
  * @returns A string representation of the property.
75
76
  */
76
77
  function getCapnpEnumTypes(type) {
77
- if (type.kind !== __powerlines_deepkit_vendor_type.ReflectionKind.enum) return null;
78
- const unique = (0, __stryke_helpers_get_unique.getUniqueBy)(type.values.filter((value) => !(0, __stryke_type_checks_is_undefined.isUndefined)(value) && !(0, __stryke_type_checks_is_null.isNull)(value)), (enumMember) => (0, __stryke_type_checks_is_string.isString)(enumMember) ? "Text" : "Float32");
78
+ if (type.kind !== _powerlines_deepkit_vendor_type.ReflectionKind.enum) return null;
79
+ const unique = (0, _stryke_helpers_get_unique.getUniqueBy)(type.values.filter((value) => !(0, _stryke_type_checks_is_undefined.isUndefined)(value) && !(0, _stryke_type_checks_is_null.isNull)(value)), (enumMember) => (0, _stryke_type_checks_is_string.isString)(enumMember) ? "Text" : "Float32");
79
80
  if (unique.length === 0) return null;
80
- return unique[0] && (0, __stryke_type_checks_is_string.isString)(unique[0]) ? "Text" : "Float32";
81
+ return unique[0] && (0, _stryke_type_checks_is_string.isString)(unique[0]) ? "Text" : "Float32";
81
82
  }
82
83
  /**
83
84
  * Determines if a Type is a `Void` type in a Cap'n Proto schema.
@@ -86,7 +87,7 @@ function getCapnpEnumTypes(type) {
86
87
  * @returns True if the Type is a `Void` type, false otherwise.
87
88
  */
88
89
  function isVoidType(type) {
89
- return type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.void || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.never || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.null || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.undefined || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.symbol;
90
+ return type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.void || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.never || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.null || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.undefined || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.symbol;
90
91
  }
91
92
  /**
92
93
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
@@ -95,7 +96,7 @@ function isVoidType(type) {
95
96
  * @returns A string representation of the Cap'n Proto primitive type.
96
97
  */
97
98
  function getCapnpUnionTypes(type) {
98
- return (0, __powerlines_deepkit_utilities.getUnionTypes)(type);
99
+ return (0, _powerlines_deepkit_utilities.getUnionTypes)(type);
99
100
  }
100
101
  /**
101
102
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
@@ -104,7 +105,7 @@ function getCapnpUnionTypes(type) {
104
105
  * @returns An array of Cap'n Proto primitive types.
105
106
  */
106
107
  function isCapnpStringUnion(type) {
107
- return getCapnpUnionTypes(type).some((member) => member.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string);
108
+ return getCapnpUnionTypes(type).some((member) => member.kind === _powerlines_deepkit_vendor_type.ReflectionKind.string);
108
109
  }
109
110
  const LARGE_BUFFER = 1024 * 1e6;
110
111
  const execAsync = (0, node_util.promisify)(node_child_process.exec);
@@ -124,8 +125,8 @@ ${reflection.getMethods().length === 0 ? generateCapnpStruct(reflection, options
124
125
  }
125
126
  function generateCapnpStruct(reflection, options = {}) {
126
127
  const structName = options?.name || reflection.getTitle() || reflection.getClassName() || reflection.getName();
127
- return `${generateCapnpEnums(reflection)}struct ${(0, __stryke_string_format_pascal_case.pascalCase)(structName)} {
128
- # Struct definition for ${(0, __stryke_string_format_title_case.titleCase)(structName)}.
128
+ return `${generateCapnpEnums(reflection)}struct ${(0, _stryke_string_format_pascal_case.pascalCase)(structName)} {
129
+ # Struct definition for ${(0, _stryke_string_format_title_case.titleCase)(structName)}.
129
130
 
130
131
  ${generateCapnpSchema(reflection, options)}
131
132
  }
@@ -133,18 +134,18 @@ function generateCapnpStruct(reflection, options = {}) {
133
134
  }
134
135
  function generateCapnpInterface(reflection, options = {}) {
135
136
  const interfaceName = options?.name || reflection.getTitle() || reflection.getClassName() || reflection.getName();
136
- return `${generateCapnpEnums(reflection)}interface ${(0, __stryke_string_format_pascal_case.pascalCase)(interfaceName)} {
137
- # Interface definition for ${(0, __stryke_string_format_title_case.titleCase)(interfaceName)}.
137
+ return `${generateCapnpEnums(reflection)}interface ${(0, _stryke_string_format_pascal_case.pascalCase)(interfaceName)} {
138
+ # Interface definition for ${(0, _stryke_string_format_title_case.titleCase)(interfaceName)}.
138
139
 
139
140
  ${generateCapnpSchema(reflection, options)}
140
141
  }
141
142
  `;
142
143
  }
143
144
  function formatEnumName(name) {
144
- return (0, __stryke_string_format_pascal_case.pascalCase)(`${name}_Type`);
145
+ return (0, _stryke_string_format_pascal_case.pascalCase)(`${name}_Type`);
145
146
  }
146
147
  function generateCapnpEnums(reflection) {
147
- const enums = reflection.getProperties().filter((prop) => !prop.isIgnored() && (prop.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum || prop.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union && getCapnpUnionTypes(prop.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)).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? b.getNameAsString().localeCompare(a.getNameAsString()) : a.isReadonly() ? 1 : -1);
148
+ const enums = reflection.getProperties().filter((prop) => !prop.isIgnored() && (prop.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.enum || prop.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.union && getCapnpUnionTypes(prop.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)).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? b.getNameAsString().localeCompare(a.getNameAsString()) : a.isReadonly() ? 1 : -1);
148
149
  if (enums.length === 0) return "";
149
150
  return `${enums.map((enumeration) => generateCapnpEnumSchema(enumeration.type, formatEnumName(enumeration.getNameAsString()))).join("\n\n")}
150
151
 
@@ -153,7 +154,7 @@ function generateCapnpEnums(reflection) {
153
154
  function generateCapnpSchema(reflection, options = {}) {
154
155
  let index = 0;
155
156
  const indexCounter = options?.indexCounter ?? (() => index++);
156
- return `${reflection.getProperties().filter((prop) => !prop.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? b.getNameAsString().localeCompare(a.getNameAsString()) : a.isReadonly() ? 1 : -1).map((prop) => generateCapnpPropertySchema(prop, indexCounter)).join(" \n\n ")}${reflection.getMethods().filter((methods) => !methods.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? String(b.getName()).localeCompare(String(a.getName())) : a.isReadonly() ? 1 : -1).map((methods) => generateCapnpMethodSchema(methods, indexCounter)).join(" \n\n ")}${reflection.getProperties().some((prop) => prop.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.class && prop.type.classType === Map) ? `
157
+ return `${reflection.getProperties().filter((prop) => !prop.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? b.getNameAsString().localeCompare(a.getNameAsString()) : a.isReadonly() ? 1 : -1).map((prop) => generateCapnpPropertySchema(prop, indexCounter)).join(" \n\n ")}${reflection.getMethods().filter((methods) => !methods.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? String(b.getName()).localeCompare(String(a.getName())) : a.isReadonly() ? 1 : -1).map((methods) => generateCapnpMethodSchema(methods, indexCounter)).join(" \n\n ")}${reflection.getProperties().some((prop) => prop.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.class && prop.type.classType === Map) ? `
157
158
  struct Map(Key, Value) {
158
159
  entries @0 :List(Entry);
159
160
 
@@ -161,7 +162,7 @@ function generateCapnpSchema(reflection, options = {}) {
161
162
  key @0 :Key;
162
163
  value @1 :Value;
163
164
  }
164
- }` : ""}${reflection.getProperties().some((prop) => prop.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.class && prop.type.classType === Date) ? `
165
+ }` : ""}${reflection.getProperties().some((prop) => prop.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.class && prop.type.classType === Date) ? `
165
166
  struct Date {
166
167
  # A standard Gregorian calendar date.
167
168
 
@@ -185,12 +186,12 @@ function generateCapnpSchema(reflection, options = {}) {
185
186
  function generateCapnpMethodSchema(reflection, indexCounter) {
186
187
  const methodName = reflection.getTitle() || typeof reflection.getName() === "string" ? String(reflection.getName()) : "";
187
188
  if (!methodName) throw new Error(`Cannot generate Cap'n Proto schema for method without a name - Parent interface: ${reflection.reflectionClass.getName()}`);
188
- return `${(0, __stryke_string_format_camel_case.camelCase)(methodName)} @${indexCounter()} (${reflection.getParameters().map((param) => {
189
- return `${(0, __stryke_string_format_camel_case.camelCase)(param.getName())} :${generateCapnpPrimitive(param.getType())}${param.hasDefault() ? ` = ${stringifyCapnpDefaultValue(param)}` : ""}`;
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", ". ")}`;
189
+ return `${(0, _stryke_string_format_camel_case.camelCase)(methodName)} @${indexCounter()} (${reflection.getParameters().map((param) => {
190
+ return `${(0, _stryke_string_format_camel_case.camelCase)(param.getName())} :${generateCapnpPrimitive(param.getType())}${param.hasDefault() ? ` = ${stringifyCapnpDefaultValue(param)}` : ""}`;
191
+ }).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
192
  }
192
193
  function generateCapnpPropertyComment(reflection) {
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) => {
194
+ 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) => {
194
195
  let length = ret.length;
195
196
  if (ret.includes("\n")) length = ret.substring(ret.lastIndexOf("\n") + 1).length;
196
197
  const current = word.trim();
@@ -202,49 +203,49 @@ function generateCapnpPropertyComment(reflection) {
202
203
  return "";
203
204
  }
204
205
  function generateCapnpPropertySchema(reflection, indexCounter) {
205
- if (reflection.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union) if (getCapnpUnionTypes(reflection.type).length === 0) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Void;
206
+ if (reflection.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.union) if (getCapnpUnionTypes(reflection.type).length === 0) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Void;
206
207
  ${generateCapnpPropertyComment(reflection)}`;
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
+ 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
209
  ${generateCapnpPropertyComment(reflection)}`;
209
- else return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} :union {
210
- ${getCapnpUnionTypes(reflection.type).map((type) => ` ${(0, __powerlines_deepkit_utilities.kindToName)(type.kind)} @${indexCounter()} :${generateCapnpPrimitive(type)};`).join("\n")}
210
+ else return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} :union {
211
+ ${getCapnpUnionTypes(reflection.type).map((type) => ` ${(0, _powerlines_deepkit_utilities.kindToName)(type.kind)} @${indexCounter()} :${generateCapnpPrimitive(type)};`).join("\n")}
211
212
  }
212
213
  ${generateCapnpPropertyComment(reflection)}`;
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)}` : ""};
214
+ 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)}` : ""};
214
215
  ${generateCapnpPropertyComment(reflection)}`;
215
- else if (reflection.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.class) if (reflection.type.classType === Map) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Map(${!reflection.type.typeArguments || reflection.type.typeArguments.length === 0 || !reflection.type.typeArguments[0] ? "Data" : generateCapnpPrimitive(reflection.type.typeArguments[0])}, ${!reflection.type.typeArguments || reflection.type.typeArguments.length < 2 || !reflection.type.typeArguments[1] ? "Data" : generateCapnpPrimitive(reflection.type.typeArguments[1])})${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
216
+ else if (reflection.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.class) if (reflection.type.classType === Map) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Map(${!reflection.type.typeArguments || reflection.type.typeArguments.length === 0 || !reflection.type.typeArguments[0] ? "Data" : generateCapnpPrimitive(reflection.type.typeArguments[0])}, ${!reflection.type.typeArguments || reflection.type.typeArguments.length < 2 || !reflection.type.typeArguments[1] ? "Data" : generateCapnpPrimitive(reflection.type.typeArguments[1])})${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
216
217
  ${generateCapnpPropertyComment(reflection)}`;
217
- else if (reflection.type.classType === Date) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
218
+ else if (reflection.type.classType === Date) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
218
219
  ${generateCapnpPropertyComment(reflection)}`;
219
- else if (reflection.type.classType === node_buffer.Buffer) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
220
+ else if (reflection.type.classType === node_buffer.Buffer) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
220
221
  ${generateCapnpPropertyComment(reflection)}`;
221
- else if (reflection.type.classType === ArrayBuffer) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
222
+ else if (reflection.type.classType === ArrayBuffer) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
222
223
  ${generateCapnpPropertyComment(reflection)}`;
223
- else return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, __powerlines_deepkit_vendor_core.getClassName)(reflection.type.classType))}${generateCapnpStruct(reflection.reflectionClass, { name: (0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, __powerlines_deepkit_vendor_core.getClassName)(reflection.type.classType)) })}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
224
+ else return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, _stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, _powerlines_deepkit_vendor_core.getClassName)(reflection.type.classType))}${generateCapnpStruct(reflection.reflectionClass, { name: (0, _stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, _powerlines_deepkit_vendor_core.getClassName)(reflection.type.classType)) })}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
224
225
  ${generateCapnpPropertyComment(reflection)}`;
225
- else if (reflection.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, __powerlines_deepkit_vendor_type.memberNameToString)(reflection.getNameAsString()))}${generateCapnpStruct(reflection.reflectionClass, { name: (0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, __powerlines_deepkit_vendor_type.memberNameToString)(reflection.getNameAsString())) })}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
226
+ else if (reflection.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, _stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, _powerlines_deepkit_vendor_type.memberNameToString)(reflection.getNameAsString()))}${generateCapnpStruct(reflection.reflectionClass, { name: (0, _stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || (0, _powerlines_deepkit_vendor_type.memberNameToString)(reflection.getNameAsString())) })}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
226
227
  ${generateCapnpPropertyComment(reflection)}`;
227
- else if (reflection.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, __stryke_string_format_pascal_case.pascalCase)(reflection.getNameAsString())}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
228
+ else if (reflection.type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.enum) return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, _stryke_string_format_pascal_case.pascalCase)(reflection.getNameAsString())}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
228
229
  ${generateCapnpPropertyComment(reflection)}`;
229
- return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${generateCapnpPrimitive(reflection.getType())}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
230
+ return `${(0, _stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${generateCapnpPrimitive(reflection.getType())}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
230
231
  ${generateCapnpPropertyComment(reflection)}`;
231
232
  }
232
233
  function generateCapnpEnumSchema(type, name) {
233
- if (type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union) return generateCapnpEnumSchema({
234
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.enum,
234
+ if (type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.union) return generateCapnpEnumSchema({
235
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.enum,
235
236
  indexType: type,
236
- enum: type.types.reduce((ret, type$1) => {
237
- if ((0, __stryke_type_checks_is_string.isString)(type$1.literal) || (0, __stryke_type_checks_is_number.isNumber)(type$1.literal)) ret[(0, __stryke_string_format_camel_case.camelCase)(String(type$1.literal))] = type$1.literal;
237
+ enum: type.types.reduce((ret, type) => {
238
+ if ((0, _stryke_type_checks_is_string.isString)(type.literal) || (0, _stryke_type_checks_is_number.isNumber)(type.literal)) ret[(0, _stryke_string_format_camel_case.camelCase)(String(type.literal))] = type.literal;
238
239
  return ret;
239
240
  }, {}),
240
- values: getCapnpUnionTypes(type).filter((type$1) => type$1.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal && ((0, __stryke_type_checks_is_string.isString)(type$1.literal) || (0, __stryke_type_checks_is_number.isNumber)(type$1.literal))).map((type$1) => type$1.literal)
241
+ values: getCapnpUnionTypes(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))).map((type) => type.literal)
241
242
  }, name);
242
243
  let index = 0;
243
244
  const indexCounter = () => index++;
244
245
  const enumType = getCapnpEnumTypes(type);
245
246
  if (!enumType) return "";
246
- return `enum ${(0, __stryke_string_format_pascal_case.pascalCase)(name)} {
247
- ${type.enum && Object.entries(type.enum).length > 0 ? Object.entries(type.enum).filter(([, value]) => value !== null && value !== void 0).map(([key]) => ` ${(0, __stryke_string_format_camel_case.camelCase)(key)} @${indexCounter()};`).join("\n") : type.values.filter((value) => value !== null && value !== void 0).map((value) => `${enumType === "Text" && value ? (0, __stryke_string_format_camel_case.camelCase)(String(value)) : `${type.typeName ? `${(0, __stryke_string_format_camel_case.camelCase)(type.typeName)}_` : ""}${value || ""}`} @${indexCounter()};`).join("\n")}
247
+ return `enum ${(0, _stryke_string_format_pascal_case.pascalCase)(name)} {
248
+ ${type.enum && Object.entries(type.enum).length > 0 ? Object.entries(type.enum).filter(([, value]) => value !== null && value !== void 0).map(([key]) => ` ${(0, _stryke_string_format_camel_case.camelCase)(key)} @${indexCounter()};`).join("\n") : type.values.filter((value) => value !== null && value !== void 0).map((value) => `${enumType === "Text" && value ? (0, _stryke_string_format_camel_case.camelCase)(String(value)) : `${type.typeName ? `${(0, _stryke_string_format_camel_case.camelCase)(type.typeName)}_` : ""}${value || ""}`} @${indexCounter()};`).join("\n")}
248
249
  }`;
249
250
  }
250
251
  /**
@@ -254,7 +255,7 @@ ${type.enum && Object.entries(type.enum).length > 0 ? Object.entries(type.enum).
254
255
  * @returns A string representation of the Cap'n Proto primitive type.
255
256
  */
256
257
  function generateCapnpPrimitive(type) {
257
- return type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.never || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.void || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.null || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.undefined || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.symbol ? "Void" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.class && type.classType === Date ? "Date" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.class && type.classType === Set ? `List(${type.typeArguments && type.typeArguments[0] ? generateCapnpPrimitive(type.typeArguments[0]) : "Data"})` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.bigint ? "UInt64" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.number ? "Float64" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.regexp ? "Text" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean ? "Bool" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal ? (0, __stryke_type_checks_is_number.isNumber)(type.literal) ? "Float64" : (0, __stryke_type_checks_is_bigint.isBigInt)(type.literal) ? "UInt64" : (0, __stryke_type_checks_is_string.isString)(type.literal) ? "Text" : typeof type.literal === "boolean" ? "Bool" : "Data" : "Data";
258
+ return type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.never || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.void || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.null || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.undefined || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.symbol ? "Void" : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.class && type.classType === Date ? "Date" : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.class && type.classType === Set ? `List(${type.typeArguments && type.typeArguments[0] ? generateCapnpPrimitive(type.typeArguments[0]) : "Data"})` : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.bigint ? "UInt64" : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.number ? "Float64" : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.string || type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.regexp ? "Text" : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.boolean ? "Bool" : type.kind === _powerlines_deepkit_vendor_type.ReflectionKind.literal ? (0, _stryke_type_checks_is_number.isNumber)(type.literal) ? "Float64" : (0, _stryke_type_checks_is_bigint.isBigInt)(type.literal) ? "UInt64" : (0, _stryke_type_checks_is_string.isString)(type.literal) ? "Text" : typeof type.literal === "boolean" ? "Bool" : "Data" : "Data";
258
259
  }
259
260
 
260
261
  //#endregion
@@ -3,7 +3,6 @@ import { ReflectionClass, ReflectionMethod, ReflectionParameter, ReflectionPrope
3
3
  import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
4
 
5
5
  //#region src/helpers/capnp.d.ts
6
-
7
6
  /**
8
7
  * Compiles a Cap'n Proto schema into TypeScript definitions.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"capnp.d.cts","names":[],"sources":["../../src/helpers/capnp.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA8DA;;;;;AAGG,iBAHmB,OAAA,CAGnB,OAAA,EAFQ,OAER,EAAA,OAAA,CAAA,EADQ,OACR,CADgB,aAChB,CAAA,CAAA,EAAA,OAAA,CAAQ,YAAR,CAAA;;AA+BH;AAiBA;AAoBA;AAsBA;AAgBA;AAUA;AAMa,iBA3FG,0BAAA,CA2F0B,QAAA,EA1F9B,kBA0F8B,GA1FT,mBA0FS,EAAA,KAAA,CAAA,EAAA,GAAA,CAAA,EAAA,MAAA;AAC1C;AACA;;;;;AAMA;AAUiB,iBA5FD,mBAAA,CA4FqB,IAAA,EA5FK,IA4FL,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,MAAA;AAIrC;;;;;;AAmBiB,iBA/FD,iBAAA,CA+F4B,IAAQ,EA/FZ,IA+FY,CAAA,EAAA,MAAA,GAAA,SAAoB,GAAA,IAAA;AAIxE;AAkBA;AA2DA;AA8EA;AA4MA;AAoEA;iBAxfgB,UAAA,OAAiB;;;;;;;iBAgBjB,kBAAA,OAAyB,OAAO;;;;;;;iBAUhC,kBAAA,OAAyB;cAM5B;KACD,MAAA;KACA,YAAA,GACR,SACA,MAAM;iBAIY,eAAA,CAAA,GAAe;UAUpB,oBAAA;;;iBAIK,aAAA,UACX,2BACG,+BACH,uBAAoB;UAgBd,0BAAA,SAAmC;;;iBAIpC,mBAAA,aACF,gCACH;iBAgBK,sBAAA,aACF,gCACH;iBAyDK,mBAAA,aACF,gCACH;iBA4EK,yBAAA,aACF;iBA2ME,uBAAA,OACR,WAAW;;;;;;;iBAmEH,sBAAA,OAA6B"}
1
+ {"version":3,"file":"capnp.d.cts","names":[],"sources":["../../src/helpers/capnp.ts"],"mappings":";;;;;;;AA8DA;;;;;iBAAsB,OAAA,CACpB,OAAA,EAAS,OAAA,EACT,OAAA,GAAS,OAAA,CAAQ,aAAA,IAChB,OAAA,CAAQ,YAAA;;;;;;;;iBA+BK,0BAAA,CACd,QAAA,EAAU,kBAAA,GAAqB,mBAAA,EAC/B,KAAA;;;;;;AAFF;;iBAiBgB,mBAAA,CAAoB,IAAA,EAAM,IAAA,EAAM,KAAA;;;;;;;iBAoBhC,iBAAA,CAAkB,IAAA,EAAM,IAAA;AApBxC;;;;;;AAAA,iBA0CgB,UAAA,CAAW,IAAA,EAAM,IAAA;;;AAtBjC;;;;iBAsCgB,kBAAA,CAAmB,IAAA,EAAM,IAAA,GAAO,IAAA;AAhBhD;;;;;AAgBA;AAhBA,iBA0BgB,kBAAA,CAAmB,IAAA,EAAM,IAAA;AAAA,cAM5B,YAAA;AAAA,KACD,MAAA;AAAA,KACA,YAAA,GACR,MAAA,GACA,KAAA,CAAM,MAAA;AAAA,iBAIY,eAAA,CAAA,GAAe,OAAA;AAAA,UAUpB,oBAAA;EACf,IAAA;AAAA;AAAA,iBAGoB,aAAA,CACpB,OAAA,EAAS,aAAA,EACT,UAAA,EAAY,eAAA,OACZ,OAAA,EAAS,oBAAA,GAAoB,OAAA;AAAA,UAgBd,0BAAA,SAAmC,oBAAA;EAClD,YAAA;AAAA;AAAA,iBAGc,mBAAA,CACd,UAAA,EAAY,eAAA,OACZ,OAAA,GAAS,0BAAA;AAAA,iBAgBK,sBAAA,CACd,UAAA,EAAY,eAAA,OACZ,OAAA,GAAS,0BAAA;AAAA,iBAyDK,mBAAA,CACd,UAAA,EAAY,eAAA,OACZ,OAAA,GAAS,0BAAA;AAAA,iBA4EK,yBAAA,CACd,UAAA,EAAY,gBAAA,EACZ,YAAA;AAAA,iBA0Mc,uBAAA,CACd,IAAA,EAAM,QAAA,GAAW,SAAA,EACjB,IAAA;;AArZF;;;;;iBAudgB,sBAAA,CAAuB,IAAA,EAAM,IAAA;AAAA"}
@@ -3,7 +3,6 @@ import { Context, PluginContext } from "powerlines";
3
3
  import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
4
 
5
5
  //#region src/helpers/capnp.d.ts
6
-
7
6
  /**
8
7
  * Compiles a Cap'n Proto schema into TypeScript definitions.
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"capnp.d.mts","names":[],"sources":["../../src/helpers/capnp.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA8DA;;;;;AAGG,iBAHmB,OAAA,CAGnB,OAAA,EAFQ,OAER,EAAA,OAAA,CAAA,EADQ,OACR,CADgB,aAChB,CAAA,CAAA,EAAA,OAAA,CAAQ,YAAR,CAAA;;AA+BH;AAiBA;AAoBA;AAsBA;AAgBA;AAUA;AAMa,iBA3FG,0BAAA,CA2F0B,QAAA,EA1F9B,kBA0F8B,GA1FT,mBA0FS,EAAA,KAAA,CAAA,EAAA,GAAA,CAAA,EAAA,MAAA;AAC1C;AACA;;;;;AAMA;AAUiB,iBA5FD,mBAAA,CA4FqB,IAAA,EA5FK,IA4FL,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,MAAA;AAIrC;;;;;;AAmBiB,iBA/FD,iBAAA,CA+F4B,IAAQ,EA/FZ,IA+FY,CAAA,EAAA,MAAA,GAAA,SAAoB,GAAA,IAAA;AAIxE;AAkBA;AA2DA;AA8EA;AA4MA;AAoEA;iBAxfgB,UAAA,OAAiB;;;;;;;iBAgBjB,kBAAA,OAAyB,OAAO;;;;;;;iBAUhC,kBAAA,OAAyB;cAM5B;KACD,MAAA;KACA,YAAA,GACR,SACA,MAAM;iBAIY,eAAA,CAAA,GAAe;UAUpB,oBAAA;;;iBAIK,aAAA,UACX,2BACG,+BACH,uBAAoB;UAgBd,0BAAA,SAAmC;;;iBAIpC,mBAAA,aACF,gCACH;iBAgBK,sBAAA,aACF,gCACH;iBAyDK,mBAAA,aACF,gCACH;iBA4EK,yBAAA,aACF;iBA2ME,uBAAA,OACR,WAAW;;;;;;;iBAmEH,sBAAA,OAA6B"}
1
+ {"version":3,"file":"capnp.d.mts","names":[],"sources":["../../src/helpers/capnp.ts"],"mappings":";;;;;;;AA8DA;;;;;iBAAsB,OAAA,CACpB,OAAA,EAAS,OAAA,EACT,OAAA,GAAS,OAAA,CAAQ,aAAA,IAChB,OAAA,CAAQ,YAAA;;;;;;;;iBA+BK,0BAAA,CACd,QAAA,EAAU,kBAAA,GAAqB,mBAAA,EAC/B,KAAA;;;;;;AAFF;;iBAiBgB,mBAAA,CAAoB,IAAA,EAAM,IAAA,EAAM,KAAA;;;;;;;iBAoBhC,iBAAA,CAAkB,IAAA,EAAM,IAAA;AApBxC;;;;;;AAAA,iBA0CgB,UAAA,CAAW,IAAA,EAAM,IAAA;;;AAtBjC;;;;iBAsCgB,kBAAA,CAAmB,IAAA,EAAM,IAAA,GAAO,IAAA;AAhBhD;;;;;AAgBA;AAhBA,iBA0BgB,kBAAA,CAAmB,IAAA,EAAM,IAAA;AAAA,cAM5B,YAAA;AAAA,KACD,MAAA;AAAA,KACA,YAAA,GACR,MAAA,GACA,KAAA,CAAM,MAAA;AAAA,iBAIY,eAAA,CAAA,GAAe,OAAA;AAAA,UAUpB,oBAAA;EACf,IAAA;AAAA;AAAA,iBAGoB,aAAA,CACpB,OAAA,EAAS,aAAA,EACT,UAAA,EAAY,eAAA,OACZ,OAAA,EAAS,oBAAA,GAAoB,OAAA;AAAA,UAgBd,0BAAA,SAAmC,oBAAA;EAClD,YAAA;AAAA;AAAA,iBAGc,mBAAA,CACd,UAAA,EAAY,eAAA,OACZ,OAAA,GAAS,0BAAA;AAAA,iBAgBK,sBAAA,CACd,UAAA,EAAY,eAAA,OACZ,OAAA,GAAS,0BAAA;AAAA,iBAyDK,mBAAA,CACd,UAAA,EAAY,eAAA,OACZ,OAAA,GAAS,0BAAA;AAAA,iBA4EK,yBAAA,CACd,UAAA,EAAY,gBAAA,EACZ,YAAA;AAAA,iBA0Mc,uBAAA,CACd,IAAA,EAAM,QAAA,GAAW,SAAA,EACjB,IAAA;;AArZF;;;;;iBAudgB,sBAAA,CAAuB,IAAA,EAAM,IAAA;AAAA"}
@@ -231,11 +231,11 @@ function generateCapnpEnumSchema(type, name) {
231
231
  if (type.kind === ReflectionKind.union) return generateCapnpEnumSchema({
232
232
  kind: ReflectionKind.enum,
233
233
  indexType: type,
234
- enum: type.types.reduce((ret, type$1) => {
235
- if (isString(type$1.literal) || isNumber(type$1.literal)) ret[camelCase(String(type$1.literal))] = type$1.literal;
234
+ enum: type.types.reduce((ret, type) => {
235
+ if (isString(type.literal) || isNumber(type.literal)) ret[camelCase(String(type.literal))] = type.literal;
236
236
  return ret;
237
237
  }, {}),
238
- values: getCapnpUnionTypes(type).filter((type$1) => type$1.kind === ReflectionKind.literal && (isString(type$1.literal) || isNumber(type$1.literal))).map((type$1) => type$1.literal)
238
+ values: getCapnpUnionTypes(type).filter((type) => type.kind === ReflectionKind.literal && (isString(type.literal) || isNumber(type.literal))).map((type) => type.literal)
239
239
  }, name);
240
240
  let index = 0;
241
241
  const indexCounter = () => index++;
@@ -1,5 +1,6 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __alloy_js_typescript = require("@alloy-js/typescript");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _alloy_js_typescript = require("@alloy-js/typescript");
3
4
 
4
5
  //#region src/helpers/create-builtin.ts
5
6
  /**
@@ -9,7 +10,7 @@ let __alloy_js_typescript = require("@alloy-js/typescript");
9
10
  * @returns An object containing reference keys for the package and a symbol creator function.
10
11
  */
11
12
  function createBuiltin(options) {
12
- return (0, __alloy_js_typescript.createPackage)({
13
+ return (0, _alloy_js_typescript.createPackage)({
13
14
  ...options,
14
15
  builtin: true
15
16
  });
@@ -1 +1 @@
1
- {"version":3,"file":"create-builtin.d.cts","names":[],"sources":["../../src/helpers/create-builtin.ts"],"sourcesContent":[],"mappings":";;;;KA0BY,+BAA+B,qBAAqB,KAC9D,mBAAmB;;AADrB;;;;;AAAoE,iBAWpD,aAXoD,CAAA,gBAWtB,iBAXsB,CAAA,CAAA,OAAA,EAYzD,oBAZyD,CAYpC,CAZoC,CAAA,CAAA,EAajE,cAbiE,CAalD,CAbkD,CAAA,GAa7C,aAb6C;AAWpD,uCAAa,GAAA,EAAA"}
1
+ {"version":3,"file":"create-builtin.d.cts","names":[],"sources":["../../src/helpers/create-builtin.ts"],"mappings":";;;;KA0BY,oBAAA,WAA+B,iBAAA,IAAqB,IAAA,CAC9D,kBAAA,CAAmB,CAAA;;AADrB;;;;;iBAWgB,aAAA,iBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,oBAAA,CAAqB,CAAA,IAC7B,cAAA,CAAe,CAAA,IAAK,aAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-builtin.d.mts","names":[],"sources":["../../src/helpers/create-builtin.ts"],"sourcesContent":[],"mappings":";;;;KA0BY,+BAA+B,qBAAqB,KAC9D,mBAAmB;;AADrB;;;;;AAAoE,iBAWpD,aAXoD,CAAA,gBAWtB,iBAXsB,CAAA,CAAA,OAAA,EAYzD,oBAZyD,CAYpC,CAZoC,CAAA,CAAA,EAajE,cAbiE,CAalD,CAbkD,CAAA,GAa7C,aAb6C;AAWpD,uCAAa,GAAA,EAAA"}
1
+ {"version":3,"file":"create-builtin.d.mts","names":[],"sources":["../../src/helpers/create-builtin.ts"],"mappings":";;;;KA0BY,oBAAA,WAA+B,iBAAA,IAAqB,IAAA,CAC9D,kBAAA,CAAmB,CAAA;;AADrB;;;;;iBAWgB,aAAA,iBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,oBAAA,CAAqB,CAAA,IAC7B,cAAA,CAAe,CAAA,IAAK,aAAA;AAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_helpers_typescript = require('./typescript.cjs');
2
3
  const require_helpers_refkey = require('./refkey.cjs');
3
4
  const require_helpers_capnp = require('./capnp.cjs');
@@ -1,5 +1,6 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __alloy_js_core = require("@alloy-js/core");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _alloy_js_core = require("@alloy-js/core");
3
4
 
4
5
  //#region src/helpers/refkey.ts
5
6
  /**
@@ -9,7 +10,7 @@ let __alloy_js_core = require("@alloy-js/core");
9
10
  * 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`
10
11
  */
11
12
  function refkey(...args) {
12
- return (0, __alloy_js_core.refkey)("powerlines", ...args);
13
+ return (0, _alloy_js_core.refkey)("powerlines", ...args);
13
14
  }
14
15
 
15
16
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import { Refkey } from "@alloy-js/core";
2
2
 
3
3
  //#region src/helpers/refkey.d.ts
4
-
5
4
  /**
6
5
  * 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.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"refkey.d.cts","names":[],"sources":["../../src/helpers/refkey.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,MAAA,sBAA4B"}
1
+ {"version":3,"file":"refkey.d.cts","names":[],"sources":["../../src/helpers/refkey.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,MAAA,CAAA,GAAU,IAAA,cAAkB,MAAA"}
@@ -1,7 +1,6 @@
1
1
  import { Refkey } from "@alloy-js/core";
2
2
 
3
3
  //#region src/helpers/refkey.d.ts
4
-
5
4
  /**
6
5
  * 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.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"refkey.d.mts","names":[],"sources":["../../src/helpers/refkey.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,MAAA,sBAA4B"}
1
+ {"version":3,"file":"refkey.d.mts","names":[],"sources":["../../src/helpers/refkey.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,MAAA,CAAA,GAAU,IAAA,cAAkB,MAAA"}
@@ -1,8 +1,9 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
3
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
4
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
4
+ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
5
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
6
+ let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
6
7
 
7
8
  //#region src/helpers/typescript.ts
8
9
  /**
@@ -16,16 +17,16 @@ function generateObjectDeclaration(reflection, options = {}) {
16
17
  if (!reflection) return "";
17
18
  return `
18
19
  /**
19
- * ${reflection.getDescription() || `${(0, __stryke_string_format_title_case.titleCase)(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
20
+ * ${reflection.getDescription() || `${(0, _stryke_string_format_title_case.titleCase)(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
20
21
  */
21
- export const ${(0, __stryke_string_format_camel_case.camelCase)(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
22
- ${reflection.getProperties().filter((item) => !item.isIgnored() && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
23
- if ((0, __stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
22
+ export const ${(0, _stryke_string_format_camel_case.camelCase)(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
23
+ ${reflection.getProperties().filter((item) => !item.isIgnored() && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
24
+ if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
24
25
  return ret;
25
26
  }, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
26
- * ${item.getDescription() || item.getTitle() || (0, __stryke_string_format_title_case.titleCase)(item.getNameAsString())}
27
+ * ${item.getDescription() || item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}
27
28
  *
28
- * @title ${item.getTitle() || (0, __stryke_string_format_title_case.titleCase)(item.getNameAsString())}${item.getAlias().length ? `
29
+ * @title ${item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}${item.getAlias().length ? `
29
30
  ${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
30
31
  * @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
31
32
  ${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
@@ -34,8 +35,8 @@ export const ${(0, __stryke_string_format_camel_case.camelCase)(options.override
34
35
  * @ignored` : ""}${item.isHidden() ? `
35
36
  * @hidden` : ""}
36
37
  */
37
- ${item.getNameAsString()}: ${(0, __powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
38
- if ((0, __stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
38
+ ${item.getNameAsString()}: ${(0, _powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
39
+ if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
39
40
  return ret;
40
41
  }, void 0) ?? item.getDefaultValue())}`).join(", \n")}
41
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.cts","names":[],"sources":["../../src/helpers/typescript.ts"],"sourcesContent":[],"mappings":";;;UAwBiB;;EAAA,eAAA,CAAA,EAAA,MAAA,GAAA,KAAA;EAwJA,aAAA,CAAA,EArJC,OAqJD,CArJS,CAqJT,CAAA;AAajB;AAAoD,UAbnC,gCAamC,CAAA,CAAA,CAAA,CAAA;EACtB,YAAA,CAAA,EAAA,MAAA;EAAhB,eAAA,CAAA,EAAA,MAAA,GAAA,KAAA;EAC8B,aAAA,CAAA,EAZ1B,OAY0B,CAZlB,CAYkB,CAAA;;;;;;;;;iBAF5B,oCAAoC,iCACtC,gBAAgB,cACnB,iCAAiC"}
1
+ {"version":3,"file":"typescript.d.cts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;;;;;AAH1B;;;iBAagB,yBAAA,WAAoC,MAAA,cAAA,CAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.mts","names":[],"sources":["../../src/helpers/typescript.ts"],"sourcesContent":[],"mappings":";;;UAwBiB;;EAAA,eAAA,CAAA,EAAA,MAAA,GAAA,KAAA;EAwJA,aAAA,CAAA,EArJC,OAqJD,CArJS,CAqJT,CAAA;AAajB;AAAoD,UAbnC,gCAamC,CAAA,CAAA,CAAA,CAAA;EACtB,YAAA,CAAA,EAAA,MAAA;EAAhB,eAAA,CAAA,EAAA,MAAA,GAAA,KAAA;EAC8B,aAAA,CAAA,EAZ1B,OAY0B,CAZlB,CAYkB,CAAA;;;;;;;;;iBAF5B,oCAAoC,iCACtC,gBAAgB,cACnB,iCAAiC"}
1
+ {"version":3,"file":"typescript.d.mts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;;;;;AAH1B;;;iBAagB,yBAAA,WAAoC,MAAA,cAAA,CAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA;AAAA"}
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- let __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
4
- __alloy_js_rollup_plugin = require_rolldown_runtime.__toESM(__alloy_js_rollup_plugin);
5
- let __stryke_json_storm_json = require("@stryke/json/storm-json");
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let _alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
4
+ _alloy_js_rollup_plugin = require_runtime.__toESM(_alloy_js_rollup_plugin);
5
+ let _stryke_json_storm_json = require("@stryke/json/storm-json");
6
6
 
7
7
  //#region src/index.tsx
8
8
  /**
@@ -24,7 +24,7 @@ const plugin = (options = {}) => {
24
24
  resolve: { external: [/^@alloy-js\//] },
25
25
  tsdown: {
26
26
  inputOptions: { transform: { jsx: "preserve" } },
27
- plugins: [(0, __alloy_js_rollup_plugin.default)()]
27
+ plugins: [(0, _alloy_js_rollup_plugin.default)()]
28
28
  }
29
29
  };
30
30
  },
@@ -34,13 +34,12 @@ const plugin = (options = {}) => {
34
34
  this.tsconfig.tsconfigJson.compilerOptions ??= {};
35
35
  if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") this.tsconfig.tsconfigJson.compilerOptions.jsx = "preserve";
36
36
  if (this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !== "@alloy-js/core") this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource = "@alloy-js/core";
37
- await this.fs.write(this.tsconfig.tsconfigFilePath, __stryke_json_storm_json.StormJSON.stringify(this.tsconfig.tsconfigJson));
37
+ await this.fs.write(this.tsconfig.tsconfigFilePath, _stryke_json_storm_json.StormJSON.stringify(this.tsconfig.tsconfigJson));
38
38
  }
39
39
  }
40
40
  }];
41
41
  };
42
- var src_default = plugin;
43
42
 
44
43
  //#endregion
45
- exports.default = src_default;
44
+ exports.default = plugin;
46
45
  exports.plugin = plugin;