@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
@@ -1,8 +1,8 @@
1
1
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
2
  let _shell_shock_core = require("@shell-shock/core");
3
- let _shell_shock_preset_script_helpers_get_default_options = require("@shell-shock/preset-script/helpers/get-default-options");
3
+ let _shell_shock_preset_script_helpers_get_global_options = require("@shell-shock/preset-script/helpers/get-global-options");
4
4
 
5
- //#region src/helpers/get-default-options.ts
5
+ //#region src/helpers/get-global-options.ts
6
6
  /**
7
7
  * Get the default command options.
8
8
  *
@@ -10,9 +10,9 @@ let _shell_shock_preset_script_helpers_get_default_options = require("@shell-sho
10
10
  * @param _ - The command input.
11
11
  * @returns The default command options.
12
12
  */
13
- function getDefaultOptions(context, _) {
13
+ function getGlobalOptions(context, _) {
14
14
  return [
15
- ...(0, _shell_shock_preset_script_helpers_get_default_options.getDefaultOptions)(),
15
+ ...(0, _shell_shock_preset_script_helpers_get_global_options.getGlobalOptions)(),
16
16
  context.config.interactive !== "never" && context.config.interactive !== true && {
17
17
  name: "interactive",
18
18
  title: "Interactive",
@@ -36,4 +36,4 @@ function getDefaultOptions(context, _) {
36
36
  }
37
37
 
38
38
  //#endregion
39
- exports.getDefaultOptions = getDefaultOptions;
39
+ exports.getGlobalOptions = getGlobalOptions;
@@ -1,7 +1,7 @@
1
1
  import { CommandParameterKinds } from "@shell-shock/core";
2
- import { getDefaultOptions } from "@shell-shock/preset-script/helpers/get-default-options";
2
+ import { getGlobalOptions } from "@shell-shock/preset-script/helpers/get-global-options";
3
3
 
4
- //#region src/helpers/get-default-options.ts
4
+ //#region src/helpers/get-global-options.ts
5
5
  /**
6
6
  * Get the default command options.
7
7
  *
@@ -9,9 +9,9 @@ import { getDefaultOptions } from "@shell-shock/preset-script/helpers/get-defaul
9
9
  * @param _ - The command input.
10
10
  * @returns The default command options.
11
11
  */
12
- function getDefaultOptions$1(context, _) {
12
+ function getGlobalOptions$1(context, _) {
13
13
  return [
14
- ...getDefaultOptions(),
14
+ ...getGlobalOptions(),
15
15
  context.config.interactive !== "never" && context.config.interactive !== true && {
16
16
  name: "interactive",
17
17
  title: "Interactive",
@@ -35,5 +35,5 @@ function getDefaultOptions$1(context, _) {
35
35
  }
36
36
 
37
37
  //#endregion
38
- export { getDefaultOptions$1 as getDefaultOptions };
39
- //# sourceMappingURL=get-default-options.mjs.map
38
+ export { getGlobalOptions$1 as getGlobalOptions };
39
+ //# sourceMappingURL=get-global-options.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-global-options.mjs","names":["getGlobalOptions","_getGlobalOptions"],"sources":["../../src/helpers/get-global-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 { getGlobalOptions as _getGlobalOptions } from \"@shell-shock/preset-script/helpers/get-global-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 getGlobalOptions(\n context: CLIPresetContext,\n _: CommandBase\n): CommandOption[] {\n return [\n ..._getGlobalOptions(),\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,mBACd,SACA,GACiB;AACjB,QAAO;EACL,GAAGC,kBAAmB;EACtB,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"}
package/dist/index.cjs CHANGED
@@ -1,17 +1,19 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ const require_index = require('./plugin-changelog/dist/index.cjs');
3
4
  const require_components_banner_builtin = require('./components/banner-builtin.cjs');
4
5
  const require_components_command_router = require('./components/command-router.cjs');
5
6
  const require_components_virtual_command_entry = require('./components/virtual-command-entry.cjs');
6
7
  const require_components_command_entry = require('./components/command-entry.cjs');
7
8
  const require_components_upgrade_builtin = require('./components/upgrade-builtin.cjs');
8
- const require_get_default_options = require('./helpers/get-default-options.cjs');
9
+ const require_get_global_options = require('./helpers/get-global-options.cjs');
9
10
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
10
11
  let _alloy_js_core = require("@alloy-js/core");
11
12
  let _alloy_js_typescript = require("@alloy-js/typescript");
12
13
  let _powerlines_plugin_alloy_core_components = require("@powerlines/plugin-alloy/core/components");
13
14
  let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
14
15
  let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
16
+ let _stryke_path = require("@stryke/path");
15
17
  let _shell_shock_plugin_completions = require("@shell-shock/plugin-completions");
16
18
  _shell_shock_plugin_completions = require_runtime.__toESM(_shell_shock_plugin_completions);
17
19
  let _shell_shock_plugin_console = require("@shell-shock/plugin-console");
@@ -23,7 +25,6 @@ _shell_shock_plugin_prompts = require_runtime.__toESM(_shell_shock_plugin_prompt
23
25
  let _shell_shock_plugin_upgrade = require("@shell-shock/plugin-upgrade");
24
26
  _shell_shock_plugin_upgrade = require_runtime.__toESM(_shell_shock_plugin_upgrade);
25
27
  let _shell_shock_preset_script_components_bin_entry = require("@shell-shock/preset-script/components/bin-entry");
26
- let _stryke_path = require("@stryke/path");
27
28
 
28
29
  //#region src/index.tsx
29
30
  /**
@@ -37,6 +38,7 @@ const plugin = (options = {}) => {
37
38
  ...(0, _shell_shock_plugin_console.default)(options),
38
39
  ...(0, _shell_shock_plugin_help.default)(options),
39
40
  ...(0, _shell_shock_plugin_prompts.default)(options),
41
+ ...options.changelog !== false ? [require_index.plugin(options.changelog)] : [],
40
42
  ...options.completions !== false ? (0, _shell_shock_plugin_completions.default)(options.completions) : [],
41
43
  (0, _shell_shock_plugin_upgrade.default)(options),
42
44
  {
@@ -44,7 +46,7 @@ const plugin = (options = {}) => {
44
46
  config() {
45
47
  this.debug("Providing default configuration for the Shell Shock `cli` preset.");
46
48
  return {
47
- defaultOptions: require_get_default_options.getDefaultOptions,
49
+ globalOptions: require_get_global_options.getGlobalOptions,
48
50
  isCaseSensitive: false,
49
51
  ...options
50
52
  };
@@ -107,14 +109,12 @@ const plugin = (options = {}) => {
107
109
  "divider",
108
110
  "stripAnsi",
109
111
  "writeLine",
110
- "splitText",
111
- "colors"
112
+ "splitText"
112
113
  ],
113
- utils: [
114
- "useApp",
114
+ utils: ["isMinimal", "isInteractive"],
115
+ state: [
116
+ "useGlobal",
115
117
  "useArgs",
116
- "isMinimal",
117
- "isInteractive",
118
118
  "isHelp"
119
119
  ],
120
120
  prompts: [
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAiDA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAkDA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAiDA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;AAkDA;;;;cAAa,MAAA,oBAA2B,gBAAA,GAAmB,gBAAA,EACzD,OAAA,GAAS,gBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs CHANGED
@@ -1,22 +1,23 @@
1
+ import { plugin as plugin$1 } from "./packages/plugin-changelog/dist/index.mjs";
1
2
  import { BannerBuiltin } from "./components/banner-builtin.mjs";
2
3
  import { CommandRouter } from "./components/command-router.mjs";
3
4
  import { VirtualCommandEntry } from "./components/virtual-command-entry.mjs";
4
5
  import { CommandEntry } from "./components/command-entry.mjs";
5
6
  import { UpgradeBuiltin } from "./components/upgrade-builtin.mjs";
6
- import { getDefaultOptions } from "./helpers/get-default-options.mjs";
7
+ import { getGlobalOptions } from "./helpers/get-global-options.mjs";
7
8
  import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
8
9
  import { For, Show, code, computed } from "@alloy-js/core";
9
10
  import { VarDeclaration } from "@alloy-js/typescript";
10
11
  import { Spacing } from "@powerlines/plugin-alloy/core/components";
11
12
  import { render } from "@powerlines/plugin-alloy/render";
12
13
  import { getAppDescription, getAppName, getCommandList } from "@shell-shock/core/plugin-utils";
14
+ import { joinPaths } from "@stryke/path";
13
15
  import completions from "@shell-shock/plugin-completions";
14
16
  import console from "@shell-shock/plugin-console";
15
17
  import help from "@shell-shock/plugin-help";
16
18
  import prompts from "@shell-shock/plugin-prompts";
17
19
  import upgrade from "@shell-shock/plugin-upgrade";
18
20
  import { BinEntry } from "@shell-shock/preset-script/components/bin-entry";
19
- import { joinPaths } from "@stryke/path";
20
21
 
21
22
  //#region src/index.tsx
22
23
  /**
@@ -30,6 +31,7 @@ const plugin = (options = {}) => {
30
31
  ...console(options),
31
32
  ...help(options),
32
33
  ...prompts(options),
34
+ ...options.changelog !== false ? [plugin$1(options.changelog)] : [],
33
35
  ...options.completions !== false ? completions(options.completions) : [],
34
36
  upgrade(options),
35
37
  {
@@ -37,7 +39,7 @@ const plugin = (options = {}) => {
37
39
  config() {
38
40
  this.debug("Providing default configuration for the Shell Shock `cli` preset.");
39
41
  return {
40
- defaultOptions: getDefaultOptions,
42
+ globalOptions: getGlobalOptions,
41
43
  isCaseSensitive: false,
42
44
  ...options
43
45
  };
@@ -100,14 +102,12 @@ const plugin = (options = {}) => {
100
102
  "divider",
101
103
  "stripAnsi",
102
104
  "writeLine",
103
- "splitText",
104
- "colors"
105
+ "splitText"
105
106
  ],
106
- utils: [
107
- "useApp",
107
+ utils: ["isMinimal", "isInteractive"],
108
+ state: [
109
+ "useGlobal",
108
110
  "useArgs",
109
- "isMinimal",
110
- "isInteractive",
111
111
  "isHelp"
112
112
  ],
113
113
  prompts: [
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"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, computed, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport {\n getAppDescription,\n getAppName,\n getCommandList\n} from \"@shell-shock/core/plugin-utils\";\nimport completions from \"@shell-shock/plugin-completions\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport prompts from \"@shell-shock/plugin-prompts\";\nimport upgrade from \"@shell-shock/plugin-upgrade\";\nimport { BinEntry } from \"@shell-shock/preset-script/components/bin-entry\";\nimport { joinPaths } from \"@stryke/path\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerBuiltin } from \"./components/banner-builtin\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { UpgradeBuiltin } from \"./components/upgrade-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getDefaultOptions } from \"./helpers/get-default-options\";\nimport type { CLIPresetContext, CLIPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock CLI Preset plugin.\n *\n * @remarks\n * This preset includes a set of built-in modules and commands to create a CLI application, as well as configuration options to customize the generated code. It also includes the `prompts` plugin to provide interactive prompts in the CLI application, and the `upgrade` plugin to manage upgrading the local application's version.\n */\nexport const plugin = <TContext extends CLIPresetContext = CLIPresetContext>(\n options: CLIPresetOptions = {}\n): Plugin<TContext>[] => {\n return [\n ...console<TContext>(options),\n ...help<TContext>(options),\n ...prompts<TContext>(options),\n ...(options.completions !== false\n ? completions<TContext>(options.completions)\n : []),\n upgrade<TContext>(options),\n {\n name: \"shell-shock:cli-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `cli` preset.\"\n );\n\n return {\n defaultOptions: getDefaultOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\"Rendering built-in modules.\");\n\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`banner\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n const bin = computed(() => ({\n id: \"\",\n name: getAppName(this),\n title: \"\",\n description: getAppDescription(this),\n isVirtual: true,\n path: null,\n segments: [],\n alias: [],\n tags: [],\n options: Object.fromEntries(\n this.options.map(option => [option.name, option])\n ),\n entry: {\n file: joinPaths(this.entryPath, \"bin.ts\")\n },\n args: [],\n parent: null,\n children: this.commands\n }));\n\n return render(\n this,\n <>\n <UpgradeBuiltin />\n <BannerBuiltin command={bin.value} />\n <Spacing />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <BannerBuiltin command={command} />}\n </For>\n </>\n );\n }\n }\n },\n {\n name: \"shell-shock:cli-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `cli` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"info\",\n \"debug\",\n \"warn\",\n \"help\",\n \"error\",\n \"cursor\",\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\",\n \"colors\"\n ],\n utils: [\n \"useApp\",\n \"useArgs\",\n \"isMinimal\",\n \"isInteractive\",\n \"isHelp\"\n ],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"isCancel\"\n ],\n env: [\"env\", \"paths\"],\n upgrade: [\"executeUpgrade\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n let\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 {code`await showBanner(0);`}\n <Spacing />\n {code`return showHelp(); `}\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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AAQ;AACV,iBAAG,gBAAQ,qBAAA,EACT,SAAC,OACF,CAAC;;SAEL,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"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, computed, For, Show } from \"@alloy-js/core\";\nimport { VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport {\n getAppDescription,\n getAppName,\n getCommandList\n} from \"@shell-shock/core/plugin-utils\";\nimport changelog from \"@shell-shock/plugin-changelog\";\nimport completions from \"@shell-shock/plugin-completions\";\nimport console from \"@shell-shock/plugin-console\";\nimport help from \"@shell-shock/plugin-help\";\nimport prompts from \"@shell-shock/plugin-prompts\";\nimport upgrade from \"@shell-shock/plugin-upgrade\";\nimport { BinEntry } from \"@shell-shock/preset-script/components/bin-entry\";\nimport { joinPaths } from \"@stryke/path\";\nimport type { Plugin } from \"powerlines\";\nimport { BannerBuiltin } from \"./components/banner-builtin\";\nimport { CommandEntry } from \"./components/command-entry\";\nimport { CommandRouter } from \"./components/command-router\";\nimport { UpgradeBuiltin } from \"./components/upgrade-builtin\";\nimport { VirtualCommandEntry } from \"./components/virtual-command-entry\";\nimport { getGlobalOptions } from \"./helpers/get-global-options\";\nimport type { CLIPresetContext, CLIPresetOptions } from \"./types/plugin\";\n\n/**\n * The Shell Shock CLI Preset plugin.\n *\n * @remarks\n * This preset includes a set of built-in modules and commands to create a CLI application, as well as configuration options to customize the generated code. It also includes the `prompts` plugin to provide interactive prompts in the CLI application, and the `upgrade` plugin to manage upgrading the local application's version.\n */\nexport const plugin = <TContext extends CLIPresetContext = CLIPresetContext>(\n options: CLIPresetOptions = {}\n): Plugin<TContext>[] => {\n return [\n ...console<TContext>(options),\n ...help<TContext>(options),\n ...prompts<TContext>(options),\n ...(options.changelog !== false\n ? [changelog<TContext>(options.changelog)]\n : []),\n ...(options.completions !== false\n ? completions<TContext>(options.completions)\n : []),\n upgrade<TContext>(options),\n {\n name: \"shell-shock:cli-preset\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `cli` preset.\"\n );\n\n return {\n globalOptions: getGlobalOptions,\n isCaseSensitive: false,\n ...options\n };\n },\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\"Rendering built-in modules.\");\n\n const commands = await getCommandList(this);\n this.debug(\n `Rendering \\`banner\\` built-ins for each of the ${\n commands.length\n } command modules.`\n );\n\n const bin = computed(() => ({\n id: \"\",\n name: getAppName(this),\n title: \"\",\n description: getAppDescription(this),\n isVirtual: true,\n path: null,\n segments: [],\n alias: [],\n tags: [],\n options: Object.fromEntries(\n this.options.map(option => [option.name, option])\n ),\n entry: {\n file: joinPaths(this.entryPath, \"bin.ts\")\n },\n args: [],\n parent: null,\n children: this.commands\n }));\n\n return render(\n this,\n <>\n <UpgradeBuiltin />\n <BannerBuiltin command={bin.value} />\n <Spacing />\n <For\n each={commands.sort((a, b) => a.name.localeCompare(b.name))}\n doubleHardline>\n {command => <BannerBuiltin command={command} />}\n </For>\n </>\n );\n }\n }\n },\n {\n name: \"shell-shock:cli-preset:generate-entrypoint\",\n prepare: {\n order: \"post\",\n async handler() {\n this.debug(\n \"Rendering entrypoint modules for the Shell Shock `cli` preset.\"\n );\n\n return render(\n this,\n <>\n <BinEntry\n builtinImports={{\n console: [\n \"info\",\n \"debug\",\n \"warn\",\n \"help\",\n \"error\",\n \"cursor\",\n \"divider\",\n \"stripAnsi\",\n \"writeLine\",\n \"splitText\"\n ],\n utils: [\"isMinimal\", \"isInteractive\"],\n state: [\"useGlobal\", \"useArgs\", \"isHelp\"],\n prompts: [\n \"text\",\n \"numeric\",\n \"toggle\",\n \"select\",\n \"confirm\",\n \"isCancel\"\n ],\n env: [\"env\", \"paths\"],\n upgrade: [\"executeUpgrade\"]\n }}>\n <Show when={Object.keys(this.commands).length > 0}>\n <VarDeclaration\n let\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 {code`await showBanner(0);`}\n <Spacing />\n {code`return showHelp(); `}\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 ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAI,UAAA,UAAA,EAAA,KAAA;AACF,QAAM;EAAA,GAAA,QAAsB,QAAS;EAAE,GAAC,KAAY,QAAY;EAAA,GAAM,QAAkB,QAAK;EAAK,GAAG,QAAA,cAAsB,QAAG,CAAA,SAAwB,QAAS,UAAK,CAAQ,GAAC,EAAI;EAAC,GAAA,QAAS,gBAAkB,QAAW,YAAoB,QAAA,YAAsB,GAAA,EAAA;EAAQ,QAAkB,QAAA;EAAU;GACtS,MAAA;GACF,SAAa;AACX,SAAS,MAAA,oEAAoB;AAC5B,WAAO;KACF,eAAC;KACF,iBAAkB;KAClB,GAAI;KACJ;;GAEH,SAAK;IACH,OAAK;IACL,MAAE,UAAQ;AACR,UAAA,MAAW,8BAA8B;KACzC,MAAG,WAAA,MAAA,eAAA,KAAA;AACP,UA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AA;YACH,MAAA;YACH,aAAA,IAAA;YACF,CAAA;WAAA,gBAAA,OAAA,EAAA,CAAA;WAAA,gBAAA,eAAA;YACD,UAAA,EAAA;YACD,IAAA,WAAA;AACe,oBAAM,OAAI,YAAgB,EAAA;;YAE7B,CAAA;WAAI,gBAAC,OAAA,EAAA,CAAA;WAAA;;SAEX,CAAI;QAAC,gBAAK,OAAA,EAAA,CAAA;QAAA,IAAA;QAAA,gBAAA,SAAA,EAAA,CAAA;QAAA,IAAA;QAAA;;MAEX,CAAC,EAAC,gBAAA,MAAA;;AAED,cAAO,OAAM,OAAA,OAAA,SAAA,CAAA,SAAA;;MAEb,IAAG,WAAA;AACD,cAAG,gBAAA,KAAA;QACD,IAAE,OAAA;AACA,gBAAE,OAAS,OAAA,OAAA,SAAA;;QAEb,gBAAa;QACb,WAAO,UAAK,gBAAA,MAAA;SACV,IAAI,OAAM;AACR,iBAAG,MAAM;;SAEX,IAAI,WAAS;AACX,iBAAG,gBAAU,cAAA,EACX,SAAC,OACF,CAAC;;SAEJ,IAAE,WAAS;AACT,iBAAO,gBAAe,qBAAmB,EACzC,SAAS,OACR,CAAC;;SAEL,CAAC;QACH,CAAC;;MAEL,CAAC,CAAC,CAAC;;IAEP;GACF;EAAC"}
@@ -0,0 +1,17 @@
1
+ //#region ../../node_modules/.pnpm/@stryke+types@0.11.3/node_modules/@stryke/types/dist/base.d.cts
2
+ /**
3
+ * Create a type that makes the given keys required. The remaining keys are kept as is.
4
+ *
5
+ * @remarks
6
+ * Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
7
+ */
8
+ type RequiredKeys<BaseType, Keys extends keyof BaseType> = Required<Pick<BaseType, Keys>> & Omit<BaseType, Keys>;
9
+ /**
10
+ * Create a type that makes the given keys optional. The remaining keys are kept as is.
11
+ *
12
+ * @remarks
13
+ * Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
14
+ */
15
+ //#endregion
16
+ export { RequiredKeys };
17
+ //# sourceMappingURL=base.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.cts","names":["TypedArray","SerializablePrimitive","Primitive","BuiltIns","Date","RegExp","AtomicObject","Function","Promise","TypeTester","value","TypeMap","Record","emptyObjectSymbol","FunctionOrValue","Value","X","List","A","ReadonlyArray","FunctionLike","P","R$1","args","AnyFunction","Nullish","Nullishable","T","NonNullishObject","NativeClass","AnyNumber","AnyString","AnyBoolean","AnyArray","PlainObject","AnyMap","Map","AnyWeakMap","WeakKey","WeakMap","EmptyArray","EmptyObject","Any","IndexType","TypedIndexable","Indexable","Dictionary","EMPTY_STRING","NEWLINE_STRING","EMPTY_OBJECT","AnyCase","F1","Uppercase","Lowercase","F2","R","F","Newable","_args","Abstract","prototype","Clonable","clone","MaybePromise","ReducerFunction","TState","TAction","state","action","TYPE_ARGUMENTS","TYPE_ARRAY","TYPE_OBJECT","TYPE_MAP","TYPE_SET","Collection","IArguments","Set","NonUndefined","BrowserNativeObject","File","DeepPartial","NestedValue","K","Rollback","initialValue","currentValue","RequiredKeysOf","BaseType","Key","Exclude","IsEqual","G","B","Filter","KeyType$1","ExcludeType","ExceptOptions","requireExactProps","Except","ObjectType","KeysType","Options","KeyType","Partial","Simplify","RequiredKeys","Keys","Pick","Required","Omit","PartialKeys","$NestedValue","TValue","RefObject","current","Identity","id","Versioned","version","Sequenced","sequence","Typed","__type","ClassTypeCheckable","isTypeOf","NonRecursiveType","arguments_","IsPrimitive","IsNever","IsAny","IsNull","IsUndefined","IsUnknown","IsNullish","IsFunction","GlobalThis","globalThis","Class","Arguments","Constructor","AbstractClass","AbstractConstructor","BuildTuple","L","Fill","HasMultipleCallSignatures","StructuredCloneablePrimitive","StructuredCloneableData","ArrayBuffer","DataView","Error","Blob","StructuredCloneableCollection","StructuredCloneable","ReadonlyMap","ReadonlySet","key"],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+types@0.11.3/node_modules/@stryke/types/dist/base.d.cts"],"x_google_ignoreList":[0],"mappings":";;;;;;;KAiLKyG,YAAAA,8BAA0ClB,QAAAA,IAAYqB,QAAAA,CAASD,IAAAA,CAAKpB,QAAAA,EAAUmB,IAAAA,KAASG,IAAAA,CAAKtB,QAAAA,EAAUmB,IAAAA"}
@@ -0,0 +1,17 @@
1
+ //#region ../../node_modules/.pnpm/@stryke+types@0.11.3/node_modules/@stryke/types/dist/base.d.cts
2
+ /**
3
+ * Create a type that makes the given keys required. The remaining keys are kept as is.
4
+ *
5
+ * @remarks
6
+ * Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
7
+ */
8
+ type RequiredKeys<BaseType, Keys extends keyof BaseType> = Required<Pick<BaseType, Keys>> & Omit<BaseType, Keys>;
9
+ /**
10
+ * Create a type that makes the given keys optional. The remaining keys are kept as is.
11
+ *
12
+ * @remarks
13
+ * Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
14
+ */
15
+ //#endregion
16
+ export { RequiredKeys };
17
+ //# sourceMappingURL=base.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.mts","names":["TypedArray","SerializablePrimitive","Primitive","BuiltIns","Date","RegExp","AtomicObject","Function","Promise","TypeTester","value","TypeMap","Record","emptyObjectSymbol","FunctionOrValue","Value","X","List","A","ReadonlyArray","FunctionLike","P","R$1","args","AnyFunction","Nullish","Nullishable","T","NonNullishObject","NativeClass","AnyNumber","AnyString","AnyBoolean","AnyArray","PlainObject","AnyMap","Map","AnyWeakMap","WeakKey","WeakMap","EmptyArray","EmptyObject","Any","IndexType","TypedIndexable","Indexable","Dictionary","EMPTY_STRING","NEWLINE_STRING","EMPTY_OBJECT","AnyCase","F1","Uppercase","Lowercase","F2","R","F","Newable","_args","Abstract","prototype","Clonable","clone","MaybePromise","ReducerFunction","TState","TAction","state","action","TYPE_ARGUMENTS","TYPE_ARRAY","TYPE_OBJECT","TYPE_MAP","TYPE_SET","Collection","IArguments","Set","NonUndefined","BrowserNativeObject","File","DeepPartial","NestedValue","K","Rollback","initialValue","currentValue","RequiredKeysOf","BaseType","Key","Exclude","IsEqual","G","B","Filter","KeyType$1","ExcludeType","ExceptOptions","requireExactProps","Except","ObjectType","KeysType","Options","KeyType","Partial","Simplify","RequiredKeys","Keys","Pick","Required","Omit","PartialKeys","$NestedValue","TValue","RefObject","current","Identity","id","Versioned","version","Sequenced","sequence","Typed","__type","ClassTypeCheckable","isTypeOf","NonRecursiveType","arguments_","IsPrimitive","IsNever","IsAny","IsNull","IsUndefined","IsUnknown","IsNullish","IsFunction","GlobalThis","globalThis","Class","Arguments","Constructor","AbstractClass","AbstractConstructor","BuildTuple","L","Fill","HasMultipleCallSignatures","StructuredCloneablePrimitive","StructuredCloneableData","ArrayBuffer","DataView","Error","Blob","StructuredCloneableCollection","StructuredCloneable","ReadonlyMap","ReadonlySet","key"],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+types@0.11.3/node_modules/@stryke/types/dist/base.d.cts"],"x_google_ignoreList":[0],"mappings":";;;;;;;KAiLKyG,YAAAA,8BAA0ClB,QAAAA,IAAYqB,QAAAA,CAASD,IAAAA,CAAKpB,QAAAA,EAAUmB,IAAAA,KAASG,IAAAA,CAAKtB,QAAAA,EAAUmB,IAAAA"}
@@ -0,0 +1,130 @@
1
+ import { e } from "../../../unified/dist/markdown/index.mjs";
2
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
3
+ import { Show, code, createResource } from "@alloy-js/core";
4
+ import { FunctionDeclaration, InterfaceDeclaration } from "@alloy-js/typescript";
5
+ import { getAppTitle } from "@shell-shock/core/plugin-utils";
6
+ import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
7
+ import { Spacing } from "@powerlines/plugin-alloy/core";
8
+ import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
9
+ import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
10
+ import { TSDoc, TSDocDefaultValue, TSDocParam } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
11
+ import { joinPaths } from "@stryke/path";
12
+
13
+ //#region ../plugin-changelog/dist/components/changelog-command.mjs
14
+ /**
15
+ * The Changelog command's handler wrapper for the Shell Shock project.
16
+ */
17
+ function ChangelogCommand() {
18
+ const context = usePowerlines();
19
+ const result = createResource(async () => {
20
+ const content = await context.fs.read(context.config.changelog.file);
21
+ if (!content) return null;
22
+ return e(content);
23
+ });
24
+ return createComponent(TypescriptFile, {
25
+ get path() {
26
+ return joinPaths(context.entryPath, "changelog", "command.ts");
27
+ },
28
+ imports: {
29
+ "node:os": "os",
30
+ "node:fs/promises": ["readFile", "writeFile"]
31
+ },
32
+ builtinImports: { console: [
33
+ "textColors",
34
+ "bold",
35
+ "writeLine",
36
+ "error",
37
+ "warn"
38
+ ] },
39
+ get children() {
40
+ return [
41
+ createComponent(TSDoc, { heading: "Options for the Changelog command." }),
42
+ createComponent(InterfaceDeclaration, {
43
+ "export": true,
44
+ name: "ChangelogOptions",
45
+ get children() {
46
+ return [
47
+ createComponent(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." }),
48
+ createComponent(InterfaceMember, {
49
+ name: "start",
50
+ optional: true,
51
+ type: "string"
52
+ }),
53
+ createComponent(Spacing, {}),
54
+ createComponent(TSDoc, {
55
+ 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.",
56
+ get children() {
57
+ return createComponent(TSDocDefaultValue, {
58
+ get type() {
59
+ return ReflectionKind.string;
60
+ },
61
+ defaultValue: "latest"
62
+ });
63
+ }
64
+ }),
65
+ createComponent(InterfaceMember, {
66
+ name: "end",
67
+ optional: true,
68
+ type: "string"
69
+ })
70
+ ];
71
+ }
72
+ }),
73
+ createComponent(Spacing, {}),
74
+ createComponent(TSDoc, {
75
+ get heading() {
76
+ return `Display the ${getAppTitle(context)} changelog.`;
77
+ },
78
+ get children() {
79
+ return createComponent(TSDocParam, {
80
+ name: "options",
81
+ children: code`An object containing options for displaying the changelog.`
82
+ });
83
+ }
84
+ }),
85
+ createComponent(FunctionDeclaration, {
86
+ "export": true,
87
+ "default": true,
88
+ async: true,
89
+ name: "handler",
90
+ parameters: [{
91
+ name: "options",
92
+ type: "ChangelogOptions"
93
+ }],
94
+ get children() {
95
+ return createComponent(Show, {
96
+ get when() {
97
+ return !result.loading && !result.error;
98
+ },
99
+ get fallback() {
100
+ return createComponent(Show, {
101
+ get when() {
102
+ return !!result.error;
103
+ },
104
+ get children() {
105
+ return code` return error(\`Failed to load changelog: ${result.error.message.replaceAll(/`/g, "\\`")}\`); `;
106
+ }
107
+ });
108
+ },
109
+ get children() {
110
+ return createComponent(Show, {
111
+ get when() {
112
+ return !!result.data?.toString();
113
+ },
114
+ fallback: code` return warn("There is no changelog available for display."); `,
115
+ get children() {
116
+ return code` return \`${result.data?.toString()}\`; `;
117
+ }
118
+ });
119
+ }
120
+ });
121
+ }
122
+ })
123
+ ];
124
+ }
125
+ });
126
+ }
127
+
128
+ //#endregion
129
+ export { ChangelogCommand };
130
+ //# sourceMappingURL=changelog-command.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changelog-command.mjs","names":["markdown"],"sources":["../../../../../../plugin-changelog/dist/components/changelog-command.mjs"],"sourcesContent":["import { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { Show, code, createResource } from \"@alloy-js/core\";\nimport { FunctionDeclaration, InterfaceDeclaration } from \"@alloy-js/typescript\";\nimport { ReflectionKind } from \"@powerlines/deepkit/vendor/type\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core\";\nimport { usePowerlines } from \"@powerlines/plugin-alloy/core/contexts/context\";\nimport { InterfaceMember, TypescriptFile } from \"@powerlines/plugin-alloy/typescript\";\nimport { TSDoc, TSDocDefaultValue, TSDocParam } from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport markdown from \"@shell-shock/unified/markdown\";\nimport { joinPaths } from \"@stryke/path\";\n\n//#region src/components/changelog-command.tsx\n/**\n* The Changelog command's handler wrapper for the Shell Shock project.\n*/\nfunction ChangelogCommand() {\n\tconst context = usePowerlines();\n\tconst result = createResource(async () => {\n\t\tconst content = await context.fs.read(context.config.changelog.file);\n\t\tif (!content) return null;\n\t\treturn markdown(content);\n\t});\n\treturn createComponent(TypescriptFile, {\n\t\tget path() {\n\t\t\treturn joinPaths(context.entryPath, \"changelog\", \"command.ts\");\n\t\t},\n\t\timports: {\n\t\t\t\"node:os\": \"os\",\n\t\t\t\"node:fs/promises\": [\"readFile\", \"writeFile\"]\n\t\t},\n\t\tbuiltinImports: { console: [\n\t\t\t\"textColors\",\n\t\t\t\"bold\",\n\t\t\t\"writeLine\",\n\t\t\t\"error\",\n\t\t\t\"warn\"\n\t\t] },\n\t\tget children() {\n\t\t\treturn [\n\t\t\t\tcreateComponent(TSDoc, { heading: \"Options for the Changelog command.\" }),\n\t\t\t\tcreateComponent(InterfaceDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\tname: \"ChangelogOptions\",\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tcreateComponent(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.\" }),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"start\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"string\"\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\t\t\t\tcreateComponent(TSDoc, {\n\t\t\t\t\t\t\t\theading: \"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.\",\n\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\treturn createComponent(TSDocDefaultValue, {\n\t\t\t\t\t\t\t\t\t\tget type() {\n\t\t\t\t\t\t\t\t\t\t\treturn ReflectionKind.string;\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdefaultValue: \"latest\"\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tcreateComponent(InterfaceMember, {\n\t\t\t\t\t\t\t\tname: \"end\",\n\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\ttype: \"string\"\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(Spacing, {}),\n\t\t\t\tcreateComponent(TSDoc, {\n\t\t\t\t\tget heading() {\n\t\t\t\t\t\treturn `Display the ${getAppTitle(context)} changelog.`;\n\t\t\t\t\t},\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn createComponent(TSDocParam, {\n\t\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\t\tchildren: code`An object containing options for displaying the changelog.`\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcreateComponent(FunctionDeclaration, {\n\t\t\t\t\t\"export\": true,\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\tasync: true,\n\t\t\t\t\tname: \"handler\",\n\t\t\t\t\tparameters: [{\n\t\t\t\t\t\tname: \"options\",\n\t\t\t\t\t\ttype: \"ChangelogOptions\"\n\t\t\t\t\t}],\n\t\t\t\t\tget children() {\n\t\t\t\t\t\treturn createComponent(Show, {\n\t\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\t\treturn !result.loading && !result.error;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tget fallback() {\n\t\t\t\t\t\t\t\treturn createComponent(Show, {\n\t\t\t\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\t\t\t\treturn !!result.error;\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\t\treturn code` return error(\\`Failed to load changelog: ${result.error.message.replaceAll(/`/g, \"\\\\`\")}\\`); `;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\treturn createComponent(Show, {\n\t\t\t\t\t\t\t\t\tget when() {\n\t\t\t\t\t\t\t\t\t\treturn !!result.data?.toString();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tfallback: code` return warn(\"There is no changelog available for display.\"); `,\n\t\t\t\t\t\t\t\t\tget children() {\n\t\t\t\t\t\t\t\t\t\treturn code` return \\`${result.data?.toString()}\\`; `;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t];\n\t\t}\n\t});\n}\n\n//#endregion\nexport { ChangelogCommand };\n//# sourceMappingURL=changelog-command.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,mBAAmB;CAC3B,MAAM,UAAU,eAAe;CAC/B,MAAM,SAAS,eAAe,YAAY;EACzC,MAAM,UAAU,MAAM,QAAQ,GAAG,KAAK,QAAQ,OAAO,UAAU,KAAK;AACpE,MAAI,CAAC,QAAS,QAAO;AACrB,SAAOA,EAAS,QAAQ;GACvB;AACF,QAAO,gBAAgB,gBAAgB;EACtC,IAAI,OAAO;AACV,UAAO,UAAU,QAAQ,WAAW,aAAa,aAAa;;EAE/D,SAAS;GACR,WAAW;GACX,oBAAoB,CAAC,YAAY,YAAY;GAC7C;EACD,gBAAgB,EAAE,SAAS;GAC1B;GACA;GACA;GACA;GACA;GACA,EAAE;EACH,IAAI,WAAW;AACd,UAAO;IACN,gBAAgB,OAAO,EAAE,SAAS,sCAAsC,CAAC;IACzE,gBAAgB,sBAAsB;KACrC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M,UAAU,CAAC;;SAEjD,CAAC;;OAEH,CAAC;;KAEH,CAAC;IACF;;EAEF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ChangelogCommand } from "./changelog-command.mjs";
2
+
3
+ export { };
@@ -0,0 +1,2 @@
1
+ import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig } from "./types/plugin.cjs";
2
+ import { Plugin } from "powerlines";
@@ -0,0 +1,2 @@
1
+ import { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig } from "./types/plugin.mjs";
2
+ import { Plugin } from "powerlines";
@@ -0,0 +1,52 @@
1
+ import { ChangelogCommand } from "./components/changelog-command.mjs";
2
+ import "./components/index.mjs";
3
+ import { createComponent } from "@alloy-js/core/jsx-runtime";
4
+ import { render } from "@powerlines/plugin-alloy/render";
5
+ import { getAppTitle } from "@shell-shock/core/plugin-utils";
6
+ import { joinPaths } from "@stryke/path/join";
7
+ import { isSetString } from "@stryke/type-checks/is-set-string";
8
+ import defu from "defu";
9
+ import { replacePathTokens } from "powerlines/plugin-utils";
10
+
11
+ //#region ../plugin-changelog/dist/index.mjs
12
+ /**
13
+ * The Changelog - Shell Shock plugin to add version check functionality and changelog commands to a Shell Shock application.
14
+ */
15
+ const plugin = (options = {}) => {
16
+ return {
17
+ name: "shell-shock:changelog",
18
+ config() {
19
+ this.debug("Providing default configuration for the Shell Shock `changelog` plugin.");
20
+ return { changelog: defu({ command: { name: isSetString(options.command) ? options.command : "changelog" } }, options, { file: joinPaths("{root}", "CHANGELOG.md") }) };
21
+ },
22
+ configResolved() {
23
+ this.debug("Adding the CLI changelog commands to the application context.");
24
+ this.config.changelog.file = replacePathTokens(this, this.config.changelog.file);
25
+ this.inputs ??= [];
26
+ 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.");
27
+ else this.inputs.push({
28
+ id: this.config.changelog.command.name,
29
+ path: this.config.changelog.command.name,
30
+ segments: [this.config.changelog.command.name],
31
+ title: "Changelog",
32
+ icon: "🗃",
33
+ tags: ["Utility"],
34
+ description: `Display the ${getAppTitle(this)} changelog.`,
35
+ entry: {
36
+ file: joinPaths(this.entryPath, "changelog", "index.ts"),
37
+ input: { file: joinPaths(this.entryPath, "changelog", "command.ts") }
38
+ },
39
+ isVirtual: false,
40
+ ...this.config.changelog.command
41
+ });
42
+ },
43
+ async prepare() {
44
+ this.debug("Rendering changelog command module for the Shell Shock `changelog` plugin.");
45
+ return render(this, createComponent(ChangelogCommand, {}));
46
+ }
47
+ };
48
+ };
49
+
50
+ //#endregion
51
+ export { plugin };
52
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../plugin-changelog/dist/index.mjs"],"sourcesContent":["import { ChangelogCommand } from \"./components/changelog-command.mjs\";\nimport \"./components/index.mjs\";\nimport { createComponent } from \"@alloy-js/core/jsx-runtime\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport defu from \"defu\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\n\n//#region src/index.tsx\n/**\n* The Changelog - Shell Shock plugin to add version check functionality and changelog commands to a Shell Shock application.\n*/\nconst plugin = (options = {}) => {\n\treturn {\n\t\tname: \"shell-shock:changelog\",\n\t\tconfig() {\n\t\t\tthis.debug(\"Providing default configuration for the Shell Shock `changelog` plugin.\");\n\t\t\treturn { changelog: defu({ command: { name: isSetString(options.command) ? options.command : \"changelog\" } }, options, { file: joinPaths(\"{root}\", \"CHANGELOG.md\") }) };\n\t\t},\n\t\tconfigResolved() {\n\t\t\tthis.debug(\"Adding the CLI changelog commands to the application context.\");\n\t\t\tthis.config.changelog.file = replacePathTokens(this, this.config.changelog.file);\n\t\t\tthis.inputs ??= [];\n\t\t\tif (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.\");\n\t\t\telse this.inputs.push({\n\t\t\t\tid: this.config.changelog.command.name,\n\t\t\t\tpath: this.config.changelog.command.name,\n\t\t\t\tsegments: [this.config.changelog.command.name],\n\t\t\t\ttitle: \"Changelog\",\n\t\t\t\ticon: \"🗃\",\n\t\t\t\ttags: [\"Utility\"],\n\t\t\t\tdescription: `Display the ${getAppTitle(this)} changelog.`,\n\t\t\t\tentry: {\n\t\t\t\t\tfile: joinPaths(this.entryPath, \"changelog\", \"index.ts\"),\n\t\t\t\t\tinput: { file: joinPaths(this.entryPath, \"changelog\", \"command.ts\") }\n\t\t\t\t},\n\t\t\t\tisVirtual: false,\n\t\t\t\t...this.config.changelog.command\n\t\t\t});\n\t\t},\n\t\tasync prepare() {\n\t\t\tthis.debug(\"Rendering changelog command module for the Shell Shock `changelog` plugin.\");\n\t\t\treturn render(this, createComponent(ChangelogCommand, {}));\n\t\t}\n\t};\n};\n\n//#endregion\nexport { plugin as default, plugin };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,UAAU,UAAU,EAAE,KAAK;AAChC,QAAO;EACN,MAAM;EACN,SAAS;AACR,QAAK,MAAM,0EAA0E;AACrF,UAAO,EAAE,WAAW,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,QAAQ,QAAQ,GAAG,QAAQ,UAAU,aAAa,EAAE,EAAE,SAAS,EAAE,MAAM,UAAU,UAAU,eAAe,EAAE,CAAC,EAAE;;EAExK,iBAAiB;AAChB,QAAK,MAAM,gEAAgE;AAC3E,QAAK,OAAO,UAAU,OAAO,kBAAkB,MAAM,KAAK,OAAO,UAAU,KAAK;AAChF,QAAK,WAAW,EAAE;AAClB,OAAI,KAAK,OAAO,MAAM,UAAU,MAAM,OAAO,KAAK,OAAO,UAAU,QAAQ,KAAK,CAAE,MAAK,KAAK,0MAA0M;OACjS,MAAK,OAAO,KAAK;IACrB,IAAI,KAAK,OAAO,UAAU,QAAQ;IAClC,MAAM,KAAK,OAAO,UAAU,QAAQ;IACpC,UAAU,CAAC,KAAK,OAAO,UAAU,QAAQ,KAAK;IAC9C,OAAO;IACP,MAAM;IACN,MAAM,CAAC,UAAU;IACjB,aAAa,eAAe,YAAY,KAAK,CAAC;IAC9C,OAAO;KACN,MAAM,UAAU,KAAK,WAAW,aAAa,WAAW;KACxD,OAAO,EAAE,MAAM,UAAU,KAAK,WAAW,aAAa,aAAa,EAAE;KACrE;IACD,WAAW;IACX,GAAG,KAAK,OAAO,UAAU;IACzB,CAAC;;EAEH,MAAM,UAAU;AACf,QAAK,MAAM,6EAA6E;AACxF,UAAO,OAAO,MAAM,gBAAgB,kBAAkB,EAAE,CAAC,CAAC;;EAE3D"}
@@ -0,0 +1,43 @@
1
+ import { RequiredKeys } from "../../../../node_modules/.pnpm/@stryke_types@0.11.3/node_modules/@stryke/types/dist/base.cjs";
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.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.cts","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"}