@shell-shock/preset-cli 0.9.8 → 0.9.10

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 +21 -12
  7. package/dist/components/command-entry.mjs +20 -11
  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 -8
  13. package/dist/components/upgrade-builtin.mjs +8 -8
  14. package/dist/components/upgrade-builtin.mjs.map +1 -1
  15. package/dist/components/virtual-command-entry.cjs +13 -5
  16. package/dist/components/virtual-command-entry.mjs +13 -5
  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-Bs-BRrSC.mjs +10 -0
  42. package/dist/packages/unified/dist/markdown-Bs-BRrSC.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-Bs-BRrSC.cjs +10 -0
  51. package/package.json +22 -21
  52. package/dist/helpers/get-default-options.mjs.map +0 -1
@@ -0,0 +1,130 @@
1
+ import { t } from "../../../unified/dist/markdown-Bs-BRrSC.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 t(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,UAAU;KACV,MAAM;KACN,IAAI,WAAW;AACd,aAAO;OACN,gBAAgB,OAAO,EAAE,SAAS,2QAA2Q,CAAC;OAC9S,gBAAgB,iBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF,gBAAgB,SAAS,EAAE,CAAC;OAC5B,gBAAgB,OAAO;QACtB,SAAS;QACT,IAAI,WAAW;AACd,gBAAO,gBAAgB,mBAAmB;UACzC,IAAI,OAAO;AACV,kBAAO,eAAe;;UAEvB,cAAc;UACd,CAAC;;QAEH,CAAC;OACF,gBAAgB,iBAAiB;QAChC,MAAM;QACN,UAAU;QACV,MAAM;QACN,CAAC;OACF;;KAEF,CAAC;IACF,gBAAgB,SAAS,EAAE,CAAC;IAC5B,gBAAgB,OAAO;KACtB,IAAI,UAAU;AACb,aAAO,eAAe,YAAY,QAAQ,CAAC;;KAE5C,IAAI,WAAW;AACd,aAAO,gBAAgB,YAAY;OAClC,MAAM;OACN,UAAU,IAAI;OACd,CAAC;;KAEH,CAAC;IACF,gBAAgB,qBAAqB;KACpC,UAAU;KACV,WAAW;KACX,OAAO;KACP,MAAM;KACN,YAAY,CAAC;MACZ,MAAM;MACN,MAAM;MACN,CAAC;KACF,IAAI,WAAW;AACd,aAAO,gBAAgB,MAAM;OAC5B,IAAI,OAAO;AACV,eAAO,CAAC,OAAO,WAAW,CAAC,OAAO;;OAEnC,IAAI,WAAW;AACd,eAAO,gBAAgB,MAAM;SAC5B,IAAI,OAAO;AACV,iBAAO,CAAC,CAAC,OAAO;;SAEjB,IAAI,WAAW;AACd,iBAAO,IAAI,6CAA6C,OAAO,MAAM,QAAQ,WAAW,MAAM,MAAM,CAAC;;SAEtG,CAAC;;OAEH,IAAI,WAAW;AACd,eAAO,gBAAgB,MAAM;SAC5B,IAAI,OAAO;AACV,iBAAO,CAAC,CAAC,OAAO,MAAM,UAAU;;SAEjC,UAAU,IAAI;SACd,IAAI,WAAW;AACd,iBAAO,IAAI,WAAW,OAAO,MAAM,UAAU,CAAC;;SAE/C,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"}
@@ -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,10 @@
1
+ //#region ../unified/dist/markdown-Bs-BRrSC.mjs
2
+ function e(e) {
3
+ return e.replaceAll("`", "\\`").replaceAll("${", "\\${").replaceAll(`\\`, `\\\\`).replaceAll(`
4
+ `, `\\n`).replaceAll(`\r`, `\\r`).replaceAll(` `, `\\t`);
5
+ }
6
+ const t = (t) => `textColors.heading.primary(\`${e(t)}\`)`;
7
+
8
+ //#endregion
9
+ export { t };
10
+ //# sourceMappingURL=markdown-Bs-BRrSC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-Bs-BRrSC.mjs","names":[],"sources":["../../../../../unified/dist/markdown-Bs-BRrSC.mjs"],"sourcesContent":["function e(e){return e.replaceAll(\"`\",\"\\\\`\").replaceAll(\"${\",\"\\\\${\").replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(`\n`,`\\\\n`).replaceAll(`\\r`,`\\\\r`).replaceAll(`\t`,`\\\\t`)}const t=t=>`textColors.heading.primary(\\`${e(t)}\\`)`;export{t};\n//# sourceMappingURL=markdown-Bs-BRrSC.mjs.map"],"mappings":";AAAA,SAAS,EAAE,GAAE;AAAC,QAAO,EAAE,WAAW,KAAI,MAAM,CAAC,WAAW,MAAK,OAAO,CAAC,WAAW,MAAK,OAAO,CAAC,WAAW;GACtG,MAAM,CAAC,WAAW,MAAK,MAAM,CAAC,WAAW,KAAI,MAAM;;AAAC,MAAM,KAAE,MAAG,gCAAgC,EAAE,EAAE,CAAC"}
@@ -0,0 +1,130 @@
1
+ const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
2
+ const require_markdown_Bs_BRrSC = require('../../../unified/dist/markdown-Bs-BRrSC.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_markdown_Bs_BRrSC.t(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