@powerlines/plugin-alloy 0.15.4 → 0.15.6

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 (66) hide show
  1. package/dist/core/components/index.cjs +1 -1
  2. package/dist/core/components/index.mjs +1 -1
  3. package/dist/core/components/output.d.cts +2 -2
  4. package/dist/core/components/output.d.mts +2 -2
  5. package/dist/core/components/single-line-comment.d.cts +2 -2
  6. package/dist/core/components/single-line-comment.d.mts +2 -2
  7. package/dist/core/components/source-file.d.cts +2 -2
  8. package/dist/core/components/source-file.d.mts +2 -2
  9. package/dist/core/contexts/reflection.d.cts +7 -8
  10. package/dist/core/contexts/reflection.d.mts +7 -8
  11. package/dist/core/index.cjs +2 -2
  12. package/dist/core/index.mjs +2 -2
  13. package/dist/deepkit/src/utilities.cjs +112 -0
  14. package/dist/deepkit/src/utilities.mjs +108 -0
  15. package/dist/helpers/capnp.cjs +31 -33
  16. package/dist/helpers/capnp.d.cts +13 -14
  17. package/dist/helpers/capnp.d.mts +13 -14
  18. package/dist/helpers/capnp.mjs +9 -11
  19. package/dist/helpers/index.cjs +2 -2
  20. package/dist/helpers/index.mjs +2 -2
  21. package/dist/helpers/typescript.cjs +3 -3
  22. package/dist/helpers/typescript.d.cts +1 -3
  23. package/dist/helpers/typescript.d.mts +1 -3
  24. package/dist/helpers/typescript.mjs +2 -2
  25. package/dist/index.cjs +22 -16
  26. package/dist/index.mjs +22 -16
  27. package/dist/markdown/components/markdown-file.d.cts +3 -3
  28. package/dist/markdown/components/markdown-file.d.mts +3 -3
  29. package/dist/markdown/components/markdown-table.d.cts +4 -4
  30. package/dist/markdown/components/markdown-table.d.mts +4 -4
  31. package/dist/powerlines/src/lib/utilities/file-header.cjs +13 -0
  32. package/dist/powerlines/src/lib/utilities/file-header.mjs +12 -0
  33. package/dist/powerlines/src/types/config.d.cts +12 -0
  34. package/dist/powerlines/src/types/config.d.mts +12 -0
  35. package/dist/powerlines/src/types/resolved.d.cts +1 -1
  36. package/dist/powerlines/src/types/resolved.d.mts +1 -1
  37. package/dist/typescript/components/builtin-file.d.cts +2 -2
  38. package/dist/typescript/components/builtin-file.d.mts +2 -2
  39. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  40. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  41. package/dist/typescript/components/entry-file.d.cts +2 -2
  42. package/dist/typescript/components/entry-file.d.mts +2 -2
  43. package/dist/typescript/components/tsdoc-reflection.cjs +2 -2
  44. package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
  45. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  46. package/dist/typescript/components/tsdoc-reflection.mjs +2 -2
  47. package/dist/typescript/components/tsdoc.cjs +2 -2
  48. package/dist/typescript/components/tsdoc.mjs +1 -1
  49. package/dist/typescript/components/typescript-file.cjs +2 -2
  50. package/dist/typescript/components/typescript-file.mjs +2 -2
  51. package/dist/typescript/components/typescript-interface.cjs +2 -3
  52. package/dist/typescript/components/typescript-interface.d.cts +2 -3
  53. package/dist/typescript/components/typescript-interface.d.mts +5 -6
  54. package/dist/typescript/components/typescript-interface.mjs +1 -2
  55. package/dist/typescript/components/typescript-object.cjs +5 -5
  56. package/dist/typescript/components/typescript-object.d.cts +2 -3
  57. package/dist/typescript/components/typescript-object.d.mts +5 -6
  58. package/dist/typescript/components/typescript-object.mjs +4 -4
  59. package/dist/vendor.cjs +12594 -0
  60. package/dist/vendor.d.cts +1 -0
  61. package/dist/vendor.d.ts +1 -0
  62. package/dist/vendor.js +12424 -0
  63. package/package.json +23 -7
  64. package/dist/_virtual/rolldown_runtime.mjs +0 -31
  65. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  66. package/dist/deepkit/src/vendor/type.d.mts +0 -7
@@ -1,28 +1,26 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
3
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
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");
2
+ const require_utilities = require('../deepkit/src/utilities.cjs');
3
+ const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
6
4
  let defu = require("defu");
7
5
  defu = require_rolldown_runtime.__toESM(defu);
