@shell-shock/preset-cli 0.8.0 → 0.8.4

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 (107) 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 +48 -164
  4. package/dist/components/banner-function-declaration.d.cts +2 -2
  5. package/dist/components/banner-function-declaration.d.cts.map +1 -1
  6. package/dist/components/banner-function-declaration.d.mts +2 -2
  7. package/dist/components/banner-function-declaration.d.mts.map +1 -1
  8. package/dist/components/banner-function-declaration.mjs +29 -146
  9. package/dist/components/banner-function-declaration.mjs.map +1 -1
  10. package/dist/components/command-entry.cjs +122 -120
  11. package/dist/components/command-entry.d.cts.map +1 -1
  12. package/dist/components/command-entry.d.mts +3 -3
  13. package/dist/components/command-entry.d.mts.map +1 -1
  14. package/dist/components/command-entry.mjs +21 -20
  15. package/dist/components/command-entry.mjs.map +1 -1
  16. package/dist/components/command-router.cjs +20 -19
  17. package/dist/components/command-router.d.cts +3 -3
  18. package/dist/components/command-router.d.cts.map +1 -1
  19. package/dist/components/command-router.d.mts.map +1 -1
  20. package/dist/components/command-router.mjs +1 -1
  21. package/dist/components/command-router.mjs.map +1 -1
  22. package/dist/components/index.cjs +4 -0
  23. package/dist/components/index.d.cts +2 -1
  24. package/dist/components/index.d.mts +2 -1
  25. package/dist/components/index.mjs +2 -1
  26. package/dist/components/upgrade-builtin.cjs +171 -0
  27. package/dist/components/upgrade-builtin.d.cts +15 -0
  28. package/dist/components/upgrade-builtin.d.cts.map +1 -0
  29. package/dist/components/upgrade-builtin.d.mts +15 -0
  30. package/dist/components/upgrade-builtin.d.mts.map +1 -0
  31. package/dist/components/upgrade-builtin.mjs +169 -0
  32. package/dist/components/upgrade-builtin.mjs.map +1 -0
  33. package/dist/components/virtual-command-entry.cjs +26 -24
  34. package/dist/components/virtual-command-entry.d.cts.map +1 -1
  35. package/dist/components/virtual-command-entry.d.mts +3 -3
  36. package/dist/components/virtual-command-entry.d.mts.map +1 -1
  37. package/dist/components/virtual-command-entry.mjs +7 -6
  38. package/dist/components/virtual-command-entry.mjs.map +1 -1
  39. package/dist/helpers/get-default-options.cjs +6 -6
  40. package/dist/helpers/get-default-options.mjs.map +1 -1
  41. package/dist/index.cjs +49 -62
  42. package/dist/index.d.cts +0 -1
  43. package/dist/index.d.cts.map +1 -1
  44. package/dist/index.d.mts +0 -1
  45. package/dist/index.d.mts.map +1 -1
  46. package/dist/index.mjs +23 -36
  47. package/dist/index.mjs.map +1 -1
  48. package/dist/plugin-help/dist/components/display.cjs +259 -0
  49. package/dist/plugin-help/dist/components/display.mjs +254 -0
  50. package/dist/plugin-help/dist/components/display.mjs.map +1 -0
  51. package/dist/plugin-help/dist/components/help-builtin.cjs +85 -0
  52. package/dist/plugin-help/dist/components/help-builtin.mjs +84 -0
  53. package/dist/plugin-help/dist/components/help-builtin.mjs.map +1 -0
  54. package/dist/plugin-help/dist/components/help-command.cjs +96 -0
  55. package/dist/plugin-help/dist/components/help-command.mjs +96 -0
  56. package/dist/plugin-help/dist/components/help-command.mjs.map +1 -0
  57. package/dist/plugin-help/dist/components/index.cjs +3 -0
  58. package/dist/plugin-help/dist/components/index.mjs +5 -0
  59. package/dist/plugin-help/dist/index.cjs +103 -0
  60. package/dist/plugin-help/dist/index.d.cts +2 -0
  61. package/dist/plugin-help/dist/index.d.mts +2 -0
  62. package/dist/plugin-help/dist/index.mjs +100 -0
  63. package/dist/plugin-help/dist/index.mjs.map +1 -0
  64. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/constant-case.cjs +17 -0
  65. 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
  66. 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
  67. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/get-words.cjs +38 -0
  68. 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
  69. 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
  70. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/kebab-case.cjs +33 -0
  71. 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
  72. 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
  73. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/snake-case.cjs +40 -0
  74. 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
  75. 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
  76. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_string-format@0.17.6/node_modules/@stryke/string-format/dist/upper-case-first.cjs +17 -0
  77. 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
  78. 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
  79. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-empty.cjs +20 -0
  80. 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
  81. 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
  82. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-null.cjs +12 -0
  83. 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
  84. 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
  85. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set-string.cjs +20 -0
  86. 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
  87. 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
  88. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-set.cjs +19 -0
  89. 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
  90. 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
  91. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-string.cjs +12 -0
  92. 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
  93. 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
  94. package/dist/plugin-help/dist/node_modules/.pnpm/@stryke_type-checks@0.5.41/node_modules/@stryke/type-checks/dist/is-undefined.cjs +8 -0
  95. 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
  96. 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
  97. package/dist/plugin-help/dist/types/plugin.d.cts +62 -0
  98. package/dist/plugin-help/dist/types/plugin.d.cts.map +1 -0
  99. package/dist/plugin-help/dist/types/plugin.d.mts +62 -0
  100. package/dist/plugin-help/dist/types/plugin.d.mts.map +1 -0
  101. package/dist/types/index.d.cts +2 -2
  102. package/dist/types/index.d.mts +2 -2
  103. package/dist/types/plugin.d.cts +20 -34
  104. package/dist/types/plugin.d.cts.map +1 -1
  105. package/dist/types/plugin.d.mts +20 -34
  106. package/dist/types/plugin.d.mts.map +1 -1
  107. package/package.json +30 -16
