@powerlines/plugin-marked 0.1.397 → 0.1.400

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.
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./_virtual/_rolldown/runtime.cjs`);let t=require(`defu`);t=e.__toESM(t,1);let n=require(`marked`);const r=(e={})=>({name:`marked`,async config(){return{marked:(0,t.default)(e,{async:!0,breaks:!0,gfm:!0,silent:!this.config.logLevel})}},async configResolved(){this.marked??={},this.marked.parse??=async(e,r={})=>n.marked.parse(e,(0,t.default)(r,this.config.marked)),this.marked.use??=(...e)=>n.marked.use(...e)}});exports.default=r,exports.plugin=r;
@@ -0,0 +1,24 @@
1
+ import { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig } from "./types/plugin.cjs";
2
+ import { Plugin } from "powerlines";
3
+
4
+ //#region src/index.d.ts
5
+ declare module "powerlines" {
6
+ interface Config {
7
+ marked?: MarkedPluginOptions;
8
+ }
9
+ }
10
+ /**
11
+ * Marked Plugin
12
+ *
13
+ * @remarks
14
+ * A Powerlines plugin to use the Marked markdown transformer during the prepare task.
15
+ *
16
+ * @see https://marked.js.org
17
+ *
18
+ * @param options - The plugin options.
19
+ * @returns A Powerlines plugin instance.
20
+ */
21
+ declare const plugin: <TContext extends MarkedPluginContext = MarkedPluginContext>(options?: MarkedPluginOptions) => Plugin<TContext>;
22
+ //#endregion
23
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig, plugin as default, plugin };
24
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YA0BY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;;;;;AAeb;;;;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
@@ -0,0 +1,24 @@
1
+ import { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig } from "./types/plugin.mjs";
2
+ import { Plugin } from "powerlines";
3
+
4
+ //#region src/index.d.ts
5
+ declare module "powerlines" {
6
+ interface Config {
7
+ marked?: MarkedPluginOptions;
8
+ }
9
+ }
10
+ /**
11
+ * Marked Plugin
12
+ *
13
+ * @remarks
14
+ * A Powerlines plugin to use the Marked markdown transformer during the prepare task.
15
+ *
16
+ * @see https://marked.js.org
17
+ *
18
+ * @param options - The plugin options.
19
+ * @returns A Powerlines plugin instance.
20
+ */
21
+ declare const plugin: <TContext extends MarkedPluginContext = MarkedPluginContext>(options?: MarkedPluginOptions) => Plugin<TContext>;
22
+ //#endregion
23
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig, plugin as default, plugin };
24
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YA0BY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;AAAA;;;;;;;;AAeb;;;;cAAa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import e from"defu";import{marked as t}from"marked";const n=(n={})=>({name:`marked`,async config(){return{marked:e(n,{async:!0,breaks:!0,gfm:!0,silent:!this.config.logLevel})}},async configResolved(){this.marked??={},this.marked.parse??=async(n,r={})=>t.parse(n,e(r,this.config.marked)),this.marked.use??=(...e)=>t.use(...e)}});export{n as default,n as plugin};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"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 { MarkedPluginContext, MarkedPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\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 };\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":"oDA0CA,MAAa,GAGX,EAA+B,EAAE,IAE1B,CACL,KAAM,SACN,MAAM,QAAS,CACb,MAAO,CACL,OAAQ,EAAK,EAAS,CACpB,MAAO,GACP,OAAQ,GACR,IAAK,GACL,OAAQ,CAAC,KAAK,OAAO,SACtB,CAAC,CACH,EAEH,MAAM,gBAAiB,CACrB,KAAK,SAAW,EAAE,CAClB,KAAK,OAAO,QAAU,MACpB,EACA,EAAmC,EAAE,GAErC,EAAO,MAAM,EAAK,EAAK,EAAU,KAAK,OAAO,OAAO,CAAkB,CACxE,KAAK,OAAO,OAAS,GAAG,IAA4B,EAAO,IAAI,GAAG,EAAK,EAE1E"}
File without changes
@@ -0,0 +1,2 @@
1
+ import { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig } from "./plugin.cjs";
2
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig };
@@ -0,0 +1,2 @@
1
+ import { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig } from "./plugin.mjs";
2
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig };
@@ -0,0 +1 @@
1
+ export{};
File without changes
@@ -0,0 +1,20 @@
1
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
2
+ import { MarkedExtension, MarkedOptions, marked } from "marked";
3
+
4
+ //#region src/types/plugin.d.ts
5
+ type MarkedPluginOptions = MarkedOptions & MarkedExtension;
6
+ type MarkedPluginUserConfig = UserConfig & {
7
+ marked?: MarkedPluginOptions;
8
+ };
9
+ type MarkedPluginResolvedConfig = ResolvedConfig & {
10
+ marked: MarkedPluginOptions;
11
+ };
12
+ type MarkedPluginContext<TResolvedConfig extends MarkedPluginResolvedConfig = MarkedPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
13
+ marked: {
14
+ parse: (src: string, override?: Partial<MarkedOptions>) => Promise<string>;
15
+ use: typeof marked.use;
16
+ };
17
+ };
18
+ //#endregion
19
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig };
20
+ //# sourceMappingURL=plugin.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,mBAAA,GAAsB,aAAA,GAAgB,eAAA;AAAA,KAEtC,sBAAA,GAAyB,UAAA;EACnC,MAAA,GAAS,mBAAA;AAAA;AAAA,KAGC,0BAAA,GAA6B,cAAA;EACvC,MAAA,EAAQ,mBAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;EAChB,MAAA;IACE,KAAA,GAAQ,GAAA,UAAa,QAAA,GAAW,OAAA,CAAQ,aAAA,MAAmB,OAAA;IAC3D,GAAA,SAAY,MAAA,CAAO,GAAA;EAAA;AAAA"}
@@ -0,0 +1,20 @@
1
+ import { MarkedExtension, MarkedOptions, marked } from "marked";
2
+ import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
3
+
4
+ //#region src/types/plugin.d.ts
5
+ type MarkedPluginOptions = MarkedOptions & MarkedExtension;
6
+ type MarkedPluginUserConfig = UserConfig & {
7
+ marked?: MarkedPluginOptions;
8
+ };
9
+ type MarkedPluginResolvedConfig = ResolvedConfig & {
10
+ marked: MarkedPluginOptions;
11
+ };
12
+ type MarkedPluginContext<TResolvedConfig extends MarkedPluginResolvedConfig = MarkedPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
13
+ marked: {
14
+ parse: (src: string, override?: Partial<MarkedOptions>) => Promise<string>;
15
+ use: typeof marked.use;
16
+ };
17
+ };
18
+ //#endregion
19
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig };
20
+ //# sourceMappingURL=plugin.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,mBAAA,GAAsB,aAAA,GAAgB,eAAA;AAAA,KAEtC,sBAAA,GAAyB,UAAA;EACnC,MAAA,GAAS,mBAAA;AAAA;AAAA,KAGC,0BAAA,GAA6B,cAAA;EACvC,MAAA,EAAQ,mBAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;EAChB,MAAA;IACE,KAAA,GAAQ,GAAA,UAAa,QAAA,GAAW,OAAA,CAAQ,aAAA,MAAmB,OAAA;IAC3D,GAAA,SAAY,MAAA,CAAO,GAAA;EAAA;AAAA"}
@@ -0,0 +1 @@
1
+ export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-marked",
3
- "version": "0.1.397",
3
+ "version": "0.1.400",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to use the Marked markdown compiler to generate HTML.",
6
6
  "keywords": ["marked", "powerlines", "storm-software", "powerlines-plugin"],
@@ -90,19 +90,19 @@
90
90
  "typings": "dist/index.d.mts",
91
91
  "files": ["dist/**/*"],
92
92
  "dependencies": {
93
- "@stryke/fs": "^0.33.67",
94
- "@stryke/path": "^0.27.5",
95
- "@stryke/types": "^0.11.4",
93
+ "@stryke/fs": "^0.33.69",
94
+ "@stryke/path": "^0.28.1",
95
+ "@stryke/types": "^0.11.6",
96
96
  "defu": "^6.1.7",
97
- "powerlines": "^0.43.28"
97
+ "powerlines": "^0.43.31"
98
98
  },
99
99
  "devDependencies": {
100
- "@powerlines/plugin-plugin": "^0.12.383",
100
+ "@powerlines/plugin-plugin": "^0.12.386",
101
101
  "@types/node": "^25.6.0",
102
102
  "marked": "^17.0.6"
103
103
  },
104
104
  "peerDependencies": { "marked": ">=17.0.4" },
105
105
  "peerDependenciesMeta": { "marked": { "optional": false } },
106
106
  "publishConfig": { "access": "public" },
107
- "gitHead": "efeaec793549f37c700f2e876bf6097c37375c46"
107
+ "gitHead": "abf752430f7af954a70fd6c9805e50eba2fa666b"
108
108
  }