@shell-shock/core 0.17.21 → 0.17.23

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 (307) hide show
  1. package/README.md +16 -7
  2. package/dist/api.cjs +4 -5
  3. package/dist/api.d.cts +1 -1
  4. package/dist/api.d.mts +1 -1
  5. package/dist/api.mjs +2 -2
  6. package/dist/command-B6KYexlV.d.mts +308 -0
  7. package/dist/command-B6KYexlV.d.mts.map +1 -0
  8. package/dist/command-CtfR7hKM.d.cts +308 -0
  9. package/dist/command-CtfR7hKM.d.cts.map +1 -0
  10. package/dist/components/command-validation-logic.cjs +153 -216
  11. package/dist/components/command-validation-logic.d.cts +2 -1
  12. package/dist/components/command-validation-logic.d.cts.map +1 -1
  13. package/dist/components/command-validation-logic.d.mts +2 -1
  14. package/dist/components/command-validation-logic.mjs +153 -214
  15. package/dist/components/docs.cjs +6 -364
  16. package/dist/components/docs.d.cts +2 -3
  17. package/dist/components/docs.d.cts.map +1 -1
  18. package/dist/components/docs.d.mts +2 -3
  19. package/dist/components/docs.mjs +2 -356
  20. package/dist/components/exec-builtin.cjs +63 -100
  21. package/dist/components/exec-builtin.d.cts +1 -2
  22. package/dist/components/exec-builtin.d.cts.map +1 -1
  23. package/dist/components/exec-builtin.d.mts +1 -2
  24. package/dist/components/exec-builtin.mjs +7 -41
  25. package/dist/components/helpers.cjs +2 -52
  26. package/dist/components/helpers.d.cts +2 -1
  27. package/dist/components/helpers.d.cts.map +1 -1
  28. package/dist/components/helpers.d.mts +2 -1
  29. package/dist/components/helpers.mjs +2 -50
  30. package/dist/components/index.cjs +7 -23
  31. package/dist/components/index.mjs +9 -9
  32. package/dist/components/options-parser-logic.cjs +198 -420
  33. package/dist/components/options-parser-logic.d.cts +2 -5
  34. package/dist/components/options-parser-logic.d.cts.map +1 -1
  35. package/dist/components/options-parser-logic.d.mts +2 -5
  36. package/dist/components/options-parser-logic.mjs +192 -407
  37. package/dist/components/state-builtin.cjs +106 -164
  38. package/dist/components/state-builtin.d.cts +1 -2
  39. package/dist/components/state-builtin.d.cts.map +1 -1
  40. package/dist/components/state-builtin.d.mts +1 -2
  41. package/dist/components/state-builtin.mjs +12 -68
  42. package/dist/components/usage.cjs +4 -48
  43. package/dist/components/usage.d.cts +1 -2
  44. package/dist/components/usage.d.cts.map +1 -1
  45. package/dist/components/usage.d.mts +1 -2
  46. package/dist/components/usage.mjs +4 -46
  47. package/dist/components/utils-builtin.cjs +77 -144
  48. package/dist/components/utils-builtin.d.cts +1 -2
  49. package/dist/components/utils-builtin.d.cts.map +1 -1
  50. package/dist/components/utils-builtin.d.mts +1 -2
  51. package/dist/components/utils-builtin.mjs +9 -74
  52. package/dist/config-BIF9mEz0.d.cts +157 -0
  53. package/dist/config-BIF9mEz0.d.cts.map +1 -0
  54. package/dist/config-CnNYdfsL.d.mts +157 -0
  55. package/dist/config-CnNYdfsL.d.mts.map +1 -0
  56. package/dist/config.cjs +24 -58
  57. package/dist/config.d.cts +1 -2
  58. package/dist/config.d.cts.map +1 -1
  59. package/dist/config.d.mts +1 -2
  60. package/dist/config.mjs +23 -55
  61. package/dist/{plugin-utils/context-helpers.mjs → context-helpers-D3EJxwbq.mjs} +5 -83
  62. package/dist/context-helpers-D3EJxwbq.mjs.map +1 -0
  63. package/dist/{plugin-utils/context-helpers.cjs → context-helpers-_wUuFRB8.cjs} +63 -92
  64. package/dist/contexts/command.cjs +3 -9
  65. package/dist/contexts/command.d.cts +1 -2
  66. package/dist/contexts/command.d.cts.map +1 -1
  67. package/dist/contexts/command.d.mts +1 -2
  68. package/dist/contexts/command.mjs +2 -7
  69. package/dist/contexts/index.cjs +19 -1
  70. package/dist/contexts/index.d.cts +2 -1
  71. package/dist/contexts/index.d.mts +2 -1
  72. package/dist/contexts/index.mjs +2 -1
  73. package/dist/contexts/options.cjs +7 -30
  74. package/dist/contexts/options.d.cts +1 -2
  75. package/dist/contexts/options.d.cts.map +1 -1
  76. package/dist/contexts/options.d.mts +1 -2
  77. package/dist/contexts/options.mjs +7 -27
  78. package/dist/contexts/power-plant.cjs +19 -0
  79. package/dist/contexts/power-plant.d.cts +2 -0
  80. package/dist/contexts/power-plant.d.mts +2 -0
  81. package/dist/contexts/power-plant.mjs +5 -0
  82. package/dist/docs-C6ZvsVMu.cjs +278 -0
  83. package/dist/docs-CGQ2HtEY.mjs +249 -0
  84. package/dist/docs-CGQ2HtEY.mjs.map +1 -0
  85. package/dist/engine.cjs +5 -39
  86. package/dist/engine.d.cts +1 -2
  87. package/dist/engine.d.cts.map +1 -1
  88. package/dist/engine.d.mts +1 -2
  89. package/dist/engine.mjs +4 -37
  90. package/dist/generator.cjs +68 -0
  91. package/dist/generator.d.cts +15 -0
  92. package/dist/generator.d.cts.map +1 -0
  93. package/dist/generator.d.mts +15 -0
  94. package/dist/generator.d.mts.map +1 -0
  95. package/dist/generator.mjs +66 -0
  96. package/dist/generator.mjs.map +1 -0
  97. package/dist/{helpers/get-framework.cjs → get-framework-CxZc2krd.cjs} +7 -8
  98. package/dist/{helpers/get-framework.mjs → get-framework-Dlqz2hVZ.mjs} +3 -8
  99. package/dist/get-framework-Dlqz2hVZ.mjs.map +1 -0
  100. package/dist/helpers/power-plant.cjs +102 -0
  101. package/dist/helpers/power-plant.d.cts +61 -0
  102. package/dist/helpers/power-plant.d.cts.map +1 -0
  103. package/dist/helpers/power-plant.d.mts +61 -0
  104. package/dist/helpers/power-plant.d.mts.map +1 -0
  105. package/dist/helpers/power-plant.mjs +99 -0
  106. package/dist/helpers/power-plant.mjs.map +1 -0
  107. package/dist/index-D4klH_pj.d.mts +2 -0
  108. package/dist/index-DYOBadKY.d.cts +2 -0
  109. package/dist/index.cjs +1 -37
  110. package/dist/index.d.cts +4 -6
  111. package/dist/index.d.cts.map +1 -1
  112. package/dist/index.d.mts +4 -6
  113. package/dist/index.mjs +0 -35
  114. package/dist/package-B7Vu265G.mjs +6 -0
  115. package/dist/package-B7Vu265G.mjs.map +1 -0
  116. package/dist/{package.cjs → package-BLC4qc8t.cjs} +2 -4
  117. package/dist/plugin-B-hM2twc.mjs +1458 -0
  118. package/dist/plugin-B-hM2twc.mjs.map +1 -0
  119. package/dist/plugin-Bhfq0DMC.cjs +1490 -0
  120. package/dist/plugin-utils/index.cjs +359 -26
  121. package/dist/plugin-utils/index.d.cts +273 -9
  122. package/dist/plugin-utils/index.d.cts.map +1 -0
  123. package/dist/plugin-utils/index.d.mts +273 -9
  124. package/dist/plugin-utils/index.d.mts.map +1 -0
  125. package/dist/plugin-utils/index.mjs +346 -10
  126. package/dist/plugin-utils/index.mjs.map +1 -0
  127. package/dist/plugin.cjs +3 -496
  128. package/dist/plugin.d.cts +1 -3
  129. package/dist/plugin.d.cts.map +1 -1
  130. package/dist/plugin.d.mts +1 -3
  131. package/dist/plugin.mjs +2 -491
  132. package/dist/power-plant-LgxcvlMN.d.cts +4 -0
  133. package/dist/power-plant-LgxcvlMN.d.mts +4 -0
  134. package/dist/reflect-CSiffeL9.cjs +27 -0
  135. package/dist/reflect-DXKSFgvS.mjs +23 -0
  136. package/dist/reflect-DXKSFgvS.mjs.map +1 -0
  137. package/dist/schemas/env.cjs +91 -0
  138. package/dist/schemas/env.d.cts +145 -0
  139. package/dist/schemas/env.d.cts.map +1 -0
  140. package/dist/schemas/env.d.mts +145 -0
  141. package/dist/{types → schemas}/env.d.mts.map +1 -1
  142. package/dist/schemas/env.mjs +91 -0
  143. package/dist/schemas/index.cjs +4 -0
  144. package/dist/schemas/index.d.cts +2 -0
  145. package/dist/schemas/index.d.mts +2 -0
  146. package/dist/schemas/index.mjs +3 -0
  147. package/dist/types/command.cjs +0 -402
  148. package/dist/types/command.d.cts +2 -309
  149. package/dist/types/command.d.mts +2 -309
  150. package/dist/types/command.mjs +1 -368
  151. package/dist/types/config.cjs +0 -175
  152. package/dist/types/config.d.cts +2 -126
  153. package/dist/types/config.d.mts +2 -126
  154. package/dist/types/config.mjs +1 -164
  155. package/dist/types/context.cjs +0 -45
  156. package/dist/types/context.d.cts +2 -31
  157. package/dist/types/context.d.mts +2 -31
  158. package/dist/types/context.mjs +1 -41
  159. package/dist/types/index.cjs +3 -53
  160. package/dist/types/index.d.cts +4 -5
  161. package/dist/types/index.d.mts +4 -5
  162. package/dist/types/index.mjs +4 -5
  163. package/package.json +106 -42
  164. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  165. package/dist/api.cjs.map +0 -1
  166. package/dist/components/command-validation-logic.cjs.map +0 -1
  167. package/dist/components/docs.cjs.map +0 -1
  168. package/dist/components/docs.mjs.map +0 -1
  169. package/dist/components/exec-builtin.cjs.map +0 -1
  170. package/dist/components/helpers.cjs.map +0 -1
  171. package/dist/components/options-parser-logic.cjs.map +0 -1
  172. package/dist/components/state-builtin.cjs.map +0 -1
  173. package/dist/components/usage.cjs.map +0 -1
  174. package/dist/components/utils-builtin.cjs.map +0 -1
  175. package/dist/config.cjs.map +0 -1
  176. package/dist/contexts/command.cjs.map +0 -1
  177. package/dist/contexts/options.cjs.map +0 -1
  178. package/dist/engine.cjs.map +0 -1
  179. package/dist/helpers/automd.cjs +0 -193
  180. package/dist/helpers/automd.cjs.map +0 -1
  181. package/dist/helpers/automd.mjs +0 -190
  182. package/dist/helpers/automd.mjs.map +0 -1
  183. package/dist/helpers/docs-helpers.cjs +0 -24
  184. package/dist/helpers/docs-helpers.cjs.map +0 -1
  185. package/dist/helpers/docs-helpers.mjs +0 -24
  186. package/dist/helpers/docs-helpers.mjs.map +0 -1
  187. package/dist/helpers/get-framework.cjs.map +0 -1
  188. package/dist/helpers/get-framework.mjs.map +0 -1
  189. package/dist/helpers/paths.cjs +0 -137
  190. package/dist/helpers/paths.cjs.map +0 -1
  191. package/dist/helpers/paths.mjs +0 -134
  192. package/dist/helpers/paths.mjs.map +0 -1
  193. package/dist/helpers/persistence.cjs +0 -114
  194. package/dist/helpers/persistence.cjs.map +0 -1
  195. package/dist/helpers/persistence.mjs +0 -113
  196. package/dist/helpers/persistence.mjs.map +0 -1
  197. package/dist/helpers/update-package-json.cjs +0 -65
  198. package/dist/helpers/update-package-json.cjs.map +0 -1
  199. package/dist/helpers/update-package-json.mjs +0 -64
  200. package/dist/helpers/update-package-json.mjs.map +0 -1
  201. package/dist/helpers/utilities.cjs +0 -95
  202. package/dist/helpers/utilities.cjs.map +0 -1
  203. package/dist/helpers/utilities.mjs +0 -94
  204. package/dist/helpers/utilities.mjs.map +0 -1
  205. package/dist/helpers/validations.cjs +0 -71
  206. package/dist/helpers/validations.cjs.map +0 -1
  207. package/dist/helpers/validations.mjs +0 -70
  208. package/dist/helpers/validations.mjs.map +0 -1
  209. package/dist/index.cjs.map +0 -1
  210. package/dist/package.cjs.map +0 -1
  211. package/dist/package.mjs +0 -6
  212. package/dist/package.mjs.map +0 -1
  213. package/dist/plugin-utils/compute-bin.cjs +0 -49
  214. package/dist/plugin-utils/compute-bin.cjs.map +0 -1
  215. package/dist/plugin-utils/compute-bin.d.cts +0 -13
  216. package/dist/plugin-utils/compute-bin.d.cts.map +0 -1
  217. package/dist/plugin-utils/compute-bin.d.mts +0 -13
  218. package/dist/plugin-utils/compute-bin.d.mts.map +0 -1
  219. package/dist/plugin-utils/compute-bin.mjs +0 -49
  220. package/dist/plugin-utils/compute-bin.mjs.map +0 -1
  221. package/dist/plugin-utils/context-helpers.cjs.map +0 -1
  222. package/dist/plugin-utils/context-helpers.d.cts +0 -106
  223. package/dist/plugin-utils/context-helpers.d.cts.map +0 -1
  224. package/dist/plugin-utils/context-helpers.d.mts +0 -106
  225. package/dist/plugin-utils/context-helpers.d.mts.map +0 -1
  226. package/dist/plugin-utils/context-helpers.mjs.map +0 -1
  227. package/dist/plugin-utils/deepkit.cjs +0 -70
  228. package/dist/plugin-utils/deepkit.cjs.map +0 -1
  229. package/dist/plugin-utils/deepkit.d.cts +0 -23
  230. package/dist/plugin-utils/deepkit.d.cts.map +0 -1
  231. package/dist/plugin-utils/deepkit.d.mts +0 -23
  232. package/dist/plugin-utils/deepkit.d.mts.map +0 -1
  233. package/dist/plugin-utils/deepkit.mjs +0 -69
  234. package/dist/plugin-utils/deepkit.mjs.map +0 -1
  235. package/dist/plugin-utils/description-helpers.cjs +0 -112
  236. package/dist/plugin-utils/description-helpers.cjs.map +0 -1
  237. package/dist/plugin-utils/description-helpers.d.cts +0 -44
  238. package/dist/plugin-utils/description-helpers.d.cts.map +0 -1
  239. package/dist/plugin-utils/description-helpers.d.mts +0 -44
  240. package/dist/plugin-utils/description-helpers.d.mts.map +0 -1
  241. package/dist/plugin-utils/description-helpers.mjs +0 -108
  242. package/dist/plugin-utils/description-helpers.mjs.map +0 -1
  243. package/dist/plugin-utils/get-command-tree.cjs +0 -118
  244. package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
  245. package/dist/plugin-utils/get-command-tree.d.cts +0 -36
  246. package/dist/plugin-utils/get-command-tree.d.cts.map +0 -1
  247. package/dist/plugin-utils/get-command-tree.d.mts +0 -36
  248. package/dist/plugin-utils/get-command-tree.d.mts.map +0 -1
  249. package/dist/plugin-utils/get-command-tree.mjs +0 -115
  250. package/dist/plugin-utils/get-command-tree.mjs.map +0 -1
  251. package/dist/plugin-utils/reflect.cjs +0 -54
  252. package/dist/plugin-utils/reflect.cjs.map +0 -1
  253. package/dist/plugin-utils/reflect.d.cts +0 -14
  254. package/dist/plugin-utils/reflect.d.cts.map +0 -1
  255. package/dist/plugin-utils/reflect.d.mts +0 -14
  256. package/dist/plugin-utils/reflect.d.mts.map +0 -1
  257. package/dist/plugin-utils/reflect.mjs +0 -53
  258. package/dist/plugin-utils/reflect.mjs.map +0 -1
  259. package/dist/plugin-utils/traverse-command-tree.cjs +0 -65
  260. package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
  261. package/dist/plugin-utils/traverse-command-tree.d.cts +0 -22
  262. package/dist/plugin-utils/traverse-command-tree.d.cts.map +0 -1
  263. package/dist/plugin-utils/traverse-command-tree.d.mts +0 -22
  264. package/dist/plugin-utils/traverse-command-tree.d.mts.map +0 -1
  265. package/dist/plugin-utils/traverse-command-tree.mjs +0 -63
  266. package/dist/plugin-utils/traverse-command-tree.mjs.map +0 -1
  267. package/dist/plugin-utils/type-checks.cjs +0 -222
  268. package/dist/plugin-utils/type-checks.cjs.map +0 -1
  269. package/dist/plugin-utils/type-checks.d.cts +0 -41
  270. package/dist/plugin-utils/type-checks.d.cts.map +0 -1
  271. package/dist/plugin-utils/type-checks.d.mts +0 -41
  272. package/dist/plugin-utils/type-checks.d.mts.map +0 -1
  273. package/dist/plugin-utils/type-checks.mjs +0 -218
  274. package/dist/plugin-utils/type-checks.mjs.map +0 -1
  275. package/dist/plugin.cjs.map +0 -1
  276. package/dist/plugin.mjs.map +0 -1
  277. package/dist/resolver/deepkit.cjs +0 -110
  278. package/dist/resolver/deepkit.cjs.map +0 -1
  279. package/dist/resolver/deepkit.mjs +0 -109
  280. package/dist/resolver/deepkit.mjs.map +0 -1
  281. package/dist/resolver/helpers.cjs +0 -184
  282. package/dist/resolver/helpers.cjs.map +0 -1
  283. package/dist/resolver/helpers.mjs +0 -180
  284. package/dist/resolver/helpers.mjs.map +0 -1
  285. package/dist/resolver/resolve.cjs +0 -473
  286. package/dist/resolver/resolve.cjs.map +0 -1
  287. package/dist/resolver/resolve.mjs +0 -473
  288. package/dist/resolver/resolve.mjs.map +0 -1
  289. package/dist/types/command.cjs.map +0 -1
  290. package/dist/types/command.d.cts.map +0 -1
  291. package/dist/types/command.d.mts.map +0 -1
  292. package/dist/types/command.mjs.map +0 -1
  293. package/dist/types/config.cjs.map +0 -1
  294. package/dist/types/config.d.cts.map +0 -1
  295. package/dist/types/config.d.mts.map +0 -1
  296. package/dist/types/config.mjs.map +0 -1
  297. package/dist/types/context.cjs.map +0 -1
  298. package/dist/types/context.d.cts.map +0 -1
  299. package/dist/types/context.d.mts.map +0 -1
  300. package/dist/types/context.mjs.map +0 -1
  301. package/dist/types/env.cjs +0 -53
  302. package/dist/types/env.cjs.map +0 -1
  303. package/dist/types/env.d.cts +0 -71
  304. package/dist/types/env.d.cts.map +0 -1
  305. package/dist/types/env.d.mts +0 -71
  306. package/dist/types/env.mjs +0 -51
  307. /package/dist/{types → schemas}/env.mjs.map +0 -0
