@shell-shock/preset-script 0.6.23 → 0.6.27

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 (143) hide show
  1. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
  2. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  3. package/dist/components/banner-function-declaration.cjs +28 -27
  4. package/dist/components/banner-function-declaration.cjs.map +1 -1
  5. package/dist/components/banner-function-declaration.d.cts.map +1 -1
  6. package/dist/components/banner-function-declaration.d.mts.map +1 -1
  7. package/dist/components/banner-function-declaration.mjs +2 -2
  8. package/dist/components/banner-function-declaration.mjs.map +1 -1
  9. package/dist/components/bin-entry.cjs +54 -45
  10. package/dist/components/bin-entry.cjs.map +1 -1
  11. package/dist/components/bin-entry.d.cts +0 -1
  12. package/dist/components/bin-entry.d.cts.map +1 -1
  13. package/dist/components/bin-entry.d.mts +0 -1
  14. package/dist/components/bin-entry.d.mts.map +1 -1
  15. package/dist/components/bin-entry.mjs +17 -9
  16. package/dist/components/bin-entry.mjs.map +1 -1
  17. package/dist/components/command-entry.cjs +76 -235
  18. package/dist/components/command-entry.cjs.map +1 -1
  19. package/dist/components/command-entry.d.cts +1 -8
  20. package/dist/components/command-entry.d.cts.map +1 -1
  21. package/dist/components/command-entry.d.mts +2 -9
  22. package/dist/components/command-entry.d.mts.map +1 -1
  23. package/dist/components/command-entry.mjs +24 -183
  24. package/dist/components/command-entry.mjs.map +1 -1
  25. package/dist/components/command-router.cjs +85 -83
  26. package/dist/components/command-router.cjs.map +1 -1
  27. package/dist/components/command-router.d.cts.map +1 -1
  28. package/dist/components/command-router.d.mts.map +1 -1
  29. package/dist/components/command-router.mjs +59 -58
  30. package/dist/components/command-router.mjs.map +1 -1
  31. package/dist/components/exit-function-declaration.cjs +38 -37
  32. package/dist/components/exit-function-declaration.cjs.map +1 -1
  33. package/dist/components/exit-function-declaration.d.cts +2 -2
  34. package/dist/components/exit-function-declaration.d.cts.map +1 -1
  35. package/dist/components/exit-function-declaration.d.mts +2 -2
  36. package/dist/components/exit-function-declaration.d.mts.map +1 -1
  37. package/dist/components/exit-function-declaration.mjs +3 -3
  38. package/dist/components/exit-function-declaration.mjs.map +1 -1
  39. package/dist/components/index.cjs +2 -9
  40. package/dist/components/index.d.cts +2 -3
  41. package/dist/components/index.d.mts +2 -3
  42. package/dist/components/index.mjs +2 -3
  43. package/dist/components/virtual-command-entry.cjs +43 -59
  44. package/dist/components/virtual-command-entry.cjs.map +1 -1
  45. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  46. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  47. package/dist/components/virtual-command-entry.mjs +13 -30
  48. package/dist/components/virtual-command-entry.mjs.map +1 -1
  49. package/dist/helpers/get-default-options.cjs +8 -7
  50. package/dist/helpers/get-default-options.cjs.map +1 -1
  51. package/dist/helpers/get-default-options.d.cts +0 -1
  52. package/dist/helpers/get-default-options.d.cts.map +1 -1
  53. package/dist/helpers/get-default-options.d.mts +0 -1
  54. package/dist/helpers/get-default-options.d.mts.map +1 -1
  55. package/dist/helpers/get-default-options.mjs.map +1 -1
  56. package/dist/index.cjs +30 -42
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.d.cts +0 -1
  59. package/dist/index.d.cts.map +1 -1
  60. package/dist/index.d.mts +0 -1
  61. package/dist/index.d.mts.map +1 -1
  62. package/dist/index.mjs +8 -20
  63. package/dist/index.mjs.map +1 -1
  64. package/dist/plugin-help/dist/components/display.cjs +260 -0
  65. package/dist/plugin-help/dist/components/display.cjs.map +1 -0
  66. package/dist/{components/help.mjs → plugin-help/dist/components/display.mjs} +26 -30
  67. package/dist/plugin-help/dist/components/display.mjs.map +1 -0
  68. package/dist/plugin-help/dist/components/help-builtin.cjs +86 -0
  69. package/dist/plugin-help/dist/components/help-builtin.cjs.map +1 -0
  70. package/dist/plugin-help/dist/components/help-builtin.mjs +84 -0
  71. package/dist/plugin-help/dist/components/help-builtin.mjs.map +1 -0
  72. package/dist/plugin-help/dist/components/help-command.cjs +97 -0
  73. package/dist/plugin-help/dist/components/help-command.cjs.map +1 -0
  74. package/dist/plugin-help/dist/components/help-command.mjs +96 -0
  75. package/dist/plugin-help/dist/components/help-command.mjs.map +1 -0
  76. package/dist/plugin-help/dist/components/index.cjs +3 -0
  77. package/dist/plugin-help/dist/components/index.mjs +5 -0
  78. package/dist/plugin-help/dist/index.cjs +104 -0
  79. package/dist/plugin-help/dist/index.cjs.map +1 -0
  80. package/dist/plugin-help/dist/index.d.cts +2 -0
  81. package/dist/plugin-help/dist/index.d.mts +2 -0
  82. package/dist/plugin-help/dist/index.mjs +100 -0
  83. package/dist/plugin-help/dist/index.mjs.map +1 -0
  84. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.cjs +18 -0
  85. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.cjs.map +1 -0
  86. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs +17 -0
  87. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs.map +1 -0
  88. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.cjs +39 -0
  89. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.cjs.map +1 -0
  90. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs +38 -0
  91. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs.map +1 -0
  92. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.cjs +34 -0
  93. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.cjs.map +1 -0
  94. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs +34 -0
  95. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs.map +1 -0
  96. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.cjs +41 -0
  97. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.cjs.map +1 -0
  98. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.mjs +41 -0
  99. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.mjs.map +1 -0
  100. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.cjs +18 -0
  101. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.cjs.map +1 -0
  102. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.mjs +17 -0
  103. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.mjs.map +1 -0
  104. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.cjs +21 -0
  105. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.cjs.map +1 -0
  106. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.mjs +21 -0
  107. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +1 -0
  108. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.cjs +13 -0
  109. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.cjs.map +1 -0
  110. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs +12 -0
  111. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.mjs.map +1 -0
  112. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.cjs +21 -0
  113. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.cjs.map +1 -0
  114. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs +21 -0
  115. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +1 -0
  116. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.cjs +20 -0
  117. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.cjs.map +1 -0
  118. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs +20 -0
  119. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.mjs.map +1 -0
  120. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.cjs +13 -0
  121. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.cjs.map +1 -0
  122. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs +12 -0
  123. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.mjs.map +1 -0
  124. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.cjs +9 -0
  125. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.cjs.map +1 -0
  126. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs +8 -0
  127. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +1 -0
  128. package/dist/plugin-help/dist/types/plugin.d.cts +62 -0
  129. package/dist/plugin-help/dist/types/plugin.d.cts.map +1 -0
  130. package/dist/plugin-help/dist/types/plugin.d.mts +62 -0
  131. package/dist/plugin-help/dist/types/plugin.d.mts.map +1 -0
  132. package/dist/types/plugin.d.cts +9 -9
  133. package/dist/types/plugin.d.cts.map +1 -1
  134. package/dist/types/plugin.d.mts +9 -9
  135. package/dist/types/plugin.d.mts.map +1 -1
  136. package/package.json +15 -29
  137. package/dist/components/help.cjs +0 -264
  138. package/dist/components/help.cjs.map +0 -1
  139. package/dist/components/help.d.cts +0 -105
  140. package/dist/components/help.d.cts.map +0 -1
  141. package/dist/components/help.d.mts +0 -105
  142. package/dist/components/help.d.mts.map +0 -1
  143. package/dist/components/help.mjs.map +0 -1