@@ -1,2 +1,2 @@
1
- import { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUpgradeOptions, CLIPresetUserConfig, UpgradeType } from "./plugin.mjs";
2
- export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUpgradeOptions, CLIPresetUserConfig, UpgradeType };
1
+ import { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType } from "./plugin.mjs";
2
+ export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
@@ -1,26 +1,15 @@
1
- import { CommandBase, CommandOption, Context } from "@shell-shock/core";
2
- import { PromptsPluginContext } from "@shell-shock/plugin-prompts/types/plugin";
3
- import { ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
4
- import { UpgradePluginOptions } from "@shell-shock/plugin-upgrade/types/plugin";
5
- import { ScriptPresetContext, ScriptPresetOptions, ScriptPresetResolvedConfig, ScriptPresetUserConfig } from "@shell-shock/preset-script/types/plugin";
1
+ import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "../plugin-help/dist/types/plugin.cjs";
2
+ import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
3
+ import { ResolvedConfig as ResolvedConfig$1 } from "powerlines";
4
+ import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
5
+ import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
6
+ import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
7
+ import { UpgradePluginContext, UpgradePluginOptions, UpgradePluginResolvedConfig, UpgradePluginUserConfig } from "@shell-shock/plugin-upgrade/types/plugin";
8
+ import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
6
9
 
7
10
  //#region src/types/plugin.d.ts
8
11
  type UpgradeType = "confirm" | "auto" | "manual";
9
- interface CLIPresetUpgradeOptions extends UpgradePluginOptions {
10
- /**
11
- * The type of upgrade to perform. This option determines how the upgrade process will be handled.
12
- *
13
- * @remarks
14
- * The upgrade logic will behave differently based on the value of this field:
15
- * - `"confirm"` - the user will be prompted to confirm the upgrade before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended upgrades.
16
- * - `"auto"` - the upgrade will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless upgrade experience and are confident in the stability of new versions.
17
- * - `"manual"` - the command will only display the latest available version without performing any upgrade. This option is useful for users who want to check for updates without making any changes to their system.
18
- *
19
- * @defaultValue "confirm"
20
- */
21
- type?: UpgradeType;
22
- }
23
- type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & {
12
+ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPluginOptions & PromptsPluginOptions & UpgradePluginOptions & {
24
13
  /**
25
14
  * The default interactive mode to apply to commands.
26
15
  *
@@ -49,24 +38,21 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & {
49
38
  */
50
39
  defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
51
40
  /**
52
- * Whether to include the upgrade process provided by the `@shell-shock/plugin-upgrade` package. If set to `true`, the upgrade command will be included with default options. If set to an object, the provided options will be used to configure the upgrade command. If set to `false`, the upgrade command will not be included.
41
+ * The type of upgrade to perform. This option determines how the upgrade process will be handled.
53
42
  *
54
43
  * @remarks
55
- * The upgrade command allows users to check for and perform upgrades to the latest version of the application. If you would like to include the upgrade command in your CLI application, but manage its configuration separately, you can set this field to `true` and configure the upgrade plugin directly in your application's configuration.
56
- */
57
- upgrade?: CLIPresetUpgradeOptions | false;
58
- };
59
- type CLIPresetUserConfig = ScriptPresetUserConfig & ThemePluginUserConfig & CLIPresetOptions;
60
- type CLIPresetResolvedConfig = ScriptPresetResolvedConfig & ThemePluginResolvedConfig & Required<Pick<CLIPresetOptions, "interactive" | "defaultOptions">> & {
61
- /**
62
- * Whether to include the upgrade process provided by the `@shell-shock/plugin-upgrade` package. If not set to `false`, the upgrade command will be included with default options. If set to an object, the provided options will be used to configure the upgrade command. If set to `false`, the upgrade command will not be included.
44
+ * The upgrade logic will behave differently based on the value of this field:
45
+ * - `"confirm"` - the user will be prompted to confirm the upgrade before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended upgrades.
46
+ * - `"auto"` - the upgrade will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless upgrade experience and are confident in the stability of new versions.
47
+ * - `"manual"` - the command will only display the latest available version without performing any upgrade. This option is useful for users who want to check for updates without making any changes to their system.
63
48
  *
64
- * @remarks
65
- * The upgrade command allows users to check for and perform upgrades to the latest version of the application. If you would like to include the upgrade command in your CLI application, but manage its configuration separately, you can set this field to `true` and configure the upgrade plugin directly in your application's configuration.
49
+ * @defaultValue "confirm"
66
50
  */
67
- upgrade: Required<CLIPresetUpgradeOptions> | false;
51
+ upgradeType?: UpgradeType | false;
68
52
  };
69
- type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = PromptsPluginContext & ScriptPresetContext<TResolvedConfig>;
53
+ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & HelpPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
54
+ type CLIPresetResolvedConfig = ResolvedConfig$1 & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & HelpPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
55
+ type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
70
56
  //#endregion
71
- export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUpgradeOptions, CLIPresetUserConfig, UpgradeType };
57
+ export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
72
58
  //# sourceMappingURL=plugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KAgCY,WAAA;UAEK,uBAAA,SAAgC;EAFrC;AAEZ;AAeA;;;;;;;;;EA0CY,IAAA,CAAA,EA7CH,WA6CG;;AACV,KA3CU,gBAAA,GAAmB,IA2C7B,CA3CkC,mBA2ClC,EAAA,gBAAA,CAAA,GAAA;EACA;;AAEF;;;;;;;;;EAYY,WAAA,CAAA,EAAA,OAAgB,GAAA,OAAA;EACF;;;;;;;;;;;;;;mBA9BpB,6BACW,gBAAgB,gBAAgB;;;;;;;YASrC;;KAGA,mBAAA,GAAsB,yBAChC,wBACA;KAEU,uBAAA,GAA0B,6BACpC,4BACA,SAAS,KAAK;;;;;;;WAOH,SAAS;;KAGV,yCACc,0BAA0B,2BAChD,uBAAuB,oBAAoB"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;KAuDY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,sBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;;AALF;;;;;AAEA;;;;;EAeI,WAAA;EAbF;;;;;;;;;;;;;;EA6BE,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAF/C;;;;;;;;;;;EAgBA,WAAA,GAAc,WAAA;AAAA;AAAA,KAGN,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,oBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,gBAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,wBAAA,GACA,2BAAA,GACA,QAAA,CAAS,gBAAA;AAAA,KAEC,gBAAA,yBACc,uBAAA,GAA0B,uBAAA,IAChD,OAAA,CAAQ,eAAA,IACV,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,oBAAA,CAAqB,eAAA,IACrB,iBAAA,CAAkB,eAAA,IAClB,oBAAA,CAAqB,eAAA"}
@@ -1,26 +1,15 @@
1
- import { CommandBase, CommandOption, Context } from "@shell-shock/core";
2
- import { PromptsPluginContext } from "@shell-shock/plugin-prompts/types/plugin";
3
- import { ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
4
- import { UpgradePluginOptions } from "@shell-shock/plugin-upgrade/types/plugin";
5
- import { ScriptPresetContext, ScriptPresetOptions, ScriptPresetResolvedConfig, ScriptPresetUserConfig } from "@shell-shock/preset-script/types/plugin";
1
+ import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "../plugin-help/dist/types/plugin.mjs";
2
+ import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
3
+ import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
4
+ import { ResolvedConfig as ResolvedConfig$1 } from "powerlines";
5
+ import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
6
+ import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
7
+ import { UpgradePluginContext, UpgradePluginOptions, UpgradePluginResolvedConfig, UpgradePluginUserConfig } from "@shell-shock/plugin-upgrade/types/plugin";
8
+ import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
6
9
 
7
10
  //#region src/types/plugin.d.ts
8
11
  type UpgradeType = "confirm" | "auto" | "manual";
9
- interface CLIPresetUpgradeOptions extends UpgradePluginOptions {
10
- /**
11
- * The type of upgrade to perform. This option determines how the upgrade process will be handled.
12
- *
13
- * @remarks
14
- * The upgrade logic will behave differently based on the value of this field:
15
- * - `"confirm"` - the user will be prompted to confirm the upgrade before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended upgrades.
16
- * - `"auto"` - the upgrade will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless upgrade experience and are confident in the stability of new versions.
17
- * - `"manual"` - the command will only display the latest available version without performing any upgrade. This option is useful for users who want to check for updates without making any changes to their system.
18
- *
19
- * @defaultValue "confirm"
20
- */
21
- type?: UpgradeType;
22
- }
23
- type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & {
12
+ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPluginOptions & PromptsPluginOptions & UpgradePluginOptions & {
24
13
  /**
25
14
  * The default interactive mode to apply to commands.
26
15
  *
@@ -49,24 +38,21 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & {
49
38
  */
50
39
  defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
51
40
  /**
52
- * Whether to include the upgrade process provided by the `@shell-shock/plugin-upgrade` package. If set to `true`, the upgrade command will be included with default options. If set to an object, the provided options will be used to configure the upgrade command. If set to `false`, the upgrade command will not be included.
41
+ * The type of upgrade to perform. This option determines how the upgrade process will be handled.
53
42
  *
54
43
  * @remarks
55
- * The upgrade command allows users to check for and perform upgrades to the latest version of the application. If you would like to include the upgrade command in your CLI application, but manage its configuration separately, you can set this field to `true` and configure the upgrade plugin directly in your application's configuration.
56
- */
57
- upgrade?: CLIPresetUpgradeOptions | false;
58
- };
59
- type CLIPresetUserConfig = ScriptPresetUserConfig & ThemePluginUserConfig & CLIPresetOptions;
60
- type CLIPresetResolvedConfig = ScriptPresetResolvedConfig & ThemePluginResolvedConfig & Required<Pick<CLIPresetOptions, "interactive" | "defaultOptions">> & {
61
- /**
62
- * Whether to include the upgrade process provided by the `@shell-shock/plugin-upgrade` package. If not set to `false`, the upgrade command will be included with default options. If set to an object, the provided options will be used to configure the upgrade command. If set to `false`, the upgrade command will not be included.
44
+ * The upgrade logic will behave differently based on the value of this field:
45
+ * - `"confirm"` - the user will be prompted to confirm the upgrade before it is performed. This is the default behavior and is recommended for most users, as it provides an extra layer of safety against unintended upgrades.
46
+ * - `"auto"` - the upgrade will be performed automatically without any user confirmation. This option is suitable for advanced users who want a seamless upgrade experience and are confident in the stability of new versions.
47
+ * - `"manual"` - the command will only display the latest available version without performing any upgrade. This option is useful for users who want to check for updates without making any changes to their system.
63
48
  *
64
- * @remarks
65
- * The upgrade command allows users to check for and perform upgrades to the latest version of the application. If you would like to include the upgrade command in your CLI application, but manage its configuration separately, you can set this field to `true` and configure the upgrade plugin directly in your application's configuration.
49
+ * @defaultValue "confirm"
66
50
  */
67
- upgrade: Required<CLIPresetUpgradeOptions> | false;
51
+ upgradeType?: UpgradeType | false;
68
52
  };
69
- type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = PromptsPluginContext & ScriptPresetContext<TResolvedConfig>;
53
+ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & HelpPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
54
+ type CLIPresetResolvedConfig = ResolvedConfig$1 & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & HelpPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
55
+ type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
70
56
  //#endregion
71
- export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUpgradeOptions, CLIPresetUserConfig, UpgradeType };
57
+ export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
72
58
  //# sourceMappingURL=plugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;KAgCY,WAAA;UAEK,uBAAA,SAAgC;EAFrC;AAEZ;AAeA;;;;;;;;;EA0CY,IAAA,CAAA,EA7CH,WA6CG;;AACV,KA3CU,gBAAA,GAAmB,IA2C7B,CA3CkC,mBA2ClC,EAAA,gBAAA,CAAA,GAAA;EACA;;AAEF;;;;;;;;;EAYY,WAAA,CAAA,EAAA,OAAgB,GAAA,OAAA;EACF;;;;;;;;;;;;;;mBA9BpB,6BACW,gBAAgB,gBAAgB;;;;;;;YASrC;;KAGA,mBAAA,GAAsB,yBAChC,wBACA;KAEU,uBAAA,GAA0B,6BACpC,4BACA,SAAS,KAAK;;;;;;;WAOH,SAAS;;KAGV,yCACc,0BAA0B,2BAChD,uBAAuB,oBAAoB"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;KAuDY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,sBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;;AALF;;;;;AAEA;;;;;EAeI,WAAA;EAbF;;;;;;;;;;;;;;EA6BE,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAF/C;;;;;;;;;;;EAgBA,WAAA,GAAc,WAAA;AAAA;AAAA,KAGN,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,oBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,gBAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,wBAAA,GACA,2BAAA,GACA,QAAA,CAAS,gBAAA;AAAA,KAEC,gBAAA,yBACc,uBAAA,GAA0B,uBAAA,IAChD,OAAA,CAAQ,eAAA,IACV,kBAAA,CAAmB,eAAA,IACnB,oBAAA,CAAqB,eAAA,IACrB,oBAAA,CAAqB,eAAA,IACrB,iBAAA,CAAkB,eAAA,IAClB,oBAAA,CAAqB,eAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/preset-cli",
3
- "version": "0.8.0",
3
+ "version": "0.8.4",
4
4
  "private": false,
5
5
  "description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
6
6
  "keywords": [
@@ -59,7 +59,6 @@
59
59
  "default": "./dist/index.mjs"
60
60
  }
61
61
  },
62
- "./*": "./*",
63
62
  "./components": {
64
63
  "require": {
65
64
  "types": "./dist/components/index.d.cts",
@@ -116,6 +115,20 @@
116
115
  "default": "./dist/components/command-router.mjs"
117
116
  }
118
117
  },
118
+ "./components/upgrade-builtin": {
119
+ "require": {
120
+ "types": "./dist/components/upgrade-builtin.d.cts",
121
+ "default": "./dist/components/upgrade-builtin.cjs"
122
+ },
123
+ "import": {
124
+ "types": "./dist/components/upgrade-builtin.d.mts",
125
+ "default": "./dist/components/upgrade-builtin.mjs"
126
+ },
127
+ "default": {
128
+ "types": "./dist/components/upgrade-builtin.d.mts",
129
+ "default": "./dist/components/upgrade-builtin.mjs"
130
+ }
131
+ },
119
132
  "./components/virtual-command-entry": {
120
133
  "require": {
121
134
  "types": "./dist/components/virtual-command-entry.d.cts",
@@ -130,6 +143,7 @@
130
143
  "default": "./dist/components/virtual-command-entry.mjs"
131
144
  }
132
145
  },
146
+ "./package.json": "./package.json",
133
147
  "./types": {
134
148
  "require": {
135
149
  "types": "./dist/types/index.d.cts",
@@ -167,24 +181,24 @@
167
181
  "dependencies": {
168
182
  "@alloy-js/core": "0.23.0-dev.8",
169
183
  "@alloy-js/typescript": "0.23.0-dev.4",
170
- "@powerlines/deepkit": "^0.6.90",
171
- "@powerlines/plugin-alloy": "^0.24.2",
172
- "@powerlines/plugin-plugin": "^0.12.262",
173
- "@shell-shock/core": "^0.12.0",
174
- "@shell-shock/plugin-console": "^0.1.8",
175
- "@shell-shock/plugin-prompts": "^0.3.9",
176
- "@shell-shock/plugin-theme": "^0.3.12",
177
- "@shell-shock/plugin-upgrade": "^0.1.14",
178
- "@shell-shock/preset-script": "^0.6.23",
179
- "@stryke/path": "^0.26.12",
180
- "@stryke/string-format": "^0.14.8",
184
+ "@powerlines/deepkit": "^0.6.134",
185
+ "@powerlines/plugin-alloy": "^0.25.41",
186
+ "@powerlines/plugin-plugin": "^0.12.306",
187
+ "@shell-shock/core": "^0.13.1",
188
+ "@shell-shock/plugin-console": "^0.1.12",
189
+ "@shell-shock/plugin-prompts": "^0.3.13",
190
+ "@shell-shock/plugin-theme": "^0.3.16",
191
+ "@shell-shock/plugin-upgrade": "^0.1.18",
192
+ "@shell-shock/preset-script": "^0.6.27",
193
+ "@stryke/path": "^0.27.2",
194
+ "@stryke/string-format": "^0.17.6",
181
195
  "cfonts": "^3.3.1",
182
196
  "defu": "^6.1.4",
183
- "powerlines": "^0.39.19"
197
+ "powerlines": "^0.41.20"
184
198
  },
185
199
  "devDependencies": {
186
200
  "@babel/core": "^7.29.0",
187
- "@types/node": "^25.3.3",
201
+ "@types/node": "^25.5.0",
188
202
  "@types/react": "^19.2.14"
189
203
  },
190
204
  "publishConfig": {
@@ -210,5 +224,5 @@
210
224
  "./package.json": "./package.json"
211
225
  }
212
226
  },
213
- "gitHead": "c38d304433a296936fb8ca58aa138a0039918931"
227
+ "gitHead": "86c55189ed02d126fb583cf6d2555266f00d0f3a"
214
228
  }