@@ -1,473 +0,0 @@
1
- import { getDynamicPathSegmentName, isDynamicPathSegment } from "../plugin-utils/context-helpers.mjs";
2
- import { getGlobalOptions } from "../helpers/utilities.mjs";
3
- import { applyArgsDefaults, applyDefaults, applyOptionsDefaults, resolveVirtualCommand } from "./helpers.mjs";
4
- import { resolveCommandArgument, resolveCommandOption } from "./deepkit.mjs";
5
- import { addProperty, extract, getPropertiesList, isJsonSchemaArray, resolveModule } from "@powerlines/schema";
6
- import { toArray } from "@stryke/convert/to-array";
7
- import { replacePath } from "@stryke/path/replace";
8
- import { constantCase } from "@stryke/string-format/constant-case";
9
- import { isSetObject } from "@stryke/type-checks/is-set-object";
10
- import { isSetString } from "@stryke/type-checks/is-set-string";
11
- import { titleCase } from "@stryke/string-format/title-case";
12
- import { ReflectionClass, ReflectionFunction, ReflectionKind, reflect } from "@powerlines/deepkit/vendor/type";
13
- import { isBoolean } from "@stryke/type-checks/is-boolean";
14
- import { getUnique } from "@stryke/helpers/get-unique";
15
- import { isFunction } from "@stryke/type-checks/is-function";
16
- import { esbuildPlugin } from "@powerlines/deepkit/esbuild-plugin";
17
- import { isJsonSchemaObjectType, isJsonSchemaTupleType } from "@stryke/json";
18
-
19
- //#region src/resolver/resolve.ts
20
- const __ΩRecord = [
21
- "K",
22
- "T",
23
- "Record",
24
- "l'e#\"Rb!b\"Pde\"!N#!w#y"
25
- ];
26
- function __assignType(fn, args) {
27
- fn.__type = args;
28
- return fn;
29
- }
30
- function isFiniteNumber(value) {
31
- return typeof value === "number" && Number.isFinite(value);
32
- }
33
- isFiniteNumber.__type = [
34
- "value",
35
- "isFiniteNumber",
36
- "P#2!!/\""
37
- ];
38
- function asRecord(value) {
39
- return isSetObject(value) ? value : {};
40
- }
41
- asRecord.__type = [
42
- "value",
43
- () => __ΩRecord,
44
- "asRecord",
45
- "P#2!&#o\"#/#"
46
- ];
47
- function toAliasList(value) {
48
- if (Array.isArray(value)) return getUnique(value.filter(isSetString));
49
- return isSetString(value) ? [value] : [];
50
- }
51
- toAliasList.__type = [
52
- "value",
53
- "toAliasList",
54
- "P#2!&F/\""
55
- ];
56
- function inferParameterType(input) {
57
- const schemaType = input.type;
58
- if (Array.isArray(schemaType)) {
59
- const first = schemaType.find(__assignType((type) => type !== "null", [
60
- "type",
61
- "",
62
- "P\"2!\"/\""
63
- ]));
64
- if (first === "integer" || first === "number") return "number";
65
- if (first === "boolean") return "boolean";
66
- if (first === "array") {
67
- const nestedType = asRecord(input.items).type;
68
- if (nestedType === "integer" || nestedType === "number") return "number";
69
- if (nestedType === "boolean") return "boolean";
70
- return "string";
71
- }
72
- return "string";
73
- }
74
- if (schemaType === "integer" || schemaType === "number") return "number";
75
- if (schemaType === "boolean") return "boolean";
76
- if (schemaType === "array") {
77
- const nestedType = asRecord(input.items).type;
78
- if (nestedType === "integer" || nestedType === "number") return "number";
79
- if (nestedType === "boolean") return "boolean";
80
- return "string";
81
- }
82
- if (Array.isArray(input.enum) && input.enum.length > 0) {
83
- const first = input.enum.find(__assignType((value) => value !== null, [
84
- "value",
85
- "",
86
- "P\"2!\"/\""
87
- ]));
88
- if (isFiniteNumber(first)) return "number";
89
- if (isBoolean(first)) return "boolean";
90
- }
91
- if (isFiniteNumber(input.default)) return "number";
92
- if (isBoolean(input.default)) return "boolean";
93
- return "string";
94
- }
95
- inferParameterType.__type = [
96
- () => __ΩRecord,
97
- "input",
98
- "CommandOption",
99
- "type",
100
- "inferParameterType",
101
- "P&#o!#2\"\"w#.$f/%"
102
- ];
103
- function inferVariadic(input) {
104
- if (isBoolean(input.variadic)) return input.variadic;
105
- return input.type === "array";
106
- }
107
- inferVariadic.__type = [
108
- () => __ΩRecord,
109
- "input",
110
- "inferVariadic",
111
- "P&#o!#2\")/#"
112
- ];
113
- function normalizeDefault(input, type, variadic) {
114
- const defaultValue = input.default;
115
- if (defaultValue === void 0) return;
116
- if (type === "boolean") {
117
- if (variadic) {
118
- if (Array.isArray(defaultValue)) return defaultValue.filter(isBoolean);
119
- return isBoolean(defaultValue) ? [defaultValue] : void 0;
120
- }
121
- if (Array.isArray(defaultValue)) return defaultValue.find(isBoolean);
122
- return isBoolean(defaultValue) ? defaultValue : void 0;
123
- }
124
- if (type === "number") {
125
- if (variadic) {
126
- if (Array.isArray(defaultValue)) return defaultValue.map(__assignType((item) => typeof item === "bigint" ? Number(item) : item, [
127
- "item",
128
- "",
129
- "P\"2!\"/\""
130
- ])).filter(isFiniteNumber);
131
- const normalized = typeof defaultValue === "bigint" ? Number(defaultValue) : defaultValue;
132
- return isFiniteNumber(normalized) ? [normalized] : void 0;
133
- }
134
- if (Array.isArray(defaultValue)) return defaultValue.map(__assignType((item) => typeof item === "bigint" ? Number(item) : item, [
135
- "item",
136
- "",
137
- "P\"2!\"/\""
138
- ])).find(isFiniteNumber);
139
- const normalized = typeof defaultValue === "bigint" ? Number(defaultValue) : defaultValue;
140
- return isFiniteNumber(normalized) ? normalized : void 0;
141
- }
142
- if (variadic) {
143
- if (Array.isArray(defaultValue)) return defaultValue.filter(isSetString);
144
- return isSetString(defaultValue) ? [defaultValue] : void 0;
145
- }
146
- if (Array.isArray(defaultValue)) return defaultValue.find(isSetString);
147
- return isSetString(defaultValue) ? defaultValue : void 0;
148
- }
149
- normalizeDefault.__type = [
150
- () => __ΩRecord,
151
- "input",
152
- "CommandOption",
153
- "type",
154
- "type",
155
- "variadic",
156
- "normalizeDefault",
157
- "P&#o!#2\"\"w#.$f2%)2&\"/'"
158
- ];
159
- function normalizeStringChoices(input) {
160
- const source = Array.isArray(input.choices) ? input.choices : input.enum;
161
- if (!Array.isArray(source)) return;
162
- return source.filter(isSetString);
163
- }
164
- normalizeStringChoices.__type = [
165
- () => __ΩRecord,
166
- "input",
167
- "normalizeStringChoices",
168
- "P&#o!#2\"\"/#"
169
- ];
170
- function normalizeNumberChoices(input) {
171
- const source = Array.isArray(input.choices) ? input.choices : input.enum;
172
- if (!Array.isArray(source)) return;
173
- return source.map(__assignType((item) => typeof item === "bigint" ? Number(item) : item, [
174
- "item",
175
- "",
176
- "P\"2!\"/\""
177
- ])).filter(isFiniteNumber);
178
- }
179
- normalizeNumberChoices.__type = [
180
- () => __ΩRecord,
181
- "input",
182
- "normalizeNumberChoices",
183
- "P&#o!#2\"\"/#"
184
- ];
185
- function resolveCommandParameter(schema, defaults) {
186
- const input = asRecord(schema);
187
- const type = inferParameterType(input);
188
- const variadic = inferVariadic(input);
189
- const defaultValue = normalizeDefault(input, type, variadic);
190
- const required = isBoolean(input.required) ? input.required : defaultValue === void 0 ? defaults.fallbackRequired : false;
191
- const env = isSetString(input.env) ? input.env : false;
192
- const result = {
193
- name: isSetString(input.name) ? input.name : "",
194
- type,
195
- title: isSetString(input.title) ? input.title : "",
196
- description: isSetString(input.description) ? input.description : "",
197
- alias: toAliasList(input.alias),
198
- default: defaultValue,
199
- env,
200
- required,
201
- variadic
202
- };
203
- if (type === "string") {
204
- const stringChoices = normalizeStringChoices(input);
205
- if (Array.isArray(stringChoices)) result.choices = stringChoices;
206
- if (isSetString(input.format)) result.format = input.format;
207
- }
208
- if (type === "number") {
209
- const numberChoices = normalizeNumberChoices(input);
210
- if (Array.isArray(numberChoices)) result.choices = numberChoices;
211
- }
212
- if (defaults.includeBooleanOptionFields && type === "boolean" && !variadic) {
213
- const optionResult = result;
214
- if (isSetString(input.isNegativeOf)) optionResult.isNegativeOf = input.isNegativeOf;
215
- if (isBoolean(input.skipAddingNegative)) optionResult.skipAddingNegative = input.skipAddingNegative;
216
- }
217
- return result;
218
- }
219
- resolveCommandParameter.__type = [
220
- "schema",
221
- "fallbackRequired",
222
- "includeBooleanOptionFields",
223
- "defaults",
224
- "CommandOption",
225
- "CommandArgument",
226
- "resolveCommandParameter",
227
- "P#2!P)4\")4#M2$P\"w%\"w&J/'"
228
- ];
229
- async function preprocess(input) {
230
- const { context, command, parent } = input;
231
- const title = command.title || `${parent?.title ? `${parent.virtual ? parent.title.replace(/(?:c|C)ommands?$/, "").trim() : parent.title} - ` : ""}${titleCase(command.name)}${command.virtual ? " Commands" : ""}`;
232
- const result = {
233
- input,
234
- output: {
235
- alias: [],
236
- icon: parent?.icon,
237
- tags: parent?.tags ?? [],
238
- ...command,
239
- title,
240
- options: parent === null ? getGlobalOptions(context, command) : {},
241
- args: [],
242
- parent: parent ?? null,
243
- children: {}
244
- }
245
- };
246
- if (!command.virtual) {
247
- if (!command.entry.input?.file || !context.fs.existsSync(command.entry.input.file)) throw new Error(`${!command.entry.input?.file ? "Missing" : "Non-existent"} command entry file for "${command.name}"`);
248
- context.debug(`Adding reflection for CLI command: ${command.id} (file: ${replacePath(command.entry.input.file, context.config.cwd)})`);
249
- result.module = await (resolveModule.Ω = [["CommandModule", "\"w!"]], resolveModule(context, command.entry.input, {
250
- name: `${command.title || titleCase(command.name)} Command Bundler`,
251
- plugins: [esbuildPlugin(context, {
252
- reflection: "default",
253
- level: "all"
254
- })],
255
- resolve: { skipNodeModulesBundle: true }
256
- }));
257
- }
258
- if (!command.virtual) {
259
- if (!result.module?.default) throw new Error(`The command entry file "${input.command.entry.input?.file || input.command.path}" does not include a handler function as its default export - this is required for command resolution and execution.`);
260
- const type = reflect(result.module.default);
261
- if (type.kind !== ReflectionKind.function) throw new Error(`The command entry file "${input.command.entry.input?.file || input.command.path}" does not have a valid function as its default export - this is required for command resolution and execution.`);
262
- result.reflection = new ReflectionFunction(type);
263
- }
264
- return result;
265
- }
266
- preprocess.__type = [
267
- "ResolverInput",
268
- "input",
269
- "ResolverContext",
270
- "preprocess",
271
- "P\"w!2\"\"w#`/$"
272
- ];
273
- async function postprocess(ctx) {
274
- ctx.output.options = applyOptionsDefaults(ctx);
275
- ctx.output.args = applyArgsDefaults(ctx);
276
- ctx.output.args.forEach(__assignType((arg, index) => {
277
- const found = ctx.output.args.findIndex(__assignType((a) => a.name === arg.name, [
278
- "a",
279
- "",
280
- "P\"2!\"/\""
281
- ]));
282
- if (found !== -1 && found !== index || ctx.output.segments.some(__assignType((segment) => isDynamicPathSegment(segment) && getDynamicPathSegmentName(segment) === arg.name, [
283
- "segment",
284
- "",
285
- "P\"2!\"/\""
286
- ]))) {
287
- arg.name += `_${ctx.output.segments.filter(__assignType((segment) => isDynamicPathSegment(segment) && getDynamicPathSegmentName(segment).replace(/_\d+$/, "") === arg.name, [
288
- "segment",
289
- "",
290
- "P\"2!\"/\""
291
- ])).length + ctx.output.args.filter(__assignType((a) => a.name.replace(/_\d+$/, "") === arg.name, [
292
- "a",
293
- "",
294
- "P\"2!\"/\""
295
- ])).length}`;
296
- arg.env = arg.name ? arg.env || arg.env === false ? arg.env : ctx.input.context.config.autoAssignEnv ? constantCase(arg.name) : false : false;
297
- }
298
- }, [
299
- "arg",
300
- "index",
301
- "",
302
- "P\"2!\"2\"\"/#"
303
- ]));
304
- applyDefaults(ctx);
305
- if (ctx.input.context.env) {
306
- if (isSetObject(ctx.output.options)) Object.values(ctx.output.options).filter(__assignType((option) => Boolean(option.env), [
307
- "option",
308
- "",
309
- "P\"2!\"/\""
310
- ])).forEach(__assignType((option) => {
311
- addProperty(ctx.input.context.env.config.schema, option.env, {
312
- ...option,
313
- name: option.env,
314
- alias: option.alias.filter(__assignType((alias) => alias.length > 1, [
315
- "alias",
316
- "",
317
- "P\"2!\"/\""
318
- ])).map(__assignType((alias) => constantCase(alias), [
319
- "alias",
320
- "",
321
- "P\"2!\"/\""
322
- ]))
323
- });
324
- }, [
325
- "option",
326
- "",
327
- "P\"2!\"/\""
328
- ]));
329
- ctx.output.args.filter(__assignType((arg) => Boolean(arg.env), [
330
- "arg",
331
- "",
332
- "P\"2!\"/\""
333
- ])).forEach(__assignType((arg) => addProperty(ctx.input.context.env.config.schema, arg.env, {
334
- ...arg,
335
- name: arg.env,
336
- alias: arg.alias.filter(__assignType((alias) => alias.length > 1, [
337
- "alias",
338
- "",
339
- "P\"2!\"/\""
340
- ])).map(__assignType((alias) => constantCase(alias), [
341
- "alias",
342
- "",
343
- "P\"2!\"/\""
344
- ]))
345
- }), [
346
- "arg",
347
- "",
348
- "P\"2!\"/\""
349
- ]));
350
- }
351
- await Promise.all(ctx.input.context.inputs.filter(__assignType((input) => input.segments.filter(__assignType((segment) => !isDynamicPathSegment(segment), [
352
- "segment",
353
- "",
354
- "P\"2!\"/\""
355
- ])).length === ctx.input.command.segments.filter(__assignType((segment) => !isDynamicPathSegment(segment), [
356
- "segment",
357
- "",
358
- "P\"2!\"/\""
359
- ])).length + 1 && input.segments.slice(0, ctx.input.command.segments.length).every(__assignType((value, index) => value === ctx.input.command.segments[index], [
360
- "value",
361
- "index",
362
- "",
363
- "P\"2!\"2\"\"/#"
364
- ])), [
365
- "input",
366
- "",
367
- "P\"2!\"/\""
368
- ])).map(__assignType(async (input) => {
369
- ctx.output.children[input.name] = await (resolve.Ω = [[
370
- () => ctx,
371
- "ResolverContext",
372
- "Pi!\"w\"q\"!j"
373
- ]], resolve({
374
- context: ctx.input.context,
375
- command: input,
376
- parent: ctx.output
377
- }));
378
- }, [
379
- "input",
380
- "",
381
- "P\"2!\"/\""
382
- ])));
383
- return ctx.output;
384
- }
385
- postprocess.__type = [
386
- "ResolverContext",
387
- "ctx",
388
- "CommandTree",
389
- "postprocess",
390
- "P\"w!2\"\"w#`/$"
391
- ];
392
- /**
393
- * Resolves a command tree from the given resolver input.
394
- *
395
- * @param input - The resolver input containing the context, command, and optional parent command tree.
396
- * @returns A promise that resolves to the resolved command tree.
397
- */
398
- async function resolve(input) {
399
- const ctx = await (preprocess.Ω = [[
400
- () => input,
401
- "ResolverInput",
402
- "Pi!\"w\"q\"!j"
403
- ]], preprocess(input));
404
- if (!ctx.output.virtual) {
405
- if (!ctx.module) throw new Error(`Command module at path "${ctx.input.command.path}" is undefined or null. Please ensure the module exports a valid command.`);
406
- else if (!isSetObject(ctx.module)) throw new TypeError(`Command module at path "${ctx.input.command.path}" is not an object. Please ensure the module exports a valid command.`);
407
- else if (!("default" in ctx.module)) throw new Error(`Command module at path "${ctx.input.command.path}" does not appear to be valid. Please ensure the module's default export is a valid command handler function.`);
408
- const metadata = ctx.module.metadata ?? {};
409
- if (isSetString(metadata.title)) ctx.output.title = metadata.title;
410
- if (isSetString(metadata.description)) ctx.output.description = metadata.description;
411
- if (isSetString(metadata.alias) || Array.isArray(metadata.alias) && metadata.alias.length > 0) ctx.output.alias = toArray(metadata.alias);
412
- if (isSetString(metadata.icon)) ctx.output.icon = metadata.icon;
413
- if (isSetString(metadata.tags)) ctx.output.tags = getUnique(ctx.output.tags.concat(toArray(metadata.tags)));
414
- ctx.output.description ??= ctx.input.command.description || isFunction(ctx.reflection?.getDescription) ? ctx.reflection?.getDescription() : ctx.reflection?.description;
415
- if (ctx.module.options) {
416
- const options = await extract(ctx.input.context, ctx.module.options);
417
- if (!isSetObject(options) || !isJsonSchemaObjectType(options.schema)) throw new TypeError(`Command options for command at path "${ctx.input.command.path}" must resolve to an object.`);
418
- ctx.output.options = getPropertiesList(options).reduce(__assignType((ret, property) => {
419
- ret[property.name] = resolveCommandParameter(property, {
420
- fallbackRequired: false,
421
- includeBooleanOptionFields: true
422
- });
423
- return ret;
424
- }, [
425
- "ret",
426
- "property",
427
- "",
428
- "P\"2!\"2\"\"/#"
429
- ]), {});
430
- }
431
- if (ctx.module.args) {
432
- const args = await extract(ctx.input.context, ctx.module.args);
433
- if (isSetObject(args)) {
434
- if (!isJsonSchemaTupleType(args.schema) && !isJsonSchemaArray(args.schema)) throw new TypeError(`Command arguments for command at path "${ctx.input.command.path}" must resolve to a tuple${args?.schema?.type ? `, instead received ${JSON.stringify(args.schema.type)}` : ""}.`);
435
- if (Array.isArray(args.schema.items)) ctx.output.args = args.schema.items.map(__assignType((item) => resolveCommandParameter(item, {
436
- fallbackRequired: true,
437
- includeBooleanOptionFields: false
438
- }), [
439
- "item",
440
- "",
441
- "P\"2!\"/\""
442
- ]));
443
- }
444
- }
445
- const parameters = ctx.reflection?.getParameters() ?? [];
446
- if (parameters.length > 0) {
447
- const hasOptions = parameters[0] && (parameters[0].type.kind === ReflectionKind.objectLiteral || parameters[0].type.kind === ReflectionKind.class);
448
- if (hasOptions && !ctx.module.options) {
449
- const optionsReflection = ReflectionClass.from(parameters[0]?.type);
450
- for (const property of optionsReflection.getProperties()) ctx.output.options[property.getNameAsString()] = resolveCommandOption(ctx, property);
451
- }
452
- if (!ctx.module.args) ctx.output.args = (hasOptions ? parameters.slice(1) : parameters).map(__assignType((arg, index) => resolveCommandArgument(ctx, index, arg), [
453
- "arg",
454
- "index",
455
- "",
456
- "P\"2!\"2\"\"/#"
457
- ]));
458
- }
459
- } else resolveVirtualCommand(ctx);
460
- return postprocess(ctx);
461
- }
462
- resolve.__type = [
463
- "ResolverInput",
464
- "input",
465
- "CommandTree",
466
- "resolve",
467
- "Resolves a command tree from the given resolver input.",
468
- "P\"w!2\"\"w#`/$?%"
469
- ];
470
-
471
- //#endregion
472
- export { resolve };
473
- //# sourceMappingURL=resolve.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.cjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"mappings":"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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.cjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;;;;;;KAmCK,YAAA,GAAe,IAAI,CACtB,YAAA;AAAA,UAmBe,WAAA;EApBZ;;;EAwBH,GAAA;EAvBoB;AAmBtB;;;;AAYU;EAAR,QAAQ;AAAA;AAAA,UAGA,WAAA;EAQJ;;;;;;EADJ,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,OAAc,KAAA,EAAO,WAAA,KAAgB,aAAA;EAFpD;;;;;EAUA,eAAA;EARoD;;;;;;;AAuClC;AAMpB;;EAzBE,GAAA;EAyBoB;;;;;;;;;EAdpB,aAAA;EAmBU;;;;;;EAXV,IAAA,GAAO,WAAA;AAAA;AAkBJ;AAML;;AANK,KAZO,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,mBAAA;;;;KAKhC,YAAA,GAAe,IAAI,CAC7B,cAAA;EAiBuB;;;EAXvB,GAAA;AAAA;;;;KAMU,UAAA,GAAa,WAAA,GACvB,YAAA,CAAa,YAAA;EAOH;;;EAHR,MAAA,GAAS,YAAA;AAAA;AAAA,KAGD,kBAAA,IACV,GAAA,EAAK,YAAA,KACF,UAAA,GAAa,UAAA;AAAA,KACN,mBAAA,IACV,GAAA,EAAK,YAAA,KACF,OAAA,CAAQ,UAAA,GAAa,UAAA;AAAA,KACd,YAAA,IACV,GAAA,EAAK,YAAA,KACF,UAAA,GAAa,UAAA,KAAe,OAAA,CAAQ,UAAA,GAAa,UAAA;AAAA,KAE1C,gBAAA,GACR,UAAA,GACA,UAAA,KACA,OAAA,CAAQ,UAAA,GAAa,UAAA,MACrB,kBAAA,GACA,mBAAA,GACA,YAAA;AAAA,KAEQ,aAAA,GAAgB,IAAI,CAC9B,eAAA;;;;KAOU,cAAA,GAAiB,0BAAA,GAC3B,yBAAA,GACA,0BAAA,GACA,0BAAA,GACA,QAAA,CAAS,IAAA,CAAK,OAAA;EA3BJ;;;;;;;;;;EAsCR,GAAA,EAAK,MAAA;EApCJ;;;EAyCD,IAAA,EAAM,WAAA;EAzC0B;AACpC;;EA6CI,oBAAA;EA5CG;;;EAiDH,UAAA,EAAY,UAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.cjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;KA4BY,OAAA,yBAAgC,cAAA,GAAiB,cAAA,IAC3D,mBAAA,CAAoB,eAAA,IAClB,kBAAA,CAAmB,eAAA,IACnB,mBAAA,CAAoB,eAAA;;AAHxB;;EAOM,YAAA;EAPsC;;;EAYtC,aAAA,EAAe,aAAA;EAVE;;;EAejB,MAAA,EAAQ,aAAA;EALO;;;EAUf,QAAA,EAAU,MAAA,SAAe,WAAA;AAAA;AAAA,KAGnB,gBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,kBAAA,CAA2B,eAAA;AAAA,KAEnB,iBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,mBAAA,CAA4B,eAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.mjs","names":[],"sources":[],"mappings":""}
@@ -1,53 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- //#region src/types/env.ts
4
- const __ΩShellShockEnv = [
5
- "PATHEXT",
6
- "The system PATHEXT variable, used to determine which file extensions are considered executable on Windows.",
7
- {
8
- hidden: true,
9
- internal: true,
10
- runtime: true
11
- },
12
- "PATH",
13
- "The system PATH variable, used to locate executable files.",
14
- {
15
- hidden: true,
16
- internal: true,
17
- runtime: true
18
- },
19
- "npm_config_user_agent",
20
- "The npm user agent string, which can be used to detect if the environment is running within an npm script.",
21
- {
22
- hidden: true,
23
- internal: true,
24
- runtime: true
25
- },
26
- "npm_config_fund",
27
- "The npm_config_fund environment variable, which can be used to control npm's funding behavior.",
28
- {
29
- hidden: true,
30
- internal: true,
31
- runtime: true
32
- },
33
- "npm_execpath",
34
- "The npm execution path, which can be used to determine the location of the npm executable.",
35
- {
36
- hidden: true,
37
- internal: true,
38
- runtime: true
39
- },
40
- "COMSPEC",
41
- "The COMSPEC environment variable, which specifies the command-line interpreter to use on Windows.",
42
- {
43
- hidden: true,
44
- internal: true,
45
- runtime: true
46
- },
47
- "ShellShockEnv",
48
- "P!&4!8?\"z#&4$8?%z&&4'8?(z)&4*8?+z,&4-8?.z/&408?1z2Mw3y"
49
- ];
50
-
51
- //#endregion
52
- exports.__ΩShellShockEnv = __ΩShellShockEnv;
53
- //# sourceMappingURL=env.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.cjs","names":[],"sources":[],"mappings":""}
@@ -1,71 +0,0 @@
1
- import { EnvInterface } from "@powerlines/plugin-env/types/env";
2
-
3
- //#region src/types/env.d.ts
4
- interface ShellShockEnv extends EnvInterface {
5
- /**
6
- * The system PATHEXT variable, used to determine which file extensions are considered executable on Windows.
7
- *
8
- * @remarks
9
- * If not provided, it will default to '.EXE;.CMD;.BAT;.COM' on Windows, and will be ignored on other platforms. This variable is used to locate executable files when running commands, and is only relevant on Windows platforms. On non-Windows platforms, the system's executable file resolution will be used, and this variable will have no effect.
10
- *
11
- * @hidden
12
- * @runtime
13
- * @internal
14
- */
15
- PATHEXT?: string;
16
- /**
17
- * The system PATH variable, used to locate executable files.
18
- *
19
- * @hidden
20
- * @runtime
21
- * @internal
22
- */
23
- PATH?: string;
24
- /**
25
- * The npm user agent string, which can be used to detect if the environment is running within an npm script.
26
- *
27
- * @remarks
28
- * This variable is set by npm when running scripts defined in package.json. It can be used to conditionally adjust behavior when running within an npm script context, such as modifying logging output or adjusting command execution. If this variable is not set, it can be assumed that the environment is not running within an npm script.
29
- *
30
- * @hidden
31
- * @runtime
32
- * @internal
33
- */
34
- npm_config_user_agent?: string;
35
- /**
36
- * The npm_config_fund environment variable, which can be used to control npm's funding behavior.
37
- *
38
- * @remarks
39
- * This variable is set by npm when running scripts defined in package.json, and can be used to control npm's funding behavior. If set to 'false', it will disable npm's funding messages. If not set, npm will use its default funding behavior. This variable is only relevant when running within an npm script context, and has no effect on command execution or behavior outside of that context.
40
- *
41
- * @hidden
42
- * @runtime
43
- * @internal
44
- */
45
- npm_config_fund?: string;
46
- /**
47
- * The npm execution path, which can be used to determine the location of the npm executable.
48
- *
49
- * @remarks
50
- * This variable is set by npm when running scripts defined in package.json. It provides the absolute path to the npm executable being used to run the script. This can be useful for resolving the location of npm or for debugging purposes. If this variable is not set, it may indicate that the environment is not running within an npm script context, or that npm is not available in the PATH.
51
- *
52
- * @hidden
53
- * @runtime
54
- * @internal
55
- */
56
- npm_execpath?: string;
57
- /**
58
- * The COMSPEC environment variable, which specifies the command-line interpreter to use on Windows.
59
- *
60
- * @remarks
61
- * This variable is used on Windows platforms to determine which command-line interpreter to use when executing commands. It typically points to cmd.exe, but can be customized by the user. If this variable is not set on Windows, it will default to 'cmd.exe'. On non-Windows platforms, this variable is ignored and has no effect on command execution.
62
- *
63
- * @hidden
64
- * @runtime
65
- * @internal
66
- */
67
- COMSPEC?: string;
68
- }
69
- //#endregion
70
- export { ShellShockEnv };
71
- //# sourceMappingURL=env.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.cts","names":[],"sources":["../../src/types/env.ts"],"mappings":";;;UAqBiB,aAAA,SAAsB,YAAY;;AAAnD;;;;;;;;;EAWE,OAAA;EAyDA;;AAAO;;;;;EAhDP,IAAA;;;;;;;;;;;EAYA,qBAAA;;;;;;;;;;;EAYA,eAAA;;;;;;;;;;;EAYA,YAAA;;;;;;;;;;;EAYA,OAAA;AAAA"}