8
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
9
- let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
10
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
11
- let __powerlines_deepkit_vendor_core = require("@powerlines/deepkit/vendor/core");
6
+ let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
7
+ let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
8
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
9
+ let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
12
10
  let __stryke_capnp_compile = require("@stryke/capnp/compile");
13
11
  let __stryke_capnp_helpers = require("@stryke/capnp/helpers");
14
12
  let __stryke_convert_to_array = require("@stryke/convert/to-array");
15
- let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
16
13
  let __stryke_json = require("@stryke/json");
17
14
  let __stryke_path_join = require("@stryke/path/join");
15
+ let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
18
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_string_format_title_case = require("@stryke/string-format/title-case");
19
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
20
  let __stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
22
21
  let node_buffer = require("node:buffer");
23
22
  let node_child_process = require("node:child_process");
24
23
  let node_util = require("node:util");
25
- let powerlines_lib_utilities_file_header = require("powerlines/lib/utilities/file-header");
26
24
 
27
25
  //#region src/helpers/capnp.ts
28
26
  /**
@@ -65,7 +63,7 @@ function stringifyCapnpDefaultValue(property, value) {
65
63
  * @returns A string representation of the value.
66
64
  */
67
65
  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);
66
+ return type.kind === ReflectionKind.string || type.kind === ReflectionKind.literal && (0, __stryke_type_checks_is_string.isString)(type.literal) ? `"${String(value)}"` : type.kind === ReflectionKind.enum ? `${(0, __stryke_string_format_camel_case.camelCase)(String(value))}` : type.kind === ReflectionKind.array ? __stryke_json.StormJSON.stringify(value) : type.kind === ReflectionKind.object || type.kind === ReflectionKind.objectLiteral ? __stryke_json.StormJSON.stringify(value).replaceAll("{", "(").replaceAll("}", ")") : String(value);
69
67
  }
70
68
  /**
71
69
  * Converts a ReflectionProperty's default value to a Cap'n Proto schema string representation.
@@ -74,7 +72,7 @@ function stringifyCapnpValue(type, value) {
74
72
  * @returns A string representation of the property.
75
73
  */
76
74
  function getCapnpEnumTypes(type) {
77
- if (type.kind !== __powerlines_deepkit_vendor_type.ReflectionKind.enum) return null;
75
+ if (type.kind !== ReflectionKind.enum) return null;
78
76
  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
77
  if (unique.length === 0) return null;
80
78
  return unique[0] && (0, __stryke_type_checks_is_string.isString)(unique[0]) ? "Text" : "Float32";
@@ -86,7 +84,7 @@ function getCapnpEnumTypes(type) {
86
84
  * @returns True if the Type is a `Void` type, false otherwise.
87
85
  */
88
86
  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;
87
+ return type.kind === ReflectionKind.void || type.kind === ReflectionKind.never || type.kind === ReflectionKind.null || type.kind === ReflectionKind.undefined || type.kind === ReflectionKind.symbol;
90
88
  }
91
89
  /**
92
90
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
@@ -95,7 +93,7 @@ function isVoidType(type) {
95
93
  * @returns A string representation of the Cap'n Proto primitive type.
96
94
  */
97
95
  function getCapnpUnionTypes(type) {
98
- return (0, __powerlines_deepkit_utilities.getUnionTypes)(type);
96
+ return require_utilities.getUnionTypes(type);
99
97
  }
100
98
  /**
101
99
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
@@ -104,7 +102,7 @@ function getCapnpUnionTypes(type) {
104
102
  * @returns An array of Cap'n Proto primitive types.
105
103
  */
106
104
  function isCapnpStringUnion(type) {
107
- return getCapnpUnionTypes(type).some((member) => member.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string);
105
+ return getCapnpUnionTypes(type).some((member) => member.kind === ReflectionKind.string);
108
106
  }
109
107
  const LARGE_BUFFER = 1024 * 1e6;
110
108
  const execAsync = (0, node_util.promisify)(node_child_process.exec);
@@ -118,7 +116,7 @@ async function generateCapnpId() {
118
116
  }
119
117
  async function generateCapnp(context, reflection, options) {
120
118
  return `${(await generateCapnpId()).trim()};
121
- ${(0, powerlines_lib_utilities_file_header.getBaseFileHeader)(context).replace(/^\r*\n*/g, "").replaceAll("//", "#")}
119
+ ${require_file_header.getBaseFileHeader(context).replace(/^\r*\n*/g, "").replaceAll("//", "#")}
122
120
  ${reflection.getMethods().length === 0 ? generateCapnpStruct(reflection, options) : generateCapnpInterface(reflection, options)}
123
121
  `.trim();
124
122
  }
@@ -144,7 +142,7 @@ function formatEnumName(name) {
144
142
  return (0, __stryke_string_format_pascal_case.pascalCase)(`${name}_Type`);
145
143
  }
146
144
  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);
