@powerlines/plugin-env 0.15.122 → 0.15.124

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 (219) hide show
  1. package/dist/babel/plugin.cjs +11 -11
  2. package/dist/babel/plugin.d.cts +2 -2
  3. package/dist/babel/plugin.d.mts +2 -3
  4. package/dist/babel/plugin.mjs +5 -5
  5. package/dist/components/docs.cjs +6 -6
  6. package/dist/components/docs.d.cts +1 -1
  7. package/dist/components/docs.d.mts +1 -1
  8. package/dist/components/docs.mjs +3 -3
  9. package/dist/components/env.cjs +40 -40
  10. package/dist/components/env.d.cts +2 -2
  11. package/dist/components/env.d.mts +2 -2
  12. package/dist/components/env.mjs +11 -11
  13. package/dist/helpers/automd-generator.cjs +2 -2
  14. package/dist/helpers/automd-generator.d.cts +1 -1
  15. package/dist/helpers/automd-generator.d.mts +1 -1
  16. package/dist/helpers/automd-generator.mjs +1 -1
  17. package/dist/helpers/load.cjs +7 -7
  18. package/dist/helpers/load.mjs +8 -8
  19. package/dist/helpers/persistence.cjs +23 -23
  20. package/dist/helpers/persistence.d.cts +1 -1
  21. package/dist/helpers/persistence.d.mts +1 -1
  22. package/dist/helpers/persistence.mjs +5 -5
  23. package/dist/helpers/reflect.cjs +5 -5
  24. package/dist/helpers/reflect.mjs +1 -1
  25. package/dist/helpers/source-file-env.cjs +1 -1
  26. package/dist/helpers/source-file-env.mjs +1 -1
  27. package/dist/index.cjs +13 -10
  28. package/dist/index.d.cts +1 -1
  29. package/dist/index.d.mts +1 -1
  30. package/dist/index.mjs +12 -12
  31. package/dist/types/plugin.cjs +19 -18
  32. package/dist/types/plugin.d.cts +5 -6
  33. package/dist/types/plugin.d.mts +4 -6
  34. package/dist/types/plugin.mjs +4 -4
  35. package/package.json +7 -7
  36. package/dist/deepkit/schemas/reflection.cjs +0 -5426
  37. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  38. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  39. package/dist/deepkit/schemas/reflection.mjs +0 -5423
  40. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  41. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  42. package/dist/deepkit/src/capnp.cjs +0 -1692
  43. package/dist/deepkit/src/capnp.mjs +0 -1690
  44. package/dist/deepkit/src/esbuild-plugin.cjs +0 -99
  45. package/dist/deepkit/src/esbuild-plugin.mjs +0 -98
  46. package/dist/deepkit/src/reflect-type.cjs +0 -40
  47. package/dist/deepkit/src/reflect-type.mjs +0 -38
  48. package/dist/deepkit/src/resolve-reflections.cjs +0 -23
  49. package/dist/deepkit/src/resolve-reflections.mjs +0 -22
  50. package/dist/deepkit/src/transformer.cjs +0 -92
  51. package/dist/deepkit/src/transformer.mjs +0 -89
  52. package/dist/deepkit/src/transpile.cjs +0 -39
  53. package/dist/deepkit/src/transpile.mjs +0 -37
  54. package/dist/deepkit/src/types.cjs +0 -22
  55. package/dist/deepkit/src/types.d.cts +0 -10
  56. package/dist/deepkit/src/types.d.mts +0 -10
  57. package/dist/deepkit/src/types.mjs +0 -21
  58. package/dist/deepkit/src/utilities.cjs +0 -184
  59. package/dist/deepkit/src/utilities.mjs +0 -183
  60. package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
  61. package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
  62. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  63. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  64. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  65. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  66. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  67. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  68. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -134
  69. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -126
  70. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  71. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  72. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -110
  73. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -101
  74. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -23
  75. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -22
  76. package/dist/plugin-alloy/src/index.cjs +0 -105
  77. package/dist/plugin-alloy/src/index.mjs +0 -103
  78. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  79. package/dist/plugin-alloy/src/markdown/components/markdown-file.d.cts +0 -8
  80. package/dist/plugin-alloy/src/markdown/components/markdown-file.d.mts +0 -8
  81. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  82. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  83. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  84. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -72
  85. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -71
  86. package/dist/plugin-alloy/src/types/components.cjs +0 -22
  87. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  88. package/dist/plugin-alloy/src/types/components.d.mts +0 -21
  89. package/dist/plugin-alloy/src/types/components.mjs +0 -21
  90. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  91. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  92. package/dist/plugin-alloy/src/types/plugin.cjs +0 -53
  93. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  94. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  95. package/dist/plugin-alloy/src/types/plugin.mjs +0 -50
  96. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
  97. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  98. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  99. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
  100. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
  101. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
  102. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
  103. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  104. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  105. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
  106. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
  107. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  108. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  109. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
  110. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
  111. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -12
  112. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -12
  113. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -71
  114. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  115. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  116. package/dist/plugin-automd/src/index.cjs +0 -127
  117. package/dist/plugin-automd/src/index.mjs +0 -124
  118. package/dist/plugin-automd/src/types/plugin.cjs +0 -47
  119. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  120. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  121. package/dist/plugin-automd/src/types/plugin.mjs +0 -47
  122. package/dist/plugin-automd/src/types/toc.cjs +0 -26
  123. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  124. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  125. package/dist/plugin-automd/src/types/toc.mjs +0 -25
  126. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -74
  127. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -70
  128. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -71
  129. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -69
  130. package/dist/plugin-babel/src/helpers/filters.cjs +0 -158
  131. package/dist/plugin-babel/src/helpers/filters.mjs +0 -154
  132. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  133. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  134. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -200
  135. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -192
  136. package/dist/plugin-babel/src/helpers/options.cjs +0 -73
  137. package/dist/plugin-babel/src/helpers/options.mjs +0 -70
  138. package/dist/plugin-babel/src/index.cjs +0 -125
  139. package/dist/plugin-babel/src/index.mjs +0 -123
  140. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  141. package/dist/plugin-babel/src/types/plugin.cjs +0 -42
  142. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  143. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  144. package/dist/plugin-babel/src/types/plugin.mjs +0 -39
  145. package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -136
  146. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  147. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  148. package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -134
  149. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -142
  150. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -140
  151. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  152. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  153. package/dist/powerlines/src/lib/entry.cjs +0 -195
  154. package/dist/powerlines/src/lib/entry.mjs +0 -194
  155. package/dist/powerlines/src/lib/logger.cjs +0 -108
  156. package/dist/powerlines/src/lib/logger.mjs +0 -106
  157. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -41
  158. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -40
  159. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -98
  160. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -97
  161. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -139
  162. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -138
  163. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -74
  164. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -72
  165. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -69
  166. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -68
  167. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -68
  168. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -66
  169. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -46
  170. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -45
  171. package/dist/powerlines/src/types/api.cjs +0 -62
  172. package/dist/powerlines/src/types/api.d.cts +0 -104
  173. package/dist/powerlines/src/types/api.d.mts +0 -104
  174. package/dist/powerlines/src/types/api.mjs +0 -62
  175. package/dist/powerlines/src/types/babel.cjs +0 -156
  176. package/dist/powerlines/src/types/babel.d.cts +0 -23
  177. package/dist/powerlines/src/types/babel.d.mts +0 -23
  178. package/dist/powerlines/src/types/babel.mjs +0 -147
  179. package/dist/powerlines/src/types/build.cjs +0 -127
  180. package/dist/powerlines/src/types/build.d.cts +0 -185
  181. package/dist/powerlines/src/types/build.d.mts +0 -185
  182. package/dist/powerlines/src/types/build.mjs +0 -121
  183. package/dist/powerlines/src/types/commands.cjs +0 -16
  184. package/dist/powerlines/src/types/commands.d.cts +0 -8
  185. package/dist/powerlines/src/types/commands.d.mts +0 -9
  186. package/dist/powerlines/src/types/commands.mjs +0 -15
  187. package/dist/powerlines/src/types/config.cjs +0 -420
  188. package/dist/powerlines/src/types/config.d.cts +0 -435
  189. package/dist/powerlines/src/types/config.d.mts +0 -436
  190. package/dist/powerlines/src/types/config.mjs +0 -397
  191. package/dist/powerlines/src/types/context.cjs +0 -388
  192. package/dist/powerlines/src/types/context.d.cts +0 -514
  193. package/dist/powerlines/src/types/context.d.mts +0 -514
  194. package/dist/powerlines/src/types/context.mjs +0 -371
  195. package/dist/powerlines/src/types/fs.cjs +0 -78
  196. package/dist/powerlines/src/types/fs.d.cts +0 -486
  197. package/dist/powerlines/src/types/fs.d.mts +0 -486
  198. package/dist/powerlines/src/types/fs.mjs +0 -75
  199. package/dist/powerlines/src/types/hooks.cjs +0 -71
  200. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  201. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  202. package/dist/powerlines/src/types/hooks.mjs +0 -68
  203. package/dist/powerlines/src/types/index.cjs +0 -11
  204. package/dist/powerlines/src/types/index.d.mts +0 -12
  205. package/dist/powerlines/src/types/index.mjs +0 -13
  206. package/dist/powerlines/src/types/plugin.cjs +0 -184
  207. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  208. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  209. package/dist/powerlines/src/types/plugin.mjs +0 -178
  210. package/dist/powerlines/src/types/resolved.cjs +0 -149
  211. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  212. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  213. package/dist/powerlines/src/types/resolved.mjs +0 -144
  214. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  215. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  216. package/dist/powerlines/src/types/unplugin.cjs +0 -64
  217. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  218. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
  219. package/dist/powerlines/src/types/unplugin.mjs +0 -62
