@shell-shock/plugin-changelog 0.1.0 → 0.1.2

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.
@@ -116,7 +116,7 @@ function ChangelogCommand() {
116
116
  },
117
117
  fallback: _alloy_js_core.code` return warn("There is no changelog available for display."); `,
118
118
  get children() {
119
- return _alloy_js_core.code` return \`${result.data?.toString()}\`; `;
119
+ return _alloy_js_core.code` return ${result.data?.toString()}; `;
120
120
  }
121
121
  });
122
122
  }
@@ -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 code` return \`${result.data?.toString()}\`; `;
116
+ return code` 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 markdown 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 markdown(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 {code` return \\`${result.data?.toString()}\\`; `}\n </Show>\n </Show>\n </FunctionDeclaration>\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,SAAS,mBAAwB;CACjC,MAAQ,UAAC,eAA6C;CACtD,MAAO,SAAS,eAAa,YAAc;EAC3C,MAAS,UAAW,MAAM,QAAQ,GAAC,KAAK,QAAA,OAAA,UAAA,KAAA;AACxC,MAAO,CAAA;AAGJ,SAAI,SAAU,QAAU;GACzB;AACF,QAAO,gBAAS,gBAAmB;EACjC,IAAM,OAAO;;;EAGX,SAAM;GACJ,WAAW;GACX,oBAAW,CAAA,YAAA,YAAA;GACb;oBAEA,SAAO;GAAA;GAAiB;GAAA;GAAA;GAAA;GAAA,EACxB;;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,aAAO,gBAAa,MAAW;OAC7B,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 markdown 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 markdown(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 {code` return ${result.data?.toString()}; `}\n </Show>\n </Show>\n </FunctionDeclaration>\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,SAAS,mBAAw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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.0",
3
+ "version": "0.1.2",
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,12 +128,12 @@
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.16.0",
132
- "@shell-shock/unified": "^0.1.0",
131
+ "@shell-shock/core": "^0.16.2",
132
+ "@shell-shock/unified": "^0.1.2",
133
133
  "@stryke/path": "^0.27.4",
134
134
  "@stryke/type-checks": "^0.6.1",
135
135
  "@stryke/types": "^0.11.3",
136
- "defu": "^6.1.6",
136
+ "defu": "^6.1.7",
137
137
  "powerlines": "^0.42.33"
138
138
  },
139
139
  "devDependencies": {
@@ -155,5 +155,5 @@
155
155
  "./package.json": "./package.json"
156
156
  }
157
157
  },
158
- "gitHead": "99864265fd762dd8a4dcdb5740242469cde2b448"
158
+ "gitHead": "c1b938503f5de35ab59e58638029def62257a504"
159
159
  }