@shell-shock/preset-cli 0.9.7 → 0.9.9

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 (52) hide show
  1. package/dist/components/banner-builtin.cjs +2 -2
  2. package/dist/components/banner-builtin.d.cts.map +1 -1
  3. package/dist/components/banner-builtin.d.mts.map +1 -1
  4. package/dist/components/banner-builtin.mjs +2 -2
  5. package/dist/components/banner-builtin.mjs.map +1 -1
  6. package/dist/components/command-entry.cjs +32 -23
  7. package/dist/components/command-entry.mjs +31 -22
  8. package/dist/components/command-entry.mjs.map +1 -1
  9. package/dist/components/command-router.cjs +3 -3
  10. package/dist/components/command-router.mjs +3 -3
  11. package/dist/components/command-router.mjs.map +1 -1
  12. package/dist/components/upgrade-builtin.cjs +8 -9
  13. package/dist/components/upgrade-builtin.mjs +8 -9
  14. package/dist/components/upgrade-builtin.mjs.map +1 -1
  15. package/dist/components/virtual-command-entry.cjs +13 -6
  16. package/dist/components/virtual-command-entry.mjs +13 -6
  17. package/dist/components/virtual-command-entry.mjs.map +1 -1
  18. package/dist/helpers/{get-default-options.cjs → get-global-options.cjs} +5 -5
  19. package/dist/helpers/{get-default-options.mjs → get-global-options.mjs} +6 -6
  20. package/dist/helpers/get-global-options.mjs.map +1 -0
  21. package/dist/index.cjs +9 -9
  22. package/dist/index.d.cts.map +1 -1
  23. package/dist/index.d.mts.map +1 -1
  24. package/dist/index.mjs +9 -9
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts +17 -0
  27. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.cts.map +1 -0
  28. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts +17 -0
  29. package/dist/node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.d.mts.map +1 -0
  30. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs +130 -0
  31. package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs.map +1 -0
  32. package/dist/packages/plugin-changelog/dist/components/index.mjs +3 -0
  33. package/dist/packages/plugin-changelog/dist/index.d.cts +2 -0
  34. package/dist/packages/plugin-changelog/dist/index.d.mts +2 -0
  35. package/dist/packages/plugin-changelog/dist/index.mjs +52 -0
  36. package/dist/packages/plugin-changelog/dist/index.mjs.map +1 -0
  37. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts +43 -0
  38. package/dist/packages/plugin-changelog/dist/types/plugin.d.cts.map +1 -0
  39. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts +43 -0
  40. package/dist/packages/plugin-changelog/dist/types/plugin.d.mts.map +1 -0
  41. package/dist/packages/unified/dist/markdown/index.mjs +6 -0
  42. package/dist/packages/unified/dist/markdown/index.mjs.map +1 -0
  43. package/dist/plugin-changelog/dist/components/changelog-command.cjs +130 -0
  44. package/dist/plugin-changelog/dist/components/index.cjs +1 -0
  45. package/dist/plugin-changelog/dist/index.cjs +53 -0
  46. package/dist/types/plugin.d.cts +11 -6
  47. package/dist/types/plugin.d.cts.map +1 -1
  48. package/dist/types/plugin.d.mts +11 -6
  49. package/dist/types/plugin.d.mts.map +1 -1
  50. package/dist/unified/dist/markdown/index.cjs +6 -0
  51. package/package.json +21 -20
  52. package/dist/helpers/get-default-options.mjs.map +0 -1
