@shell-shock/core 0.17.10 → 0.17.12

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 (257) hide show
  1. package/dist/api.cjs +31 -143
  2. package/dist/api.cjs.map +1 -0
  3. package/dist/api.d.cts +2 -77
  4. package/dist/api.d.cts.map +1 -1
  5. package/dist/api.d.mts +2 -76
  6. package/dist/api.d.mts.map +1 -1
  7. package/dist/api.mjs +30 -140
  8. package/dist/api.mjs.map +1 -1
  9. package/dist/components/command-validation-logic.cjs +14 -15
  10. package/dist/components/command-validation-logic.cjs.map +1 -0
  11. package/dist/components/command-validation-logic.d.cts +1 -3
  12. package/dist/components/command-validation-logic.d.cts.map +1 -1
  13. package/dist/components/command-validation-logic.d.mts +1 -3
  14. package/dist/components/command-validation-logic.d.mts.map +1 -1
  15. package/dist/components/command-validation-logic.mjs +12 -13
  16. package/dist/components/command-validation-logic.mjs.map +1 -1
  17. package/dist/components/docs.cjs +6 -6
  18. package/dist/components/docs.cjs.map +1 -0
  19. package/dist/components/docs.d.cts +4 -5
  20. package/dist/components/docs.d.cts.map +1 -1
  21. package/dist/components/docs.d.mts +4 -5
  22. package/dist/components/docs.d.mts.map +1 -1
  23. package/dist/components/docs.mjs +4 -4
  24. package/dist/components/docs.mjs.map +1 -1
  25. package/dist/components/exec-builtin.cjs +9 -11
  26. package/dist/components/exec-builtin.cjs.map +1 -0
  27. package/dist/components/exec-builtin.d.cts +1 -2
  28. package/dist/components/exec-builtin.d.cts.map +1 -1
  29. package/dist/components/exec-builtin.d.mts +1 -2
  30. package/dist/components/exec-builtin.d.mts.map +1 -1
  31. package/dist/components/exec-builtin.mjs +7 -10
  32. package/dist/components/exec-builtin.mjs.map +1 -1
  33. package/dist/components/helpers.cjs +4 -5
  34. package/dist/components/helpers.cjs.map +1 -0
  35. package/dist/components/helpers.d.cts +6 -8
  36. package/dist/components/helpers.d.cts.map +1 -1
  37. package/dist/components/helpers.d.mts +6 -8
  38. package/dist/components/helpers.d.mts.map +1 -1
  39. package/dist/components/helpers.mjs +2 -3
  40. package/dist/components/helpers.mjs.map +1 -1
  41. package/dist/components/options-parser-logic.cjs +29 -30
  42. package/dist/components/options-parser-logic.cjs.map +1 -0
  43. package/dist/components/options-parser-logic.d.cts +8 -9
  44. package/dist/components/options-parser-logic.d.cts.map +1 -1
  45. package/dist/components/options-parser-logic.d.mts +8 -9
  46. package/dist/components/options-parser-logic.d.mts.map +1 -1
  47. package/dist/components/options-parser-logic.mjs +27 -28
  48. package/dist/components/options-parser-logic.mjs.map +1 -1
  49. package/dist/components/state-builtin.cjs +3 -2
  50. package/dist/components/state-builtin.cjs.map +1 -0
  51. package/dist/components/state-builtin.d.cts +4 -5
  52. package/dist/components/state-builtin.d.cts.map +1 -1
  53. package/dist/components/state-builtin.d.mts +4 -5
  54. package/dist/components/state-builtin.d.mts.map +1 -1
  55. package/dist/components/state-builtin.mjs +1 -1
  56. package/dist/components/state-builtin.mjs.map +1 -1
  57. package/dist/components/usage.cjs +4 -6
  58. package/dist/components/usage.cjs.map +1 -0
  59. package/dist/components/usage.d.cts +1 -2
  60. package/dist/components/usage.d.cts.map +1 -1
  61. package/dist/components/usage.d.mts +1 -2
  62. package/dist/components/usage.d.mts.map +1 -1
  63. package/dist/components/usage.mjs +2 -4
  64. package/dist/components/usage.mjs.map +1 -1
  65. package/dist/components/utils-builtin.cjs +5 -4
  66. package/dist/components/utils-builtin.cjs.map +1 -0
  67. package/dist/components/utils-builtin.d.cts +7 -8
  68. package/dist/components/utils-builtin.d.cts.map +1 -1
  69. package/dist/components/utils-builtin.d.mts +7 -8
  70. package/dist/components/utils-builtin.d.mts.map +1 -1
  71. package/dist/components/utils-builtin.mjs +3 -3
  72. package/dist/components/utils-builtin.mjs.map +1 -1
  73. package/dist/config.cjs +53 -19
  74. package/dist/config.cjs.map +1 -0
  75. package/dist/config.d.cts +29 -8
  76. package/dist/config.d.cts.map +1 -1
  77. package/dist/config.d.mts +29 -8
  78. package/dist/config.d.mts.map +1 -1
  79. package/dist/config.mjs +51 -18
  80. package/dist/config.mjs.map +1 -1
  81. package/dist/contexts/command.cjs +2 -2
  82. package/dist/contexts/command.cjs.map +1 -0
  83. package/dist/contexts/command.d.cts.map +1 -1
  84. package/dist/contexts/command.d.mts.map +1 -1
  85. package/dist/contexts/command.mjs.map +1 -1
  86. package/dist/contexts/options.cjs +4 -4
  87. package/dist/contexts/options.cjs.map +1 -0
  88. package/dist/contexts/options.d.cts.map +1 -1
  89. package/dist/contexts/options.d.mts.map +1 -1
  90. package/dist/contexts/options.mjs +2 -3
  91. package/dist/contexts/options.mjs.map +1 -1
  92. package/dist/engine.cjs +138 -0
  93. package/dist/engine.cjs.map +1 -0
  94. package/dist/engine.d.cts +79 -0
  95. package/dist/engine.d.cts.map +1 -0
  96. package/dist/engine.d.mts +79 -0
  97. package/dist/engine.d.mts.map +1 -0
  98. package/dist/engine.mjs +136 -0
  99. package/dist/engine.mjs.map +1 -0
  100. package/dist/helpers/automd.cjs +6 -7
  101. package/dist/helpers/automd.cjs.map +1 -0
  102. package/dist/helpers/automd.mjs +2 -3
  103. package/dist/helpers/automd.mjs.map +1 -1
  104. package/dist/helpers/docs-helpers.cjs +2 -2
  105. package/dist/helpers/docs-helpers.cjs.map +1 -0
  106. package/dist/helpers/docs-helpers.mjs.map +1 -1
  107. package/dist/helpers/get-framework.cjs +24 -0
  108. package/dist/helpers/get-framework.cjs.map +1 -0
  109. package/dist/helpers/get-framework.mjs +24 -0
  110. package/dist/helpers/get-framework.mjs.map +1 -0
  111. package/dist/helpers/paths.cjs +5 -5
  112. package/dist/helpers/paths.cjs.map +1 -0
  113. package/dist/helpers/paths.mjs +4 -4
  114. package/dist/helpers/paths.mjs.map +1 -1
  115. package/dist/helpers/persistence.cjs +4 -6
  116. package/dist/helpers/persistence.cjs.map +1 -0
  117. package/dist/helpers/persistence.mjs +3 -3
  118. package/dist/helpers/persistence.mjs.map +1 -1
  119. package/dist/helpers/update-package-json.cjs +2 -2
  120. package/dist/helpers/update-package-json.cjs.map +1 -0
  121. package/dist/helpers/update-package-json.mjs.map +1 -1
  122. package/dist/helpers/utilities.cjs +3 -3
  123. package/dist/helpers/utilities.cjs.map +1 -0
  124. package/dist/helpers/utilities.mjs +1 -1
  125. package/dist/helpers/utilities.mjs.map +1 -1
  126. package/dist/helpers/validations.cjs +3 -3
  127. package/dist/helpers/validations.cjs.map +1 -0
  128. package/dist/helpers/validations.mjs +1 -3
  129. package/dist/helpers/validations.mjs.map +1 -1
  130. package/dist/index.cjs +121 -51
  131. package/dist/index.cjs.map +1 -0
  132. package/dist/index.d.cts +80 -5
  133. package/dist/index.d.cts.map +1 -0
  134. package/dist/index.d.mts +80 -5
  135. package/dist/index.d.mts.map +1 -0
  136. package/dist/index.mjs +118 -6
  137. package/dist/index.mjs.map +1 -0
  138. package/dist/package.cjs +12 -0
  139. package/dist/package.cjs.map +1 -0
  140. package/dist/package.mjs +6 -0
  141. package/dist/package.mjs.map +1 -0
  142. package/dist/plugin-utils/compute-bin.cjs +8 -10
  143. package/dist/plugin-utils/compute-bin.cjs.map +1 -0
  144. package/dist/plugin-utils/compute-bin.d.cts +2 -2
  145. package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
  146. package/dist/plugin-utils/compute-bin.d.mts +2 -2
  147. package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
  148. package/dist/plugin-utils/compute-bin.mjs +6 -8
  149. package/dist/plugin-utils/compute-bin.mjs.map +1 -1
  150. package/dist/plugin-utils/context-helpers.cjs +7 -14
  151. package/dist/plugin-utils/context-helpers.cjs.map +1 -0
  152. package/dist/plugin-utils/context-helpers.d.cts +4 -4
  153. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  154. package/dist/plugin-utils/context-helpers.d.mts +4 -4
  155. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  156. package/dist/plugin-utils/context-helpers.mjs +5 -12
  157. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  158. package/dist/plugin-utils/deepkit.cjs +15 -16
  159. package/dist/plugin-utils/deepkit.cjs.map +1 -0
  160. package/dist/plugin-utils/deepkit.d.cts +5 -5
  161. package/dist/plugin-utils/deepkit.d.cts.map +1 -1
  162. package/dist/plugin-utils/deepkit.d.mts +5 -5
  163. package/dist/plugin-utils/deepkit.d.mts.map +1 -1
  164. package/dist/plugin-utils/deepkit.mjs +14 -15
  165. package/dist/plugin-utils/deepkit.mjs.map +1 -1
  166. package/dist/plugin-utils/description-helpers.cjs +2 -1
  167. package/dist/plugin-utils/description-helpers.cjs.map +1 -0
  168. package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
  169. package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
  170. package/dist/plugin-utils/description-helpers.mjs.map +1 -1
  171. package/dist/plugin-utils/get-command-tree.cjs +2 -1
  172. package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
  173. package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
  174. package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
  175. package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
  176. package/dist/plugin-utils/index.cjs +1 -1
  177. package/dist/plugin-utils/index.d.cts +2 -2
  178. package/dist/plugin-utils/index.d.mts +2 -2
  179. package/dist/plugin-utils/index.mjs +2 -2
  180. package/dist/plugin-utils/reflect.cjs +5 -5
  181. package/dist/plugin-utils/reflect.cjs.map +1 -0
  182. package/dist/plugin-utils/reflect.d.cts.map +1 -1
  183. package/dist/plugin-utils/reflect.d.mts.map +1 -1
  184. package/dist/plugin-utils/reflect.mjs +3 -5
  185. package/dist/plugin-utils/reflect.mjs.map +1 -1
  186. package/dist/plugin-utils/traverse-command-tree.cjs +2 -1
  187. package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
  188. package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
  189. package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
  190. package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
  191. package/dist/plugin-utils/type-checks.cjs +146 -17
  192. package/dist/plugin-utils/type-checks.cjs.map +1 -0
  193. package/dist/plugin-utils/type-checks.d.cts +5 -5
  194. package/dist/plugin-utils/type-checks.d.cts.map +1 -1
  195. package/dist/plugin-utils/type-checks.d.mts +5 -5
  196. package/dist/plugin-utils/type-checks.d.mts.map +1 -1
  197. package/dist/plugin-utils/type-checks.mjs +145 -16
  198. package/dist/plugin-utils/type-checks.mjs.map +1 -1
  199. package/dist/plugin.cjs +80 -56
  200. package/dist/plugin.cjs.map +1 -0
  201. package/dist/plugin.d.cts.map +1 -1
  202. package/dist/plugin.d.mts.map +1 -1
  203. package/dist/plugin.mjs +75 -52
  204. package/dist/plugin.mjs.map +1 -1
  205. package/dist/resolver/helpers.cjs +33 -24
  206. package/dist/resolver/helpers.cjs.map +1 -0
  207. package/dist/resolver/helpers.mjs +32 -22
  208. package/dist/resolver/helpers.mjs.map +1 -1
  209. package/dist/resolver/resolve.cjs +319 -61
  210. package/dist/resolver/resolve.cjs.map +1 -0
  211. package/dist/resolver/resolve.mjs +316 -58
  212. package/dist/resolver/resolve.mjs.map +1 -1
  213. package/dist/types/command.cjs +43 -82
  214. package/dist/types/command.cjs.map +1 -0
  215. package/dist/types/command.d.cts +61 -119
  216. package/dist/types/command.d.cts.map +1 -1
  217. package/dist/types/command.d.mts +61 -119
  218. package/dist/types/command.d.mts.map +1 -1
  219. package/dist/types/command.mjs +42 -80
  220. package/dist/types/command.mjs.map +1 -1
  221. package/dist/types/config.cjs +45 -4
  222. package/dist/types/config.cjs.map +1 -0
  223. package/dist/types/config.d.cts +16 -11
  224. package/dist/types/config.d.cts.map +1 -1
  225. package/dist/types/config.d.mts +16 -11
  226. package/dist/types/config.d.mts.map +1 -1
  227. package/dist/types/config.mjs +40 -4
  228. package/dist/types/config.mjs.map +1 -1
  229. package/dist/types/context.cjs +9 -1
  230. package/dist/types/context.cjs.map +1 -0
  231. package/dist/types/context.d.cts +3 -2
  232. package/dist/types/context.d.cts.map +1 -1
  233. package/dist/types/context.d.mts +3 -2
  234. package/dist/types/context.d.mts.map +1 -1
  235. package/dist/types/context.mjs +7 -1
  236. package/dist/types/context.mjs.map +1 -1
  237. package/dist/types/env.cjs +2 -1
  238. package/dist/types/env.cjs.map +1 -0
  239. package/dist/types/env.d.cts.map +1 -1
  240. package/dist/types/env.d.mts.map +1 -1
  241. package/dist/types/env.mjs.map +1 -1
  242. package/dist/types/index.cjs +6 -3
  243. package/dist/types/index.d.cts +4 -4
  244. package/dist/types/index.d.mts +4 -4
  245. package/dist/types/index.mjs +4 -4
  246. package/dist/types/options.cjs +2 -1
  247. package/dist/types/options.cjs.map +1 -0
  248. package/dist/types/options.d.cts.map +1 -1
  249. package/dist/types/options.d.mts.map +1 -1
  250. package/dist/types/options.mjs.map +1 -1
  251. package/package.json +43 -35
  252. package/dist/resolver/deepkit.cjs +0 -135
  253. package/dist/resolver/deepkit.mjs +0 -135
  254. package/dist/resolver/deepkit.mjs.map +0 -1
  255. package/dist/resolver/module.cjs +0 -145
  256. package/dist/resolver/module.mjs +0 -145
  257. package/dist/resolver/module.mjs.map +0 -1
