@shell-shock/preset-script 0.6.9 → 0.6.11

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 (78) hide show
  1. package/dist/components/banner-function-declaration.cjs +3 -4
  2. package/dist/components/banner-function-declaration.cjs.map +1 -1
  3. package/dist/components/banner-function-declaration.mjs +1 -2
  4. package/dist/components/banner-function-declaration.mjs.map +1 -1
  5. package/dist/components/bin-entry.cjs +3 -1
  6. package/dist/components/bin-entry.cjs.map +1 -1
  7. package/dist/components/bin-entry.d.cts.map +1 -1
  8. package/dist/components/bin-entry.d.mts.map +1 -1
  9. package/dist/components/bin-entry.mjs +3 -1
  10. package/dist/components/bin-entry.mjs.map +1 -1
  11. package/dist/components/command-entry.cjs +1 -1
  12. package/dist/components/command-entry.mjs +1 -1
  13. package/dist/components/exit-function-declaration.cjs +161 -0
  14. package/dist/components/exit-function-declaration.cjs.map +1 -0
  15. package/dist/components/exit-function-declaration.d.cts +10 -0
  16. package/dist/components/exit-function-declaration.d.cts.map +1 -0
  17. package/dist/components/exit-function-declaration.d.mts +10 -0
  18. package/dist/components/exit-function-declaration.d.mts.map +1 -0
  19. package/dist/components/exit-function-declaration.mjs +160 -0
  20. package/dist/components/exit-function-declaration.mjs.map +1 -0
  21. package/dist/components/help.cjs +3 -4
  22. package/dist/components/help.cjs.map +1 -1
  23. package/dist/components/help.d.cts +7 -7
  24. package/dist/components/help.d.mts +7 -7
  25. package/dist/components/help.d.mts.map +1 -1
  26. package/dist/components/help.mjs +1 -2
  27. package/dist/components/help.mjs.map +1 -1
  28. package/dist/components/helpers.d.cts +5 -5
  29. package/dist/components/helpers.d.cts.map +1 -1
  30. package/dist/components/helpers.d.mts +5 -5
  31. package/dist/components/index.cjs +3 -20
  32. package/dist/components/index.d.cts +2 -3
  33. package/dist/components/index.d.mts +2 -3
  34. package/dist/components/index.mjs +2 -3
  35. package/dist/index.cjs +3 -9
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts.map +1 -1
  38. package/dist/index.d.mts.map +1 -1
  39. package/dist/index.mjs +2 -8
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/types/plugin.d.cts.map +1 -1
  42. package/package.json +18 -73
  43. package/dist/components/console-builtin.cjs +0 -2963
  44. package/dist/components/console-builtin.cjs.map +0 -1
  45. package/dist/components/console-builtin.d.cts +0 -60
  46. package/dist/components/console-builtin.d.cts.map +0 -1
  47. package/dist/components/console-builtin.d.mts +0 -60
  48. package/dist/components/console-builtin.d.mts.map +0 -1
  49. package/dist/components/console-builtin.mjs +0 -2953
  50. package/dist/components/console-builtin.mjs.map +0 -1
  51. package/dist/components/utils-builtin.cjs +0 -725
  52. package/dist/components/utils-builtin.cjs.map +0 -1
  53. package/dist/components/utils-builtin.d.cts +0 -33
  54. package/dist/components/utils-builtin.d.cts.map +0 -1
  55. package/dist/components/utils-builtin.d.mts +0 -33
  56. package/dist/components/utils-builtin.d.mts.map +0 -1
  57. package/dist/components/utils-builtin.mjs +0 -717
  58. package/dist/components/utils-builtin.mjs.map +0 -1
  59. package/dist/contexts/index.cjs +0 -4
  60. package/dist/contexts/index.d.cts +0 -2
  61. package/dist/contexts/index.d.mts +0 -2
  62. package/dist/contexts/index.mjs +0 -3
  63. package/dist/contexts/theme.cjs +0 -29
  64. package/dist/contexts/theme.cjs.map +0 -1
  65. package/dist/contexts/theme.d.cts +0 -20
  66. package/dist/contexts/theme.d.cts.map +0 -1
  67. package/dist/contexts/theme.d.mts +0 -20
  68. package/dist/contexts/theme.d.mts.map +0 -1
  69. package/dist/contexts/theme.mjs +0 -27
  70. package/dist/contexts/theme.mjs.map +0 -1
  71. package/dist/helpers/ansi-utils.cjs +0 -693
  72. package/dist/helpers/ansi-utils.cjs.map +0 -1
  73. package/dist/helpers/ansi-utils.d.cts +0 -75
  74. package/dist/helpers/ansi-utils.d.cts.map +0 -1
  75. package/dist/helpers/ansi-utils.d.mts +0 -75
  76. package/dist/helpers/ansi-utils.d.mts.map +0 -1
  77. package/dist/helpers/ansi-utils.mjs +0 -689
  78. package/dist/helpers/ansi-utils.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core12 from "@alloy-js/core";
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
2
 
3
3
  //#region src/components/helpers.d.ts
4
4
 
@@ -8,22 +8,22 @@ import * as _alloy_js_core12 from "@alloy-js/core";
8
8
  * @remarks
9
9
  * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
10
10
  */
11
- declare function IsDebug(): _alloy_js_core12.Children;
11
+ declare function IsDebug(): _alloy_js_core0.Children;
12
12
  /**
13
13
  * Write the logic to determine if the application is **not** running in debug mode.
14
14
  */
15
- declare function IsNotDebug(): _alloy_js_core12.Children;
15
+ declare function IsNotDebug(): _alloy_js_core0.Children;
16
16
  /**
17
17
  * Write the logic to determine if the application is running in verbose mode.
18
18
  *
19
19
  * @remarks
20
20
  * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
21
21
  */