@@ -0,0 +1,43 @@
1
+ import { RequiredKeys } from "../../../../node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.mjs";
2
+ import { CommandConfig, Context, ResolvedConfig, UserConfig } from "@shell-shock/core";
3
+
4
+ //#region ../plugin-changelog/dist/types/plugin.d.cts
5
+ //#region src/types/plugin.d.ts
6
+ interface ChangelogPluginOptions {
7
+ /**
8
+ * The path to the changelog file to read when executing the `changelog` command. This can be an absolute path or a path relative to the application's root directory.
9
+ *
10
+ * @defaultValue "\{root\}/CHANGELOG.md"
11
+ */
12
+ file?: string;
13
+ /**
14
+ * Should the plugin add the `changelog` command?
15
+ *
16
+ * @remarks
17
+ * This can be set to a string to specify a custom command name for the `changelog` command or an object to override the default command configuration. By default, the command name will be `"changelog"`.
18
+ *
19
+ * @defaultValue "changelog"
20
+ */
21
+ command?: Partial<CommandConfig> | string;
22
+ }
23
+ type ChangelogPluginUserConfig = UserConfig & {
24
+ /**
25
+ * Resolved changelog configuration for the plugin.
26
+ */
27
+ changelog: ChangelogPluginOptions;
28
+ };
29
+ type ChangelogPluginResolvedConfig = ResolvedConfig & {
30
+ /**
31
+ * Resolved changelog configuration for the plugin.
32
+ */
33
+ changelog: Required<Omit<ChangelogPluginOptions, "command">> & {
34
+ /**
35
+ * Resolved command configuration for the changelog command.
36
+ */
37
+ command: RequiredKeys<Partial<CommandConfig>, "name">;
38
+ };
39
+ };
40
+ type ChangelogPluginContext<TResolvedConfig extends ChangelogPluginResolvedConfig = ChangelogPluginResolvedConfig> = Context<TResolvedConfig>; //#endregion
41
+ //#endregion
42
+ export { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig };
43
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.mts","names":["CommandConfig","Context","ResolvedConfig","UserConfig","RequiredKeys","ChangelogPluginOptions","Partial","file","command","ChangelogPluginUserConfig","changelog","ChangelogPluginResolvedConfig","Omit","Required","ChangelogPluginContext","TResolvedConfig"],"sources":["../../../../../../plugin-changelog/dist/types/plugin.d.cts"],"mappings":";;;;;UAIUK,sBAAAA;EAAsB;;;;;EAM9BE,IAAAA;EASkBP;;;AAAa;;;;;EAA/BQ,OAAAA,GAAUF,OAAAA,CAAQN,aAAAA;AAAAA;AAAAA,KAEfS,yBAAAA,GAA4BN,UAAAA;EAIE;AAAA;;EAAjCO,SAAAA,EAAWL,sBAAAA;AAAAA;AAAAA,KAERM,6BAAAA,GAAgCT,cAAAA;EAIfU;;;EAApBF,SAAAA,EAAWG,QAAAA,CAASD,IAAAA,CAAKP,sBAAAA;IAIdD;;;IAATI,OAAAA,EAASJ,YAAAA,CAAaE,OAAAA,CAAQN,aAAAA;EAAAA;AAAAA;AAAAA,KAG7Bc,sBAAAA,yBAA+CH,6BAAAA,GAAgCA,6BAAAA,IAAiCV,OAAAA,CAAQc,eAAAA"}
@@ -0,0 +1,6 @@
1
+ //#region ../unified/dist/markdown/index.mjs
2
+ const e = (e) => `textColors.heading.primary(\`${e}\`)`;
3
+
4
+ //#endregion
5
+ export { e };
6
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../unified/dist/markdown/index.mjs"],"sourcesContent":["const e=e=>`textColors.heading.primary(\\`${e}\\`)`;export{e as default};\n//# sourceMappingURL=index.mjs.map"],"mappings":";AAAA,MAAM,KAAE,MAAG,gCAAgC,EAAE"}
@@ -0,0 +1,130 @@
1
+ const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
2
+ const require_index = require('../../../unified/dist/markdown/index.cjs');
3
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
+ let _alloy_js_core = require("@alloy-js/core");
5
+ let _alloy_js_typescript = require("@alloy-js/typescript");
6
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
7
+ let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
8
+ let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
9
+ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
10
+ let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
11
+ let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
12
+ let _stryke_path = require("@stryke/path");
13
+
14
+ //#region ../plugin-changelog/dist/components/changelog-command.mjs
15
+ /**
16
+ * The Changelog command's handler wrapper for the Shell Shock project.
17
+ */
18
+ function ChangelogCommand() {
19
+ const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
20
+ const result = (0, _alloy_js_core.createResource)(async () => {
21
+ const content = await context.fs.read(context.config.changelog.file);
22
+ if (!content) return null;
23
+ return require_index.e(content);
24
+ });
25
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TypescriptFile, {
26
+ get path() {
27
+ return (0, _stryke_path.joinPaths)(context.entryPath, "changelog", "command.ts");
28
+ },
29
+ imports: {
30
+ "node:os": "os",
31
+ "node:fs/promises": ["readFile", "writeFile"]
32
+ },
33
+ builtinImports: { console: [
34
+ "textColors",
35
+ "bold",
36
+ "writeLine",
37
+ "error",
38
+ "warn"
39
+ ] },
40
+ get children() {
41
+ return [
42
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "Options for the Changelog command." }),
43
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
44
+ "export": true,
45
+ name: "ChangelogOptions",
46
+ get children() {
47
+ return [
48
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { heading: "An optional starting version for the changelog. The command will attempt to display changes starting from the specified version. The version should be a valid semantic version string. If not specified, the changelog will start from the earliest version available." }),
49
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
50
+ name: "start",
51
+ optional: true,
52
+ type: "string"
53
+ }),
54
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
55
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
56
+ heading: "An optional ending version for the changelog. The command will attempt to display changes up to the specified version. The version should be a valid semantic version string. If not specified, the changelog will display changes up to the latest version available.",
57
+ get children() {
58
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
59
+ get type() {
60
+ return _powerlines_deepkit_vendor_type.ReflectionKind.string;
61
+ },
62
+ defaultValue: "latest"
63
+ });
64
+ }
65
+ }),
66
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
67
+ name: "end",
68
+ optional: true,
69
+ type: "string"
70
+ })
71
+ ];
72
+ }
73
+ }),
74
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
75
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
76
+ get heading() {
77
+ return `Display the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context)} changelog.`;
78
+ },
79
+ get children() {
80
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
81
+ name: "options",
82
+ children: _alloy_js_core.code`An object containing options for displaying the changelog.`
83
+ });
84
+ }
85
+ }),
86
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
87
+ "export": true,
88
+ "default": true,
89
+ async: true,
90
+ name: "handler",
91
+ parameters: [{
92
+ name: "options",
93
+ type: "ChangelogOptions"
94
+ }],
95
+ get children() {
96
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
97
+ get when() {
98
+ return !result.loading && !result.error;
99
+ },
100
+ get fallback() {
101
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
102
+ get when() {
103
+ return !!result.error;
104
+ },
105
+ get children() {
106
+ return _alloy_js_core.code` return error(\`Failed to load changelog: ${result.error.message.replaceAll(/`/g, "\\`")}\`); `;
107
+ }
108
+ });
109
+ },
110
+ get children() {
111
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
112
+ get when() {
113
+ return !!result.data?.toString();
114
+ },
115
+ fallback: _alloy_js_core.code` return warn("There is no changelog available for display."); `,
116
+ get children() {
117
+ return _alloy_js_core.code` return \`${result.data?.toString()}\`; `;
118
+ }
119
+ });
120
+ }
121
+ });
122
+ }
123
+ })
124
+ ];
125
+ }
126
+ });
127
+ }
128
+
129
+ //#endregion
130
+ exports.ChangelogCommand = ChangelogCommand;
@@ -0,0 +1 @@
1
+ const require_changelog_command = require('./changelog-command.cjs');
@@ -0,0 +1,53 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_changelog_command = require('./components/changelog-command.cjs');
3
+ require('./components/index.cjs');
4
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
+ let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
6
+ let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
7
+ let _stryke_path_join = require("@stryke/path/join");
8
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
9
+ let defu = require("defu");
10
+ defu = require_runtime.__toESM(defu);
11
+ let powerlines_plugin_utils = require("powerlines/plugin-utils");
12
+
13
+ //#region ../plugin-changelog/dist/index.mjs
14
+ /**
15
+ * The Changelog - Shell Shock plugin to add version check functionality and changelog commands to a Shell Shock application.
16
+ */
17
+ const plugin = (options = {}) => {
18
+ return {
19
+ name: "shell-shock:changelog",
20
+ config() {
21
+ this.debug("Providing default configuration for the Shell Shock `changelog` plugin.");
22
+ return { changelog: (0, defu.default)({ command: { name: (0, _stryke_type_checks_is_set_string.isSetString)(options.command) ? options.command : "changelog" } }, options, { file: (0, _stryke_path_join.joinPaths)("{root}", "CHANGELOG.md") }) };
23
+ },
24
+ configResolved() {
25
+ this.debug("Adding the CLI changelog commands to the application context.");
26
+ this.config.changelog.file = (0, powerlines_plugin_utils.replacePathTokens)(this, this.config.changelog.file);
27
+ this.inputs ??= [];
28
+ if (this.inputs.some((input) => input.id === this.config.changelog.command.name)) this.info("The `changelog` command already exists in the commands list. If you would like the changelog command to be managed by the `@shell-shock/plugin-changelog` package, please remove or rename the command.");
29
+ else this.inputs.push({
30
+ id: this.config.changelog.command.name,
31
+ path: this.config.changelog.command.name,
32
+ segments: [this.config.changelog.command.name],
33
+ title: "Changelog",
34
+ icon: "🗃",
35
+ tags: ["Utility"],
36
+ description: `Display the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this)} changelog.`,
37
+ entry: {
38
+ file: (0, _stryke_path_join.joinPaths)(this.entryPath, "changelog", "index.ts"),
39
+ input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "changelog", "command.ts") }
40
+ },
41
+ isVirtual: false,
42
+ ...this.config.changelog.command
43
+ });
44
+ },
45
+ async prepare() {
46
+ this.debug("Rendering changelog command module for the Shell Shock `changelog` plugin.");
47
+ return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_changelog_command.ChangelogCommand, {}));
48
+ }
49
+ };
50
+ };
51
+
52
+ //#endregion
53
+ exports.plugin = plugin;
@@ -1,5 +1,6 @@
1
+ import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig } from "../packages/plugin-changelog/dist/types/plugin.cjs";
1
2
  import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