@@ -1,26 +1,142 @@
1
- import { CommandParameterKinds } from "../types/command.mjs";
2
- import { isSetString } from "@stryke/type-checks/is-set-string";
3
1
  import { isSetObject } from "@stryke/type-checks/is-set-object";
2
+ import { isSetString } from "@stryke/type-checks/is-set-string";
4
3
  import { isBoolean } from "@stryke/type-checks/is-boolean";
5
4
 
6
5
  //#region src/plugin-utils/type-checks.ts
6
+ const __ΩRecord = [
7
+ "K",
8
+ "T",
9
+ "Record",
10
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
11
+ ];
12
+ function __assignType(fn, args) {
13
+ fn.__type = args;
14
+ return fn;
15
+ }
16
+ function isStringArray(value) {
17
+ return Array.isArray(value) && value.every(__assignType((item) => isSetString(item), [
18
+ "item",
19
+ "",
20
+ "P\"2!\"/\""
21
+ ]));
22
+ }
23
+ isStringArray.__type = [
24
+ "value",
25
+ "isStringArray",
26
+ "P#2!!/\""
27
+ ];
28
+ function isNumberArray(value) {
29
+ return Array.isArray(value) && value.every(__assignType((item) => typeof item === "number" && Number.isFinite(item), [
30
+ "item",
31
+ "",
32
+ "P\"2!\"/\""
33
+ ]));
34
+ }
35
+ isNumberArray.__type = [
36
+ "value",
37
+ "isNumberArray",
38
+ "P#2!!/\""
39
+ ];
40
+ function isBooleanArray(value) {
41
+ return Array.isArray(value) && value.every(__assignType((item) => isBoolean(item), [
42
+ "item",
43
+ "",
44
+ "P\"2!\"/\""
45
+ ]));
46
+ }
47
+ isBooleanArray.__type = [
48
+ "value",
49
+ "isBooleanArray",
50
+ "P#2!!/\""
51
+ ];
52
+ function isAliasConfig(value) {
53
+ return isSetString(value) || isStringArray(value);
54
+ }
55
+ isAliasConfig.__type = [
56
+ "value",
57
+ "isAliasConfig",
58
+ "P#2!!/\""
59
+ ];
60
+ function isTypedDefaultValue(type, value, variadic) {
61
+ if (type === "string") {
62
+ if (variadic === true) return isStringArray(value);
63
+ if (variadic === false) return isSetString(value);
64
+ return isSetString(value) || isStringArray(value);
65
+ }
66
+ if (type === "number") {
67
+ if (variadic === true) return isNumberArray(value);
68
+ if (variadic === false) return typeof value === "number" && Number.isFinite(value);
69
+ return typeof value === "number" && Number.isFinite(value) || isNumberArray(value);
70
+ }
71
+ if (variadic === true) return isBooleanArray(value);
72
+ if (variadic === false) return isBoolean(value);
73
+ return isBoolean(value) || isBooleanArray(value);
74
+ }
75
+ isTypedDefaultValue.__type = [
76
+ "CommandParameterType",
77
+ "type",
78
+ "value",
79
+ "variadic",
80
+ "isTypedDefaultValue",
81
+ "P\"w!2\"#2#)2$8)/%"
82
+ ];
83
+ function hasValidOptionalCommonFields(obj) {
84
+ if ("alias" in obj && obj.alias !== void 0 && !isAliasConfig(obj.alias)) return false;
85
+ if ("name" in obj && obj.name !== void 0 && !isSetString(obj.name)) return false;
86
+ if ("title" in obj && obj.title !== void 0 && !isSetString(obj.title)) return false;
87
+ if ("description" in obj && obj.description !== void 0 && !isSetString(obj.description)) return false;
88
+ if ("env" in obj && obj.env !== void 0 && !(isSetString(obj.env) || obj.env === false)) return false;
89
+ if ("required" in obj && obj.required !== void 0 && !isBoolean(obj.required)) return false;
90
+ if ("variadic" in obj && obj.variadic !== void 0 && !isBoolean(obj.variadic)) return false;
91
+ return true;
92
+ }
93
+ hasValidOptionalCommonFields.__type = [
94
+ () => __ΩRecord,
95
+ "obj",
96
+ "hasValidOptionalCommonFields",
97
+ "P&#o!#2\")/#"
98
+ ];
99
+ function hasValidTypeSpecificFields(obj, type) {
100
+ const variadic = isBoolean(obj.variadic) ? obj.variadic : void 0;
101
+ if ("default" in obj && obj.default !== void 0 && !isTypedDefaultValue(type, obj.default, variadic)) return false;
102
+ if (type === "string") {
103
+ if ("format" in obj && obj.format !== void 0 && !isSetString(obj.format)) return false;
104
+ if ("choices" in obj && obj.choices !== void 0 && !isStringArray(obj.choices)) return false;
105
+ return true;
106
+ }
107
+ if (type === "number") {
108
+ if ("choices" in obj && obj.choices !== void 0 && !isNumberArray(obj.choices)) return false;
109
+ return true;
110
+ }
111
+ if ("choices" in obj && obj.choices !== void 0) return false;
112
+ if ("format" in obj && obj.format !== void 0) return false;
113
+ return true;
114
+ }
115
+ hasValidTypeSpecificFields.__type = [
116
+ () => __ΩRecord,
117
+ "obj",
118
+ "CommandParameterType",
119
+ "type",
120
+ "hasValidTypeSpecificFields",
121
+ "P&#o!#2\"\"w#2$)/%"
122
+ ];
7
123
  /**
8
- * Type guard to check if a value is a valid {@link CommandParameterKind} type.
124
+ * Type guard to check if a value is a valid {@link CommandParameterType} type.
9
125
  *
10
126
  * @param obj - The value to check.
11
- * @returns True if the value is a valid {@link CommandParameterKind} type, false otherwise.
127
+ * @returns True if the value is a valid {@link CommandParameterType} type, false otherwise.
12
128
  */