145
+ const enums = reflection.getProperties().filter((prop) => !prop.isIgnored() && (prop.type.kind === ReflectionKind.enum || prop.type.kind === ReflectionKind.union && getCapnpUnionTypes(prop.type).filter((type) => type.kind === 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
146
  if (enums.length === 0) return "";
149
147
  return `${enums.map((enumeration) => generateCapnpEnumSchema(enumeration.type, formatEnumName(enumeration.getNameAsString()))).join("\n\n")}
150
148
 
@@ -153,7 +151,7 @@ function generateCapnpEnums(reflection) {
153
151
  function generateCapnpSchema(reflection, options = {}) {
154
152
  let index = 0;
155
153
  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) ? `
154
+ 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 === ReflectionKind.class && prop.type.classType === Map) ? `
157
155
  struct Map(Key, Value) {
158
156
  entries @0 :List(Entry);
159
157
 
@@ -161,7 +159,7 @@ function generateCapnpSchema(reflection, options = {}) {
161
159
  key @0 :Key;
162
160
  value @1 :Value;
163
161
  }
164
- }` : ""}${reflection.getProperties().some((prop) => prop.type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.class && prop.type.classType === Date) ? `
162
+ }` : ""}${reflection.getProperties().some((prop) => prop.type.kind === ReflectionKind.class && prop.type.classType === Date) ? `
165
163
  struct Date {
166
164
  # A standard Gregorian calendar date.
167
165
 
@@ -187,7 +185,7 @@ function generateCapnpMethodSchema(reflection, indexCounter) {
187
185
  if (!methodName) throw new Error(`Cannot generate Cap'n Proto schema for method without a name - Parent interface: ${reflection.reflectionClass.getName()}`);
188
186
  return `${(0, __stryke_string_format_camel_case.camelCase)(methodName)} @${indexCounter()} (${reflection.getParameters().map((param) => {
189
187
  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", ". ")}`;
188
+ }).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", ". ")}`;
191
189
  }
192
190
  function generateCapnpPropertyComment(reflection) {
193
191
  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) => {
@@ -202,17 +200,17 @@ function generateCapnpPropertyComment(reflection) {
202
200
  return "";
203
201
  }
204
202
  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;
203
+ if (reflection.type.kind === ReflectionKind.union) if (getCapnpUnionTypes(reflection.type).length === 0) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Void;
206
204
  ${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)}` : ""};
205
+ else if (getCapnpUnionTypes(reflection.type).filter((type) => type.kind === 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
206
  ${generateCapnpPropertyComment(reflection)}`;
209
207
  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")}
208
+ ${getCapnpUnionTypes(reflection.type).map((type) => ` ${require_utilities.kindToName(type.kind)} @${indexCounter()} :${generateCapnpPrimitive(type)};`).join("\n")}
211
209
  }
212
210
  ${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)}` : ""};
211
+ else if (reflection.type.kind === ReflectionKind.array) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :List(${generateCapnpPrimitive(reflection.getSubType())})${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
214
212
  ${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)}` : ""};
213
+ else if (reflection.type.kind === 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
214
  ${generateCapnpPropertyComment(reflection)}`;
217
215
  else if (reflection.type.classType === Date) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
218
216
  ${generateCapnpPropertyComment(reflection)}`;
@@ -220,24 +218,24 @@ ${generateCapnpPropertyComment(reflection)}`;
220
218
  ${generateCapnpPropertyComment(reflection)}`;
221
219
  else if (reflection.type.classType === ArrayBuffer) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :Data${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
222
220
  ${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)}` : ""};
221
+ else return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || getClassName(reflection.type.classType))}${generateCapnpStruct(reflection.reflectionClass, { name: (0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || getClassName(reflection.type.classType)) })}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
224
222
  ${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)}` : ""};
223
+ else if (reflection.type.kind === ReflectionKind.objectLiteral) return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${(0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || memberNameToString(reflection.getNameAsString()))}${generateCapnpStruct(reflection.reflectionClass, { name: (0, __stryke_string_format_pascal_case.pascalCase)(reflection.type.typeName || memberNameToString(reflection.getNameAsString())) })}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
226
224
  ${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)}` : ""};
225
+ else if (reflection.type.kind === 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
226
  ${generateCapnpPropertyComment(reflection)}`;
229
227
  return `${(0, __stryke_string_format_camel_case.camelCase)(reflection.getNameAsString())} @${indexCounter()} :${generateCapnpPrimitive(reflection.getType())}${reflection.hasDefault() ? ` = ${stringifyCapnpDefaultValue(reflection)}` : ""};
230
228
  ${generateCapnpPropertyComment(reflection)}`;
