@shell-shock/plugin-changelog 0.1.2 → 0.1.3
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.
|
@@ -10,7 +10,6 @@ let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin
|
|
|
10
10
|
let _powerlines_plugin_alloy_typescript = require("@powerlines/plugin-alloy/typescript");
|
|
11
11
|
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
12
12
|
let _shell_shock_unified_markdown = require("@shell-shock/unified/markdown");
|
|
13
|
-
_shell_shock_unified_markdown = require_runtime.__toESM(_shell_shock_unified_markdown);
|
|
14
13
|
let _stryke_path = require("@stryke/path");
|
|
15
14
|
|
|
16
15
|
//#region src/components/changelog-command.tsx
|
|
@@ -22,7 +21,7 @@ function ChangelogCommand() {
|
|
|
22
21
|
const result = (0, _alloy_js_core.createResource)(async () => {
|
|
23
22
|
const content = await context.fs.read(context.config.changelog.file);
|
|
24
23
|
if (!content) return null;
|
|
25
|
-
return (0, _shell_shock_unified_markdown.
|
|
24
|
+
return (0, _shell_shock_unified_markdown.renderMarkdown)(content);
|
|
26
25
|
});
|
|
27
26
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript.TypescriptFile, {
|
|
28
27
|
get path() {
|
|
@@ -116,7 +115,7 @@ function ChangelogCommand() {
|
|
|
116
115
|
},
|
|
117
116
|
fallback: _alloy_js_core.code` return warn("There is no changelog available for display."); `,
|
|
118
117
|
get children() {
|
|
119
|
-
return
|
|
118
|
+
return result.data?.toString();
|
|
120
119
|
}
|
|
121
120
|
});
|
|
122
121
|
}
|
|
@@ -7,7 +7,7 @@ import { Spacing } from "@powerlines/plugin-alloy/core";
|
|
|
7
7
|
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
8
8
|
import { InterfaceMember, TypescriptFile } from "@powerlines/plugin-alloy/typescript";
|
|
9
9
|
import { TSDoc, TSDocDefaultValue, TSDocParam } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
10
|
-
import
|
|
10
|
+
import { renderMarkdown } from "@shell-shock/unified/markdown";
|
|
11
11
|
import { joinPaths } from "@stryke/path";
|
|
12
12
|
|
|
13
13
|
//#region src/components/changelog-command.tsx
|
|
@@ -19,7 +19,7 @@ function ChangelogCommand() {
|
|
|
19
19
|
const result = createResource(async () => {
|
|
20
20
|
const content = await context.fs.read(context.config.changelog.file);
|
|
21
21
|
if (!content) return null;
|
|
22
|
-
return
|
|
22
|
+
return renderMarkdown(content);
|
|
23
23
|
});
|
|
24
24
|
return createComponent(TypescriptFile, {
|
|
25
25
|
get path() {
|
|
@@ -113,7 +113,7 @@ function ChangelogCommand() {
|
|
|
113
113
|
},
|
|
114
114
|
fallback: code` return warn("There is no changelog available for display."); `,
|
|
115
115
|
get children() {
|
|
116
|
-
return
|
|
116
|
+
return result.data?.toString();
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-command.mjs","names":[],"sources":["../../src/components/changelog-command.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, createResource, Show } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n InterfaceDeclaration\n} 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 {\n InterfaceMember,\n TypescriptFile\n} from \"@powerlines/plugin-alloy/typescript\";\nimport {\n TSDoc,\n TSDocDefaultValue,\n TSDocParam\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport
|
|
1
|
+
{"version":3,"file":"changelog-command.mjs","names":[],"sources":["../../src/components/changelog-command.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, createResource, Show } from \"@alloy-js/core\";\nimport {\n FunctionDeclaration,\n InterfaceDeclaration\n} 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 {\n InterfaceMember,\n TypescriptFile\n} from \"@powerlines/plugin-alloy/typescript\";\nimport {\n TSDoc,\n TSDocDefaultValue,\n TSDocParam\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { getAppTitle } from \"@shell-shock/core/plugin-utils\";\nimport { renderMarkdown } from \"@shell-shock/unified/markdown\";\nimport { joinPaths } from \"@stryke/path\";\nimport type { ChangelogPluginContext } from \"../types/plugin\";\n\n/**\n * The Changelog command's handler wrapper for the Shell Shock project.\n */\nexport function ChangelogCommand() {\n const context = usePowerlines<ChangelogPluginContext>();\n\n const result = createResource(async () => {\n const content = await context.fs.read(context.config.changelog.file);\n if (!content) {\n return null;\n }\n\n return renderMarkdown(content);\n });\n\n return (\n <TypescriptFile\n path={joinPaths(context.entryPath, \"changelog\", \"command.ts\")}\n imports={{\n \"node:os\": \"os\",\n \"node:fs/promises\": [\"readFile\", \"writeFile\"]\n }}\n builtinImports={{\n console: [\"textColors\", \"bold\", \"writeLine\", \"error\", \"warn\"]\n }}>\n <TSDoc heading=\"Options for the Changelog command.\" />\n <InterfaceDeclaration export name=\"ChangelogOptions\">\n <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 <InterfaceMember name=\"start\" optional type=\"string\" />\n <Spacing />\n <TSDoc 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.\">\n <TSDocDefaultValue\n type={ReflectionKind.string}\n defaultValue=\"latest\"\n />\n </TSDoc>\n <InterfaceMember name=\"end\" optional type=\"string\" />\n </InterfaceDeclaration>\n <Spacing />\n <TSDoc heading={`Display the ${getAppTitle(context)} changelog.`}>\n <TSDocParam name=\"options\">\n {code`An object containing options for displaying the changelog.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n export\n default\n async\n name=\"handler\"\n parameters={[{ name: \"options\", type: \"ChangelogOptions\" }]}>\n <Show\n when={!result.loading && !result.error}\n fallback={\n <Show when={!!result.error}>\n {code` return error(\\`Failed to load changelog: ${result.error!.message.replaceAll(\n /`/g,\n \"\\\\\\`\"\n )}\\`); `}\n </Show>\n }>\n <Show\n when={!!result.data?.toString()}\n fallback={code` return warn(\"There is no changelog available for display.\"); `}>\n {result.data?.toString()}\n </Show>\n </Show>\n </FunctionDeclaration>\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,SAAS,mBAAwB;CACjC,MAAQ,UAAC,eAA6C;CACtD,MAAQ,SAAC,eAAuB,YAAY;EAC5C,MAAS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A,gBAAA,MAAA;SACH,IAAA,OAAA"}
|
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.3",
|
|
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": [
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"@powerlines/deepkit": "^0.6.167",
|
|
129
129
|
"@powerlines/plugin-alloy": "^0.26.9",
|
|
130
130
|
"@powerlines/plugin-plugin": "^0.12.343",
|
|
131
|
-
"@shell-shock/core": "^0.
|
|
132
|
-
"@shell-shock/unified": "^0.1.
|
|
131
|
+
"@shell-shock/core": "^0.17.0",
|
|
132
|
+
"@shell-shock/unified": "^0.1.3",
|
|
133
133
|
"@stryke/path": "^0.27.4",
|
|
134
134
|
"@stryke/type-checks": "^0.6.1",
|
|
135
135
|
"@stryke/types": "^0.11.3",
|
|
@@ -155,5 +155,5 @@
|
|
|
155
155
|
"./package.json": "./package.json"
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
"gitHead": "
|
|
158
|
+
"gitHead": "8ca409c1453d9722650670c3df4f4da72abdc308"
|
|
159
159
|
}
|