@@ -0,0 +1,96 @@
1
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { code } from "@alloy-js/core";
3
+ import { FunctionDeclaration, InterfaceDeclaration } from "@alloy-js/typescript";
4
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
5
+ import { InterfaceMember as InterfaceMember$1, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
6
+ import { joinPaths } from "@stryke/path";
7
+ import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
8
+ import { Spacing } from "@powerlines/plugin-alloy/core";
9
+ import { TSDoc, TSDocDefaultValue, TSDocRemarks } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
10
+
11
+ //#region ../plugin-help/dist/components/help-command.mjs
12
+ /**
13
+ * The Help command's handler wrapper for the Shell Shock project.
14
+ */
15
+ function HelpCommand() {
16
+ const context = usePowerlines();
17
+ return createComponent(TypescriptFile, {
18
+ get path() {
19
+ return joinPaths(context.entryPath, "help", "command.ts");
20
+ },
21
+ imports: {
22
+ "node:os": ["os"],
23
+ "node:fs/promises": ["readFile", "writeFile"]
24
+ },
25
+ builtinImports: { console: [
26
+ "colors",
27
+ "writeLine",
28
+ "success",
29
+ "warn",
30
+ "stripAnsi"
31
+ ] },
32
+ get children() {
33
+ return [
34
+ createComponent(TSDoc, { heading: "Options for the Help command." }),
35
+ createComponent(InterfaceDeclaration, {
36
+ "export": true,
37
+ name: "HelpOptions",
38
+ get children() {
39
+ return [
40
+ createComponent(TSDoc, {
41
+ heading: "Whether to help to the latest version.",
42
+ get children() {
43
+ return [createComponent(TSDocRemarks, { children: `If set to \`true\`, the command will attempt to help to the latest version. This option takes precedence over the \`version\` option.` }), createComponent(TSDocDefaultValue, {
44
+ get type() {
45
+ return ReflectionKind.boolean;
46
+ },
47
+ defaultValue: false
48
+ })];
49
+ }
50
+ }),
51
+ createComponent(InterfaceMember$1, {
52
+ name: "latest",
53
+ optional: true,
54
+ type: "boolean"
55
+ }),
56
+ createComponent(Spacing, {}),
57
+ createComponent(TSDoc, {
58
+ heading: "A specific application version to help to.",
59
+ get children() {
60
+ return [createComponent(TSDocRemarks, { children: `The command will attempt to help to the specified version. The version should be a valid semantic version string, or \`latest\` to help to the latest version.` }), createComponent(TSDocDefaultValue, {
61
+ get type() {
62
+ return ReflectionKind.string;
63
+ },
64
+ defaultValue: "latest"
65
+ })];
66
+ }
67
+ }),
68
+ createComponent(InterfaceMember$1, {
69
+ name: "version",
70
+ optional: true,
71
+ type: "string"
72
+ })
73
+ ];
74
+ }
75
+ }),
76
+ createComponent(Spacing, {}),
77
+ createComponent(TSDoc, { heading: "Handler logic for the \\`help\\` command." }),
78
+ createComponent(FunctionDeclaration, {
79
+ "export": true,
80
+ "default": true,
81
+ async: true,
82
+ name: "handler",
83
+ parameters: [{
84
+ name: "options",
85
+ type: "HelpOptions"
86
+ }],
87
+ children: code` return;`
88
+ })
89
+ ];
90
+ }
91
+ });
92
+ }
93
+
94
+ //#endregion
95
+ export { HelpCommand };
96
+ //# sourceMappingURL=help-command.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-command.mjs","names":["TSDoc$1","TSDocRemarks$1","InterfaceMember"],"sources":["../../../../../plugin-help/dist/components/help-command.mjs"],"sourcesContent":["import { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { code } from \"@alloy-js/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { FunctionDeclaration, InterfaceDeclaration } from \"@alloy-js/typescript\";\nimport { InterfaceMember, TypescriptFile } from \"@powerlines/plugin-alloy/typescript\";\nimport { joinPaths } from \"@stryke/path\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { TSDoc as TSDoc$1, TSDocDefaultValue, TSDocRemarks as TSDocRemarks$1 } from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\n\n//#region src/components/help-command.tsx\n/**\n* The Help command's handler wrapper for the Shell Shock project.\n*/\nfunction HelpCommand() {\n\tconst context = usePowerlines();\n\treturn createComponent(TypescriptFile, {\n\t\tget path() {\n\t\t\treturn joinPaths(context.entryPath, \"help\", \"command.ts\");\n\t\t},\n\t\timports: {\n\t\t\t\"node:os\": [\"os\"],\n\t\t\t\"node:fs/promises\": [\"readFile\", \"writeFile\"]\n\t\t},\n\t\tbuiltinImports: { console: [\n\t\t\t\"colors\",\n\t\t\t\"writeLine\",\n\t\t\t\"success\",\n\t\t\t\"warn\",\n\t\t\t\"stripAnsi\"\n\t\t] },\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDoc$1, { heading: \"Options for the Help command.\" }),\n\t\t\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\tname: \"HelpOptions\",\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tcreateComponent(TSDoc$1, {\n\t\t\t\t\t\t\t\theading: \"Whether to help to the latest version.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn [createComponent(TSDocRemarks$1, { children: `If set to \\`true\\`, the command will attempt to help to the latest version. This option takes precedence over the \\`version\\` option.` }), createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.boolean;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: false\n\t\t\t\t\t\t\t\t\t})];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"latest\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"boolean\"\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\tcreateComponent(TSDoc$1, {\n\t\t\t\t\t\t\t\theading: \"A specific application version to help to.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn [createComponent(TSDocRemarks$1, { children: `The command will attempt to help to the specified version. The version should be a valid semantic version string, or \\`latest\\` to help to the latest version.` }), createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.string;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: \"latest\"\n\t\t\t\t\t\t\t\t\t})];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"version\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"string\"\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDoc$1, { heading: \"Handler logic for the \\\\`help\\\\` command.\" }),\n\t\t\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\tasync: true,\n\t\t\t\t\tname: \"handler\",\n\t\t\t\t\tparameters: [{\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\ttype: \"HelpOptions\"\n\t\t\t\t\t}],\n\t\t\t\t\tchildren: code` return;`\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t});\n}\n\n//#endregion\nexport { HelpCommand };\n//# sourceMappingURL=help-command.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,cAAc;CACtB,MAAM,UAAU,eAAe;AAC/B,QAAO,gBAAgB,gBAAgB;EACtC,IAAI,OAAO;AACV,UAAO,UAAU,QAAQ,WAAW,QAAQ,aAAa;;EAE1D,SAAS;GACR,WAAW,CAAC,KAAK;GACjB,oBAAoB,CAAC,YAAY,YAAY;GAC7C;EACD,gBAAgB,EAAE,SAAS;GAC1B;GACA;GACA;GACA;GACA;GACA,EAAE;EACH,IAAI,WAAW;AACd,UAAO;IACN,gBAAgBA,OAAS,EAAE,SAAS,iCAAiC,CAAC;IACtE,gBAAgB,sBAAsB;KACrC,UAAU;KACV,MAAM;KACN,IAAI,WAAW;AACd,aAAO;OACN,gBAAgBA,OAAS;QACxB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,CAAC,gBAAgBC,cAAgB,EAAE,UAAU,yIAAyI,CAAC,EAAE,gBAAgB,mBAAmB;UAClO,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC,CAAC;;QAEJ,CAAC;OACF,gBAAgBC,mBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF,gBAAgB,SAAS,EAAE,CAAC;OAC5B,gBAAgBF,OAAS;QACxB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,CAAC,gBAAgBC,cAAgB,EAAE,UAAU,kKAAkK,CAAC,EAAE,gBAAgB,mBAAmB;UAC3P,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC,CAAC;;QAEJ,CAAC;OACF,gBAAgBC,mBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF;;KAEF,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgBF,OAAS,EAAE,SAAS,6CAA6C,CAAC;IAClF,gBAAgB,qBAAqB;KACpC,UAAU;KACV,WAAW;KACX,OAAO;KACP,MAAM;KACN,YAAY,CAAC;MACZ,MAAM;MACN,MAAM;MACN,CAAC;KACF,UAAU,IAAI;KACd,CAAC;IACF;;EAEF,CAAC"}
@@ -0,0 +1,3 @@
1
+ const require_display = require('./display.cjs');
2
+ const require_help_builtin = require('./help-builtin.cjs');
3
+ const require_help_command = require('./help-command.cjs');
@@ -0,0 +1,5 @@
1
+ import { BaseHelpDisplay, CommandHelpDisplay, HelpCommandsDisplay, HelpOptionsDisplay, HelpUsageDisplay, VirtualCommandHelpDisplay } from "./display.mjs";
2
+ import { HelpBuiltin } from "./help-builtin.mjs";
3
+ import { HelpCommand } from "./help-command.mjs";
4
+
5
+ export { };
@@ -0,0 +1,104 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_is_set_string = require('./node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.cjs');
3
+ const require_help_builtin = require('./components/help-builtin.cjs');
4
+ const require_help_command = require('./components/help-command.cjs');
5
+ require('./components/index.cjs');
6
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
+ let _alloy_js_core = require("@alloy-js/core");
8
+ let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
9
+ let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
10
+ let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
11
+ _shell_shock_plugin_console = require_runtime.__toESM(_shell_shock_plugin_console);
12
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
13
+ let defu = require("defu");
14
+ defu = require_runtime.__toESM(defu);
15
+ let _shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
16
+ _shell_shock_plugin_theme = require_runtime.__toESM(_shell_shock_plugin_theme);
17
+ let _stryke_path_join = require("@stryke/path/join");
18
+
19
+ //#region ../plugin-help/dist/index.mjs
20
+ /**
21
+ * The Help - Shell Shock plugin to add a help command to the application.
22
+ */
23
+ const plugin = (options = {}) => {
24
+ return [
25
+ ...(0, _shell_shock_plugin_theme.default)(options.theme),
26
+ (0, _shell_shock_plugin_console.default)(options.console),
27
+ {
28
+ name: "shell-shock:help",
29
+ enforce: "post",
30
+ config() {
31
+ this.debug("Providing default configuration for the Shell Shock `help` plugin.");
32
+ return { help: (0, defu.default)({ command: options.command === false ? false : require_is_set_string.isSetString(options.command) ? options.command : "help" }, options, { builtins: true }) };
33
+ },
34
+ async configResolved() {
35
+ this.debug("Adding the Help command to the application context.");
36
+ if (this.config.help.command !== false) {
37
+ this.inputs ??= [];
38
+ if (this.inputs.some((input) => input.name === this.config.help.command)) this.info("The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.");
39
+ else this.inputs.push({
40
+ id: this.config.help.command,
41
+ name: this.config.help.command,
42
+ path: this.config.help.command,
43
+ segments: [this.config.help.command],
44
+ title: "Help",
45
+ description: `A command for displaying help information to assist in using the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this, true)} command-line interface application.`,
46
+ entry: {
47
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "help", "index.ts"),
48
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "help", "command.ts") }
49
+ },
50
+ isVirtual: false
51
+ });
52
+ await (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_help_command.HelpCommand, {}));
53
+ }
54
+ },
55
+ prepare: {
56
+ order: "post",
57
+ async handler() {
58
+ const _self$ = this;
59
+ const commands = await (0, _shell_shock_core_plugin_utils.getCommandList)(this);
60
+ this.debug(`Rendering \`help\` built-ins for each of the ${commands.length} command modules.`);
61
+ const bin = (0, _alloy_js_core.computed)(() => ({
62
+ id: "",
63
+ name: (0, _shell_shock_core_plugin_utils.getAppName)(this),
64
+ title: (0, _shell_shock_core_plugin_utils.getAppTitle)(this),
65
+ description: (0, _shell_shock_core_plugin_utils.getAppDescription)(this),
66
+ isVirtual: true,
67
+ path: null,
68
+ segments: [],
69
+ alias: [],
70
+ options: Object.fromEntries(this.options.map((option) => [option.name, option])),
71
+ entry: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "bin.ts") },
72
+ args: [],
73
+ parent: null,
74
+ children: this.commands
75
+ }));
76
+ return (0, _powerlines_plugin_alloy_render.render)(this, [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
77
+ get when() {
78
+ return _self$.config.help.builtins !== false;
79
+ },
80
+ get children() {
81
+ return [
82
+ (0, _alloy_js_core_jsx_runtime.createComponent)(require_help_builtin.HelpBuiltin, { get command() {
83
+ return bin.value;
84
+ } }),
85
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components.Spacing, {}),
86
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
87
+ get each() {
88
+ return commands.sort((a, b) => a.name.localeCompare(b.name));
89
+ },
90
+ doubleHardline: true,
91
+ children: (command) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_help_builtin.HelpBuiltin, { command })
92
+ })
93
+ ];
94
+ }
95
+ })]);
96
+ }
97
+ }
98
+ }
99
+ ];
100
+ };
101
+
102
+ //#endregion
103
+ exports.plugin = plugin;
104
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["isSetString","HelpCommand","Show","HelpBuiltin","Spacing","For"],"sources":["../../../../plugin-help/dist/index.mjs"],"sourcesContent":["import { isSetString } from \"./node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs\";\nimport { HelpBuiltin } from \"./components/help-builtin.mjs\";\nimport { HelpCommand } from \"./components/help-command.mjs\";\nimport \"./components/index.mjs\";\nimport { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, computed } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppDescription, getAppName, getAppTitle, getCommandList } from \"@shell-shock/core/plugin-utils\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport defu from \"defu\";\n\n//#region src/index.tsx\n/**\n* The Help - Shell Shock plugin to add a help command to the application.\n*/\nconst plugin = (options = {}) => {\n\treturn [\n\t\t...theme(options.theme),\n\t\tconsole(options.console),\n\t\t{\n\t\t\tname: \"shell-shock:help\",\n\t\t\tenforce: \"post\",\n\t\t\tconfig() {\n\t\t\t\tthis.debug(\"Providing default configuration for the Shell Shock `help` plugin.\");\n\t\t\t\treturn { help: defu({ command: options.command === false ? false : isSetString(options.command) ? options.command : \"help\" }, options, { builtins: true }) };\n\t\t\t},\n\t\t\tasync configResolved() {\n\t\t\t\tthis.debug(\"Adding the Help command to the application context.\");\n\t\t\t\tif (this.config.help.command !== false) {\n\t\t\t\t\tthis.inputs ??= [];\n\t\t\t\t\tif (this.inputs.some((input) => input.name === this.config.help.command)) this.info(\"The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.\");\n\t\t\t\t\telse this.inputs.push({\n\t\t\t\t\t\tid: this.config.help.command,\n\t\t\t\t\t\tname: this.config.help.command,\n\t\t\t\t\t\tpath: this.config.help.command,\n\t\t\t\t\t\tsegments: [this.config.help.command],\n\t\t\t\t\t\ttitle: \"Help\",\n\t\t\t\t\t\tdescription: `A command for displaying help information to assist in using the ${getAppTitle(this, true)} command-line interface application.`,\n\t\t\t\t\t\tentry: {\n\t\t\t\t\t\t\tfile: joinPaths(this.entryPath, \"help\", \"index.ts\"),\n\t\t\t\t\t\t\tinput: { file: joinPaths(this.entryPath, \"help\", \"command.ts\") }\n\t\t\t\t\t\t},\n\t\t\t\t\t\tisVirtual: false\n\t\t\t\t\t});\n\t\t\t\t\tawait render(this, createComponent(HelpCommand, {}));\n\t\t\t\t}\n\t\t\t},\n\t\t\tprepare: {\n\t\t\t\torder: \"post\",\n\t\t\t\tasync handler() {\n\t\t\t\t\tconst _self$ = this;\n\t\t\t\t\tconst commands = await getCommandList(this);\n\t\t\t\t\tthis.debug(`Rendering \\`help\\` built-ins for each of the ${commands.length} command modules.`);\n\t\t\t\t\tconst bin = computed(() => ({\n\t\t\t\t\t\tid: \"\",\n\t\t\t\t\t\tname: getAppName(this),\n\t\t\t\t\t\ttitle: getAppTitle(this),\n\t\t\t\t\t\tdescription: getAppDescription(this),\n\t\t\t\t\t\tisVirtual: true,\n\t\t\t\t\t\tpath: null,\n\t\t\t\t\t\tsegments: [],\n\t\t\t\t\t\talias: [],\n\t\t\t\t\t\toptions: Object.fromEntries(this.options.map((option) => [option.name, option])),\n\t\t\t\t\t\tentry: { file: joinPaths(this.entryPath, \"bin.ts\") },\n\t\t\t\t\t\targs: [],\n\t\t\t\t\t\tparent: null,\n\t\t\t\t\t\tchildren: this.commands\n\t\t\t\t\t}));\n\t\t\t\t\treturn render(this, [createComponent(Show, {\n\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\treturn _self$.config.help.builtins !== false;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\tcreateComponent(HelpBuiltin, { get command() {\n\t\t\t\t\t\t\t\t\treturn bin.value;\n\t\t\t\t\t\t\t\t} }),\n\t\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\t\t\t\treturn commands.sort((a, b) => a.name.localeCompare(b.name));\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\t\t\t\tchildren: (command) => createComponent(HelpBuiltin, { command })\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t})]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t];\n};\n\n//#endregion\nexport { plugin as default, plugin };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,UAAU,UAAU,EAAE,KAAK;AAChC,QAAO;EACN,0CAAS,QAAQ,MAAM;2CACf,QAAQ,QAAQ;EACxB;GACC,MAAM;GACN,SAAS;GACT,SAAS;AACR,SAAK,MAAM,qEAAqE;AAChF,WAAO,EAAE,wBAAW,EAAE,SAAS,QAAQ,YAAY,QAAQ,QAAQA,kCAAY,QAAQ,QAAQ,GAAG,QAAQ,UAAU,QAAQ,EAAE,SAAS,EAAE,UAAU,MAAM,CAAC,EAAE;;GAE7J,MAAM,iBAAiB;AACtB,SAAK,MAAM,sDAAsD;AACjE,QAAI,KAAK,OAAO,KAAK,YAAY,OAAO;AACvC,UAAK,WAAW,EAAE;AAClB,SAAI,KAAK,OAAO,MAAM,UAAU,MAAM,SAAS,KAAK,OAAO,KAAK,QAAQ,CAAE,MAAK,KAAK,2LAA2L;SAC1Q,MAAK,OAAO,KAAK;MACrB,IAAI,KAAK,OAAO,KAAK;MACrB,MAAM,KAAK,OAAO,KAAK;MACvB,MAAM,KAAK,OAAO,KAAK;MACvB,UAAU,CAAC,KAAK,OAAO,KAAK,QAAQ;MACpC,OAAO;MACP,aAAa,oHAAgF,MAAM,KAAK,CAAC;MACzG,OAAO;OACN,uCAAgB,KAAK,WAAW,QAAQ,WAAW;OACnD,OAAO,EAAE,uCAAgB,KAAK,WAAW,QAAQ,aAAa,EAAE;OAChE;MACD,WAAW;MACX,CAAC;AACF,uDAAa,sDAAsBC,kCAAa,EAAE,CAAC,CAAC;;;GAGtD,SAAS;IACR,OAAO;IACP,MAAM,UAAU;KACf,MAAM,SAAS;KACf,MAAM,WAAW,yDAAqB,KAAK;AAC3C,UAAK,MAAM,gDAAgD,SAAS,OAAO,mBAAmB;KAC9F,MAAM,0CAAsB;MAC3B,IAAI;MACJ,qDAAiB,KAAK;MACtB,uDAAmB,KAAK;MACxB,mEAA+B,KAAK;MACpC,WAAW;MACX,MAAM;MACN,UAAU,EAAE;MACZ,OAAO,EAAE;MACT,SAAS,OAAO,YAAY,KAAK,QAAQ,KAAK,WAAW,CAAC,OAAO,MAAM,OAAO,CAAC,CAAC;MAChF,OAAO,EAAE,uCAAgB,KAAK,WAAW,SAAS,EAAE;MACpD,MAAM,EAAE;MACR,QAAQ;MACR,UAAU,KAAK;MACf,EAAE;AACH,wDAAc,MAAM,iDAAiBC,qBAAM;MAC1C,IAAI,OAAO;AACV,cAAO,OAAO,OAAO,KAAK,aAAa;;MAExC,IAAI,WAAW;AACd,cAAO;wDACUC,kCAAa,EAAE,IAAI,UAAU;AAC5C,gBAAO,IAAI;WACT,CAAC;wDACYC,kDAAS,EAAE,CAAC;wDACZC,oBAAK;SACpB,IAAI,OAAO;AACV,iBAAO,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,CAAC;;SAE7D,gBAAgB;SAChB,WAAW,4DAA4BF,kCAAa,EAAE,SAAS,CAAC;SAChE,CAAC;QACF;;MAEF,CAAC,CAAC,CAAC;;IAEL;GACD;EACD"}
@@ -0,0 +1,2 @@
1
+ import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "./types/plugin.cjs";
2
+ import { Plugin } from "powerlines";
@@ -0,0 +1,2 @@
1
+ import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "./types/plugin.mjs";
2
+ import { Plugin } from "powerlines";
@@ -0,0 +1,100 @@
1
+ import { isSetString } from "./node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs";
2
+ import { HelpBuiltin } from "./components/help-builtin.mjs";
3
+ import { HelpCommand } from "./components/help-command.mjs";
4
+ import "./components/index.mjs";
5
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
6
+ import { For, Show, computed } from "@alloy-js/core";
7
+ import { Spacing } from "@powerlines/plugin-alloy/core/components";
8
+ import { render } from "@powerlines/plugin-alloy/render";
9
+ import console from "@shell-shock/plugin-console";
10
+ import { getAppDescription, getAppName, getAppTitle, getCommandList } from "@shell-shock/core/plugin-utils";
11
+ import defu from "defu";
12
+ import theme from "@shell-shock/plugin-theme";
13
+ import { joinPaths } from "@stryke/path/join";
14
+
15
+ //#region ../plugin-help/dist/index.mjs
16
+ /**
17
+ * The Help - Shell Shock plugin to add a help command to the application.
18
+ */
19
+ const plugin = (options = {}) => {
20
+ return [
21
+ ...theme(options.theme),
22
+ console(options.console),
23
+ {
24
+ name: "shell-shock:help",
25
+ enforce: "post",
26
+ config() {
27
+ this.debug("Providing default configuration for the Shell Shock `help` plugin.");
28
+ return { help: defu({ command: options.command === false ? false : isSetString(options.command) ? options.command : "help" }, options, { builtins: true }) };
29
+ },
30
+ async configResolved() {
31
+ this.debug("Adding the Help command to the application context.");
32
+ if (this.config.help.command !== false) {
33
+ this.inputs ??= [];
34
+ if (this.inputs.some((input) => input.name === this.config.help.command)) this.info("The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.");
35
+ else this.inputs.push({
36
+ id: this.config.help.command,
37
+ name: this.config.help.command,
38
+ path: this.config.help.command,
39
+ segments: [this.config.help.command],
40
+ title: "Help",
41
+ description: `A command for displaying help information to assist in using the ${getAppTitle(this, true)} command-line interface application.`,
42
+ entry: {
43
+ file: joinPaths(this.entryPath, "help", "index.ts"),
44
+ input: { file: joinPaths(this.entryPath, "help", "command.ts") }
45
+ },
46
+ isVirtual: false
47
+ });
48
+ await render(this, createComponent(HelpCommand, {}));
49
+ }
50
+ },
51
+ prepare: {
52
+ order: "post",
53
+ async handler() {
54
+ const _self$ = this;
55
+ const commands = await getCommandList(this);
56
+ this.debug(`Rendering \`help\` built-ins for each of the ${commands.length} command modules.`);
57
+ const bin = computed(() => ({
58
+ id: "",
59
+ name: getAppName(this),
60
+ title: getAppTitle(this),
61
+ description: getAppDescription(this),
62
+ isVirtual: true,
63
+ path: null,
64
+ segments: [],
65
+ alias: [],
66
+ options: Object.fromEntries(this.options.map((option) => [option.name, option])),
67
+ entry: { file: joinPaths(this.entryPath, "bin.ts") },
68
+ args: [],
69
+ parent: null,
70
+ children: this.commands
71
+ }));
72
+ return render(this, [createComponent(Show, {
73
+ get when() {
74
+ return _self$.config.help.builtins !== false;
75
+ },
76
+ get children() {
77
+ return [
78
+ createComponent(HelpBuiltin, { get command() {
79
+ return bin.value;
80
+ } }),
81
+ createComponent(Spacing, {}),
82
+ createComponent(For, {
83
+ get each() {
84
+ return commands.sort((a, b) => a.name.localeCompare(b.name));
85
+ },
86
+ doubleHardline: true,
87
+ children: (command) => createComponent(HelpBuiltin, { command })
88
+ })
89
+ ];
90
+ }
91
+ })]);
92
+ }
93
+ }
94
+ }
95
+ ];
96
+ };
97
+
98
+ //#endregion
99
+ export { plugin };
100
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../plugin-help/dist/index.mjs"],"sourcesContent":["import { isSetString } from \"./node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.mjs\";\nimport { HelpBuiltin } from \"./components/help-builtin.mjs\";\nimport { HelpCommand } from \"./components/help-command.mjs\";\nimport \"./components/index.mjs\";\nimport { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { For, Show, computed } from \"@alloy-js/core\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppDescription, getAppName, getAppTitle, getCommandList } from \"@shell-shock/core/plugin-utils\";\nimport console from \"@shell-shock/plugin-console\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport defu from \"defu\";\n\n//#region src/index.tsx\n/**\n* The Help - Shell Shock plugin to add a help command to the application.\n*/\nconst plugin = (options = {}) => {\n\treturn [\n\t\t...theme(options.theme),\n\t\tconsole(options.console),\n\t\t{\n\t\t\tname: \"shell-shock:help\",\n\t\t\tenforce: \"post\",\n\t\t\tconfig() {\n\t\t\t\tthis.debug(\"Providing default configuration for the Shell Shock `help` plugin.\");\n\t\t\t\treturn { help: defu({ command: options.command === false ? false : isSetString(options.command) ? options.command : \"help\" }, options, { builtins: true }) };\n\t\t\t},\n\t\t\tasync configResolved() {\n\t\t\t\tthis.debug(\"Adding the Help command to the application context.\");\n\t\t\t\tif (this.config.help.command !== false) {\n\t\t\t\t\tthis.inputs ??= [];\n\t\t\t\t\tif (this.inputs.some((input) => input.name === this.config.help.command)) this.info(\"The `help` command already exists in the commands list. If you would like the help command to be managed by the `@shell-shock/plugin-help` package, please remove or rename the command.\");\n\t\t\t\t\telse this.inputs.push({\n\t\t\t\t\t\tid: this.config.help.command,\n\t\t\t\t\t\tname: this.config.help.command,\n\t\t\t\t\t\tpath: this.config.help.command,\n\t\t\t\t\t\tsegments: [this.config.help.command],\n\t\t\t\t\t\ttitle: \"Help\",\n\t\t\t\t\t\tdescription: `A command for displaying help information to assist in using the ${getAppTitle(this, true)} command-line interface application.`,\n\t\t\t\t\t\tentry: {\n\t\t\t\t\t\t\tfile: joinPaths(this.entryPath, \"help\", \"index.ts\"),\n\t\t\t\t\t\t\tinput: { file: joinPaths(this.entryPath, \"help\", \"command.ts\") }\n\t\t\t\t\t\t},\n\t\t\t\t\t\tisVirtual: false\n\t\t\t\t\t});\n\t\t\t\t\tawait render(this, createComponent(HelpCommand, {}));\n\t\t\t\t}\n\t\t\t},\n\t\t\tprepare: {\n\t\t\t\torder: \"post\",\n\t\t\t\tasync handler() {\n\t\t\t\t\tconst _self$ = this;\n\t\t\t\t\tconst commands = await getCommandList(this);\n\t\t\t\t\tthis.debug(`Rendering \\`help\\` built-ins for each of the ${commands.length} command modules.`);\n\t\t\t\t\tconst bin = computed(() => ({\n\t\t\t\t\t\tid: \"\",\n\t\t\t\t\t\tname: getAppName(this),\n\t\t\t\t\t\ttitle: getAppTitle(this),\n\t\t\t\t\t\tdescription: getAppDescription(this),\n\t\t\t\t\t\tisVirtual: true,\n\t\t\t\t\t\tpath: null,\n\t\t\t\t\t\tsegments: [],\n\t\t\t\t\t\talias: [],\n\t\t\t\t\t\toptions: Object.fromEntries(this.options.map((option) => [option.name, option])),\n\t\t\t\t\t\tentry: { file: joinPaths(this.entryPath, \"bin.ts\") },\n\t\t\t\t\t\targs: [],\n\t\t\t\t\t\tparent: null,\n\t\t\t\t\t\tchildren: this.commands\n\t\t\t\t\t}));\n\t\t\t\t\treturn render(this, [createComponent(Show, {\n\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\treturn _self$.config.help.builtins !== false;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\tcreateComponent(HelpBuiltin, { get command() {\n\t\t\t\t\t\t\t\t\treturn bin.value;\n\t\t\t\t\t\t\t\t} }),\n\t\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\t\tcreateComponent(For, {\n\t\t\t\t\t\t\t\t\tget each() {\n\t\t\t\t\t\t\t\t\t\treturn commands.sort((a, b) => a.name.localeCompare(b.name));\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdoubleHardline: true,\n\t\t\t\t\t\t\t\t\tchildren: (command) => createComponent(HelpBuiltin, { command })\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t})]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t];\n};\n\n//#endregion\nexport { plugin as default, plugin };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,UAAU,UAAU,EAAE,KAAK;AAChC,QAAO;EACN,GAAG,MAAM,QAAQ,MAAM;EACvB,QAAQ,QAAQ,QAAQ;EACxB;GACC,MAAM;GACN,SAAS;GACT,SAAS;AACR,SAAK,MAAM,qEAAqE;AAChF,WAAO,EAAE,MAAM,KAAK,EAAE,SAAS,QAAQ,YAAY,QAAQ,QAAQ,YAAY,QAAQ,QAAQ,GAAG,QAAQ,UAAU,QAAQ,EAAE,SAAS,EAAE,UAAU,MAAM,CAAC,EAAE;;GAE7J,MAAM,iBAAiB;AACtB,SAAK,MAAM,sDAAsD;AACjE,QAAI,KAAK,OAAO,KAAK,YAAY,OAAO;AACvC,UAAK,WAAW,EAAE;AAClB,SAAI,KAAK,OAAO,MAAM,UAAU,MAAM,SAAS,KAAK,OAAO,KAAK,QAAQ,CAAE,MAAK,KAAK,2LAA2L;SAC1Q,MAAK,OAAO,KAAK;MACrB,IAAI,KAAK,OAAO,KAAK;MACrB,MAAM,KAAK,OAAO,KAAK;MACvB,MAAM,KAAK,OAAO,KAAK;MACvB,UAAU,CAAC,KAAK,OAAO,KAAK,QAAQ;MACpC,OAAO;MACP,aAAa,oEAAoE,YAAY,MAAM,KAAK,CAAC;MACzG,OAAO;OACN,MAAM,UAAU,KAAK,WAAW,QAAQ,WAAW;OACnD,OAAO,EAAE,MAAM,UAAU,KAAK,WAAW,QAAQ,aAAa,EAAE;OAChE;MACD,WAAW;MACX,CAAC;AACF,WAAM,OAAO,MAAM,gBAAgB,aAAa,EAAE,CAAC,CAAC;;;GAGtD,SAAS;IACR,OAAO;IACP,MAAM,UAAU;KACf,MAAM,SAAS;KACf,MAAM,WAAW,MAAM,eAAe,KAAK;AAC3C,UAAK,MAAM,gDAAgD,SAAS,OAAO,mBAAmB;KAC9F,MAAM,MAAM,gBAAgB;MAC3B,IAAI;MACJ,MAAM,WAAW,KAAK;MACtB,OAAO,YAAY,KAAK;MACxB,aAAa,kBAAkB,KAAK;MACpC,WAAW;MACX,MAAM;MACN,UAAU,EAAE;MACZ,OAAO,EAAE;MACT,SAAS,OAAO,YAAY,KAAK,QAAQ,KAAK,WAAW,CAAC,OAAO,MAAM,OAAO,CAAC,CAAC;MAChF,OAAO,EAAE,MAAM,UAAU,KAAK,WAAW,SAAS,EAAE;MACpD,MAAM,EAAE;MACR,QAAQ;MACR,UAAU,KAAK;MACf,EAAE;AACH,YAAO,OAAO,MAAM,CAAC,gBAAgB,MAAM;MAC1C,IAAI,OAAO;AACV,cAAO,OAAO,OAAO,KAAK,aAAa;;MAExC,IAAI,WAAW;AACd,cAAO;QACN,gBAAgB,aAAa,EAAE,IAAI,UAAU;AAC5C,gBAAO,IAAI;WACT,CAAC;QACJ,gBAAgB,SAAS,EAAE,CAAC;QAC5B,gBAAgB,KAAK;SACpB,IAAI,OAAO;AACV,iBAAO,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,CAAC;;SAE7D,gBAAgB;SAChB,WAAW,YAAY,gBAAgB,aAAa,EAAE,SAAS,CAAC;SAChE,CAAC;QACF;;MAEF,CAAC,CAAC,CAAC;;IAEL;GACD;EACD"}
@@ -0,0 +1,18 @@
1
+
2
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs
3
+ /**
4
+ * Check if the input string is in constant case.
5
+ *
6
+ * @remarks
7
+ * Constant case is defined as all uppercase letters with underscores separating words - "THIS_IS_AN_EXAMPLE".
8
+ *
9
+ * @param input - The input string to check.
10
+ * @returns True if the input is in constant case, false otherwise.
11
+ */
12
+ function isConstantCase(input) {
13
+ return input ? /^[A-Z0-9_]+$/.test(input) : false;
14
+ }
15
+
16
+ //#endregion
17
+ exports.isConstantCase = isConstantCase;
18
+ //# sourceMappingURL=constant-case.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-case.cjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs\n/**\n* Check if the input string is in constant case.\n*\n* @remarks\n* Constant case is defined as all uppercase letters with underscores separating words - \"THIS_IS_AN_EXAMPLE\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in constant case, false otherwise.\n*/\nfunction isConstantCase(input) {\n\treturn input ? /^[A-Z0-9_]+$/.test(input) : false;\n}\n\n//#endregion\nexport { isConstantCase };\n//# sourceMappingURL=constant-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAUA,SAAS,eAAe,OAAO;AAC9B,QAAO,QAAQ,eAAe,KAAK,MAAM,GAAG"}
@@ -0,0 +1,17 @@
1
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs
2
+ /**
3
+ * Check if the input string is in constant case.
4
+ *
5
+ * @remarks
6
+ * Constant case is defined as all uppercase letters with underscores separating words - "THIS_IS_AN_EXAMPLE".
7
+ *
8
+ * @param input - The input string to check.
9
+ * @returns True if the input is in constant case, false otherwise.
10
+ */
11
+ function isConstantCase(input) {
12
+ return input ? /^[A-Z0-9_]+$/.test(input) : false;
13
+ }
14
+
15
+ //#endregion
16
+ export { isConstantCase };
17
+ //# sourceMappingURL=constant-case.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant-case.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.mjs\n/**\n* Check if the input string is in constant case.\n*\n* @remarks\n* Constant case is defined as all uppercase letters with underscores separating words - \"THIS_IS_AN_EXAMPLE\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in constant case, false otherwise.\n*/\nfunction isConstantCase(input) {\n\treturn input ? /^[A-Z0-9_]+$/.test(input) : false;\n}\n\n//#endregion\nexport { isConstantCase };\n//# sourceMappingURL=constant-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,SAAS,eAAe,OAAO;AAC9B,QAAO,QAAQ,eAAe,KAAK,MAAM,GAAG"}
@@ -0,0 +1,39 @@
1
+
2
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs
3
+ /**
4
+ * Regular expression pattern to split strings into words for various case conversions
5
+ *
6
+ * This pattern matches sequences of characters in a string, considering the following case:
7
+ * - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
8
+ * - Sequences of one uppercase letter optionally followed by lowercase letters and digits
9
+ * - Single uppercase letters
10
+ * - Sequences of digits
11
+ *
12
+ * The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
13
+ * a consistent format like snake case.
14
+ *
15
+ * @example
16
+ * const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);
17
+ * // matches: ['camel', 'Case', 'HTTP', 'Request']
18
+ */
19
+ const CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;
20
+ const RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\d+|[A-Z/.-]+(?![a-z/.-])/g;
21
+ /**
22
+ * Splits a string into words using a regular expression pattern
23
+ *
24
+ * @example
25
+ * const words = getWords('camelCaseHTTPRequest');
26
+ * // words: ['camel', 'Case', 'HTTP', 'Request']
27
+ *
28
+ * @param str - The string to split into words
29
+ * @param options - Options for splitting the string
30
+ * @returns An array of words
31
+ */
32
+ function getWords(str, options = {}) {
33
+ if (str.length > 5e3) throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");
34
+ return [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];
35
+ }
36
+
37
+ //#endregion
38
+ exports.getWords = getWords;
39
+ //# sourceMappingURL=get-words.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-words.cjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs\n/**\n* Regular expression pattern to split strings into words for various case conversions\n*\n* This pattern matches sequences of characters in a string, considering the following case:\n* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n* - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n* - Single uppercase letters\n* - Sequences of digits\n*\n* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n* a consistent format like snake case.\n*\n* @example\n* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);\n* // matches: ['camel', 'Case', 'HTTP', 'Request']\n*/\nconst CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\\d+|[A-Z]+(?![a-z])/g;\nconst RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\\d+|[A-Z/.-]+(?![a-z/.-])/g;\n/**\n* Splits a string into words using a regular expression pattern\n*\n* @example\n* const words = getWords('camelCaseHTTPRequest');\n* // words: ['camel', 'Case', 'HTTP', 'Request']\n*\n* @param str - The string to split into words\n* @param options - Options for splitting the string\n* @returns An array of words\n*/\nfunction getWords(str, options = {}) {\n\tif (str.length > 5e3) throw new Error(\"The regular expression parameter of `get-words` can't handle strings longer than 2000 characters\");\n\treturn [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];\n}\n\n//#endregion\nexport { getWords };\n//# sourceMappingURL=get-words.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;;;;;;;;;;;;AAY9B,SAAS,SAAS,KAAK,UAAU,EAAE,EAAE;AACpC,KAAI,IAAI,SAAS,IAAK,OAAM,IAAI,MAAM,mGAAmG;AACzI,QAAO,CAAC,GAAG,IAAI,MAAM,QAAQ,UAAU,QAAQ,UAAU,wBAAwB,oBAAoB,IAAI,EAAE,CAAC"}
@@ -0,0 +1,38 @@
1
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs
2
+ /**
3
+ * Regular expression pattern to split strings into words for various case conversions
4
+ *
5
+ * This pattern matches sequences of characters in a string, considering the following case:
6
+ * - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)
7
+ * - Sequences of one uppercase letter optionally followed by lowercase letters and digits
8
+ * - Single uppercase letters
9
+ * - Sequences of digits
10
+ *
11
+ * The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into
12
+ * a consistent format like snake case.
13
+ *
14
+ * @example
15
+ * const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);
16
+ * // matches: ['camel', 'Case', 'HTTP', 'Request']
17
+ */
18
+ const CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\d+|[A-Z]+(?![a-z])/g;
19
+ const RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\d+|[A-Z/.-]+(?![a-z/.-])/g;
20
+ /**
21
+ * Splits a string into words using a regular expression pattern
22
+ *
23
+ * @example
24
+ * const words = getWords('camelCaseHTTPRequest');
25
+ * // words: ['camel', 'Case', 'HTTP', 'Request']
26
+ *
27
+ * @param str - The string to split into words
28
+ * @param options - Options for splitting the string
29
+ * @returns An array of words
30
+ */
31
+ function getWords(str, options = {}) {
32
+ if (str.length > 5e3) throw new Error("The regular expression parameter of `get-words` can't handle strings longer than 2000 characters");
33
+ return [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];
34
+ }
35
+
36
+ //#endregion
37
+ export { getWords };
38
+ //# sourceMappingURL=get-words.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-words.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs"],"sourcesContent":["//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.mjs\n/**\n* Regular expression pattern to split strings into words for various case conversions\n*\n* This pattern matches sequences of characters in a string, considering the following case:\n* - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n* - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n* - Single uppercase letters\n* - Sequences of digits\n*\n* The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n* a consistent format like snake case.\n*\n* @example\n* const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);\n* // matches: ['camel', 'Case', 'HTTP', 'Request']\n*/\nconst CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|\\d+|[A-Z]+(?![a-z])/g;\nconst RELAXED_SPLIT_PATTERN = /[A-Z/.-]?[a-z/.-]+|\\d+|[A-Z/.-]+(?![a-z/.-])/g;\n/**\n* Splits a string into words using a regular expression pattern\n*\n* @example\n* const words = getWords('camelCaseHTTPRequest');\n* // words: ['camel', 'Case', 'HTTP', 'Request']\n*\n* @param str - The string to split into words\n* @param options - Options for splitting the string\n* @returns An array of words\n*/\nfunction getWords(str, options = {}) {\n\tif (str.length > 5e3) throw new Error(\"The regular expression parameter of `get-words` can't handle strings longer than 2000 characters\");\n\treturn [...str.match(options.split ?? (options.relaxed ? RELAXED_SPLIT_PATTERN : CASE_SPLIT_PATTERN)) ?? []];\n}\n\n//#endregion\nexport { getWords };\n//# sourceMappingURL=get-words.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;;;;;;;;;;;;AAY9B,SAAS,SAAS,KAAK,UAAU,EAAE,EAAE;AACpC,KAAI,IAAI,SAAS,IAAK,OAAM,IAAI,MAAM,mGAAmG;AACzI,QAAO,CAAC,GAAG,IAAI,MAAM,QAAQ,UAAU,QAAQ,UAAU,wBAAwB,oBAAoB,IAAI,EAAE,CAAC"}
@@ -0,0 +1,34 @@
1
+ const require_get_words = require('./get-words.cjs');
2
+
3
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs
4
+ /**
5
+ * Check if the input string is in kebab case.
6
+ *
7
+ * @remarks
8
+ * Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
9
+ *
10
+ * @param input - The input string to check.
11
+ * @returns True if the input is in kebab case, false otherwise.
12
+ */
13
+ function isKebabCase(input) {
14
+ return input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;
15
+ }
16
+ /**
17
+ * Convert the input string to kebab case.
18
+ *
19
+ * @remarks
20
+ * Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
21
+ *
22
+ * @param input - The input string.
23
+ * @returns The kebab-cased string.
24
+ */
25
+ function kebabCase(input) {
26
+ if (isKebabCase(input) || input === void 0) return input;
27
+ const parts = input ? require_get_words.getWords(input) : [];
28
+ if (parts.length === 0) return "";
29
+ return parts.join("-").toLowerCase();
30
+ }
31
+
32
+ //#endregion
33
+ exports.kebabCase = kebabCase;
34
+ //# sourceMappingURL=kebab-case.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kebab-case.cjs","names":["getWords"],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs"],"sourcesContent":["import { getWords } from \"./get-words.mjs\";\n\n//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs\n/**\n* Check if the input string is in kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in kebab case, false otherwise.\n*/\nfunction isKebabCase(input) {\n\treturn input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;\n}\n/**\n* Convert the input string to kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string.\n* @returns The kebab-cased string.\n*/\nfunction kebabCase(input) {\n\tif (isKebabCase(input) || input === void 0) return input;\n\tconst parts = input ? getWords(input) : [];\n\tif (parts.length === 0) return \"\";\n\treturn parts.join(\"-\").toLowerCase();\n}\n\n//#endregion\nexport { kebabCase };\n//# sourceMappingURL=kebab-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAYA,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,0BAA0B,KAAK,MAAM,GAAG;;;;;;;;;;;AAWxD,SAAS,UAAU,OAAO;AACzB,KAAI,YAAY,MAAM,IAAI,UAAU,KAAK,EAAG,QAAO;CACnD,MAAM,QAAQ,QAAQA,2BAAS,MAAM,GAAG,EAAE;AAC1C,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAO,MAAM,KAAK,IAAI,CAAC,aAAa"}
@@ -0,0 +1,34 @@
1
+ import { getWords } from "./get-words.mjs";
2
+
3
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs
4
+ /**
5
+ * Check if the input string is in kebab case.
6
+ *
7
+ * @remarks
8
+ * Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
9
+ *
10
+ * @param input - The input string to check.
11
+ * @returns True if the input is in kebab case, false otherwise.
12
+ */
13
+ function isKebabCase(input) {
14
+ return input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;
15
+ }
16
+ /**
17
+ * Convert the input string to kebab case.
18
+ *
19
+ * @remarks
20
+ * Kebab case is defined as all lowercase letters with hyphens separating words - "this-is-an-example".
21
+ *
22
+ * @param input - The input string.
23
+ * @returns The kebab-cased string.
24
+ */
25
+ function kebabCase(input) {
26
+ if (isKebabCase(input) || input === void 0) return input;
27
+ const parts = input ? getWords(input) : [];
28
+ if (parts.length === 0) return "";
29
+ return parts.join("-").toLowerCase();
30
+ }
31
+
32
+ //#endregion
33
+ export { kebabCase };
34
+ //# sourceMappingURL=kebab-case.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kebab-case.mjs","names":[],"sources":["../../../../../../../../../../../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs"],"sourcesContent":["import { getWords } from \"./get-words.mjs\";\n\n//#region ../../node_modules/.pnpm/@stryke+string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.mjs\n/**\n* Check if the input string is in kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string to check.\n* @returns True if the input is in kebab case, false otherwise.\n*/\nfunction isKebabCase(input) {\n\treturn input ? /^[a-z]+(?:-[a-z0-9]+)*$/.test(input) : false;\n}\n/**\n* Convert the input string to kebab case.\n*\n* @remarks\n* Kebab case is defined as all lowercase letters with hyphens separating words - \"this-is-an-example\".\n*\n* @param input - The input string.\n* @returns The kebab-cased string.\n*/\nfunction kebabCase(input) {\n\tif (isKebabCase(input) || input === void 0) return input;\n\tconst parts = input ? getWords(input) : [];\n\tif (parts.length === 0) return \"\";\n\treturn parts.join(\"-\").toLowerCase();\n}\n\n//#endregion\nexport { kebabCase };\n//# sourceMappingURL=kebab-case.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAYA,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,0BAA0B,KAAK,MAAM,GAAG;;;;;;;;;;;AAWxD,SAAS,UAAU,OAAO;AACzB,KAAI,YAAY,MAAM,IAAI,UAAU,KAAK,EAAG,QAAO;CACnD,MAAM,QAAQ,QAAQ,SAAS,MAAM,GAAG,EAAE;AAC1C,KAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAO,MAAM,KAAK,IAAI,CAAC,aAAa"}
@@ -0,0 +1,41 @@
1
+ const require_upper_case_first = require('./upper-case-first.cjs');
2
+ const require_constant_case = require('./constant-case.cjs');
3
+
4
+ //#region ../plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.mjs
5
+ /**
6
+ * Check if the input string is in snake case.
7
+ *
8
+ * @remarks
9
+ * Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
10
+ *
11
+ * @param input - The input string to check.
12
+ * @returns True if the input is in snake case, false otherwise.
13
+ */
14
+ function isSnakeCase(input) {
15
+ return input ? /^[a-z]+(?:_[a-z0-9]+)*$/.test(input) : false;
16
+ }
17
+ /**
18
+ * Convert the input string to snake case.
19
+ *
20
+ * @remarks
21
+ * Snake case is defined as all lowercase letters with underscores separating words - "this_is_an_example"
22
+ *
23
+ * @param input - The input string.
24
+ * @param options - Options to control the behavior of the function.
25
+ * @returns The snake-cased string.
26
+ */
27
+ function snakeCase(input, options) {
28
+ if (isSnakeCase(input) || input === void 0) return input;
29
+ if (require_constant_case.isConstantCase(input)) return input.toLowerCase();
30
+ const parts = input?.replace(/[A-Z]+/g, (input$1) => require_upper_case_first.upperCaseFirst(input$1) ?? "").split(/(?=[A-Z])|[\s._-]/).map((x) => x.toLowerCase()) ?? [];
31
+ if (parts.length === 0) return "";
32
+ if (parts.length === 1) return parts[0];
33
+ const result = parts.reduce((ret, part) => {
34
+ return `${ret}_${part.toLowerCase()}`;
35
+ });
36
+ return options?.splitOnNumber === false ? result : result.replace(/[A-Z]\d/i, (val) => `${val[0]}_${val[1]}`);
37
+ }
38
+
39
+ //#endregion
40
+ exports.snakeCase = snakeCase;
41
+ //# sourceMappingURL=snake-case.cjs.map