2
- import { ResolvedConfig } from "powerlines";
3
+ import { ResolvedConfig as ResolvedConfig$1 } from "powerlines";
3
4
  import { BannerPluginContext, BannerPluginOptions, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
4
5
  import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "@shell-shock/plugin-completions";
5
6
  import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
@@ -11,7 +12,7 @@ import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
11
12
 
12
13
  //#region src/types/plugin.d.ts
13
14
  type UpgradeType = "confirm" | "auto" | "manual";
14
- type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPluginOptions & PromptsPluginOptions & UpgradePluginOptions & {
15
+ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpgradePluginOptions & {
15
16
  /**
16
17
  * The default interactive mode to apply to commands.
17
18
  *
@@ -38,7 +39,7 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPlugin
38
39
  *
39
40
  * To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
40
41
  */
41
- defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
42
+ globalOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
42
43
  /**
43
44
  * The type of upgrade to perform. This option determines how the upgrade process will be handled.
44
45
  *
@@ -59,10 +60,14 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPlugin
59
60
  * Configuration options for the `completions` plugin. This field allows you to customize the behavior of the `completions` plugin, which provides commands for generating shell completion scripts for the CLI application. You can specify which shells to generate completions for, and other related settings.
60
61
  */
61
62
  completions?: Pick<CompletionsPluginOptions, "shells"> | false;
63
+ /**
64
+ * Configuration options for the `changelog` plugin. This field allows you to customize the behavior of the `changelog` plugin, which provides commands for displaying the application's changelog. You can specify the path to the changelog file, the command name, and other related settings.
65
+ */
66
+ changelog?: ChangelogPluginOptions | false;
62
67
  };
63
- type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
64
- type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
65
- type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
68
+ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
69
+ type CLIPresetResolvedConfig = ResolvedConfig$1 & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
70
+ type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
66
71
  //#endregion
67
72
  export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
68
73
  //# sourceMappingURL=plugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;KAmEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,sBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;;AAEZ;;;;;;EAeI,WAAA;EAZF;;;;;;;;;;;;;;EA4BE,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EA/BjD;;;;;;;;;;;EA6CE,WAAA,GAAc,WAAA;EAKd;;;EAAA,MAAA,GAAS,IAAA,CAAK,mBAAA;EAKA;;;EAAd,WAAA,GAAc,IAAA,CAAK,wBAAA;AAAA;AAAA,KAGX,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,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,mBAAA,CAAoB,eAAA,IACpB,iBAAA,CAAkB,eAAA,IAClB,wBAAA,CAAyB,eAAA,IACzB,oBAAA,CAAqB,eAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;KAyEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;;AALF;;;;;AAEA;;;;;EAeI,WAAA;EAbF;;;;;;;;;;;;;;EA6BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAjCf;;;;;;;;;;;EA+ChC,WAAA,GAAc,WAAA;EAAd;;;EAKA,MAAA,GAAS,IAAA,CAAK,mBAAA;EAAA;;;EAKd,WAAA,GAAc,IAAA,CAAK,wBAAA;EAKnB;;;EAAA,SAAA,GAAY,sBAAA;AAAA;AAAA,KAGJ,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,yBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,gBAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,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,mBAAA,CAAoB,eAAA,IACpB,iBAAA,CAAkB,eAAA,IAClB,wBAAA,CAAyB,eAAA,IACzB,sBAAA,CAAuB,eAAA,IACvB,oBAAA,CAAqB,eAAA"}
@@ -1,8 +1,9 @@
1
+ import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig } from "../packages/plugin-changelog/dist/types/plugin.mjs";
1
2
  import { CompletionsPluginContext, CompletionsPluginOptions, CompletionsPluginResolvedConfig, CompletionsPluginUserConfig } from "@shell-shock/plugin-completions";
2
3
  import { ConsolePluginContext, ConsolePluginResolvedConfig, ConsolePluginUserConfig } from "@shell-shock/plugin-console";
3
4
  import { HelpPluginContext, HelpPluginOptions, HelpPluginResolvedConfig, HelpPluginUserConfig } from "@shell-shock/plugin-help";
4
5
  import { CommandBase, CommandOption, Context, UserConfig } from "@shell-shock/core";
5
- import { ResolvedConfig } from "powerlines";
6
+ import { ResolvedConfig as ResolvedConfig$1 } from "powerlines";
6
7
  import { BannerPluginContext, BannerPluginOptions, BannerPluginResolvedConfig, BannerPluginUserConfig } from "@shell-shock/plugin-banner";
7
8
  import { PromptsPluginContext, PromptsPluginOptions, PromptsPluginResolvedConfig, PromptsPluginUserConfig } from "@shell-shock/plugin-prompts/types/plugin";
8
9
  import { ThemePluginContext, ThemePluginResolvedConfig, ThemePluginUserConfig } from "@shell-shock/plugin-theme/types/plugin";
@@ -11,7 +12,7 @@ import { ScriptPresetOptions } from "@shell-shock/preset-script/types/plugin";
11
12
 
12
13
  //#region src/types/plugin.d.ts
13
14
  type UpgradeType = "confirm" | "auto" | "manual";
14
- type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPluginOptions & PromptsPluginOptions & UpgradePluginOptions & {
15
+ type CLIPresetOptions = Omit<ScriptPresetOptions, "globalOptions"> & HelpPluginOptions & PromptsPluginOptions & UpgradePluginOptions & {
15
16
  /**
16
17
  * The default interactive mode to apply to commands.
17
18
  *
@@ -38,7 +39,7 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPlugin
38
39
  *
39
40
  * To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.
40
41
  */
41
- defaultOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
42
+ globalOptions?: CommandOption[] | ((context: Context, input: CommandBase) => CommandOption[]) | false;
42
43
  /**
43
44
  * The type of upgrade to perform. This option determines how the upgrade process will be handled.
44
45
  *
@@ -59,10 +60,14 @@ type CLIPresetOptions = Omit<ScriptPresetOptions, "defaultOptions"> & HelpPlugin
59
60
  * Configuration options for the `completions` plugin. This field allows you to customize the behavior of the `completions` plugin, which provides commands for generating shell completion scripts for the CLI application. You can specify which shells to generate completions for, and other related settings.
60
61
  */
61
62
  completions?: Pick<CompletionsPluginOptions, "shells"> | false;
63
+ /**
64
+ * Configuration options for the `changelog` plugin. This field allows you to customize the behavior of the `changelog` plugin, which provides commands for displaying the application's changelog. You can specify the path to the changelog file, the command name, and other related settings.
65
+ */
66
+ changelog?: ChangelogPluginOptions | false;
62
67
  };
63
- type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
64
- type CLIPresetResolvedConfig = ResolvedConfig & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
65
- type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
68
+ type CLIPresetUserConfig = UserConfig & ThemePluginUserConfig & ConsolePluginUserConfig & PromptsPluginUserConfig & BannerPluginUserConfig & HelpPluginUserConfig & CompletionsPluginUserConfig & ChangelogPluginUserConfig & UpgradePluginUserConfig & CLIPresetOptions;
69
+ type CLIPresetResolvedConfig = ResolvedConfig$1 & ThemePluginResolvedConfig & ConsolePluginResolvedConfig & PromptsPluginResolvedConfig & BannerPluginResolvedConfig & HelpPluginResolvedConfig & CompletionsPluginResolvedConfig & ChangelogPluginResolvedConfig & UpgradePluginResolvedConfig & Required<CLIPresetOptions>;
70
+ type CLIPresetContext<TResolvedConfig extends CLIPresetResolvedConfig = CLIPresetResolvedConfig> = Context<TResolvedConfig> & ThemePluginContext<TResolvedConfig> & ConsolePluginContext<TResolvedConfig> & PromptsPluginContext<TResolvedConfig> & BannerPluginContext<TResolvedConfig> & HelpPluginContext<TResolvedConfig> & CompletionsPluginContext<TResolvedConfig> & ChangelogPluginContext<TResolvedConfig> & UpgradePluginContext<TResolvedConfig>;
66
71
  //#endregion
67
72
  export { CLIPresetContext, CLIPresetOptions, CLIPresetResolvedConfig, CLIPresetUserConfig, UpgradeType };
68
73
  //# sourceMappingURL=plugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;KAmEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,sBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;EALU;;;;;AAEZ;;;;;;EAeI,WAAA;EAZF;;;;;;;;;;;;;;EA4BE,cAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EA/BjD;;;;;;;;;;;EA6CE,WAAA,GAAc,WAAA;EAKd;;;EAAA,MAAA,GAAS,IAAA,CAAK,mBAAA;EAKA;;;EAAd,WAAA,GAAc,IAAA,CAAK,wBAAA;AAAA;AAAA,KAGX,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,cAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,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,mBAAA,CAAoB,eAAA,IACpB,iBAAA,CAAkB,eAAA,IAClB,wBAAA,CAAyB,eAAA,IACzB,oBAAA,CAAqB,eAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;;;;;KAyEY,WAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA,qBAClC,iBAAA,GACA,oBAAA,GACA,oBAAA;;AALF;;;;;AAEA;;;;;EAeI,WAAA;EAbF;;;;;;;;;;;;;;EA6BE,aAAA,GACI,aAAA,OACE,OAAA,EAAS,OAAA,EAAS,KAAA,EAAO,WAAA,KAAgB,aAAA;EAjCf;;;;;;;;;;;EA+ChC,WAAA,GAAc,WAAA;EAAd;;;EAKA,MAAA,GAAS,IAAA,CAAK,mBAAA;EAAA;;;EAKd,WAAA,GAAc,IAAA,CAAK,wBAAA;EAKnB;;;EAAA,SAAA,GAAY,sBAAA;AAAA;AAAA,KAGJ,mBAAA,GAAsB,UAAA,GAChC,qBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,oBAAA,GACA,2BAAA,GACA,yBAAA,GACA,uBAAA,GACA,gBAAA;AAAA,KAEU,uBAAA,GAA0B,gBAAA,GACpC,yBAAA,GACA,2BAAA,GACA,2BAAA,GACA,0BAAA,GACA,wBAAA,GACA,+BAAA,GACA,6BAAA,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,mBAAA,CAAoB,eAAA,IACpB,iBAAA,CAAkB,eAAA,IAClB,wBAAA,CAAyB,eAAA,IACzB,sBAAA,CAAuB,eAAA,IACvB,oBAAA,CAAqB,eAAA"}
@@ -0,0 +1,6 @@
1
+
2
+ //#region ../unified/dist/markdown/index.mjs
3
+ const e = (e) => `textColors.heading.primary(\`${e}\`)`;
4
+
5
+ //#endregion
6
+ exports.e = e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/preset-cli",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
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": [
@@ -181,28 +181,28 @@
181
181
  "dependencies": {
182
182
  "@alloy-js/core": "0.23.0-dev.8",
183
183
  "@alloy-js/typescript": "0.23.0-dev.4",
184
- "@powerlines/deepkit": "^0.6.165",
185
- "@powerlines/plugin-alloy": "^0.26.2",
186
- "@powerlines/plugin-plugin": "^0.12.337",
187
- "@shell-shock/core": "^0.15.1",
188
- "@shell-shock/plugin-banner": "^0.1.22",
189
- "@shell-shock/plugin-completions": "^0.4.3",
190
- "@shell-shock/plugin-console": "^0.1.35",
191
- "@shell-shock/plugin-help": "^0.2.13",
192
- "@shell-shock/plugin-prompts": "^0.3.36",
193
- "@shell-shock/plugin-theme": "^0.4.8",
194
- "@shell-shock/plugin-upgrade": "^0.1.40",
195
- "@shell-shock/preset-script": "^0.6.50",
196
- "@stryke/path": "^0.27.3",
197
- "@stryke/string-format": "^0.17.7",
198
- "@stryke/type-checks": "^0.6.0",
184
+ "@powerlines/deepkit": "^0.6.167",
185
+ "@powerlines/plugin-alloy": "^0.26.9",
186
+ "@powerlines/plugin-plugin": "^0.12.343",
187
+ "@shell-shock/core": "^0.16.0",
188
+ "@shell-shock/plugin-banner": "^0.1.24",
189
+ "@shell-shock/plugin-completions": "^0.4.5",
190
+ "@shell-shock/plugin-console": "^0.2.1",
191
+ "@shell-shock/plugin-help": "^0.2.15",
192
+ "@shell-shock/plugin-prompts": "^0.3.38",
193
+ "@shell-shock/plugin-theme": "^0.4.10",
194
+ "@shell-shock/plugin-upgrade": "^0.1.42",
195
+ "@shell-shock/preset-script": "^0.6.52",
196
+ "@stryke/path": "^0.27.4",
197
+ "@stryke/string-format": "^0.17.9",
198
+ "@stryke/type-checks": "^0.6.1",
199
199
  "cfonts": "^3.3.1",
200
200
  "defu": "^6.1.6",
201
- "powerlines": "^0.42.27"
201
+ "powerlines": "^0.42.33"
202
202
  },
203
203
  "devDependencies": {
204
- "@babel/core": "^7.29.0",
205
- "@types/node": "^25.5.0",
204
+ "@stryke/types": "^0.11.3",
205
+ "@types/node": "^25.5.2",
206
206
  "@types/react": "^19.2.14"
207
207
  },
208
208
  "publishConfig": {
@@ -228,5 +228,6 @@
228
228
  "./package.json": "./package.json"
229
229
  }
230
230
  },
231
- "gitHead": "b39233bcc3bed352f050a2b43ca0fa432a4175a4"
231
+ "inlinedDependencies": { "@stryke/types": "0.11.3" },
232
+ "gitHead": "99864265fd762dd8a4dcdb5740242469cde2b448"
232
233
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-default-options.mjs","names":["getDefaultOptions","getDefaultOptionsBase"],"sources":["../../src/helpers/get-default-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { CommandBase, CommandOption } from \"@shell-shock/core\";\nimport { CommandParameterKinds } from \"@shell-shock/core\";\nimport { getDefaultOptions as getDefaultOptionsBase } from \"@shell-shock/preset-script/helpers/get-default-options\";\nimport type { CLIPresetContext } from \"../types\";\n\n/**\n * Get the default command options.\n *\n * @param context - The build context.\n * @param _ - The command input.\n * @returns The default command options.\n */\nexport function getDefaultOptions(\n context: CLIPresetContext,\n _: CommandBase\n): CommandOption[] {\n return [\n ...getDefaultOptionsBase(),\n context.config.interactive !== \"never\" &&\n context.config.interactive !== true && {\n name: \"interactive\",\n title: \"Interactive\",\n description:\n \"Enable interactive mode - will be set to false if running in a CI pipeline.\",\n alias: [\"i\", \"interact\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: context.config.interactive !== false\n },\n context.config.interactive !== \"never\" &&\n context.config.interactive !== false && {\n name: \"non-interactive\",\n title: \"Non-Interactive\",\n description:\n \"Disable interactive mode - will be set to true if running in a CI pipeline.\",\n alias: [\"no-interactive\"],\n kind: CommandParameterKinds.boolean,\n optional: true,\n default: false,\n isNegativeOf: \"interactive\"\n }\n ].filter(Boolean) as CommandOption[];\n}\n"],"mappings":";;;;;;;;;;;AA8BA,SAAgBA,oBACd,SACA,GACiB;AACjB,QAAO;EACL,GAAGC,mBAAuB;EAC1B,QAAQ,OAAO,gBAAgB,WAC7B,QAAQ,OAAO,gBAAgB,QAAQ;GACrC,MAAM;GACN,OAAO;GACP,aACE;GACF,OAAO,CAAC,KAAK,WAAW;GACxB,MAAM,sBAAsB;GAC5B,UAAU;GACV,SAAS,QAAQ,OAAO,gBAAgB;GACzC;EACH,QAAQ,OAAO,gBAAgB,WAC7B,QAAQ,OAAO,gBAAgB,SAAS;GACtC,MAAM;GACN,OAAO;GACP,aACE;GACF,OAAO,CAAC,iBAAiB;GACzB,MAAM,sBAAsB;GAC5B,UAAU;GACV,SAAS;GACT,cAAc;GACf;EACJ,CAAC,OAAO,QAAQ"}