@@ -1,184 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
3
- let __stryke_type_checks = require("@stryke/type-checks");
4
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
5
- let __stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
6
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
7
- let __stryke_json_storm_json = require("@stryke/json/storm-json");
8
- let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
9
-
10
- //#region ../deepkit/src/utilities.ts
11
- function __assignType(fn, args) {
12
- fn.__type = args;
13
- return fn;
14
- }
15
- /**
16
- * Converts any {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind}'s value to string representation.
17
- *
18
- * @param property - The {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind} containing the value to stringify.
19
- * @param value - The value to stringify.
20
- * @returns A string representation of the value.
21
- */
22
- function stringifyDefaultValue(property, value) {
23
- return (0, __stryke_type_checks.isSetObject)(property) ? stringifyValue(property.type, value ?? property.getDefaultValue()) : stringifyValue({ kind: property }, value);
24
- }
25
- stringifyDefaultValue.__type = [
26
- () => __powerlines_deepkit_vendor_type.ReflectionProperty,
27
- () => __powerlines_deepkit_vendor_type.ReflectionParameter,
28
- () => __powerlines_deepkit_vendor_type.__ΩReflectionKind,
29
- "property",
30
- "value",
31
- "stringifyDefaultValue",
32
- "Converts any {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind}'s value to string representation.",
33
- "PPP7!P7\"n#J2$\"2%8&/&?'"
34
- ];
35
- /**
36
- * Stringifies a value as a string.
37
- *
38
- * @param value - The value to stringify.
39
- * @returns A string representation of the value.
40
- */
41
- function stringifyStringValue(value) {
42
- return `"${String(value).replaceAll("\"", "\\\"")}"`;
43
- }
44
- stringifyStringValue.__type = [
45
- "value",
46
- "stringifyStringValue",
47
- "Stringifies a value as a string.",
48
- "P\"2!8&/\"?#"
49
- ];
50
- /**
51
- * Converts any {@link Type}'s actual value to string representation.
52
- *
53
- * @param type - The {@link Type} of the value to stringify.
54
- * @param value - The value to stringify.
55
- * @returns A string representation of the value.
56
- */
57
- function stringifyValue(type, value) {
58
- return (0, __stryke_type_checks_is_undefined.isUndefined)(value) ? "undefined" : (0, __stryke_type_checks_is_null.isNull)(value) ? "null" : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean ? String(value).trim().toLowerCase() === "true" ? "true" : "false" : 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) ? stringifyStringValue(value) : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum ? getEnumReflectionType(type).kind === __powerlines_deepkit_vendor_type.ReflectionKind.string ? stringifyStringValue(value) : `${String(value)}` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union ? isStringUnion(type) ? stringifyStringValue(value) : `${String(value)}` : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.array ? stringifyStringValue(__stryke_json_storm_json.StormJSON.stringify(value)) : type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.object || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral ? __stryke_json_storm_json.StormJSON.stringify(value) : (type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.property || type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.parameter) && type.type?.kind ? stringifyValue(type.type, value) : String(value)?.includes("\"") || String(value)?.includes("'") ? stringifyStringValue(value) : String(value);
59
- }
60
- stringifyValue.__type = [
61
- "Type",
62
- "type",
63
- "value",
64
- "stringifyValue",
65
- "Converts any {@link Type}'s actual value to string representation.",
66
- "P\"w!2\"\"2#&/$?%"
67
- ];
68
- /**
69
- * Converts a {@link TypeEnum} to its underlying primitive type representation.
70
- *
71
- * @param type - The {@link TypeEnum} to evaluate.
72
- * @returns A string representation of the primitive type.
73
- */
74
- function getEnumReflectionType(type) {
75
- if (type.kind !== __powerlines_deepkit_vendor_type.ReflectionKind.enum) throw new Error(`Expected a TypeEnum, but received ${type.kind}.`);
76
- const unique = (0, __stryke_helpers_get_unique.getUniqueBy)(type.values.filter(__assignType((value) => value !== void 0 && value !== null, [
77
- "value",
78
- "",
79
- "P\"2!\"/\""
80
- ])), __assignType((enumMember) => (0, __stryke_type_checks_is_string.isString)(enumMember) ? { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string } : { kind: __powerlines_deepkit_vendor_type.ReflectionKind.number }, [
81
- "enumMember",
82
- "",
83
- "P\"2!\"/\""
84
- ]));
85
- if (unique.length === 0) throw new Error(`No valid enum members could be found.`);
86
- return unique[0] && (0, __stryke_type_checks_is_string.isString)(unique[0]) ? { kind: __powerlines_deepkit_vendor_type.ReflectionKind.string } : { kind: __powerlines_deepkit_vendor_type.ReflectionKind.number };
87
- }
88
- getEnumReflectionType.__type = [
89
- "Type",
90
- "type",
91
- () => __powerlines_deepkit_vendor_type.__ΩTypeString,
92
- () => __powerlines_deepkit_vendor_type.__ΩTypeNumber,
93
- "getEnumReflectionType",
94
- "Converts a {@link TypeEnum} to its underlying primitive type representation.",
95
- "P\"w!2\"Pn#n$J/%?&"
96
- ];
97
- /**
98
- * Converts a {@link TypeUnion} to its underlying primitive type representation.
99
- *
100
- * @param type - The {@link TypeUnion} to evaluate.
101
- * @returns A string representation of the primitive type.
102
- */
103
- function getUnionTypes(type) {
104
- if (type.kind === __powerlines_deepkit_vendor_type.ReflectionKind.union && type.types.length > 0) return (0, __stryke_helpers_get_unique.getUniqueBy)(type.types, __assignType((member) => member.kind, [
105
- "member",
106
- "",
107
- "P\"2!\"/\""
108
- ]));
109
- throw new Error(`Expected a TypeUnion, but received ${type.kind}.`);
110
- }
111
- getUnionTypes.__type = [
112
- "Type",
113
- "type",
114
- "getUnionTypes",
115
- "Converts a {@link TypeUnion} to its underlying primitive type representation.",
116
- "P\"w!2\"\"w!F/#?$"
117
- ];
118
- function isStringUnion(type) {
119
- return getUnionTypes(type).some(__assignType((member) => member.kind === __powerlines_deepkit_vendor_type.ReflectionKind.string || member.kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal && (0, __stryke_type_checks_is_string.isString)(member.literal), [
120
- "member",
121
- "",
122
- "P\"2!\"/\""
123
- ]));
124
- }
125
- isStringUnion.__type = [
126
- "Type",
127
- "type",
128
- "isStringUnion",
129
- "P\"w!2\")/#"
130
- ];
131
- /**
132
- * Converts a ReflectionKind to its string representation.
133
- *
134
- * @param kind - The {@link ReflectionKind} to convert.
135
- * @returns A string representation of the kind.
136
- */
137
- function kindToName(kind) {
138
- if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.void) return "void";
139
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.never) return "never";
140
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.null) return "null";
141
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.undefined) return "undefined";
142
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.symbol) return "symbol";
143
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.bigint) return "bigint";
144
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.number) return "number";
145
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.string) return "string";
146
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.boolean) return "boolean";
147
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.literal) return "literal";
148
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.class) return "class";
149
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.array) return "array";
150
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.object) return "object";
151
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral) return "objectLiteral";
152
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.union) return "union";
153
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.enum) return "enum";
154
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.regexp) return "regexp";
155
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.templateLiteral) return "templateLiteral";
156
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.property) return "property";
157
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.method) return "method";
158
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.function) return "function";
159
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.parameter) return "parameter";
160
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.promise) return "promise";
161
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.typeParameter) return "typeParameter";
162
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.tuple) return "tuple";
163
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.tupleMember) return "tupleMember";
164
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.enumMember) return "enumMember";
165
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.rest) return "rest";
166
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.indexSignature) return "indexSignature";
167
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.propertySignature) return "propertySignature";
168
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.methodSignature) return "methodSignature";
169
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.infer) return "infer";
170
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.callSignature) return "callSignature";
171
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.any) return "any";
172
- else if (kind === __powerlines_deepkit_vendor_type.ReflectionKind.intersection) return "intersection";
173
- return "unknown";
174
- }
175
- kindToName.__type = [
176
- () => __powerlines_deepkit_vendor_type.__ΩReflectionKind,
177
- "kind",
178
- "kindToName",
179
- "Converts a ReflectionKind to its string representation.",
180
- "Pn!2\"&/#?$"
181
- ];
182
-
183
- //#endregion
184
- exports.stringifyDefaultValue = stringifyDefaultValue;
@@ -1,183 +0,0 @@
1
- import { ReflectionKind, ReflectionParameter, ReflectionProperty, __ΩReflectionKind, __ΩTypeNumber, __ΩTypeString } from "@powerlines/deepkit/vendor/type";
2
- import { isSetObject } from "@stryke/type-checks";
3
- import { isString as isString$1 } from "@stryke/type-checks/is-string";
4
- import { getUniqueBy } from "@stryke/helpers/get-unique";
5
- import { isUndefined as isUndefined$1 } from "@stryke/type-checks/is-undefined";
6
- import { StormJSON } from "@stryke/json/storm-json";
7
- import { isNull } from "@stryke/type-checks/is-null";
8
-
9
- //#region ../deepkit/src/utilities.ts
10
- function __assignType(fn, args) {
11
- fn.__type = args;
12
- return fn;
13
- }
14
- /**
15
- * Converts any {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind}'s value to string representation.
16
- *
17
- * @param property - The {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind} containing the value to stringify.
18
- * @param value - The value to stringify.
19
- * @returns A string representation of the value.
20
- */
21
- function stringifyDefaultValue(property, value) {
22
- return isSetObject(property) ? stringifyValue(property.type, value ?? property.getDefaultValue()) : stringifyValue({ kind: property }, value);
23
- }
24
- stringifyDefaultValue.__type = [
25
- () => ReflectionProperty,
26
- () => ReflectionParameter,
27
- () => __ΩReflectionKind,
28
- "property",
29
- "value",
30
- "stringifyDefaultValue",
31
- "Converts any {@link ReflectionProperty}, {@link ReflectionParameter}, or {@link ReflectionKind}'s value to string representation.",
32
- "PPP7!P7\"n#J2$\"2%8&/&?'"
33
- ];
34
- /**
35
- * Stringifies a value as a string.
36
- *
37
- * @param value - The value to stringify.
38
- * @returns A string representation of the value.
39
- */
40
- function stringifyStringValue(value) {
41
- return `"${String(value).replaceAll("\"", "\\\"")}"`;
42
- }
43
- stringifyStringValue.__type = [
44
- "value",
45
- "stringifyStringValue",
46
- "Stringifies a value as a string.",
47
- "P\"2!8&/\"?#"
48
- ];
49
- /**
50
- * Converts any {@link Type}'s actual value to string representation.
51
- *
52
- * @param type - The {@link Type} of the value to stringify.
53
- * @param value - The value to stringify.
54
- * @returns A string representation of the value.
55
- */
56
- function stringifyValue(type, value) {
57
- return isUndefined$1(value) ? "undefined" : isNull(value) ? "null" : type.kind === ReflectionKind.boolean ? String(value).trim().toLowerCase() === "true" ? "true" : "false" : type.kind === ReflectionKind.string || type.kind === ReflectionKind.literal && isString$1(type.literal) ? stringifyStringValue(value) : type.kind === ReflectionKind.enum ? getEnumReflectionType(type).kind === ReflectionKind.string ? stringifyStringValue(value) : `${String(value)}` : type.kind === ReflectionKind.union ? isStringUnion(type) ? stringifyStringValue(value) : `${String(value)}` : type.kind === ReflectionKind.array ? stringifyStringValue(StormJSON.stringify(value)) : type.kind === ReflectionKind.object || type.kind === ReflectionKind.objectLiteral ? StormJSON.stringify(value) : (type.kind === ReflectionKind.property || type.kind === ReflectionKind.parameter) && type.type?.kind ? stringifyValue(type.type, value) : String(value)?.includes("\"") || String(value)?.includes("'") ? stringifyStringValue(value) : String(value);
58
- }
59
- stringifyValue.__type = [
60
- "Type",
61
- "type",
62
- "value",
63
- "stringifyValue",
64
- "Converts any {@link Type}'s actual value to string representation.",
65
- "P\"w!2\"\"2#&/$?%"
66
- ];
67
- /**
68
- * Converts a {@link TypeEnum} to its underlying primitive type representation.
69
- *
70
- * @param type - The {@link TypeEnum} to evaluate.
71
- * @returns A string representation of the primitive type.
72
- */
73
- function getEnumReflectionType(type) {
74
- if (type.kind !== ReflectionKind.enum) throw new Error(`Expected a TypeEnum, but received ${type.kind}.`);
75
- const unique = getUniqueBy(type.values.filter(__assignType((value) => value !== void 0 && value !== null, [
76
- "value",
77
- "",
78
- "P\"2!\"/\""
79
- ])), __assignType((enumMember) => isString$1(enumMember) ? { kind: ReflectionKind.string } : { kind: ReflectionKind.number }, [
80
- "enumMember",
81
- "",
82
- "P\"2!\"/\""
83
- ]));
84
- if (unique.length === 0) throw new Error(`No valid enum members could be found.`);
85
- return unique[0] && isString$1(unique[0]) ? { kind: ReflectionKind.string } : { kind: ReflectionKind.number };
86
- }
87
- getEnumReflectionType.__type = [
88
- "Type",
89
- "type",
90
- () => __ΩTypeString,
91
- () => __ΩTypeNumber,
92
- "getEnumReflectionType",
93
- "Converts a {@link TypeEnum} to its underlying primitive type representation.",
94
- "P\"w!2\"Pn#n$J/%?&"
95
- ];
96
- /**
97
- * Converts a {@link TypeUnion} to its underlying primitive type representation.
98
- *
99
- * @param type - The {@link TypeUnion} to evaluate.
100
- * @returns A string representation of the primitive type.
101
- */
102
- function getUnionTypes(type) {
103
- if (type.kind === ReflectionKind.union && type.types.length > 0) return getUniqueBy(type.types, __assignType((member) => member.kind, [
104
- "member",
105
- "",
106
- "P\"2!\"/\""
107
- ]));
108
- throw new Error(`Expected a TypeUnion, but received ${type.kind}.`);
109
- }
110
- getUnionTypes.__type = [
111
- "Type",
112
- "type",
113
- "getUnionTypes",
114
- "Converts a {@link TypeUnion} to its underlying primitive type representation.",
115
- "P\"w!2\"\"w!F/#?$"
116
- ];
117
- function isStringUnion(type) {
118
- return getUnionTypes(type).some(__assignType((member) => member.kind === ReflectionKind.string || member.kind === ReflectionKind.literal && isString$1(member.literal), [
119
- "member",
120
- "",
121
- "P\"2!\"/\""
122
- ]));
123
- }
124
- isStringUnion.__type = [
125
- "Type",
126
- "type",
127
- "isStringUnion",
128
- "P\"w!2\")/#"
129
- ];
130
- /**
131
- * Converts a ReflectionKind to its string representation.
132
- *
133
- * @param kind - The {@link ReflectionKind} to convert.
134
- * @returns A string representation of the kind.
135
- */
136
- function kindToName(kind) {
137
- if (kind === ReflectionKind.void) return "void";
138
- else if (kind === ReflectionKind.never) return "never";
139
- else if (kind === ReflectionKind.null) return "null";
140
- else if (kind === ReflectionKind.undefined) return "undefined";
141
- else if (kind === ReflectionKind.symbol) return "symbol";
142
- else if (kind === ReflectionKind.bigint) return "bigint";
143
- else if (kind === ReflectionKind.number) return "number";
144
- else if (kind === ReflectionKind.string) return "string";
145
- else if (kind === ReflectionKind.boolean) return "boolean";
146
- else if (kind === ReflectionKind.literal) return "literal";
147
- else if (kind === ReflectionKind.class) return "class";
148
- else if (kind === ReflectionKind.array) return "array";
149
- else if (kind === ReflectionKind.object) return "object";
150
- else if (kind === ReflectionKind.objectLiteral) return "objectLiteral";
151
- else if (kind === ReflectionKind.union) return "union";
152
- else if (kind === ReflectionKind.enum) return "enum";
153
- else if (kind === ReflectionKind.regexp) return "regexp";
154
- else if (kind === ReflectionKind.templateLiteral) return "templateLiteral";
155
- else if (kind === ReflectionKind.property) return "property";
156
- else if (kind === ReflectionKind.method) return "method";
157
- else if (kind === ReflectionKind.function) return "function";
158
- else if (kind === ReflectionKind.parameter) return "parameter";
159
- else if (kind === ReflectionKind.promise) return "promise";
160
- else if (kind === ReflectionKind.typeParameter) return "typeParameter";
161
- else if (kind === ReflectionKind.tuple) return "tuple";
162
- else if (kind === ReflectionKind.tupleMember) return "tupleMember";
163
- else if (kind === ReflectionKind.enumMember) return "enumMember";
164
- else if (kind === ReflectionKind.rest) return "rest";
165
- else if (kind === ReflectionKind.indexSignature) return "indexSignature";
166
- else if (kind === ReflectionKind.propertySignature) return "propertySignature";
167
- else if (kind === ReflectionKind.methodSignature) return "methodSignature";
168
- else if (kind === ReflectionKind.infer) return "infer";
169
- else if (kind === ReflectionKind.callSignature) return "callSignature";
170
- else if (kind === ReflectionKind.any) return "any";
171
- else if (kind === ReflectionKind.intersection) return "intersection";
172
- return "unknown";
173
- }
174
- kindToName.__type = [
175
- () => __ΩReflectionKind,
176
- "kind",
177
- "kindToName",
178
- "Converts a ReflectionKind to its string representation.",
179
- "Pn!2\"&/#?$"
180
- ];
181
-
182
- //#endregion
183
- export { stringifyDefaultValue };
@@ -1,43 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../contexts/context.cjs');
3
- let __stryke_path_replace = require("@stryke/path/replace");
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
6
-
7
- //#region ../plugin-alloy/src/core/components/output.tsx
8
- /**
9
- * Output component for rendering the Powerlines plugin's output files via templates.
10
- */
11
- function Output(props) {
12
- const [{ children, context, meta, basePath }, rest] = (0, __alloy_js_core.splitProps)(props, [
13
- "children",
14
- "context",
15
- "meta",
16
- "basePath"
17
- ]);
18
- const basePathRef = (0, __alloy_js_core.computed)(() => basePath ? (0, __stryke_path_replace.replacePath)(basePath, context.workspaceConfig.workspaceRoot) : context.workspaceConfig.workspaceRoot);
19
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Output, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
20
- get basePath() {
21
- return basePathRef.value;
22
- },
23
- get children() {
24
- return (0, __alloy_js_core_jsx_runtime.createComponent)(require_context.PowerlinesContext.Provider, {
25
- value: {
26
- value: context,
27
- meta: meta ?? {}
28
- },
29
- get children() {
30
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
31
- get when() {
32
- return Boolean(context);
33
- },
34
- children
35
- });
36
- }
37
- });
38
- }
39
- }));
40
- }
41
-
42
- //#endregion
43
- exports.Output = Output;
@@ -1,42 +0,0 @@
1
- import { PowerlinesContext } from "../contexts/context.mjs";
2
- import { replacePath } from "@stryke/path/replace";
3
- import { Output, Show, computed, splitProps } from "@alloy-js/core";
4
- import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
5
-
6
- //#region ../plugin-alloy/src/core/components/output.tsx
7
- /**
8
- * Output component for rendering the Powerlines plugin's output files via templates.
9
- */
10
- function Output$1(props) {
11
- const [{ children, context, meta, basePath }, rest] = splitProps(props, [
12
- "children",
13
- "context",
14
- "meta",
15
- "basePath"
16
- ]);
17
- const basePathRef = computed(() => basePath ? replacePath(basePath, context.workspaceConfig.workspaceRoot) : context.workspaceConfig.workspaceRoot);
18
- return createComponent(Output, mergeProps(rest, {
19
- get basePath() {
20
- return basePathRef.value;
21
- },
22
- get children() {
23
- return createComponent(PowerlinesContext.Provider, {
24
- value: {
25
- value: context,
26
- meta: meta ?? {}
27
- },
28
- get children() {
29
- return createComponent(Show, {
30
- get when() {
31
- return Boolean(context);
32
- },
33
- children
34
- });
35
- }
36
- });
37
- }
38
- }));
39
- }
40
-
41
- //#endregion
42
- export { Output$1 as Output };
@@ -1,22 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- let __alloy_js_core = require("@alloy-js/core");
3
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
-
5
- //#region ../plugin-alloy/src/core/components/single-line-comment.tsx
6
- /**
7
- * A single line comment block. The children are rendered as a prose element, which means that they
8
- * are broken into multiple lines
9
- */
10
- function SingleLineComment(props) {
11
- const { variant = "double-slash", children } = props;
12
- const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : "// ";
13
- return [commentStart, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("align", {
14
- string: commentStart,
15
- get children() {
16
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
17
- }
18
- })];
19
- }
20
-
21
- //#endregion
22
- exports.SingleLineComment = SingleLineComment;
@@ -1,21 +0,0 @@
1
- import { Prose } from "@alloy-js/core";
2
- import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
3
-
4
- //#region ../plugin-alloy/src/core/components/single-line-comment.tsx
5
- /**
6
- * A single line comment block. The children are rendered as a prose element, which means that they
7
- * are broken into multiple lines
8
- */
9
- function SingleLineComment(props) {
10
- const { variant = "double-slash", children } = props;
11
- const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : "// ";
12
- return [commentStart, createIntrinsic("align", {
13
- string: commentStart,
14
- get children() {
15
- return [createComponent(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
16
- }
17
- })];
18
- }
19
-
20
- //#endregion
21
- export { SingleLineComment };
@@ -1,64 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../contexts/context.cjs');
3
- require('../contexts/index.cjs');
4
- let defu = require("defu");
5
- defu = require_rolldown_runtime.__toESM(defu);
6
- let __stryke_path_append = require("@stryke/path/append");
7
- let __alloy_js_core = require("@alloy-js/core");
8
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
-
10
- //#region ../plugin-alloy/src/core/components/source-file.tsx
11
- /**
12
- * A base component representing a Powerlines generated source file.
13
- *
14
- * @param props - The properties for the source file.
15
- * @returns The rendered source file component.
16
- */
17
- function SourceFile(props) {
18
- const [{ children, meta, path, header, storage, filetype, reference }] = (0, __alloy_js_core.splitProps)(props, [
19
- "children",
20
- "meta",
21
- "path",
22
- "header",
23
- "storage",
24
- "filetype",
25
- "reference"
26
- ]);
27
- const metadata = require_context.useMetaSafe();
28
- const parentDirectory = (0, __alloy_js_core.useContext)(__alloy_js_core.SourceDirectoryContext);
29
- const sourceFile = {
30
- path: (0, __stryke_path_append.appendPath)(path, parentDirectory.path),
31
- filetype,
32
- reference
33
- };
34
- parentDirectory?.addContent(sourceFile);
35
- const printOptions = (0, __alloy_js_core.useFormatOptions)({
36
- printWidth: props.printWidth,
37
- tabWidth: props.tabWidth,
38
- useTabs: props.useTabs,
39
- insertFinalNewLine: props.insertFinalNewLine
40
- });
41
- const nodeContext = (0, __alloy_js_core.getContext)();
42
- nodeContext.meta = (0, defu.default)({
43
- sourceFile,
44
- printOptions
45
- }, meta ?? {});
46
- if (metadata) metadata[sourceFile.path] = {
47
- storage,
48
- ...meta ?? {}
49
- };
50
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.SourceFileContext.Provider, {
51
- value: sourceFile,
52
- get children() {
53
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
54
- when: header !== void 0,
55
- get children() {
56
- return [header, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
57
- }
58
- }), children];
59
- }
60
- });
61
- }
62
-
63
- //#endregion
64
- exports.SourceFile = SourceFile;
@@ -1,23 +0,0 @@
1
- import { StoragePreset } from "../../../../powerlines/src/types/fs.cjs";
2
- import { ComponentProps } from "../../types/components.cjs";
3
- import { SourceFileProps } from "@alloy-js/core";
4
-
5
- //#region ../plugin-alloy/src/core/components/source-file.d.ts
6
- type SourceFileProps$1 = SourceFileProps & ComponentProps & {
7
- /**
8
- * The storage preset for the output files.
9
- *
10
- * @remarks
11
- * If not specified, the output mode will be determined by the provided `output.mode` value.
12
- */
13
- storage?: StoragePreset;
14
- /**
15
- * The metadata associated with the source file.
16
- *
17
- * @remarks
18
- * The values stored in the metadata will be available in the rendering context.
19
- */
20
- meta?: Record<string, any>;
21
- };
22
- //#endregion
23
- export { SourceFileProps$1 as SourceFileProps };
@@ -1,23 +0,0 @@
1
- import { StoragePreset } from "../../../../powerlines/src/types/fs.mjs";
2
- import { ComponentProps } from "../../types/components.mjs";
3
- import { SourceFileProps } from "@alloy-js/core";
4
-
5
- //#region ../plugin-alloy/src/core/components/source-file.d.ts
6
- type SourceFileProps$1 = SourceFileProps & ComponentProps & {
7
- /**
8
- * The storage preset for the output files.
9
- *
10
- * @remarks
11
- * If not specified, the output mode will be determined by the provided `output.mode` value.
12
- */
13
- storage?: StoragePreset;
14
- /**
15
- * The metadata associated with the source file.
16
- *
17
- * @remarks
18
- * The values stored in the metadata will be available in the rendering context.
19
- */
20
- meta?: Record<string, any>;
21
- };
22
- //#endregion
23
- export { SourceFileProps$1 as SourceFileProps };