13
- function isCommandParameterKind(obj) {
129
+ function isCommandParameterType(obj) {
14
130
  return isSetString(obj) && [
15
- CommandParameterKinds.string,
16
- CommandParameterKinds.number,
17
- CommandParameterKinds.boolean
131
+ "string",
132
+ "number",
133
+ "boolean"
18
134
  ].includes(obj);
19
135
  }
20
- isCommandParameterKind.__type = [
136
+ isCommandParameterType.__type = [
21
137
  "obj",
22
- "isCommandParameterKind",
23
- "Type guard to check if a value is a valid {@link CommandParameterKind} type.",
138
+ "isCommandParameterType",
139
+ "Type guard to check if a value is a valid {@link CommandParameterType} type.",
24
140
  "P\"2!!/\"?#"
25
141
  ];
26
142
  /**
@@ -30,7 +146,8 @@ isCommandParameterKind.__type = [
30
146
  * @returns True if the value is a valid {@link CommandParameterConfig} type, false otherwise.
31
147
  */
32
148
  function isCommandParameterConfig(obj) {
33
- return isSetObject(obj) && "kind" in obj && isCommandParameterKind(obj.kind);
149
+ if (!isSetObject(obj) || !("type" in obj) || !isCommandParameterType(obj.type)) return false;
150
+ return hasValidOptionalCommonFields(obj) && hasValidTypeSpecificFields(obj, obj.type);
34
151
  }
35
152
  isCommandParameterConfig.__type = [
36
153
  "obj",
@@ -45,7 +162,15 @@ isCommandParameterConfig.__type = [
45
162
  * @returns True if the value is a valid {@link CommandParameter} type, false otherwise.
46
163
  */
47
164
  function isCommandParameter(obj) {
48
- return isCommandParameterConfig(obj) && "name" in obj && isSetString(obj.name) && "title" in obj && isSetString(obj.title) && "description" in obj && isSetString(obj.description) && "alias" in obj && Array.isArray(obj.alias) && "env" in obj && (isSetString(obj.env) || obj.env === false) && "optional" in obj && isBoolean(obj.optional) && "variadic" in obj && isBoolean(obj.variadic);
165
+ if (!isCommandParameterConfig(obj)) return false;
166
+ if (!("name" in obj) || !isSetString(obj.name)) return false;
167
+ if (!("title" in obj) || !isSetString(obj.title)) return false;
168
+ if (!("description" in obj) || !isSetString(obj.description)) return false;
169
+ if (!("alias" in obj) || !isStringArray(obj.alias)) return false;
170
+ if (!("env" in obj) || !(isSetString(obj.env) || obj.env === false)) return false;
171
+ if (!("required" in obj) || !isBoolean(obj.required)) return false;
172
+ if (!("variadic" in obj) || !isBoolean(obj.variadic)) return false;
173
+ return hasValidTypeSpecificFields(obj, obj.type);
49
174
  }
50
175
  isCommandParameter.__type = [
51
176
  "obj",
@@ -60,7 +185,11 @@ isCommandParameter.__type = [
60
185
  * @returns True if the value is a valid {@link CommandOption} type, false otherwise.
61
186
  */
62
187
  function isCommandOption(obj) {
63
- return isCommandParameterConfig(obj) && isCommandParameter(obj) && "default" in obj;
188
+ if (!isCommandParameter(obj)) return false;
189
+ if (obj.type !== "boolean") return true;
190
+ if ("isNegativeOf" in obj && obj.isNegativeOf !== void 0 && !isSetString(obj.isNegativeOf)) return false;
191
+ if ("skipAddingNegative" in obj && obj.skipAddingNegative !== void 0 && !isBoolean(obj.skipAddingNegative)) return false;
192
+ return true;
64
193
  }
65
194
  isCommandOption.__type = [
66
195
  "obj",
@@ -75,7 +204,7 @@ isCommandOption.__type = [
75
204
  * @returns True if the value is a valid {@link CommandArgument} type, false otherwise.
76
205
  */
77
206
  function isCommandArgument(obj) {
78
- return isCommandParameterConfig(obj) && isCommandParameter(obj);
207
+ return isCommandParameter(obj);
79
208
  }
80
209
  isCommandArgument.__type = [
81
210
  "obj",
@@ -85,5 +214,5 @@ isCommandArgument.__type = [
85
214
  ];
86
215
 
87
216
  //#endregion
88
- export { isCommandArgument, isCommandOption, isCommandParameter, isCommandParameterConfig, isCommandParameterKind };
217
+ export { isCommandArgument, isCommandOption, isCommandParameter, isCommandParameterConfig, isCommandParameterType };
89
218
  //# sourceMappingURL=type-checks.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-checks.mjs","names":[],"sources":["../../src/plugin-utils/type-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isBoolean } from \"@stryke/type-checks/is-boolean\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type {\n CommandArgument,\n CommandOption,\n CommandParameter,\n CommandParameterConfig,\n CommandParameterKind\n} from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\n\n/**\n * Type guard to check if a value is a valid {@link CommandParameterKind} type.\n *\n * @param obj - The value to check.\n * @returns True if the value is a valid {@link CommandParameterKind} type, false otherwise.\n */\nexport function isCommandParameterKind(obj: any): obj is CommandParameterKind {\n return (\n isSetString(obj) &&\n [\n CommandParameterKinds.string,\n CommandParameterKinds.number,\n CommandParameterKinds.boolean\n ].includes(obj as CommandParameterKind)\n );\n}\n\n/**\n * Type guard to check if a value is a valid {@link CommandParameterConfig} type.\n *\n * @param obj - The value to check.\n * @returns True if the value is a valid {@link CommandParameterConfig} type, false otherwise.\n */\nexport function isCommandParameterConfig(\n obj: any\n): obj is CommandParameterConfig {\n return isSetObject(obj) && \"kind\" in obj && isCommandParameterKind(obj.kind);\n}\n\n/**\n * Type guard to check if a value is a valid {@link CommandParameter} type.\n *\n * @param obj - The value to check.\n * @returns True if the value is a valid {@link CommandParameter} type, false otherwise.\n */\nexport function isCommandParameter(obj: any): obj is CommandParameter {\n return (\n isCommandParameterConfig(obj) &&\n \"name\" in obj &&\n isSetString(obj.name) &&\n \"title\" in obj &&\n isSetString(obj.title) &&\n \"description\" in obj &&\n isSetString(obj.description) &&\n \"alias\" in obj &&\n Array.isArray(obj.alias) &&\n \"env\" in obj &&\n (isSetString(obj.env) || obj.env === false) &&\n \"optional\" in obj &&\n isBoolean(obj.optional) &&\n \"variadic\" in obj &&\n isBoolean(obj.variadic)\n );\n}\n\n/**\n * Type guard to check if a value is a valid {@link CommandOption} type.\n *\n * @param obj - The value to check.\n * @returns True if the value is a valid {@link CommandOption} type, false otherwise.\n */\nexport function isCommandOption(obj: any): obj is CommandOption {\n return (\n isCommandParameterConfig(obj) && isCommandParameter(obj) && \"default\" in obj\n );\n}\n\n/**\n * Type guard to check if a value is a valid {@link CommandArgument} type.\n *\n * @param obj - The value to check.\n * @returns True if the value is a valid {@link CommandArgument} type, false otherwise.\n */\nexport function isCommandArgument(obj: any): obj is CommandArgument {\n return isCommandParameterConfig(obj) && isCommandParameter(obj);\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAgB,uBAAS,KAAA;AACzB,QAAS,YAAA,IAAA,IAAA;EAAqB,sBAAkB;EAAQ,sBAAA;EAAA,sBAAA;EAAA,CAAA,SAAA,IAAA;;AAExD,uBAAE,SAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOF,SAAS,yBAAA,KAAA;AACP,QAAE,YAAiB,IAAC,IAAA,UAAA,OAAA,uBAAA,IAAA,KAAA;;AAEtB,yBAAM,SAA4B;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAOlC,SAAE,mBAAA,KAAA;AACA,QAAM,yBAA0B,IAAI,IAAC,UAAa,OAAA,YAAA,IAAuB,KAAK,IAAA,WAAA,OAAA,YAAA,IAAA,MAAA,IAAA,iBAAA,OAAA,YAAA,IAAA,YAAA,IAAA,WAAA,OAAA,MAAA,QAAA,IAAA,MAAA,IAAA,SAAA,QAAA,YAAA,IAAA,IAAA,IAAA,IAAA,QAAA,UAAA,cAAA,OAAA,UAAA,IAAA,SAAA,IAAA,cAAA,OAAA,UAAA,IAAA,SAAA;;AAEhF,mBAAmB,SAAS;CAAC;CAAK;CAAA;CAAA;CAAA;;;;;;;AAOlC,SAAA,gBAAA,KAAA;;;AAGA,gBAAgB,SAAS;CAAC;CAAO;CAAmB;CAAsB;CAAA;;;;;;;AAO1E,SAAI,kBAA8B,KAAC;AACjC,QAAO,yBAAU,IAAA,IAAA,mBAAA,IAAA;;AAEnB,kBAAkB,SAAE;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"type-checks.mjs","names":[],"sources":[],"mappings":""}
package/dist/plugin.cjs CHANGED
@@ -3,13 +3,12 @@ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_context_helpers = require('./plugin-utils/context-helpers.cjs');
4
4
  const require_components_docs = require('./components/docs.cjs');
5
5
  const require_components_exec_builtin = require('./components/exec-builtin.cjs');
6
- const require_deepkit = require('./plugin-utils/deepkit.cjs');
7
6
  const require_traverse_command_tree = require('./plugin-utils/traverse-command-tree.cjs');
8
7
  const require_get_command_tree = require('./plugin-utils/get-command-tree.cjs');
9
- require('./plugin-utils/index.cjs');
10
8
  const require_components_state_builtin = require('./components/state-builtin.cjs');
11
9
  const require_components_utils_builtin = require('./components/utils-builtin.cjs');
12
10
  const require_automd = require('./helpers/automd.cjs');
11
+ const require_get_framework = require('./helpers/get-framework.cjs');
13
12
  const require_paths = require('./helpers/paths.cjs');
14
13
  const require_persistence = require('./helpers/persistence.cjs');
15
14
  const require_update_package_json = require('./helpers/update-package-json.cjs');
@@ -17,20 +16,20 @@ const require_utilities = require('./helpers/utilities.cjs');
17
16
  const require_validations = require('./helpers/validations.cjs');
18
17
  const require_resolve = require('./resolver/resolve.cjs');
19
18
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
20
- let _alloy_js_core_components = require("@alloy-js/core/components");
21
- let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
19
+ let _alloy_js_core = require("@alloy-js/core");
22
20
  let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
23
21
  let _powerlines_plugin_automd = require("@powerlines/plugin-automd");
24
22
  _powerlines_plugin_automd = require_runtime.__toESM(_powerlines_plugin_automd);
25
- let _powerlines_plugin_env_helpers = require("@powerlines/plugin-env/helpers");
23
+ let _powerlines_plugin_env_helpers_schema = require("@powerlines/plugin-env/helpers/schema");
26
24
  let _powerlines_plugin_nodejs = require("@powerlines/plugin-nodejs");
27
25
  _powerlines_plugin_nodejs = require_runtime.__toESM(_powerlines_plugin_nodejs);
28
26
  let _powerlines_plugin_tsdown = require("@powerlines/plugin-tsdown");
29
27
  _powerlines_plugin_tsdown = require_runtime.__toESM(_powerlines_plugin_tsdown);
28
+ let _powerlines_schema = require("@powerlines/schema");
30
29
  let _stryke_convert_to_array = require("@stryke/convert/to-array");
31
30
  let _stryke_fs_chmod_x = require("@stryke/fs/chmod-x");
32
31
  let _stryke_path_append = require("@stryke/path/append");
33
- let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
32
+ let _stryke_path_find = require("@stryke/path/find");
34
33
  let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
35
34
  let _stryke_path_join_paths = require("@stryke/path/join-paths");
36
35
  let _stryke_path_replace = require("@stryke/path/replace");
@@ -39,8 +38,10 @@ let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case
39
38
  let _stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
40
39
  let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
41
40
  let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
41
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
42
42
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
43
43
  let defu = require("defu");
44
+ let powerlines = require("powerlines");
44
45
  let powerlines_utils = require("powerlines/utils");
45
46
 
46
47
  //#region src/plugin.tsx
@@ -57,7 +58,7 @@ const plugin = __assignType((options = {}) => {
57
58
  (_powerlines_plugin_tsdown.default.Ω = [["Context", "\"w!"]], (0, _powerlines_plugin_tsdown.default)()),
58
59
  (_powerlines_plugin_automd.default.Ω = [["Context", "\"w!"]], (0, _powerlines_plugin_automd.default)()),
59
60
  {
60
- name: "shell-shock:config",
61
+ name: "shell-shock/core:config",
61
62
  config: __assignType(async function config() {
62
63
  this.debug("Resolving the Shell Shock configuration.");
63
64
  return (0, defu.defu)(options, {
@@ -66,7 +67,7 @@ const plugin = __assignType((options = {}) => {
66
67
  description: require_context_helpers.getAppDescription(this),
67
68
  platform: "node",
68
69
  projectType: "application",
69
- framework: "shell-shock",
70
+ framework: require_get_framework.getFramework(),
70
71
  isCaseSensitive: false,
71
72
  output: {
72
73
  format: "esm",
@@ -111,13 +112,13 @@ const plugin = __assignType((options = {}) => {
111
112
  title: this.config.title,
112
113
  description: this.config.description,
113
114
  alias: [],
114
- isVirtual: false
115
+ virtual: false
115
116
  }));
116
117
  this.globalOptions = this.globalOptions.map(__assignType((option) => ({
117
118
  ...option,
118
119
  name: (0, _stryke_string_format_camel_case.camelCase)(option.name),
119
120
  alias: option.alias ?? [],
120
- optional: option.optional ?? false
121
+ required: option.required ?? true
121
122
  }), [
122
123
  "option",
123
124
  "",
@@ -127,13 +128,39 @@ const plugin = __assignType((options = {}) => {
127
128
  }
128
129
  },
129
130
  ...(_powerlines_plugin_nodejs.default.Ω = [["Context", "\"w!"]], (0, _powerlines_plugin_nodejs.default)((0, defu.defu)(options ?? {}, { env: {
130
- types: "@shell-shock/core/types/env#ShellShockEnv",
131
+ config: "@shell-shock/core/types/env#ShellShockEnv",
131
132
  validate: false
132
133
  } }))),
133
134
  {
134
- name: "shell-shock:inputs",
135
+ name: "shell-shock/core:inputs",
135
136
  async configResolved() {
136
- this.debug(`Checking for commands using input: ${JSON.stringify(this.config.input)}`);
137
+ const toInputLocation = __assignType((value) => {
138
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(value)) return value;
139
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(value) && (0, powerlines.isFileReference)(value)) return String(value.file);
140
+ return null;
141
+ }, [
142
+ "value",
143
+ "",
144
+ "P#2!P&,J/\""
145
+ ]);
146
+ const configuredInputs = [];
147
+ if (Array.isArray(this.config.input)) configuredInputs.push(...this.config.input.map(toInputLocation).filter(__assignType((value) => (0, _stryke_type_checks_is_set_string.isSetString)(value), [
148
+ "value",
149
+ "",
150
+ "P\"2!!/\""
151
+ ])));
152
+ else if ((0, _stryke_type_checks_is_set_string.isSetString)(this.config.input)) configuredInputs.push(this.config.input);
153
+ else if ((0, _stryke_type_checks_is_set_object.isSetObject)(this.config.input) && (0, powerlines.isFileReference)(this.config.input)) configuredInputs.push(String(this.config.input.file));
154
+ else if ((0, _stryke_type_checks_is_set_object.isSetObject)(this.config.input)) configuredInputs.push(...Object.values(this.config.input).map(toInputLocation).filter(__assignType((value) => (0, _stryke_type_checks_is_set_string.isSetString)(value), [
155
+ "value",
156
+ "",
157
+ "P\"2!!/\""
158
+ ])));
159
+ this.debug(configuredInputs.length <= 1 ? `Checking for command modules in the following location: ${configuredInputs[0] ?? "(none configured)"}.` : `Checking for command modules in the following locations:\n${configuredInputs.map(__assignType((input) => ` - ${input}`, [
160
+ "input",
161
+ "",
162
+ "P\"2!\"/\""
163
+ ])).join("\n")}`);
137
164
  this.commandsPath = await require_paths.findCommandsRoot(this);
138
165
  this.debug(`Resolved commands root path: ${this.commandsPath}`);
139
166
  const inputs = await (0, powerlines_utils.resolveInputs)(this, this.config.input);
@@ -173,14 +200,12 @@ const plugin = __assignType((options = {}) => {
173
200
  name,
174
201
  alias: [],
175
202
  tags: [],
176
- isVirtual: false,
177
- source: "file",
203
+ virtual: false,
178
204
  entry: {
179
205
  ...entry,
180
- file: entry.file,
181
206
  input: {
182
207
  file: entry.file,
183
- name: entry.name
208
+ export: entry.export
184
209
  },
185
210
  output: name
186
211
  }
@@ -209,7 +234,7 @@ const plugin = __assignType((options = {}) => {
209
234
  }, ["prepare", "P\"/!"])
210
235
  },
211
236
  {
212
- name: "shell-shock:virtual-inputs",
237
+ name: "shell-shock/core:virtual-inputs",
213
238
  configResolved: {
214
239
  order: "post",
215
240
  async handler() {
@@ -218,10 +243,10 @@ const plugin = __assignType((options = {}) => {
218
243
  this.debug("Finding and adding virtual command inputs for each command previously found.");
219
244
  this.inputs = this.inputs.reduce(__assignType((ret, command) => {
220
245
  let depth = 0;
221
- let parentPath = (0, _stryke_path_resolve_parent_path.resolveParentPath)((0, _stryke_path_file_path_fns.findFilePath)(command.entry.file));
246
+ let parentPath = (0, _stryke_path_resolve_parent_path.resolveParentPath)((0, _stryke_path_find.findFilePath)(command.entry.file));
222
247
  if ((0, _stryke_path_is_parent_path.isParentPath)(parentPath, this.commandsPath)) while (parentPath !== this.commandsPath) {
223
248
  if (depth++ > MAX_DEPTH) throw new Error(`Unable to process virtual commands for ${command.name} \n\nPlease ensure ${command.entry.file} is a valid command entry file and does not have an invalid path.`);
224
- if (!ret.some(__assignType((existing) => (0, _stryke_path_file_path_fns.findFilePath)(existing.entry.file) === parentPath, [
249
+ if (!ret.some(__assignType((existing) => (0, _stryke_path_find.findFilePath)(existing.entry.file) === parentPath, [
225
250
  "existing",
226
251
  "",
227
252
  "P\"2!\"/\""
@@ -260,9 +285,8 @@ const plugin = __assignType((options = {}) => {
260
285
  name,
261
286
  alias: [],
262
287
  tags: [],
263
- isVirtual: true,
264
- entry: { file },
265
- source: "file"
288
+ virtual: true,
289
+ entry: { file }
266
290
  });
267
291
  }
268
292
  }
@@ -280,7 +304,7 @@ const plugin = __assignType((options = {}) => {
280
304
  "",
281
305
  "P\"2!\"2\"\"/#"
282
306
  ]));
283
- this.debug(`Final command input list: \n${this.inputs.map(__assignType((command) => ` - ${command.id}${command.isVirtual ? " (virtual)" : ""}: ${command.source === "file" ? (0, _stryke_path_replace.replacePath)(command.entry.file, this.commandsPath) : `added by ${command.source}`}`, [
307
+ this.debug(`Final command input list: \n${this.inputs.map(__assignType((command) => ` - ${command.id}${command.virtual ? " (virtual)" : ""}`, [
284
308
  "command",
285
309
  "",
286
310
  "P\"2!\"/\""
@@ -290,54 +314,53 @@ const plugin = __assignType((options = {}) => {
290
314
  }
291
315
  },
292
316
  {
293
- name: "shell-shock:update-env",
317
+ name: "shell-shock/core:update-env",
294
318
  configResolved: {
295
319
  order: "post",
296
320
  async handler() {
297
321
  this.debug("Adding global options to the CLI application's environment variables.");
322
+ if (!this.env.config) {
323
+ this.debug("Environment variable schema not found in plugin context. Extracting environment variable schema from type definitions provided in plugin options.");
324
+ await (0, _powerlines_plugin_env_helpers_schema.extractEnv)(this);
325
+ if (!this.env.config) throw new Error("Failed to extract environment variable schema from type definitions provided in plugin options. Please ensure the `env.types` option is correctly specified and points to a valid TypeScript type definition file.");
326
+ }
327
+ if (!(0, _powerlines_schema.isJsonSchemaObject)(this.env.config.schema)) throw new Error("Invalid environment variable schema extracted.");
328
+ const env = (0, _powerlines_schema.getProperties)(this.env.config);
298
329
  for (const option of Object.values(this.globalOptions).filter(__assignType((option) => Boolean(option.env), [
299
330
  "option",
300
331
  "",
301
332
  "P\"2!\"/\""
302
- ])).filter(__assignType((option) => !this.env.types.env.getPropertyOrUndefined(option.env), [
333
+ ])).filter(__assignType((option) => (0, _stryke_type_checks_is_set_string.isSetString)(option.env) && !env[option.env], [
303
334
  "option",
304
335
  "",
305
336
  "P\"2!\"/\""
306
- ]))) this.env.types.env.addProperty({
337
+ ]))) (0, _powerlines_schema.addProperty)(this.env.config, option.env, {
338
+ ...option,
307
339
  name: option.env,
308
- optional: option.optional ? true : void 0,
309
- description: option.description,
310
- visibility: _powerlines_deepkit_vendor_type.ReflectionVisibility.public,
311
- type: require_deepkit.extractType(option),
312
- default: option.default,
313
- tags: {
314
- title: option.title,
315
- alias: option.alias.filter(__assignType((alias) => alias.length > 1, [
316
- "alias",
317
- "",
318
- "P\"2!\"/\""
319
- ])).map(__assignType((alias) => (0, _stryke_string_format_constant_case.constantCase)(alias), [
320
- "alias",
321
- "",
322
- "P\"2!\"/\""
323
- ])),
324
- domain: "cli"
325
- }
340
+ alias: option.alias.filter(__assignType((alias) => alias.length > 1, [
341
+ "alias",
342
+ "",
343
+ "P\"2!\"/\""
344
+ ])).map(__assignType((alias) => (0, _stryke_string_format_constant_case.constantCase)(alias), [
345
+ "alias",
346
+ "",
347
+ "P\"2!\"/\""
348
+ ]))
326
349
  });
327
- await (0, _powerlines_plugin_env_helpers.writeEnvTypeReflection)(this, this.env.types.env, "env");
350
+ await (0, _powerlines_plugin_env_helpers_schema.writeEnv)(this);
328
351
  }
329
352
  }
330
353
  },
331
354
  {
332
- name: "shell-shock:resolve-commands",
355
+ name: "shell-shock/core:resolve-commands",
333
356
  prepare: {
334
357
  order: "post",
335
358
  async handler() {
336
359
  this.debug("Initializing the CLI application's command tree.");
337
360
  this.commands = {};
338
- if (this.config.command !== "prepare" && this.config.skipCache !== true && this.persistedMeta?.checksum === this.meta.checksum && this.fs.existsSync(require_persistence.getCommandsPersistencePath(this))) {
361
+ if (this.config.command !== "prepare" && this.config.skipCache !== true && this.persistedMeta?.checksum === this.meta.checksum && this.fs.existsSync((0, _powerlines_schema.getCacheFilePath)(this, this.env.config))) {
339
362
  this.debug(`Skipping command resolution as the meta checksum has not changed.`);
340
- await require_persistence.readCommandsPersistence(this);
363
+ await (0, _powerlines_plugin_env_helpers_schema.extractEnv)(this);
341
364
  } else {
342
365
  for (const input of this.inputs.filter(__assignType((input) => input.segments.filter(__assignType((segment) => !require_context_helpers.isDynamicPathSegment(segment) && !require_context_helpers.isPathSegmentGroup(segment), [
343
366
  "segment",
@@ -357,7 +380,7 @@ const plugin = __assignType((options = {}) => {
357
380
  ...option,
358
381
  name: (0, _stryke_string_format_camel_case.camelCase)(name),
359
382
  alias: option.alias ?? [],
360
- optional: option.optional ?? false
383
+ required: option.required ?? true
361
384
  }], [
362
385
  "param0",
363
386
  "",
@@ -393,7 +416,7 @@ const plugin = __assignType((options = {}) => {
393
416
  }
394
417
  },
395
418
  {
396
- name: "shell-shock:chmod+x",
419
+ name: "shell-shock/core:chmod+x",
397
420
  configResolved() {
398
421
  this.config.tsdown.hooks ??= {};
399
422
  this.config.tsdown.hooks["build:done"] = __assignType(async (_) => {
@@ -420,7 +443,7 @@ const plugin = __assignType((options = {}) => {
420
443
  }
421
444
  },
422
445
  {
423
- name: "shell-shock:docs",
446
+ name: "shell-shock/core:docs",
424
447
  configResolved: __assignType(function configResolved() {
425
448
  this.config.automd ??= {};
426
449
  this.config.automd.generators = {
@@ -435,15 +458,15 @@ const plugin = __assignType((options = {}) => {
435
458
  "",
436
459
  "P\"2!\"/\""
437
460
  ])).filter(Boolean);
438
- return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core_components.For, {
461
+ return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
439
462
  get each() {
440
463
  return Object.values(commands);
441
464
  },
442
465
  doubleHardline: true,
443
466
  get children() {
444
- return __assignType((child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core_components.Show, {
467
+ return __assignType((child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
445
468
  get when() {
446
- return !child.isVirtual;
469
+ return !child.virtual;
447
470
  },
448
471
  get children() {
449
472
  return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_docs.CommandDocsFile, { command: child });
@@ -468,4 +491,5 @@ const plugin = __assignType((options = {}) => {
468
491
 
469
492
  //#endregion
470
493
  exports.default = plugin;
471
- exports.plugin = plugin;
494
+ exports.plugin = plugin;
495
+ //# sourceMappingURL=plugin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../src/plugin.tsx"],"mappings":";;;;;;;AAqFA;cAAa,MAAA,oBAA2B,OAAA,GAAU,OAAA,EAChD,OAAA,GAAS,OAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../src/plugin.tsx"],"mappings":";;;;;;;AAwFA;cAAa,MAAA,oBAA2B,OAAA,GAAU,OAAA,EAChD,OAAA,GAAS,OAAA,KACR,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../src/plugin.tsx"],"mappings":";;;;;;;AAqFA;cAAa,MAAA,oBAA2B,OAAA,GAAU,OAAA,EAChD,OAAA,GAAS,OAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../src/plugin.tsx"],"mappings":""}