231
229
  }
232
230
  function generateCapnpEnumSchema(type, name) {
233
- if (type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union) return generateCapnpEnumSchema({
234
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.enum,
231
+ if (type.kind === ReflectionKind.union) return generateCapnpEnumSchema({
232
+ kind: ReflectionKind.enum,
235
233
  indexType: type,
236
234
  enum: type.types.reduce((ret, type$1) => {
237
235
  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;
238
236
  return ret;
239
237
  }, {}),
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)
238
+ values: getCapnpUnionTypes(type).filter((type$1) => type$1.kind === 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
239
  }, name);
242
240
  let index = 0;
243
241
  const indexCounter = () => index++;
@@ -254,7 +252,7 @@ ${type.enum && Object.entries(type.enum).length > 0 ? Object.entries(type.enum).
254
252
  * @returns A string representation of the Cap'n Proto primitive type.
255
253
  */
256
254
  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";
255
+ return type.kind === ReflectionKind.never || type.kind === ReflectionKind.void || type.kind === ReflectionKind.null || type.kind === ReflectionKind.undefined || type.kind === ReflectionKind.symbol ? "Void" : type.kind === ReflectionKind.class && type.classType === Date ? "Date" : type.kind === ReflectionKind.class && type.classType === Set ? `List(${type.typeArguments && type.typeArguments[0] ? generateCapnpPrimitive(type.typeArguments[0]) : "Data"})` : type.kind === ReflectionKind.bigint ? "UInt64" : type.kind === ReflectionKind.number ? "Float64" : type.kind === ReflectionKind.string || type.kind === ReflectionKind.regexp ? "Text" : type.kind === ReflectionKind.boolean ? "Bool" : type.kind === 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
256
  }
259
257
 
260
258
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Context, PluginContext } from "../powerlines/src/types/context.cjs";
2
- import { type_d_exports } from "../deepkit/src/vendor/type.cjs";
3
2
  import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
3
 
5
4
  //#region src/helpers/capnp.d.ts
@@ -19,7 +18,7 @@ declare function compile(context: Context, options?: Partial<CapnpcOptions>): Pr
19
18
  * @param value - The value to stringify.
20
19
  * @returns A string representation of the value.
21
20
  */
22
- declare function stringifyCapnpDefaultValue(property: type_d_exports.ReflectionProperty | type_d_exports.ReflectionParameter, value?: any): string;
21
+ declare function stringifyCapnpDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
23
22
  /**
24
23
  * Converts any {@link Type}'s actual value to string representation.
25
24
  *
@@ -27,35 +26,35 @@ declare function stringifyCapnpDefaultValue(property: type_d_exports.ReflectionP
27
26
  * @param value - The value to stringify.
28
27
  * @returns A string representation of the value.
29
28
  */
30
- declare function stringifyCapnpValue(type: type_d_exports.Type, value: any): string;
29
+ declare function stringifyCapnpValue(type: Type, value: any): string;
31
30
  /**
32
31
  * Converts a ReflectionProperty's default value to a Cap'n Proto schema string representation.
33
32
  *
34
33
  * @param type - The TypeEnum to evaluate.
35
34
  * @returns A string representation of the property.
36
35
  */
37
- declare function getCapnpEnumTypes(type: type_d_exports.Type): "Text" | "Float32" | null;
36
+ declare function getCapnpEnumTypes(type: Type): "Text" | "Float32" | null;
38
37
  /**
39
38
  * Determines if a Type is a `Void` type in a Cap'n Proto schema.
40
39
  *
41
40
  * @param type - The Type to check.
42
41
  * @returns True if the Type is a `Void` type, false otherwise.
43
42
  */
44
- declare function isVoidType(type: type_d_exports.Type): boolean;
43
+ declare function isVoidType(type: Type): boolean;
45
44
  /**
46
45
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
47
46
  *
48
47
  * @param type - The {@link TypeUnion} to convert.
49
48
  * @returns A string representation of the Cap'n Proto primitive type.
50
49
  */
51
- declare function getCapnpUnionTypes(type: type_d_exports.Type): type_d_exports.Type[];
50
+ declare function getCapnpUnionTypes(type: Type): Type[];
52
51
  /**
53
52
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
54
53
  *
55
54
  * @param type - The {@link TypeUnion} to convert.
56
55
  * @returns An array of Cap'n Proto primitive types.
57
56
  */
58
- declare function isCapnpStringUnion(type: type_d_exports.Type): boolean;
57
+ declare function isCapnpStringUnion(type: Type): boolean;
59
58
  declare const LARGE_BUFFER: number;
60
59
  type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
61
60
  type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>;
@@ -63,22 +62,22 @@ declare function generateCapnpId(): Promise<string>;
63
62
  interface GenerateCapnpOptions {
64
63
  name?: string;
65
64
  }
66
- declare function generateCapnp(context: PluginContext, reflection: type_d_exports.ReflectionClass<any>, options: GenerateCapnpOptions): Promise<string>;
65
+ declare function generateCapnp(context: PluginContext, reflection: ReflectionClass<any>, options: GenerateCapnpOptions): Promise<string>;
67
66
  interface GenerateCapnpStructOptions extends GenerateCapnpOptions {
68
67
  indexCounter?: () => number;
69
68
  }
70
- declare function generateCapnpStruct(reflection: type_d_exports.ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
71
- declare function generateCapnpInterface(reflection: type_d_exports.ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
72
- declare function generateCapnpSchema(reflection: type_d_exports.ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
73
- declare function generateCapnpMethodSchema(reflection: type_d_exports.ReflectionMethod, indexCounter: () => number): string;
74
- declare function generateCapnpEnumSchema(type: type_d_exports.TypeEnum | type_d_exports.TypeUnion, name: string): string;
69
+ declare function generateCapnpStruct(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
70
+ declare function generateCapnpInterface(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
71
+ declare function generateCapnpSchema(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
72
+ declare function generateCapnpMethodSchema(reflection: ReflectionMethod, indexCounter: () => number): string;
73
+ declare function generateCapnpEnumSchema(type: TypeEnum | TypeUnion, name: string): string;
75
74
  /**
76
75
  * Generates a string representation of Cap'n Proto primitive types from a Deepkit Type.
77
76
  *
78
77
  * @param type - The Deepkit Type to convert.
79
78
  * @returns A string representation of the Cap'n Proto primitive type.
80
79
  */
81
- declare function generateCapnpPrimitive(type: type_d_exports.Type): string;
80
+ declare function generateCapnpPrimitive(type: Type): string;
82
81
  declare type __ΩIOType = any[];
83
82
  declare type __ΩStdioOptions = any[];
84
83
  declare type __ΩGenerateCapnpOptions = any[];
@@ -1,5 +1,4 @@
1
1
  import { Context, PluginContext } from "../powerlines/src/types/context.mjs";
2
- import { type_d_exports } from "../deepkit/src/vendor/type.mjs";
3
2
  import { CapnpcOptions, CapnpcResult } from "@stryke/capnp/types";
4
3
 
5
4
  //#region src/helpers/capnp.d.ts
@@ -19,7 +18,7 @@ declare function compile(context: Context, options?: Partial<CapnpcOptions>): Pr
19
18
  * @param value - The value to stringify.
20
19
  * @returns A string representation of the value.
21
20
  */
22
- declare function stringifyCapnpDefaultValue(property: type_d_exports.ReflectionProperty | type_d_exports.ReflectionParameter, value?: any): string;
21
+ declare function stringifyCapnpDefaultValue(property: ReflectionProperty | ReflectionParameter, value?: any): string;
23
22
  /**
24
23
  * Converts any {@link Type}'s actual value to string representation.
25
24
  *
@@ -27,35 +26,35 @@ declare function stringifyCapnpDefaultValue(property: type_d_exports.ReflectionP
27
26
  * @param value - The value to stringify.
28
27
  * @returns A string representation of the value.
29
28
  */
30
- declare function stringifyCapnpValue(type: type_d_exports.Type, value: any): string;
29
+ declare function stringifyCapnpValue(type: Type, value: any): string;
31
30
  /**
32
31
  * Converts a ReflectionProperty's default value to a Cap'n Proto schema string representation.
33
32
  *
34
33
  * @param type - The TypeEnum to evaluate.
35
34
  * @returns A string representation of the property.
36
35
  */
37
- declare function getCapnpEnumTypes(type: type_d_exports.Type): "Text" | "Float32" | null;
36
+ declare function getCapnpEnumTypes(type: Type): "Text" | "Float32" | null;
38
37
  /**
39
38
  * Determines if a Type is a `Void` type in a Cap'n Proto schema.
40
39
  *
41
40
  * @param type - The Type to check.
42
41
  * @returns True if the Type is a `Void` type, false otherwise.
43
42
  */
44
- declare function isVoidType(type: type_d_exports.Type): boolean;
43
+ declare function isVoidType(type: Type): boolean;
45
44
  /**
46
45
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
47
46
  *
48
47
  * @param type - The {@link TypeUnion} to convert.
49
48
  * @returns A string representation of the Cap'n Proto primitive type.
50
49
  */
51
- declare function getCapnpUnionTypes(type: type_d_exports.Type): type_d_exports.Type[];
50
+ declare function getCapnpUnionTypes(type: Type): Type[];
52
51
  /**
53
52
  * Converts a {@link TypeUnion} to an array of its underlying Cap'n Proto primitive type representation.
54
53
  *
55
54
  * @param type - The {@link TypeUnion} to convert.
56
55
  * @returns An array of Cap'n Proto primitive types.
57
56
  */
58
- declare function isCapnpStringUnion(type: type_d_exports.Type): boolean;
57
+ declare function isCapnpStringUnion(type: Type): boolean;
59
58
  declare const LARGE_BUFFER: number;
60
59
  type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
61
60
  type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>;
@@ -63,22 +62,22 @@ declare function generateCapnpId(): Promise<string>;
63
62
  interface GenerateCapnpOptions {
64
63
  name?: string;
65
64
  }
66
- declare function generateCapnp(context: PluginContext, reflection: type_d_exports.ReflectionClass<any>, options: GenerateCapnpOptions): Promise<string>;
65
+ declare function generateCapnp(context: PluginContext, reflection: ReflectionClass<any>, options: GenerateCapnpOptions): Promise<string>;
67
66
  interface GenerateCapnpStructOptions extends GenerateCapnpOptions {
68
67
  indexCounter?: () => number;
69
68
  }
70
- declare function generateCapnpStruct(reflection: type_d_exports.ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
71
- declare function generateCapnpInterface(reflection: type_d_exports.ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
72
- declare function generateCapnpSchema(reflection: type_d_exports.ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
73
- declare function generateCapnpMethodSchema(reflection: type_d_exports.ReflectionMethod, indexCounter: () => number): string;
74
- declare function generateCapnpEnumSchema(type: type_d_exports.TypeEnum | type_d_exports.TypeUnion, name: string): string;
69
+ declare function generateCapnpStruct(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
70
+ declare function generateCapnpInterface(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
71
+ declare function generateCapnpSchema(reflection: ReflectionClass<any>, options?: GenerateCapnpStructOptions): string;
72
+ declare function generateCapnpMethodSchema(reflection: ReflectionMethod, indexCounter: () => number): string;
73
+ declare function generateCapnpEnumSchema(type: TypeEnum | TypeUnion, name: string): string;
75
74
  /**
76
75
  * Generates a string representation of Cap'n Proto primitive types from a Deepkit Type.
77
76
  *
78
77
  * @param type - The Deepkit Type to convert.
79
78
  * @returns A string representation of the Cap'n Proto primitive type.
80
79
  */
81
- declare function generateCapnpPrimitive(type: type_d_exports.Type): string;
80
+ declare function generateCapnpPrimitive(type: Type): string;
82
81
  declare type __ΩIOType = any[];
83
82
  declare type __ΩStdioOptions = any[];
84
83
  declare type __ΩGenerateCapnpOptions = any[];
@@ -1,26 +1,24 @@
1
- import { getUnionTypes, kindToName } from "@powerlines/deepkit/utilities";
2
- import { isUndefined } from "@stryke/type-checks/is-undefined";
3
- import { titleCase } from "@stryke/string-format/title-case";
4
- import { isString } from "@stryke/type-checks/is-string";
1
+ import { getUnionTypes, kindToName } from "../deepkit/src/utilities.mjs";
2
+ import { getBaseFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
5
3
  import defu from "defu";
6
- import { ReflectionKind, memberNameToString } from "@powerlines/deepkit/vendor/type";
7
- import { pascalCase } from "@stryke/string-format/pascal-case";
8
- import { camelCase } from "@stryke/string-format/camel-case";
9
- import { getClassName } from "@powerlines/deepkit/vendor/core";
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";
7
+ import { isUndefined } from "@stryke/type-checks/is-undefined";
10
8
  import { capnpc } from "@stryke/capnp/compile";
11
9
  import { resolveOptions } from "@stryke/capnp/helpers";
12
10
  import { toArray } from "@stryke/convert/to-array";
13
- import { getUniqueBy } from "@stryke/helpers/get-unique";
14
11
  import { StormJSON } from "@stryke/json";
15
12
  import { joinPaths } from "@stryke/path/join";
13
+ import { camelCase } from "@stryke/string-format/camel-case";
16
14
  import { getWords } from "@stryke/string-format/get-words";
15
+ import { pascalCase } from "@stryke/string-format/pascal-case";
16
+ import { titleCase } from "@stryke/string-format/title-case";
17
17
  import { isBigInt } from "@stryke/type-checks/is-bigint";
18
- import { isNull } from "@stryke/type-checks/is-null";
19
18
  import { isNumber } from "@stryke/type-checks/is-number";
20
19
  import { Buffer } from "node:buffer";
21
20
  import { exec } from "node:child_process";
22
21
  import { promisify } from "node:util";
23
- import { getBaseFileHeader } from "powerlines/lib/utilities/file-header";
24
22
 
25
23
  //#region src/helpers/capnp.ts
26
24
  /**
@@ -1,7 +1,7 @@
1
- const require_helpers_typescript = require('./typescript.cjs');
2
- const require_helpers_refkey = require('./refkey.cjs');
3
1
  const require_helpers_capnp = require('./capnp.cjs');
4
2
  const require_helpers_create_builtin = require('./create-builtin.cjs');
3
+ const require_helpers_refkey = require('./refkey.cjs');
4
+ const require_helpers_typescript = require('./typescript.cjs');
5
5
 
6
6
  exports.LARGE_BUFFER = require_helpers_capnp.LARGE_BUFFER;
7
7
  exports.compile = require_helpers_capnp.compile;
@@ -1,6 +1,6 @@
1
- import { generateTypeScriptObject } from "./typescript.mjs";
2
- import { refkey } from "./refkey.mjs";
3
1
  import { LARGE_BUFFER, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue } from "./capnp.mjs";
4
2
  import { createBuiltin } from "./create-builtin.mjs";
3
+ import { refkey } from "./refkey.mjs";
4
+ import { generateTypeScriptObject } from "./typescript.mjs";
5
5
 
6
6
  export { LARGE_BUFFER, compile, createBuiltin, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, generateTypeScriptObject, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, refkey, stringifyCapnpDefaultValue, stringifyCapnpValue };
@@ -1,8 +1,8 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
2
+ const require_utilities = require('../deepkit/src/utilities.cjs');
3
3
  let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
4
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
5
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
6
 
7
7
  //#region src/helpers/typescript.ts
8
8
  /**
@@ -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()}: ${(0, __powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
37
+ ${item.getNameAsString()}: ${require_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,5 +1,3 @@
1
- import { type_d_exports } from "../deepkit/src/vendor/type.cjs";
2
-
3
1
  //#region src/helpers/typescript.d.ts
4
2
  interface GenerateTypeScriptInterfaceOptions<T> {
5
3
  overrideName?: string;
@@ -18,7 +16,7 @@ interface GenerateTypeScriptObjectOptions<T> {
18
16
  * @param options - Options for generating the object.
19
17
  * @returns A string containing the TypeScript object definition.
20
18
  */
21
- declare function generateTypeScriptObject<T extends Record<string, any>>(reflection: type_d_exports.ReflectionClass<T>, options?: GenerateTypeScriptObjectOptions<T>): string;
19
+ declare function generateTypeScriptObject<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateTypeScriptObjectOptions<T>): string;
22
20
  declare type __ΩGenerateTypeScriptInterfaceOptions = any[];
23
21
  declare type __ΩGenerateTypeScriptObjectOptions = any[];
24
22
  //#endregion
@@ -1,5 +1,3 @@
1
- import { type_d_exports } from "../deepkit/src/vendor/type.mjs";
2
-
3
1
  //#region src/helpers/typescript.d.ts
4
2
  interface GenerateTypeScriptInterfaceOptions<T> {
5
3
  overrideName?: string;
@@ -18,7 +16,7 @@ interface GenerateTypeScriptObjectOptions<T> {
18
16
  * @param options - Options for generating the object.
19
17
  * @returns A string containing the TypeScript object definition.
20
18
  */
21
- declare function generateTypeScriptObject<T extends Record<string, any>>(reflection: type_d_exports.ReflectionClass<T>, options?: GenerateTypeScriptObjectOptions<T>): string;
19
+ declare function generateTypeScriptObject<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateTypeScriptObjectOptions<T>): string;
22
20
  declare type __ΩGenerateTypeScriptInterfaceOptions = any[];
23
21
  declare type __ΩGenerateTypeScriptObjectOptions = any[];
24
22
  //#endregion
@@ -1,7 +1,7 @@
1
- import { stringifyValue } from "@powerlines/deepkit/utilities";
1
+ import { stringifyValue } from "../deepkit/src/utilities.mjs";
2
2
  import { isUndefined } from "@stryke/type-checks/is-undefined";
3
- import { titleCase } from "@stryke/string-format/title-case";
4
3
  import { camelCase } from "@stryke/string-format/camel-case";
4
+ import { titleCase } from "@stryke/string-format/title-case";
5
5
 
6
6
  //#region src/helpers/typescript.ts
7
7
  /**
package/dist/index.cjs CHANGED
@@ -1,39 +1,39 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
3
  const require_core_contexts_context = require('./core/contexts/context.cjs');
4
- const require_typescript_components_tsdoc = require('./typescript/components/tsdoc.cjs');
4
+ const require_core_components_output = require('./core/components/output.cjs');
5
5
  const require_core_components_single_line_comment = require('./core/components/single-line-comment.cjs');
6
6
  const require_core_components_source_file = require('./core/components/source-file.cjs');
7
+ const require_core_contexts_reflection = require('./core/contexts/reflection.cjs');
8
+ require('./core/index.cjs');
9
+ const require_helpers_capnp = require('./helpers/capnp.cjs');
10
+ const require_helpers_create_builtin = require('./helpers/create-builtin.cjs');
11
+ const require_helpers_refkey = require('./helpers/refkey.cjs');
12
+ const require_helpers_typescript = require('./helpers/typescript.cjs');
13
+ require('./helpers/index.cjs');
14
+ const require_markdown_components_markdown_file = require('./markdown/components/markdown-file.cjs');
15
+ const require_markdown_contexts_markdown_table = require('./markdown/contexts/markdown-table.cjs');
16
+ const require_markdown_components_markdown_table = require('./markdown/components/markdown-table.cjs');
17
+ require('./markdown/index.cjs');
18
+ const require_typescript_components_tsdoc = require('./typescript/components/tsdoc.cjs');
7
19
  const require_typescript_components_typescript_file = require('./typescript/components/typescript-file.cjs');
8
20
  const require_typescript_components_builtin_file = require('./typescript/components/builtin-file.cjs');
9
21
  const require_typescript_components_dynamic_import_statement = require('./typescript/components/dynamic-import-statement.cjs');
10
22
  const require_typescript_components_entry_file = require('./typescript/components/entry-file.cjs');
11
23
  const require_typescript_components_record_expression = require('./typescript/components/record-expression.cjs');
12
- const require_core_contexts_reflection = require('./core/contexts/reflection.cjs');
13
24
  const require_typescript_components_tsdoc_reflection = require('./typescript/components/tsdoc-reflection.cjs');
14
25
  const require_typescript_components_typescript_interface = require('./typescript/components/typescript-interface.cjs');
15
26
  const require_typescript_components_typescript_object = require('./typescript/components/typescript-object.cjs');
16
27
  require('./typescript/index.cjs');
17
- const require_markdown_components_markdown_file = require('./markdown/components/markdown-file.cjs');
18
- const require_markdown_contexts_markdown_table = require('./markdown/contexts/markdown-table.cjs');
19
- const require_markdown_components_markdown_table = require('./markdown/components/markdown-table.cjs');
20
- require('./markdown/index.cjs');
21
- const require_helpers_typescript = require('./helpers/typescript.cjs');
22
- const require_helpers_refkey = require('./helpers/refkey.cjs');
23
- const require_helpers_capnp = require('./helpers/capnp.cjs');
24
- const require_helpers_create_builtin = require('./helpers/create-builtin.cjs');
25
- require('./helpers/index.cjs');
26
- const require_core_components_output = require('./core/components/output.cjs');
27
- require('./core/index.cjs');
28
28
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
29
29
  let __alloy_js_core = require("@alloy-js/core");
30
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
31
- let __stryke_path_replace = require("@stryke/path/replace");
32
30
  let __alloy_js_rollup_plugin = require("@alloy-js/rollup-plugin");
33
31
  __alloy_js_rollup_plugin = require_rolldown_runtime.__toESM(__alloy_js_rollup_plugin);
34
32
  let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
35
33
  let __stryke_json_storm_json = require("@stryke/json/storm-json");
36
34
  let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
35
+ let __stryke_path_replace = require("@stryke/path/replace");
36
+ let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
37
37
  let prettier_doc_js = require("prettier/doc.js");
38
38
 
39
39
  //#region src/index.tsx
@@ -58,7 +58,13 @@ const plugin = (options = {}) => {
58
58
  pragma: "Alloy.createElement",
59
59
  importSource: "@alloy-js/core"
60
60
  } } },
61
- plugins: [(0, __alloy_js_rollup_plugin.default)()]
61
+ plugins: [(0, __alloy_js_rollup_plugin.default)()],
62
+ alias: { "@alloy-js/core": "@powerlines/plugin-alloy/vendor" },
63
+ external: [
64
+ "@alloy-js/core",
65
+ "@vue/reactivity",
66
+ "@vue/shared"
67
+ ]
62
68
  }
63
69
  };
64
70
  },