@shell-shock/plugin-changelog 0.1.3 → 0.1.5

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.
@@ -111,11 +111,11 @@ function ChangelogCommand() {
111
111
  get children() {
112
112
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
113
113
  get when() {
114
- return !!result.data?.toString();
114
+ return !!result.data;
115
115
  },
116
116
  fallback: _alloy_js_core.code` return warn("There is no changelog available for display."); `,
117
117
  get children() {
118
- return result.data?.toString();
118
+ return result.data;
119
119
  }
120
120
  });
121
121
  }
@@ -109,11 +109,11 @@ function ChangelogCommand() {
109
109
  get children() {
110
110
  return createComponent(Show, {
111
111
  get when() {
112
- return !!result.data?.toString();
112
+ return !!result.data;
113
113
  },
114
114
  fallback: code` return warn("There is no changelog available for display."); `,
115
115
  get children() {
116
- return result.data?.toString();
116
+ return result.data;
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 { 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,UAAW,MAAM,QAAQ,GAAC,KAAK,QAAA,OAAA,UAAA,KAAA;AACxC,MAAO,CAAA;AAGJ,SAAI,eAAmB,QAAQ;GAChC;AACF,QAAO,gBAAS,gBAAmB;EACjC,IAAM,OAAO;;;EAGX,SAAM;GACJ,WAAW;GACX,oBAAW,CAAA,YAAA,YAAA;GACb;oBAEA,SAAO;GAAA;GAAe;GAAQ;GAAA;GAAA;GAAA,EAC9B;;AAEF,UAAO;IAAA,gBAAA,OAAA,EACJ,SAAA,sCACC,CAAA;IAAI,gBAAY,sBAAoB;KACpC,UAAS;KACP,MAAM;KACN,IAAC,WAAQ;AACV,aAAA;OAAA,gBAAA,OAAA,EACD,SAAe,2QACb,CAAA;OAAA,gBAAwB,iBAAS;QACjC,MAAA;QACI,UAAU;QACf,MAAA;QACE,CAAA;OAAK,gBAAa,SAAS,EAAA,CAAQ;OAAC,gBAAgB,OAAU;QAC9D,SAAA;QACA,IAAO,WAAE;AACJ,gBAAC,gBAAqB,mBAAsB;UAC/C,IAAA,OAAA;AACO,kBAAA,eAAqB;;UAE5B,cAAA;UACI,CAAA;;QAEP,CAAA;OAAA,gBAAoB,iBAAA;QACrB,MAAS;QACJ,UAAU;QACb,MAAA;QACE,CAAA;OAAA;;KAEJ,CAAC;IAAA,gBAAK,SAAA,EAAA,CAAA;IAAA,gBAAA,OAAA;KACN,IAAA,UAAA;AACC,aAAA,eAAA,YAAA,QAAA,CAAA;;KAEA,IAAA,WAAA;AACA,aAAM,gBAAO,YAAA;OACb,MAAU;OACT,UAAA,IAAA;OACC,CAAA;;KAEH,CAAC;IAAE,gBAAgB,qBAAa;KAC/B,UAAO;KACP,WAAW;KACX,OAAO;KACP,MAAM;KACN,YAAU,CAAA;MACR,MAAC;MACD,MAAC;MACF,CAAC;KACF,IAAI,WAAU;AACZ,aAAG,gBAAsB,MAAC;OACxB,IAAI,OAAA;AACF,eAAA,CAAA,OAAA,WAAA,CAAA,OAAA;;OAER,IAAA,WAAc;AACjB,eAAA,gBAAA,MAAA;SACH,IAAA,OAAA"}
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}\n fallback={code` return warn(\"There is no changelog available for display.\"); `}>\n {result.data}\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AU,CAAA;MACR,MAAC;MACD,MAAC;MACF,CAAC;KACF,IAAI,WAAU;AACZ,aAAG,gBAAW,MAAA;OACZ,IAAI,OAAA;AACF,eAAA,CAAA,OAAA,WAAA,CAAA,OAAA;;OAER,IAAA,WAAc;AACjB,eAAA,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",
3
+ "version": "0.1.5",
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": [
@@ -126,19 +126,19 @@
126
126
  "@alloy-js/core": "0.23.0-dev.8",
127
127
  "@alloy-js/typescript": "0.23.0-dev.4",
128
128
  "@powerlines/deepkit": "^0.6.167",
129
- "@powerlines/plugin-alloy": "^0.26.9",
130
- "@powerlines/plugin-plugin": "^0.12.343",
131
- "@shell-shock/core": "^0.17.0",
132
- "@shell-shock/unified": "^0.1.3",
129
+ "@powerlines/plugin-alloy": "^0.26.10",
130
+ "@powerlines/plugin-plugin": "^0.12.344",
131
+ "@shell-shock/core": "^0.17.2",
132
+ "@shell-shock/unified": "^0.2.0",
133
133
  "@stryke/path": "^0.27.4",
134
134
  "@stryke/type-checks": "^0.6.1",
135
135
  "@stryke/types": "^0.11.3",
136
136
  "defu": "^6.1.7",
137
- "powerlines": "^0.42.33"
137
+ "powerlines": "^0.42.34"
138
138
  },
139
139
  "devDependencies": {
140
- "@powerlines/plugin-deepkit": "^0.11.271",
141
- "@types/node": "^25.5.2"
140
+ "@powerlines/plugin-deepkit": "^0.11.272",
141
+ "@types/node": "^25.6.0"
142
142
  },
143
143
  "publishConfig": {
144
144
  "access": "public",
@@ -155,5 +155,5 @@
155
155
  "./package.json": "./package.json"
156
156
  }
157
157
  },
158
- "gitHead": "8ca409c1453d9722650670c3df4f4da72abdc308"
158
+ "gitHead": "38e2393cfc876607226b05a59cc9bd62e3b59960"
159
159
  }