@shell-shock/plugin-changelog 0.1.13 → 0.1.14
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.
- package/dist/components/changelog-command.cjs +18 -74
- package/dist/components/changelog-command.d.cts +1 -3
- package/dist/components/changelog-command.d.cts.map +1 -1
- package/dist/components/changelog-command.d.mts +1 -3
- package/dist/components/changelog-command.d.mts.map +1 -1
- package/dist/components/changelog-command.mjs +20 -75
- package/dist/components/changelog-command.mjs.map +1 -1
- package/dist/helpers/resolve-changelog.cjs +0 -1
- package/dist/helpers/resolve-changelog.mjs.map +1 -1
- package/dist/index.cjs +22 -21
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +22 -21
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +14 -16
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let _shell_shock_core_plugin_utils = require("@shell-shock/core/plugin-utils");
|
|
4
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
5
5
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
6
6
|
let _alloy_js_core = require("@alloy-js/core");
|
|
7
7
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
8
|
-
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
9
|
-
let _powerlines_plugin_alloy_core = require("@powerlines/plugin-alloy/core");
|
|
10
8
|
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
11
9
|
let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
|
|
12
10
|
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
13
|
-
let _stryke_path = require("@stryke/path");
|
|
14
11
|
|
|
15
12
|
//#region src/components/changelog-command.tsx
|
|
16
13
|
/**
|
|
@@ -20,11 +17,7 @@ function ChangelogCommand({ changelog }) {
|
|
|
20
17
|
const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
21
18
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TypescriptFile, {
|
|
22
19
|
get path() {
|
|
23
|
-
return (0,
|
|
24
|
-
},
|
|
25
|
-
imports: {
|
|
26
|
-
"node:os": "os",
|
|
27
|
-
"node:fs/promises": ["readFile", "writeFile"]
|
|
20
|
+
return (0, _stryke_path_join.joinPaths)(context.entryPath, "changelog", "command.ts");
|
|
28
21
|
},
|
|
29
22
|
builtinImports: { console: [
|
|
30
23
|
"textColors",
|
|
@@ -34,71 +27,22 @@ function ChangelogCommand({ changelog }) {
|
|
|
34
27
|
"warn"
|
|
35
28
|
] },
|
|
36
29
|
get children() {
|
|
37
|
-
return [
|
|
38
|
-
(0,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
get children() {
|
|
54
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocDefaultValue, {
|
|
55
|
-
get type() {
|
|
56
|
-
return _powerlines_deepkit_vendor_type.ReflectionKind.string;
|
|
57
|
-
},
|
|
58
|
-
defaultValue: "latest"
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}),
|
|
62
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.InterfaceMember, {
|
|
63
|
-
name: "end",
|
|
64
|
-
optional: true,
|
|
65
|
-
type: "string"
|
|
66
|
-
})
|
|
67
|
-
];
|
|
68
|
-
}
|
|
69
|
-
}),
|
|
70
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core.Spacing, {}),
|
|
71
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
72
|
-
get heading() {
|
|
73
|
-
return `Display the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context)} changelog.`;
|
|
74
|
-
},
|
|
75
|
-
get children() {
|
|
76
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
|
|
77
|
-
name: "options",
|
|
78
|
-
children: _alloy_js_core.code`An object containing options for displaying the changelog.`
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}),
|
|
82
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
83
|
-
"export": true,
|
|
84
|
-
"default": true,
|
|
85
|
-
async: true,
|
|
86
|
-
name: "handler",
|
|
87
|
-
parameters: [{
|
|
88
|
-
name: "options",
|
|
89
|
-
type: "ChangelogOptions"
|
|
90
|
-
}],
|
|
91
|
-
get children() {
|
|
92
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
93
|
-
get when() {
|
|
94
|
-
return (0, _stryke_type_checks_is_set_string.isSetString)(changelog);
|
|
95
|
-
},
|
|
96
|
-
fallback: _alloy_js_core.code` return warn("There is no changelog available for display."); `,
|
|
97
|
-
children: changelog
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
];
|
|
30
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { get heading() {
|
|
31
|
+
return `Display the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(context)} changelog.`;
|
|
32
|
+
} }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
33
|
+
"export": true,
|
|
34
|
+
"default": true,
|
|
35
|
+
name: "handler",
|
|
36
|
+
get children() {
|
|
37
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
38
|
+
get when() {
|
|
39
|
+
return (0, _stryke_type_checks_is_set_string.isSetString)(changelog);
|
|
40
|
+
},
|
|
41
|
+
fallback: _alloy_js_core.code` return warn("There is no changelog available for display."); `,
|
|
42
|
+
children: _alloy_js_core.code`console.log(${changelog});`
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
})];
|
|
102
46
|
}
|
|
103
47
|
});
|
|
104
48
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
|
|
3
1
|
//#region src/components/changelog-command.d.ts
|
|
4
2
|
interface ChangelogCommandProps {
|
|
5
3
|
changelog: string;
|
|
@@ -9,7 +7,7 @@ interface ChangelogCommandProps {
|
|
|
9
7
|
*/
|
|
10
8
|
declare function ChangelogCommand({
|
|
11
9
|
changelog
|
|
12
|
-
}: ChangelogCommandProps):
|
|
10
|
+
}: ChangelogCommandProps): import("@alloy-js/core").Children;
|
|
13
11
|
//#endregion
|
|
14
12
|
export { ChangelogCommand, ChangelogCommandProps };
|
|
15
13
|
//# sourceMappingURL=changelog-command.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-command.d.cts","names":[],"sources":["../../src/components/changelog-command.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"changelog-command.d.cts","names":[],"sources":["../../src/components/changelog-command.tsx"],"mappings":";UA4BiB,qBAAA;EACf,SAAS;AAAA;;;AAAA;iBAMK,gBAAA;EAAmB;AAAA,GAAa,qBAAqB,4BAAA,QAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
|
|
3
1
|
//#region src/components/changelog-command.d.ts
|
|
4
2
|
interface ChangelogCommandProps {
|
|
5
3
|
changelog: string;
|
|
@@ -9,7 +7,7 @@ interface ChangelogCommandProps {
|
|
|
9
7
|
*/
|
|
10
8
|
declare function ChangelogCommand({
|
|
11
9
|
changelog
|
|
12
|
-
}: ChangelogCommandProps):
|
|
10
|
+
}: ChangelogCommandProps): import("@alloy-js/core").Children;
|
|
13
11
|
//#endregion
|
|
14
12
|
export { ChangelogCommand, ChangelogCommandProps };
|
|
15
13
|
//# sourceMappingURL=changelog-command.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-command.d.mts","names":[],"sources":["../../src/components/changelog-command.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"changelog-command.d.mts","names":[],"sources":["../../src/components/changelog-command.tsx"],"mappings":""}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { getAppTitle } from "@shell-shock/core/plugin-utils";
|
|
3
|
+
import { joinPaths } from "@stryke/path/join";
|
|
3
4
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
4
5
|
import { Show, code } from "@alloy-js/core";
|
|
5
|
-
import { FunctionDeclaration
|
|
6
|
-
import { ReflectionKind } from "@powerlines/deepkit/vendor/type";
|
|
7
|
-
import { Spacing } from "@powerlines/plugin-alloy/core";
|
|
6
|
+
import { FunctionDeclaration } from "@alloy-js/typescript";
|
|
8
7
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
9
|
-
import {
|
|
10
|
-
import { TSDoc
|
|
11
|
-
import { joinPaths } from "@stryke/path";
|
|
8
|
+
import { TypescriptFile } from "@powerlines/plugin-alloy/typescript";
|
|
9
|
+
import { TSDoc } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
12
10
|
|
|
13
11
|
//#region src/components/changelog-command.tsx
|
|
14
12
|
/**
|
|
@@ -20,10 +18,6 @@ function ChangelogCommand({ changelog }) {
|
|
|
20
18
|
get path() {
|
|
21
19
|
return joinPaths(context.entryPath, "changelog", "command.ts");
|
|
22
20
|
},
|
|
23
|
-
imports: {
|
|
24
|
-
"node:os": "os",
|
|
25
|
-
"node:fs/promises": ["readFile", "writeFile"]
|
|
26
|
-
},
|
|
27
21
|
builtinImports: { console: [
|
|
28
22
|
"textColors",
|
|
29
23
|
"bold",
|
|
@@ -32,71 +26,22 @@ function ChangelogCommand({ changelog }) {
|
|
|
32
26
|
"warn"
|
|
33
27
|
] },
|
|
34
28
|
get children() {
|
|
35
|
-
return [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
get children() {
|
|
52
|
-
return createComponent(TSDocDefaultValue, {
|
|
53
|
-
get type() {
|
|
54
|
-
return ReflectionKind.string;
|
|
55
|
-
},
|
|
56
|
-
defaultValue: "latest"
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}),
|
|
60
|
-
createComponent(InterfaceMember, {
|
|
61
|
-
name: "end",
|
|
62
|
-
optional: true,
|
|
63
|
-
type: "string"
|
|
64
|
-
})
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
createComponent(Spacing, {}),
|
|
69
|
-
createComponent(TSDoc, {
|
|
70
|
-
get heading() {
|
|
71
|
-
return `Display the ${getAppTitle(context)} changelog.`;
|
|
72
|
-
},
|
|
73
|
-
get children() {
|
|
74
|
-
return createComponent(TSDocParam, {
|
|
75
|
-
name: "options",
|
|
76
|
-
children: code`An object containing options for displaying the changelog.`
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}),
|
|
80
|
-
createComponent(FunctionDeclaration, {
|
|
81
|
-
"export": true,
|
|
82
|
-
"default": true,
|
|
83
|
-
async: true,
|
|
84
|
-
name: "handler",
|
|
85
|
-
parameters: [{
|
|
86
|
-
name: "options",
|
|
87
|
-
type: "ChangelogOptions"
|
|
88
|
-
}],
|
|
89
|
-
get children() {
|
|
90
|
-
return createComponent(Show, {
|
|
91
|
-
get when() {
|
|
92
|
-
return isSetString(changelog);
|
|
93
|
-
},
|
|
94
|
-
fallback: code` return warn("There is no changelog available for display."); `,
|
|
95
|
-
children: changelog
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
})
|
|
99
|
-
];
|
|
29
|
+
return [createComponent(TSDoc, { get heading() {
|
|
30
|
+
return `Display the ${getAppTitle(context)} changelog.`;
|
|
31
|
+
} }), createComponent(FunctionDeclaration, {
|
|
32
|
+
"export": true,
|
|
33
|
+
"default": true,
|
|
34
|
+
name: "handler",
|
|
35
|
+
get children() {
|
|
36
|
+
return createComponent(Show, {
|
|
37
|
+
get when() {
|
|
38
|
+
return isSetString(changelog);
|
|
39
|
+
},
|
|
40
|
+
fallback: code` return warn("There is no changelog available for display."); `,
|
|
41
|
+
children: code`console.log(${changelog});`
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
})];
|
|
100
45
|
}
|
|
101
46
|
});
|
|
102
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-command.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"changelog-command.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-changelog.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"resolve-changelog.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
|
19
19
|
*/
|
|
20
20
|
const plugin = (options = {}) => {
|
|
21
21
|
return {
|
|
22
|
-
name: "shell-shock
|
|
22
|
+
name: "shell-shock/changelog",
|
|
23
23
|
config() {
|
|
24
24
|
this.debug("Providing default configuration for the Shell Shock `changelog` plugin.");
|
|
25
25
|
return { changelog: (0, defu.default)({ command: { name: (0, _stryke_type_checks_is_set_string.isSetString)(options.command) ? options.command : "changelog" } }, options) };
|
|
@@ -35,27 +35,28 @@ const plugin = (options = {}) => {
|
|
|
35
35
|
this.inputs ??= [];
|
|
36
36
|
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.");
|
|
37
37
|
else {
|
|
38
|
-
this.inputs.push({
|
|
39
|
-
id: this.config.changelog.command.name,
|
|
40
|
-
path: this.config.changelog.command.name,
|
|
41
|
-
segments: [this.config.changelog.command.name],
|
|
42
|
-
title: "Changelog",
|
|
43
|
-
icon: "🗃",
|
|
44
|
-
tags: ["Utility"],
|
|
45
|
-
description: `Display the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this)} changelog.`,
|
|
46
|
-
entry: {
|
|
47
|
-
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "changelog", "index.ts"),
|
|
48
|
-
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "changelog", "command.ts") }
|
|
49
|
-
},
|
|
50
|
-
isVirtual: false,
|
|
51
|
-
source: "changelog-plugin",
|
|
52
|
-
...this.config.changelog.command
|
|
53
|
-
});
|
|
54
|
-
this.debug("Rendering changelog command module for the Shell Shock `changelog` plugin.");
|
|
55
38
|
const content = await this.fs.read(this.config.changelog.file);
|
|
56
|
-
if (content)
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
if (content) {
|
|
40
|
+
this.inputs.push({
|
|
41
|
+
id: this.config.changelog.command.name,
|
|
42
|
+
path: this.config.changelog.command.name,
|
|
43
|
+
segments: [this.config.changelog.command.name],
|
|
44
|
+
title: "Changelog",
|
|
45
|
+
icon: "🗃",
|
|
46
|
+
tags: ["Utility"],
|
|
47
|
+
description: `Display the ${(0, _shell_shock_core_plugin_utils.getAppTitle)(this)} changelog.`,
|
|
48
|
+
entry: {
|
|
49
|
+
file: (0, _stryke_path_join.joinPaths)(this.entryPath, "changelog", "index.ts"),
|
|
50
|
+
input: { file: (0, _stryke_path_join.joinPaths)(this.entryPath, "changelog", "command.ts") }
|
|
51
|
+
},
|
|
52
|
+
virtual: false,
|
|
53
|
+
...this.config.changelog.command
|
|
54
|
+
});
|
|
55
|
+
this.debug("Rendering changelog command module for the Shell Shock `changelog` plugin.");
|
|
56
|
+
await (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_changelog_command.ChangelogCommand, { get changelog() {
|
|
57
|
+
return `\`${(0, _shell_shock_unified_markdown.renderMarkdown)(content).split("\n").map((line) => (0, _stryke_type_checks_is_set_string.isSetString)(line) ? `\${${line}}` : "").join("\n")}\``;
|
|
58
|
+
} }));
|
|
59
|
+
} else this.warn(`The changelog file at the resolved path: ${this.config.changelog.file} could not be read or is empty. The \`${this.config.changelog.command.name}\` command will not be added to the application. Please ensure that the changelog file exists at the specified path and contains valid content.`);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -7,5 +7,5 @@ import { Plugin } from "powerlines";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const plugin: <TContext extends ChangelogPluginContext = ChangelogPluginContext>(options?: ChangelogPluginOptions) => Plugin<TContext>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig, plugin as default, plugin };
|
|
10
|
+
export { type ChangelogPluginContext, type ChangelogPluginOptions, type ChangelogPluginResolvedConfig, type ChangelogPluginUserConfig, plugin as default, plugin };
|
|
11
11
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -7,5 +7,5 @@ import { Plugin } from "powerlines";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const plugin: <TContext extends ChangelogPluginContext = ChangelogPluginContext>(options?: ChangelogPluginOptions) => Plugin<TContext>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { ChangelogPluginContext, ChangelogPluginOptions, ChangelogPluginResolvedConfig, ChangelogPluginUserConfig, plugin as default, plugin };
|
|
10
|
+
export { type ChangelogPluginContext, type ChangelogPluginOptions, type ChangelogPluginResolvedConfig, type ChangelogPluginUserConfig, plugin as default, plugin };
|
|
11
11
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":""}
|
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { replacePathTokens } from "powerlines/plugin-utils";
|
|
|
16
16
|
*/
|
|
17
17
|
const plugin = (options = {}) => {
|
|
18
18
|
return {
|
|
19
|
-
name: "shell-shock
|
|
19
|
+
name: "shell-shock/changelog",
|
|
20
20
|
config() {
|
|
21
21
|
this.debug("Providing default configuration for the Shell Shock `changelog` plugin.");
|
|
22
22
|
return { changelog: defu({ command: { name: isSetString(options.command) ? options.command : "changelog" } }, options) };
|
|
@@ -32,27 +32,28 @@ const plugin = (options = {}) => {
|
|
|
32
32
|
this.inputs ??= [];
|
|
33
33
|
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.");
|
|
34
34
|
else {
|
|
35
|
-
this.inputs.push({
|
|
36
|
-
id: this.config.changelog.command.name,
|
|
37
|
-
path: this.config.changelog.command.name,
|
|
38
|
-
segments: [this.config.changelog.command.name],
|
|
39
|
-
title: "Changelog",
|
|
40
|
-
icon: "🗃",
|
|
41
|
-
tags: ["Utility"],
|
|
42
|
-
description: `Display the ${getAppTitle(this)} changelog.`,
|
|
43
|
-
entry: {
|
|
44
|
-
file: joinPaths(this.entryPath, "changelog", "index.ts"),
|
|
45
|
-
input: { file: joinPaths(this.entryPath, "changelog", "command.ts") }
|
|
46
|
-
},
|
|
47
|
-
isVirtual: false,
|
|
48
|
-
source: "changelog-plugin",
|
|
49
|
-
...this.config.changelog.command
|
|
50
|
-
});
|
|
51
|
-
this.debug("Rendering changelog command module for the Shell Shock `changelog` plugin.");
|
|
52
35
|
const content = await this.fs.read(this.config.changelog.file);
|
|
53
|
-
if (content)
|
|
54
|
-
|
|
55
|
-
|
|
36
|
+
if (content) {
|
|
37
|
+
this.inputs.push({
|
|
38
|
+
id: this.config.changelog.command.name,
|
|
39
|
+
path: this.config.changelog.command.name,
|
|
40
|
+
segments: [this.config.changelog.command.name],
|
|
41
|
+
title: "Changelog",
|
|
42
|
+
icon: "🗃",
|
|
43
|
+
tags: ["Utility"],
|
|
44
|
+
description: `Display the ${getAppTitle(this)} changelog.`,
|
|
45
|
+
entry: {
|
|
46
|
+
file: joinPaths(this.entryPath, "changelog", "index.ts"),
|
|
47
|
+
input: { file: joinPaths(this.entryPath, "changelog", "command.ts") }
|
|
48
|
+
},
|
|
49
|
+
virtual: false,
|
|
50
|
+
...this.config.changelog.command
|
|
51
|
+
});
|
|
52
|
+
this.debug("Rendering changelog command module for the Shell Shock `changelog` plugin.");
|
|
53
|
+
await render(this, createComponent(ChangelogCommand, { get changelog() {
|
|
54
|
+
return `\`${renderMarkdown(content).split("\n").map((line) => isSetString(line) ? `\${${line}}` : "").join("\n")}\``;
|
|
55
|
+
} }));
|
|
56
|
+
} else this.warn(`The changelog file at the resolved path: ${this.config.changelog.file} could not be read or is empty. The \`${this.config.changelog.command.name}\` command will not be added to the application. Please ensure that the changelog file exists at the specified path and contains valid content.`);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
};
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UA0BiB,sBAAA;;AAAjB
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UA0BiB,sBAAA;;AAAjB;;;;;;;;;AAgEiC;AAGjC;;;;;;;;AAImC;AAGnC;;;;;;;;;;;;;;;;;;;;;;AAQ+C;AAI/C;;;;;;;;;;EAhCE,IAAA;EAkCE;;;;AACuB;;;;EAzBzB,OAAA,GAAU,OAAO,CAAC,aAAA;AAAA;AAAA,KAGR,yBAAA,GAA4B,UAAA;;;;EAItC,SAAA,EAAW,sBAAsB;AAAA;AAAA,KAGvB,6BAAA,GAAgC,cAAA;;;;EAI1C,SAAA,EAAW,QAAA,CAAS,IAAA,CAAK,sBAAA;;;;IAIvB,OAAA,EAAS,YAAA,CAAa,OAAA,CAAQ,aAAA;EAAA;AAAA;AAAA,KAItB,sBAAA,yBACc,6BAAA,GACtB,6BAAA,IACA,OAAA,CAAQ,eAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/plugin-changelog",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Shell Shock plugin to manage upgrading the local application's version.",
|
|
6
6
|
"keywords": [
|
|
@@ -121,25 +121,23 @@
|
|
|
121
121
|
"module": "./dist/index.mjs",
|
|
122
122
|
"types": "./dist/index.d.cts",
|
|
123
123
|
"typings": "dist/index.d.mts",
|
|
124
|
-
"files": ["dist
|
|
124
|
+
"files": ["dist"],
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@alloy-js/core": "0.23.
|
|
127
|
-
"@alloy-js/typescript": "0.23.0
|
|
128
|
-
"@powerlines/
|
|
129
|
-
"@
|
|
130
|
-
"@
|
|
131
|
-
"@
|
|
132
|
-
"@
|
|
133
|
-
"@stryke/
|
|
134
|
-
"@stryke/type-checks": "^0.6.5",
|
|
135
|
-
"@stryke/types": "^0.12.0",
|
|
126
|
+
"@alloy-js/core": "^0.23.1",
|
|
127
|
+
"@alloy-js/typescript": "^0.23.0",
|
|
128
|
+
"@powerlines/plugin-alloy": "^0.26.217",
|
|
129
|
+
"@shell-shock/core": "0.17.11",
|
|
130
|
+
"@shell-shock/unified": "0.2.9",
|
|
131
|
+
"@stryke/path": "^0.29.11",
|
|
132
|
+
"@stryke/type-checks": "^0.6.17",
|
|
133
|
+
"@stryke/types": "^0.12.12",
|
|
136
134
|
"defu": "^6.1.7",
|
|
137
|
-
"powerlines": "^0.47.
|
|
135
|
+
"powerlines": "^0.47.124"
|
|
138
136
|
},
|
|
139
137
|
"devDependencies": {
|
|
140
|
-
"@powerlines/plugin-
|
|
141
|
-
"@types/node": "^25.
|
|
138
|
+
"@powerlines/plugin-plugin": "^0.12.536",
|
|
139
|
+
"@types/node": "^25.9.1"
|
|
142
140
|
},
|
|
143
141
|
"publishConfig": { "access": "public" },
|
|
144
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "9401c1de122d800040306fc89ad1835930c1a826"
|
|
145
143
|
}
|