22
- declare function IsVerbose(): _alloy_js_core12.Children;
22
+ declare function IsVerbose(): _alloy_js_core0.Children;
23
23
  /**
24
24
  * Write the logic to determine if the application is **not** running in verbose mode.
25
25
  */
26
- declare function IsNotVerbose(): _alloy_js_core12.Children;
26
+ declare function IsNotVerbose(): _alloy_js_core0.Children;
27
27
  //#endregion
28
28
  export { IsDebug, IsNotDebug, IsNotVerbose, IsVerbose };
29
29
  //# sourceMappingURL=helpers.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.cts","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":[],"mappings":";;;;;;;AA0BA;AAOA;AAgBA;AAagB,iBApCA,OAAA,CAAA,CAoCY,EApCL,gBAAA,CAAA,QAoCK;;;;iBA7BZ,UAAA,CAAA,GAAU,gBAAA,CAAA;;;;;;;iBAgBV,SAAA,CAAA,GAAS,gBAAA,CAAA;;;;iBAaT,YAAA,CAAA,GAAY,gBAAA,CAAA"}
1
+ {"version":3,"file":"helpers.d.cts","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":[],"mappings":";;;;;;;AA0BA;AAOA;AAgBA;AAagB,iBApCA,OAAA,CAAA,CAoCY,EApCL,eAAA,CAAA,QAoCK;;;;iBA7BZ,UAAA,CAAA,GAAU,eAAA,CAAA;;;;;;;iBAgBV,SAAA,CAAA,GAAS,eAAA,CAAA;;;;iBAaT,YAAA,CAAA,GAAY,eAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core6 from "@alloy-js/core";
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
2
 
3
3
  //#region src/components/helpers.d.ts
4
4
 
@@ -8,22 +8,22 @@ import * as _alloy_js_core6 from "@alloy-js/core";
8
8
  * @remarks
9
9
  * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
10
10
  */
11
- declare function IsDebug(): _alloy_js_core6.Children;
11
+ declare function IsDebug(): _alloy_js_core0.Children;
12
12
  /**
13
13
  * Write the logic to determine if the application is **not** running in debug mode.
14
14
  */
15
- declare function IsNotDebug(): _alloy_js_core6.Children;
15
+ declare function IsNotDebug(): _alloy_js_core0.Children;
16
16
  /**
17
17
  * Write the logic to determine if the application is running in verbose mode.
18
18
  *
19
19
  * @remarks
20
20
  * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
21
21
  */
22
- declare function IsVerbose(): _alloy_js_core6.Children;
22
+ declare function IsVerbose(): _alloy_js_core0.Children;
23
23
  /**
24
24
  * Write the logic to determine if the application is **not** running in verbose mode.
25
25
  */
26
- declare function IsNotVerbose(): _alloy_js_core6.Children;
26
+ declare function IsNotVerbose(): _alloy_js_core0.Children;
27
27
  //#endregion
28
28
  export { IsDebug, IsNotDebug, IsNotVerbose, IsVerbose };
29
29
  //# sourceMappingURL=helpers.d.mts.map
@@ -1,20 +1,15 @@
1
1
  const require_components_banner_function_declaration = require('./banner-function-declaration.cjs');
2
+ const require_components_exit_function_declaration = require('./exit-function-declaration.cjs');
2
3
  const require_components_bin_entry = require('./bin-entry.cjs');
3
4
  const require_components_help = require('./help.cjs');
4
5
  const require_components_command_router = require('./command-router.cjs');
5
6
  const require_components_virtual_command_entry = require('./virtual-command-entry.cjs');
6
7
  const require_components_command_entry = require('./command-entry.cjs');
7
- const require_components_console_builtin = require('./console-builtin.cjs');
8
- const require_components_utils_builtin = require('./utils-builtin.cjs');
9
8
 
10
- exports.AnsiHelpersDeclarations = require_components_console_builtin.AnsiHelpersDeclarations;
11
- exports.ArgsUtilities = require_components_utils_builtin.ArgsUtilities;
12
9
  exports.BannerFunctionBodyDeclaration = require_components_banner_function_declaration.BannerFunctionBodyDeclaration;
13
10
  exports.BannerFunctionDeclaration = require_components_banner_function_declaration.BannerFunctionDeclaration;
14
11
  exports.BaseHelp = require_components_help.BaseHelp;
15
12
  exports.BinEntry = require_components_bin_entry.BinEntry;
16
- exports.ColorSupportUtilities = require_components_utils_builtin.ColorSupportUtilities;
17
- exports.ColorsDeclaration = require_components_console_builtin.ColorsDeclaration;
18
13
  exports.CommandEntry = require_components_command_entry.CommandEntry;
19
14
  exports.CommandHandlerDeclaration = require_components_command_entry.CommandHandlerDeclaration;
20
15
  exports.CommandHelp = require_components_help.CommandHelp;
@@ -23,23 +18,11 @@ exports.CommandRouter = require_components_command_router.CommandRouter;
23
18
  exports.CommandRouterBody = require_components_command_router.CommandRouterBody;
24
19
  exports.CommandRouterRoute = require_components_command_router.CommandRouterRoute;
25
20
  exports.CommandValidationLogic = require_components_command_entry.CommandValidationLogic;
26
- exports.ConsoleBuiltin = require_components_console_builtin.ConsoleBuiltin;
27
- exports.ContextUtilities = require_components_utils_builtin.ContextUtilities;
28
- exports.DividerFunctionDeclaration = require_components_console_builtin.DividerFunctionDeclaration;
29
- exports.EnvSupportUtilities = require_components_utils_builtin.EnvSupportUtilities;
30
- exports.ExitFunctionDeclaration = require_components_utils_builtin.ExitFunctionDeclaration;
21
+ exports.ExitFunctionDeclaration = require_components_exit_function_declaration.ExitFunctionDeclaration;
31
22
  exports.HelpCommands = require_components_help.HelpCommands;
32
23
  exports.HelpOptions = require_components_help.HelpOptions;
33
24
  exports.HelpUsage = require_components_help.HelpUsage;
34
- exports.HyperlinkSupportUtilities = require_components_utils_builtin.HyperlinkSupportUtilities;
35
- exports.LinkFunctionDeclaration = require_components_console_builtin.LinkFunctionDeclaration;
36
- exports.MessageFunctionDeclaration = require_components_console_builtin.MessageFunctionDeclaration;
37
25
  exports.RunApplication = require_components_bin_entry.RunApplication;
38
- exports.StripAnsiFunctionDeclaration = require_components_console_builtin.StripAnsiFunctionDeclaration;
39
- exports.TableFunctionDeclaration = require_components_console_builtin.TableFunctionDeclaration;
40
- exports.UtilsBuiltin = require_components_utils_builtin.UtilsBuiltin;
41
26
  exports.VirtualCommandEntry = require_components_virtual_command_entry.VirtualCommandEntry;
42
27
  exports.VirtualCommandHandlerDeclaration = require_components_virtual_command_entry.VirtualCommandHandlerDeclaration;
43
- exports.VirtualHelp = require_components_help.VirtualHelp;
44
- exports.WrapAnsiFunction = require_components_console_builtin.WrapAnsiFunction;
45
- exports.WriteLineFunctionDeclaration = require_components_console_builtin.WriteLineFunctionDeclaration;
28
+ exports.VirtualHelp = require_components_help.VirtualHelp;
@@ -2,8 +2,7 @@ import { BannerFunctionBodyDeclaration, BannerFunctionBodyDeclarationProps, Bann
2
2
  import { BinEntry, BinEntryProps, RunApplication } from "./bin-entry.cjs";
3
3
  import { CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandHandlerDeclarationProps, CommandInvocation, CommandValidationLogic, CommandValidationLogicProps } from "./command-entry.cjs";
4
4
  import { CommandRouter, CommandRouterBody, CommandRouterProps, CommandRouterRoute } from "./command-router.cjs";
5
- import { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration } from "./console-builtin.cjs";
5
+ import { ExitFunctionDeclaration } from "./exit-function-declaration.cjs";
6
6
  import { BaseHelp, BaseHelpProps, CommandHelp, CommandHelpProps, HelpCommands, HelpCommandsProps, HelpOptions, HelpOptionsProps, HelpUsage, HelpUsageProps, VirtualHelp, VirtualHelpProps } from "./help.cjs";
7
- import { ArgsUtilities, ColorSupportUtilities, ContextUtilities, EnvSupportUtilities, ExitFunctionDeclaration, HyperlinkSupportUtilities, UtilsBuiltin, UtilsBuiltinProps } from "./utils-builtin.cjs";
8
7
  import { VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, VirtualCommandHandlerDeclarationProps } from "./virtual-command-entry.cjs";
9
- export { AnsiHelpersDeclarations, ArgsUtilities, BannerFunctionBodyDeclaration, BannerFunctionBodyDeclarationProps, BannerFunctionDeclaration, BannerFunctionDeclarationProps, BaseHelp, BaseHelpProps, BinEntry, BinEntryProps, ColorSupportUtilities, ColorsDeclaration, CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandHandlerDeclarationProps, CommandHelp, CommandHelpProps, CommandInvocation, CommandRouter, CommandRouterBody, CommandRouterProps, CommandRouterRoute, CommandValidationLogic, CommandValidationLogicProps, ConsoleBuiltin, ConsoleBuiltinProps, ContextUtilities, DividerFunctionDeclaration, EnvSupportUtilities, ExitFunctionDeclaration, HelpCommands, HelpCommandsProps, HelpOptions, HelpOptionsProps, HelpUsage, HelpUsageProps, HyperlinkSupportUtilities, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, RunApplication, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, UtilsBuiltin, UtilsBuiltinProps, VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, VirtualCommandHandlerDeclarationProps, VirtualHelp, VirtualHelpProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
8
+ export { BannerFunctionBodyDeclaration, BannerFunctionBodyDeclarationProps, BannerFunctionDeclaration, BannerFunctionDeclarationProps, BaseHelp, BaseHelpProps, BinEntry, BinEntryProps, CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandHandlerDeclarationProps, CommandHelp, CommandHelpProps, CommandInvocation, CommandRouter, CommandRouterBody, CommandRouterProps, CommandRouterRoute, CommandValidationLogic, CommandValidationLogicProps, ExitFunctionDeclaration, HelpCommands, HelpCommandsProps, HelpOptions, HelpOptionsProps, HelpUsage, HelpUsageProps, RunApplication, VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, VirtualCommandHandlerDeclarationProps, VirtualHelp, VirtualHelpProps };
@@ -2,8 +2,7 @@ import { BannerFunctionBodyDeclaration, BannerFunctionBodyDeclarationProps, Bann
2
2
  import { BinEntry, BinEntryProps, RunApplication } from "./bin-entry.mjs";
3
3
  import { CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandHandlerDeclarationProps, CommandInvocation, CommandValidationLogic, CommandValidationLogicProps } from "./command-entry.mjs";
4
4
  import { CommandRouter, CommandRouterBody, CommandRouterProps, CommandRouterRoute } from "./command-router.mjs";
5
- import { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, ConsoleBuiltinProps, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, WrapAnsiFunction, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
5
+ import { ExitFunctionDeclaration } from "./exit-function-declaration.mjs";
6
6
  import { BaseHelp, BaseHelpProps, CommandHelp, CommandHelpProps, HelpCommands, HelpCommandsProps, HelpOptions, HelpOptionsProps, HelpUsage, HelpUsageProps, VirtualHelp, VirtualHelpProps } from "./help.mjs";
7
- import { ArgsUtilities, ColorSupportUtilities, ContextUtilities, EnvSupportUtilities, ExitFunctionDeclaration, HyperlinkSupportUtilities, UtilsBuiltin, UtilsBuiltinProps } from "./utils-builtin.mjs";
8
7
  import { VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, VirtualCommandHandlerDeclarationProps } from "./virtual-command-entry.mjs";
9
- export { AnsiHelpersDeclarations, ArgsUtilities, BannerFunctionBodyDeclaration, BannerFunctionBodyDeclarationProps, BannerFunctionDeclaration, BannerFunctionDeclarationProps, BaseHelp, BaseHelpProps, BinEntry, BinEntryProps, ColorSupportUtilities, ColorsDeclaration, CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandHandlerDeclarationProps, CommandHelp, CommandHelpProps, CommandInvocation, CommandRouter, CommandRouterBody, CommandRouterProps, CommandRouterRoute, CommandValidationLogic, CommandValidationLogicProps, ConsoleBuiltin, ConsoleBuiltinProps, ContextUtilities, DividerFunctionDeclaration, EnvSupportUtilities, ExitFunctionDeclaration, HelpCommands, HelpCommandsProps, HelpOptions, HelpOptionsProps, HelpUsage, HelpUsageProps, HyperlinkSupportUtilities, LinkFunctionDeclaration, MessageFunctionDeclaration, MessageFunctionDeclarationProps, RunApplication, StripAnsiFunctionDeclaration, TableFunctionDeclaration, TableFunctionDeclarationProps, UtilsBuiltin, UtilsBuiltinProps, VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, VirtualCommandHandlerDeclarationProps, VirtualHelp, VirtualHelpProps, WrapAnsiFunction, WriteLineFunctionDeclaration };
8
+ export { BannerFunctionBodyDeclaration, BannerFunctionBodyDeclarationProps, BannerFunctionDeclaration, BannerFunctionDeclarationProps, BaseHelp, BaseHelpProps, BinEntry, BinEntryProps, CommandEntry, CommandEntryProps, CommandHandlerDeclaration, CommandHandlerDeclarationProps, CommandHelp, CommandHelpProps, CommandInvocation, CommandRouter, CommandRouterBody, CommandRouterProps, CommandRouterRoute, CommandValidationLogic, CommandValidationLogicProps, ExitFunctionDeclaration, HelpCommands, HelpCommandsProps, HelpOptions, HelpOptionsProps, HelpUsage, HelpUsageProps, RunApplication, VirtualCommandEntry, VirtualCommandEntryProps, VirtualCommandHandlerDeclaration, VirtualCommandHandlerDeclarationProps, VirtualHelp, VirtualHelpProps };
@@ -1,10 +1,9 @@
1
1
  import { BannerFunctionBodyDeclaration, BannerFunctionDeclaration } from "./banner-function-declaration.mjs";
2
+ import { ExitFunctionDeclaration } from "./exit-function-declaration.mjs";
2
3
  import { BinEntry, RunApplication } from "./bin-entry.mjs";
3
4
  import { BaseHelp, CommandHelp, HelpCommands, HelpOptions, HelpUsage, VirtualHelp } from "./help.mjs";
4
5
  import { CommandRouter, CommandRouterBody, CommandRouterRoute } from "./command-router.mjs";
5
6
  import { VirtualCommandEntry, VirtualCommandHandlerDeclaration } from "./virtual-command-entry.mjs";
6
7
  import { CommandEntry, CommandHandlerDeclaration, CommandInvocation, CommandValidationLogic } from "./command-entry.mjs";
7
- import { AnsiHelpersDeclarations, ColorsDeclaration, ConsoleBuiltin, DividerFunctionDeclaration, LinkFunctionDeclaration, MessageFunctionDeclaration, StripAnsiFunctionDeclaration, TableFunctionDeclaration, WrapAnsiFunction, WriteLineFunctionDeclaration } from "./console-builtin.mjs";
8
- import { ArgsUtilities, ColorSupportUtilities, ContextUtilities, EnvSupportUtilities, ExitFunctionDeclaration, HyperlinkSupportUtilities, UtilsBuiltin } from "./utils-builtin.mjs";
9
8
 
10
- export { AnsiHelpersDeclarations, ArgsUtilities, BannerFunctionBodyDeclaration, BannerFunctionDeclaration, BaseHelp, BinEntry, ColorSupportUtilities, ColorsDeclaration, CommandEntry, CommandHandlerDeclaration, CommandHelp, CommandInvocation, CommandRouter, CommandRouterBody, CommandRouterRoute, CommandValidationLogic, ConsoleBuiltin, ContextUtilities, DividerFunctionDeclaration, EnvSupportUtilities, ExitFunctionDeclaration, HelpCommands, HelpOptions, HelpUsage, HyperlinkSupportUtilities, LinkFunctionDeclaration, MessageFunctionDeclaration, RunApplication, StripAnsiFunctionDeclaration, TableFunctionDeclaration, UtilsBuiltin, VirtualCommandEntry, VirtualCommandHandlerDeclaration, VirtualHelp, WrapAnsiFunction, WriteLineFunctionDeclaration };
9
+ export { BannerFunctionBodyDeclaration, BannerFunctionDeclaration, BaseHelp, BinEntry, CommandEntry, CommandHandlerDeclaration, CommandHelp, CommandInvocation, CommandRouter, CommandRouterBody, CommandRouterRoute, CommandValidationLogic, ExitFunctionDeclaration, HelpCommands, HelpOptions, HelpUsage, RunApplication, VirtualCommandEntry, VirtualCommandHandlerDeclaration, VirtualHelp };
package/dist/index.cjs CHANGED
@@ -6,16 +6,14 @@ const require_components_help = require('./components/help.cjs');
6
6
  const require_components_command_router = require('./components/command-router.cjs');
7
7
  const require_components_virtual_command_entry = require('./components/virtual-command-entry.cjs');
8
8
  const require_components_command_entry = require('./components/command-entry.cjs');
9
- const require_components_console_builtin = require('./components/console-builtin.cjs');
10
- const require_components_utils_builtin = require('./components/utils-builtin.cjs');
11
9
  require('./components/index.cjs');
12
10
  const require_helpers_get_default_options = require('./helpers/get-default-options.cjs');
13
11
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
14
12
  let __alloy_js_core = require("@alloy-js/core");
15
13
  let __alloy_js_typescript = require("@alloy-js/typescript");
16
14
  let __powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
17
- let __shell_shock_plugin_theme = require("@shell-shock/plugin-theme");
18
- __shell_shock_plugin_theme = require_rolldown_runtime.__toESM(__shell_shock_plugin_theme);
15
+ let __shell_shock_plugin_console = require("@shell-shock/plugin-console");
16
+ __shell_shock_plugin_console = require_rolldown_runtime.__toESM(__shell_shock_plugin_console);
19
17
 
20
18
  //#region src/index.tsx
21
19
  /**
@@ -23,7 +21,7 @@ __shell_shock_plugin_theme = require_rolldown_runtime.__toESM(__shell_shock_plug
23
21
  */
24
22
  const plugin = (options = {}) => {
25
23
  return [
26
- (0, __shell_shock_plugin_theme.default)({ theme: options.theme }),
24
+ (0, __shell_shock_plugin_console.default)(options),
27
25
  {
28
26
  name: "shell-shock:script-preset",
29
27
  config() {
@@ -36,10 +34,6 @@ const plugin = (options = {}) => {
36
34
  },
37
35
  configResolved() {
38
36
  this.dependencies.didyoumean2 = "^7.0.4";
39
- },
40
- async prepare() {
41
- this.debug("Rendering built-in modules for the Shell Shock `script` preset.");
42
- return (0, __powerlines_plugin_alloy_render.render)(this, [(0, __alloy_js_core_jsx_runtime.createComponent)(require_components_utils_builtin.UtilsBuiltin, {}), (0, __alloy_js_core_jsx_runtime.createComponent)(require_components_console_builtin.ConsoleBuiltin, {})]);
43
37
  }
44
38
  },
45
39
  {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["code","For","Show","VarDeclaration","render","theme","BannerFunctionDeclaration","VirtualHelp","BinEntry","CommandEntry","CommandRouter","ConsoleBuiltin","UtilsBuiltin","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","_$createComponent","order","handler","_self$","builtinImports","console","utils","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","segments","values","each","doubleHardline","child","isVirtual","fallback","command"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, VirtualHelp } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { ConsoleBuiltin } from \"./components/console-builtin\";\nimport { UtilsBuiltin } from \"./components/utils-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n) => {\n return [\n theme({\n theme: options.theme\n }),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n },\n async prepare() {\n this.debug(\n \"Rendering built-in modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <UtilsBuiltin />\n <ConsoleBuiltin />\n </>\n );\n }\n },\n {\n name: \"shell-shock:script-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\",\n \"help\"\n ],\n utils: [\"useArgs\", \"isMinimal\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <hbr />\n {code`banner();`}\n <hbr />\n <hbr />\n <VirtualHelp\n options={this.options}\n commands={this.commands ?? {}}\n />\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For each={Object.values(this.commands)} doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAae,UAGXC,UAA+B,EAAE,KAC9B;AACH,QAAO;0CACC,EACJX,OAAOW,QAAQX,OAChB,CAAC;EACF;GACEY,MAAM;GACNC,SAAS;AACP,SAAKC,MACH,uEACD;AAED,WAAO;KACLC,gBAAgBN;KAChBO,iBAAiB;KACjB,GAAGL;KACJ;;GAEHM,iBAAiB;AACf,SAAKC,aAAaC,cAAc;;GAElC,MAAMC,UAAU;AACd,SAAKN,MACH,kEACD;AAED,wDACE,MAAI,kDAEDP,+CAAY,EAAA,CAAA,mDACZD,mDAAc,EAAA,CAAA,CAEnB,CAAC;;GAEJ;EACD;GACEM,MAAM;GACNQ,SAAS;IACPE,OAAO;IACP,MAAMC,UAAU;KAAA,MAAAC,SAAA;AACd,UAAKV,MACH,oEACD;AAED,yDACE,MAAI,kDAEDX,uCAAQ;MACPsB,gBAAgB;OACdC,SAAS;QACP;QACA;QACA;QACA;QACA;QACA;QACD;OACDC,OAAO,CAAC,WAAW,YAAW;OAC/B;MAAA,IACDC,SAAM;AAAA,cAAA;yDAED3B,0EAAyB,EAAA,CAAA;yDAAA,OAAA,EAAA,CAAA;yDAAA,OAAA,EAAA,CAAA;QAAA;;MAAA,IAAA6B,WAAA;AAAA,cAAA;yDAK7BjC,sBAAI;SAAA,IAACkC,OAAI;AAAA,iBAAEC,OAAOC,KAAKT,OAAKU,SAAS,CAACC,SAAS;;SAAC,IAAAL,WAAA;AAAA,iBAAA;4DAC9ChC,sCAAc;YAAA,SAAA;YAEbc,MAAI;YACJwB,MAAI;YACJC,aAAa1C,oBAAI;YAAY,CAAA;4DAAA,OAAA,EAAA,CAAA;4DAG9BU,iDAAa;YAACiC,UAAU,EAAE;YAAA,IAAEJ,WAAQ;AAAA,oBAAEV,OAAKU,YAAY,EAAE;;YAAA,CAAA;4DAAA,OAAA,EAAA,CAAA;WAAA;;SAAA,CAAA;yDAAA,OAAA,EAAA,CAAA;yDAAA,OAAA,EAAA,CAAA;QAK3DvC,oBAAI;yDAAW,OAAA,EAAA,CAAA;yDAAA,OAAA,EAAA,CAAA;yDAGfO,qCAAW;SAAA,IACVS,UAAO;AAAA,iBAAEa,OAAKb;;SAAO,IACrBuB,WAAQ;AAAA,iBAAEV,OAAKU,YAAY,EAAE;;SAAA,CAAA;QAAA;;MAAA,CAAA,mDAGhCrC,sBAAI;MAAA,IAACkC,OAAI;AAAA,cAAEC,OAAOO,OAAOf,OAAKU,SAAS,CAACC,SAAS;;MAAC,IAAAL,WAAA;AAAA,+DAChDlC,qBAAG;QAAA,IAAC4C,OAAI;AAAA,gBAAER,OAAOO,OAAOf,OAAKU,SAAS;;QAAEO,gBAAc;QAAAX,WACpDY,2DACE7C,sBAAI;SAAA,IACHkC,OAAI;AAAA,iBAAEW,MAAMC;;SAAS,IACrBC,WAAQ;AAAA,kEAAGxC,+CAAY,EAACyC,SAASH,OAAK,CAAA;;SAAA,IAAAZ,WAAA;AAAA,kEACrCtB,8DAAmB,EAACqC,SAASH,OAAK,CAAA;;SAAA,CAAA;QAEtC,CAAA;;MAAA,CAAA,CAIT,CAAC;;IAEL;GACD;EACF;;AAGH,kBAAehC"}
1
+ {"version":3,"file":"index.cjs","names":["code","For","Show","VarDeclaration","render","console","BannerFunctionDeclaration","VirtualHelp","BinEntry","CommandEntry","CommandRouter","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","order","handler","_self$","_$createComponent","builtinImports","utils","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","segments","values","each","doubleHardline","child","isVirtual","fallback","command"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport console from \"@shell-shock/plugin-console\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, VirtualHelp } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n) => {\n return [\n console(options),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n }\n },\n {\n name: \"shell-shock:script-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\",\n \"help\"\n ],\n utils: [\"useArgs\", \"isMinimal\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <hbr />\n {code`banner();`}\n <hbr />\n <hbr />\n <VirtualHelp\n options={this.options}\n commands={this.commands ?? {}}\n />\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For each={Object.values(this.commands)} doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCA,MAAaa,UAGXC,UAA+B,EAAE,KAC9B;AACH,QAAO;4CACGA,QAAQ;EAChB;GACEC,MAAM;GACNC,SAAS;AACP,SAAKC,MACH,uEACD;AAED,WAAO;KACLC,gBAAgBN;KAChBO,iBAAiB;KACjB,GAAGL;KACJ;;GAEHM,iBAAiB;AACf,SAAKC,aAAaC,cAAc;;GAEnC;EACD;GACEP,MAAM;GACNQ,SAAS;IACPC,OAAO;IACP,MAAMC,UAAU;KAAA,MAAAC,SAAA;AACd,UAAKT,MACH,oEACD;AAED,yDACE,MAAI,kDAEDT,uCAAQ;MACPoB,gBAAgB;OACdvB,SAAS;QACP;QACA;QACA;QACA;QACA;QACA;QACD;OAC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AmB,EAACoC,SAASH,OAAK,CAAA;;SAAA,CAAA;QAEtC,CAAA;;MAAA,CAAA,CAIT,CAAC;;IAEL;GACD;EACF;;AAGH,kBAAe/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAoCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GA0GZ,MA1GY,CA0GL,QA1GK,CAAA,EAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GA2FZ,MA3FY,CA2FL,QA3FK,CAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAoCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GA0GZ,MA1GY,CA0GL,QA1GK,CAAA,EAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,mBAAA,GAAsB,mBAAtB,CAAA,CAAA,OAAA,CAAA,EAER,mBAFQ,EAAA,GA2FZ,MA3FY,CA2FL,QA3FK,CAAA,EAAA"}
package/dist/index.mjs CHANGED
@@ -4,15 +4,13 @@ import { VirtualHelp } from "./components/help.mjs";
4
4
  import { CommandRouter } from "./components/command-router.mjs";
5
5
  import { VirtualCommandEntry } from "./components/virtual-command-entry.mjs";
6
6
  import { CommandEntry } from "./components/command-entry.mjs";
7
- import { ConsoleBuiltin } from "./components/console-builtin.mjs";
8
- import { UtilsBuiltin } from "./components/utils-builtin.mjs";
9
7
  import "./components/index.mjs";
10
8
  import { getDefaultOptions } from "./helpers/get-default-options.mjs";
11
9
  import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
12
10
  import { For, Show, code } from "@alloy-js/core";
13
11
  import { VarDeclaration } from "@alloy-js/typescript";
14
12
  import { render } from "@powerlines/plugin-alloy/render";
15
- import theme from "@shell-shock/plugin-theme";
13
+ import console from "@shell-shock/plugin-console";
16
14
 
17
15
  //#region src/index.tsx
18
16
  /**
@@ -20,7 +18,7 @@ import theme from "@shell-shock/plugin-theme";
20
18
  */
21
19
  const plugin = (options = {}) => {
22
20
  return [
23
- theme({ theme: options.theme }),
21
+ console(options),
24
22
  {
25
23
  name: "shell-shock:script-preset",
26
24
  config() {
@@ -33,10 +31,6 @@ const plugin = (options = {}) => {
33
31
  },
34
32
  configResolved() {
35
33
  this.dependencies.didyoumean2 = "^7.0.4";
36
- },
37
- async prepare() {
38
- this.debug("Rendering built-in modules for the Shell Shock `script` preset.");
39
- return render(this, [createComponent(UtilsBuiltin, {}), createComponent(ConsoleBuiltin, {})]);
40
34
  }
41
35
  },
42
36
  {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["code","For","Show","VarDeclaration","render","theme","BannerFunctionDeclaration","VirtualHelp","BinEntry","CommandEntry","CommandRouter","ConsoleBuiltin","UtilsBuiltin","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","_$createComponent","order","handler","_self$","builtinImports","console","utils","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","segments","values","each","doubleHardline","child","isVirtual","fallback","command"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport theme from \"@shell-shock/plugin-theme\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, VirtualHelp } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { ConsoleBuiltin } from \"./components/console-builtin\";\nimport { UtilsBuiltin } from \"./components/utils-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n) => {\n return [\n theme({\n theme: options.theme\n }),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n },\n async prepare() {\n this.debug(\n \"Rendering built-in modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <UtilsBuiltin />\n <ConsoleBuiltin />\n </>\n );\n }\n },\n {\n name: \"shell-shock:script-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\",\n \"help\"\n ],\n utils: [\"useArgs\", \"isMinimal\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <hbr />\n {code`banner();`}\n <hbr />\n <hbr />\n <VirtualHelp\n options={this.options}\n commands={this.commands ?? {}}\n />\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For each={Object.values(this.commands)} doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAae,UAGXC,UAA+B,EAAE,KAC9B;AACH,QAAO;EACLX,MAAM,EACJA,OAAOW,QAAQX,OAChB,CAAC;EACF;GACEY,MAAM;GACNC,SAAS;AACP,SAAKC,MACH,uEACD;AAED,WAAO;KACLC,gBAAgBN;KAChBO,iBAAiB;KACjB,GAAGL;KACJ;;GAEHM,iBAAiB;AACf,SAAKC,aAAaC,cAAc;;GAElC,MAAMC,UAAU;AACd,SAAKN,MACH,kEACD;AAED,WAAOf,OACL,MAAI,CAAAsB,gBAEDd,cAAY,EAAA,CAAA,EAAAc,gBACZf,gBAAc,EAAA,CAAA,CAEnB,CAAC;;GAEJ;EACD;GACEM,MAAM;GACNQ,SAAS;IACPE,OAAO;IACP,MAAMC,UAAU;KAAA,MAAAC,SAAA;AACd,UAAKV,MACH,oEACD;AAED,YAAOf,O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AS;;QAAEO,gBAAc;QAAAX,WACpDY,UAAKrB,gBACHxB,MAAI;SAAA,IACHkC,OAAI;AAAA,iBAAEW,MAAMC;;SAAS,IACrBC,WAAQ;AAAA,iBAAAvB,gBAAGjB,cAAY,EAACyC,SAASH,OAAK,CAAA;;SAAA,IAAAZ,WAAA;AAAA,iBAAAT,gBACrCb,qBAAmB,EAACqC,SAASH,OAAK,CAAA;;SAAA,CAAA;QAEtC,CAAA;;MAAA,CAAA,CAIT,CAAC;;IAEL;GACD;EACF;;AAGH,kBAAehC"}
1
+ {"version":3,"file":"index.mjs","names":["code","For","Show","VarDeclaration","render","console","BannerFunctionDeclaration","VirtualHelp","BinEntry","CommandEntry","CommandRouter","VirtualCommandEntry","getDefaultOptions","plugin","options","name","config","debug","defaultOptions","isCaseSensitive","configResolved","dependencies","didyoumean2","prepare","order","handler","_self$","_$createComponent","builtinImports","utils","prefix","_$createIntrinsic","children","when","Object","keys","commands","length","type","initializer","segments","values","each","doubleHardline","child","isVirtual","fallback","command"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport console from \"@shell-shock/plugin-console\";\nimport type { Plugin } from \"powerlines/types/plugin\";\nimport { BannerFunctionDeclaration, VirtualHelp } from \"./components\";\nimport { BinEntry } from \"./components/bin-entry\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { ScriptPresetContext, ScriptPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock base plugin.\n */\nexport const plugin = <\n TContext extends ScriptPresetContext = ScriptPresetContext\n>(\n options: ScriptPresetOptions = {}\n) => {\n return [\n console(options),\n {\n name: \"shell-shock:script-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `script` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n configResolved() {\n this.dependencies.didyoumean2 = \"^7.0.4\";\n }\n },\n {\n name: \"shell-shock:script-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `script` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\",\n \"help\"\n ],\n utils: [\"useArgs\", \"isMinimal\"]\n }}\n prefix={\n <>\n <BannerFunctionDeclaration />\n <hbr />\n <hbr />\n </>\n }>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n const\n name=\"args\"\n type=\"string[]\"\n initializer={code`useArgs();`}\n />\n <hbr />\n <CommandRouter segments={[]} commands={this.commands ?? {}} />\n <hbr />\n </Show>\n <hbr />\n <hbr />\n {code`banner();`}\n <hbr />\n <hbr />\n <VirtualHelp\n options={this.options}\n commands={this.commands ?? {}}\n />\n </BinEntry>\n <Show when={Object.values(this.commands).length > 0}>\n <For each={Object.values(this.commands)} doubleHardline>\n {child => (\n <Show\n when={child.isVirtual}\n fallback={<CommandEntry command={child} />}>\n <VirtualCommandEntry command={child} />\n </Show>\n )}\n </For>\n </Show>\n </>\n );\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"m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,0BALO,CAAA,GAMP,kBANO,CAMY,eANZ,CAAA,GAOT,kBAPS,CAOU,eAPV,CAAA,GAQT,OARS,CAQD,eARC,CAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAmCiB,mBAAA,SACP,KAAK,4BAA4B,QAAQ;;AADnD;;;;;;;;;;EAmBY,cAAA,CAAA,EALN,aAK4B,EAAA,GAAA,CAAG,CAAA,OAAA,EAJpB,OAIiC,EAAA,KAAA,EAJjB,WAIoC,EAAA,GAJpB,aAIoB,EAAA,CAAA,GAAA,KAAA;AAErE;AAAyC,KAF7B,sBAAA,GAAyB,UAEI,GAFS,mBAET;AACzB,KADJ,0BAAA,GAA6B,cACzB,GAAd,QAAc,CAAL,IAAK,CAAA,mBAAA,EAAA,OAAA,CAAA,CAAA,GACd,yBADc;AAAL,KAGC,mBAHD,CAAA,wBAIe,0BAJf,GAKP,0BALO,CAAA,GAMP,kBANO,CAMY,eANZ,CAAA,GAOT,kBAPS,CAOU,eAPV,CAAA,GAQT,OARS,CAQD,eARC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/preset-script",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "type": "module",
5
5
  "description": "A Shell Shock preset that generates a fully-featured script application.",
6
6
  "repository": {
@@ -125,18 +125,18 @@
125
125
  "default": "./dist/components/command-router.mjs"
126
126
  }
127
127
  },
128
- "./components/console-builtin": {
128
+ "./components/exit-function-declaration": {
129
129
  "require": {
130
- "types": "./dist/components/console-builtin.d.cts",
131
- "default": "./dist/components/console-builtin.cjs"
130
+ "types": "./dist/components/exit-function-declaration.d.cts",
131
+ "default": "./dist/components/exit-function-declaration.cjs"
132
132
  },
133
133
  "import": {
134
- "types": "./dist/components/console-builtin.d.mts",
135
- "default": "./dist/components/console-builtin.mjs"
134
+ "types": "./dist/components/exit-function-declaration.d.mts",
135
+ "default": "./dist/components/exit-function-declaration.mjs"
136
136
  },
137
137
  "default": {
138
- "types": "./dist/components/console-builtin.d.mts",
139
- "default": "./dist/components/console-builtin.mjs"
138
+ "types": "./dist/components/exit-function-declaration.d.mts",
139
+ "default": "./dist/components/exit-function-declaration.mjs"
140
140
  }
141
141
  },
142
142
  "./components/help": {
@@ -167,20 +167,6 @@
167
167
  "default": "./dist/components/helpers.mjs"
168
168
  }
169
169
  },
170
- "./components/utils-builtin": {
171
- "require": {
172
- "types": "./dist/components/utils-builtin.d.cts",
173
- "default": "./dist/components/utils-builtin.cjs"
174
- },
175
- "import": {
176
- "types": "./dist/components/utils-builtin.d.mts",
177
- "default": "./dist/components/utils-builtin.mjs"
178
- },
179
- "default": {
180
- "types": "./dist/components/utils-builtin.d.mts",
181
- "default": "./dist/components/utils-builtin.mjs"
182
- }
183
- },
184
170
  "./components/virtual-command-entry": {
185
171
  "require": {
186
172
  "types": "./dist/components/virtual-command-entry.d.cts",
@@ -195,48 +181,6 @@
195
181
  "default": "./dist/components/virtual-command-entry.mjs"
196
182
  }
197
183
  },
198
- "./contexts": {
199
- "require": {
200
- "types": "./dist/contexts/index.d.cts",
201
- "default": "./dist/contexts/index.cjs"
202
- },
203
- "import": {
204
- "types": "./dist/contexts/index.d.mts",
205
- "default": "./dist/contexts/index.mjs"
206
- },
207
- "default": {
208
- "types": "./dist/contexts/index.d.mts",
209
- "default": "./dist/contexts/index.mjs"
210
- }
211
- },
212
- "./contexts/theme": {
213
- "require": {
214
- "types": "./dist/contexts/theme.d.cts",
215
- "default": "./dist/contexts/theme.cjs"
216
- },
217
- "import": {
218
- "types": "./dist/contexts/theme.d.mts",
219
- "default": "./dist/contexts/theme.mjs"
220
- },
221
- "default": {
222
- "types": "./dist/contexts/theme.d.mts",
223
- "default": "./dist/contexts/theme.mjs"
224
- }
225
- },
226
- "./helpers/ansi-utils": {
227
- "require": {
228
- "types": "./dist/helpers/ansi-utils.d.cts",
229
- "default": "./dist/helpers/ansi-utils.cjs"
230
- },
231
- "import": {
232
- "types": "./dist/helpers/ansi-utils.d.mts",
233
- "default": "./dist/helpers/ansi-utils.mjs"
234
- },
235
- "default": {
236
- "types": "./dist/helpers/ansi-utils.d.mts",
237
- "default": "./dist/helpers/ansi-utils.mjs"
238
- }
239
- },
240
184
  "./helpers/get-default-options": {
241
185
  "require": {
242
186
  "types": "./dist/helpers/get-default-options.d.cts",
@@ -293,22 +237,23 @@
293
237
  "dependencies": {
294
238
  "@alloy-js/core": "0.23.0-dev.8",
295
239
  "@alloy-js/typescript": "0.23.0-dev.4",
296
- "@powerlines/deepkit": "^0.6.65",
297
- "@powerlines/plugin-alloy": "^0.23.15",
298
- "@powerlines/plugin-plugin": "^0.12.236",
299
- "@shell-shock/core": "^0.8.10",
300
- "@shell-shock/plugin-theme": "^0.2.1",
240
+ "@powerlines/deepkit": "^0.6.66",
241
+ "@powerlines/plugin-alloy": "0.23.16",
242
+ "@powerlines/plugin-plugin": "^0.12.237",
243
+ "@shell-shock/core": "^0.8.12",
244
+ "@shell-shock/plugin-theme": "^0.3.0",
301
245
  "@stryke/helpers": "^0.9.42",
302
246
  "@stryke/path": "0.26.6",
303
- "@stryke/string-format": "^0.14.2",
247
+ "@stryke/string-format": "0.14.2",
304
248
  "defu": "6.1.4",
305
- "powerlines": "^0.38.52"
249
+ "powerlines": "^0.38.53",
250
+ "@shell-shock/plugin-console": "^0.0.2"
306
251
  },
307
252
  "devDependencies": {
308
253
  "@babel/core": "^7.29.0",
309
- "@powerlines/plugin-alloy": "^0.23.15",
254
+ "@powerlines/plugin-alloy": "0.23.16",
310
255
  "@types/node": "^22.19.11"
311
256
  },
312
257
  "publishConfig": { "access": "public" },
313
- "gitHead": "ba4e6ba921fb77de5be8950f02ea798752b61450"
258
+ "gitHead": "a802bf947afd12ce5c0f29aae1d4039c9e4f40f7"
314
259
  }