@powerlines/plugin-marked 0.1.267 → 0.1.268

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/index.d.cts CHANGED
@@ -3,8 +3,8 @@ import "./types/index.cjs";
3
3
  import { Plugin } from "powerlines";
4
4
 
5
5
  //#region src/index.d.ts
6
- declare module "powerlines" {
7
- interface UserConfig {
6
+ declare module "@powerlines/core" {
7
+ interface BaseConfig {
8
8
  marked?: MarkedPluginOptions;
9
9
  }
10
10
  }
package/dist/index.d.mts CHANGED
@@ -3,8 +3,8 @@ import "./types/index.mjs";
3
3
  import { Plugin } from "powerlines";
4
4
 
5
5
  //#region src/index.d.ts
6
- declare module "powerlines" {
7
- interface UserConfig {
6
+ declare module "@powerlines/core" {
7
+ interface BaseConfig {
8
8
  marked?: MarkedPluginOptions;
9
9
  }
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["marked"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport { marked, MarkedExtension, MarkedOptions } from \"marked\";\nimport { Plugin } from \"powerlines\";\nimport {\n MarkedPluginContext,\n MarkedPluginOptions,\n MarkedPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n export interface UserConfig {\n marked?: MarkedPluginOptions;\n }\n}\n\n/**\n * Marked Plugin\n *\n * @remarks\n * A Powerlines plugin to use the Marked markdown transformer during the prepare task.\n *\n * @see https://marked.js.org\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends MarkedPluginContext = MarkedPluginContext\n>(\n options: MarkedPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"marked\",\n async config() {\n return {\n marked: defu(options, {\n async: true,\n breaks: true,\n gfm: true,\n silent: !this.config.logLevel\n })\n } as Partial<MarkedPluginUserConfig>;\n },\n async configResolved() {\n this.marked ??= {} as TContext[\"marked\"];\n this.marked.parse ??= async (\n src: string,\n override: Partial<MarkedOptions> = {}\n ) =>\n marked.parse(src, defu(override, this.config.marked) as MarkedOptions);\n this.marked.use ??= (...args: MarkedExtension[]) => marked.use(...args);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA8CA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,QAAQ,KAAK,SAAS;IACpB,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ,CAAC,KAAK,OAAO;IACtB,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,WAAW,EAAE;AAClB,QAAK,OAAO,UAAU,OACpB,KACA,WAAmC,EAAE,KAErCA,EAAO,MAAM,KAAK,KAAK,UAAU,KAAK,OAAO,OAAO,CAAkB;AACxE,QAAK,OAAO,SAAS,GAAG,SAA4BA,EAAO,IAAI,GAAG,KAAK;;EAE1E;;AAGH,kBAAe"}
1
+ {"version":3,"file":"index.mjs","names":["marked"],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\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/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport defu from \"defu\";\nimport { marked, MarkedExtension, MarkedOptions } from \"marked\";\nimport { Plugin } from \"powerlines\";\nimport {\n MarkedPluginContext,\n MarkedPluginOptions,\n MarkedPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n marked?: MarkedPluginOptions;\n }\n}\n\n/**\n * Marked Plugin\n *\n * @remarks\n * A Powerlines plugin to use the Marked markdown transformer during the prepare task.\n *\n * @see https://marked.js.org\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends MarkedPluginContext = MarkedPluginContext\n>(\n options: MarkedPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"marked\",\n async config() {\n return {\n marked: defu(options, {\n async: true,\n breaks: true,\n gfm: true,\n silent: !this.config.logLevel\n })\n } as Partial<MarkedPluginUserConfig>;\n },\n async configResolved() {\n this.marked ??= {} as TContext[\"marked\"];\n this.marked.parse ??= async (\n src: string,\n override: Partial<MarkedOptions> = {}\n ) =>\n marked.parse(src, defu(override, this.config.marked) as MarkedOptions);\n this.marked.use ??= (...args: MarkedExtension[]) => marked.use(...args);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA8CA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,QAAQ,KAAK,SAAS;IACpB,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ,CAAC,KAAK,OAAO;IACtB,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,WAAW,EAAE;AAClB,QAAK,OAAO,UAAU,OACpB,KACA,WAAmC,EAAE,KAErCA,EAAO,MAAM,KAAK,KAAK,UAAU,KAAK,OAAO,OAAO,CAAkB;AACxE,QAAK,OAAO,SAAS,GAAG,SAA4BA,EAAO,IAAI,GAAG,KAAK;;EAE1E;;AAGH,kBAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-marked",
3
- "version": "0.1.267",
3
+ "version": "0.1.268",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to use the Marked markdown compiler to generate HTML.",
6
6
  "repository": {
@@ -93,14 +93,14 @@
93
93
  "@stryke/path": "^0.26.6",
94
94
  "@stryke/types": "^0.10.39",
95
95
  "defu": "^6.1.4",
96
- "powerlines": "^0.39.10"
96
+ "powerlines": "^0.39.11"
97
97
  },
98
98
  "devDependencies": {
99
- "@powerlines/plugin-plugin": "^0.12.253",
99
+ "@powerlines/plugin-plugin": "^0.12.254",
100
100
  "@types/node": "^25.3.3",
101
101
  "marked": "^17.0.3"
102
102
  },
103
103
  "publishConfig": { "access": "public" },
104
104
  "types": "./dist/index.d.cts",
105
- "gitHead": "905dbeee1a9e2658cf70489e977cafac62733e46"
105
+ "gitHead": "e63eb5a0ecd0e5ee3e030388ad1c534b3ecb2136"
106
106
  }