@powerlines/plugin-marked 0.1.328 → 0.1.330

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,29 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+
3
+ export { };
package/dist/index.cjs ADDED
@@ -0,0 +1,40 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let defu = require("defu");
4
+ defu = require_runtime.__toESM(defu);
5
+ let marked = require("marked");
6
+
7
+ //#region src/index.ts
8
+ /**
9
+ * Marked Plugin
10
+ *
11
+ * @remarks
12
+ * A Powerlines plugin to use the Marked markdown transformer during the prepare task.
13
+ *
14
+ * @see https://marked.js.org
15
+ *
16
+ * @param options - The plugin options.
17
+ * @returns A Powerlines plugin instance.
18
+ */
19
+ const plugin = (options = {}) => {
20
+ return {
21
+ name: "marked",
22
+ async config() {
23
+ return { marked: (0, defu.default)(options, {
24
+ async: true,
25
+ breaks: true,
26
+ gfm: true,
27
+ silent: !this.config.logLevel
28
+ }) };
29
+ },
30
+ async configResolved() {
31
+ this.marked ??= {};
32
+ this.marked.parse ??= async (src, override = {}) => marked.marked.parse(src, (0, defu.default)(override, this.config.marked));
33
+ this.marked.use ??= (...args) => marked.marked.use(...args);
34
+ }
35
+ };
36
+ };
37
+
38
+ //#endregion
39
+ exports.default = plugin;
40
+ exports.plugin = plugin;
@@ -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":";;;;;YA8BY,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":";;;;;YA8BY,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,37 @@
1
+ import defu from "defu";
2
+ import { marked } from "marked";
3
+
4
+ //#region src/index.ts
5
+ /**
6
+ * Marked Plugin
7
+ *
8
+ * @remarks
9
+ * A Powerlines plugin to use the Marked markdown transformer during the prepare task.
10
+ *
11
+ * @see https://marked.js.org
12
+ *
13
+ * @param options - The plugin options.
14
+ * @returns A Powerlines plugin instance.
15
+ */
16
+ const plugin = (options = {}) => {
17
+ return {
18
+ name: "marked",
19
+ async config() {
20
+ return { marked: defu(options, {
21
+ async: true,
22
+ breaks: true,
23
+ gfm: true,
24
+ silent: !this.config.logLevel
25
+ }) };
26
+ },
27
+ async configResolved() {
28
+ this.marked ??= {};
29
+ this.marked.parse ??= async (src, override = {}) => marked.parse(src, defu(override, this.config.marked));
30
+ this.marked.use ??= (...args) => marked.use(...args);
31
+ }
32
+ };
33
+ };
34
+
35
+ //#endregion
36
+ export { plugin as default, plugin };
37
+ //# 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 {\n MarkedPluginContext,\n MarkedPluginOptions,\n MarkedPluginUserConfig\n} 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 } 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,KAErC,OAAO,MAAM,KAAK,KAAK,UAAU,KAAK,OAAO,OAAO,CAAkB;AACxE,QAAK,OAAO,SAAS,GAAG,SAA4B,OAAO,IAAI,GAAG,KAAK;;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.328",
3
+ "version": "0.1.330",
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"],
@@ -94,15 +94,15 @@
94
94
  "@stryke/path": "^0.27.2",
95
95
  "@stryke/types": "^0.11.1",
96
96
  "defu": "^6.1.4",
97
- "powerlines": "^0.42.4"
97
+ "powerlines": "^0.42.6"
98
98
  },
99
99
  "devDependencies": {
100
- "@powerlines/plugin-plugin": "^0.12.314",
100
+ "@powerlines/plugin-plugin": "^0.12.316",
101
101
  "@types/node": "^25.5.0",
102
102
  "marked": "^17.0.4"
103
103
  },
104
104
  "peerDependencies": { "marked": ">=17.0.4" },
105
105
  "peerDependenciesMeta": { "marked": { "optional": false } },
106
106
  "publishConfig": { "access": "public" },
107
- "gitHead": "c3243c1ec0fbacb4afd4bd3db20432f443334076"
107
+ "gitHead": "af94c1952c9f2d293dac72a2d0ed3627be8d807d"
108
108
  }