@powerlines/plugin-marked 0.1.11 → 0.1.12

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
+ export { };
@@ -0,0 +1 @@
1
+ export { };
package/dist/index.cjs CHANGED
@@ -1,7 +1 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var n=require('defu'),marked=require('marked'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);/*****************************************
2
- *
3
- * ⚡ Built by Storm Software
4
- *
5
- *****************************************/
6
-
7
- var o=Object.defineProperty;var t=(r,e)=>o(r,"name",{value:e,configurable:true});const s=t((r={})=>({name:"marked",async config(){return {marked:n__default.default(r,{async:true,breaks:true,gfm:true,silent:!this.config.logLevel})}},async configResolved(){this.marked??={},this.marked.parse??=async(e,i={})=>marked.marked.parse(e,n__default.default(i,this.config.marked)),this.marked.use??=(...e)=>marked.marked.use(...e);}}),"plugin");var C=s;exports.default=C;exports.plugin=s;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});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));require(`./plugin-DHXHjv16.cjs`),require(`./types-DHkg7xmX.cjs`);let c=require(`defu`);c=s(c);let l=require(`marked`);const u=(e={})=>({name:`marked`,async config(){return{marked:(0,c.default)(e,{async:!0,breaks:!0,gfm:!0,silent:!this.config.logLevel})}},async configResolved(){this.marked??={},this.marked.parse??=async(e,t={})=>l.marked.parse(e,(0,c.default)(t,this.config.marked)),this.marked.use??=(...e)=>l.marked.use(...e)}});var d=u;exports.default=d,exports.plugin=u;
package/dist/index.d.cts CHANGED
@@ -1,27 +1,7 @@
1
- import { M as MarkedPluginContext, a as MarkedPluginOptions, P as Plugin } from './index-DQgZEBhQ.cjs';
2
- export { c as MarkedPluginResolvedConfig, b as MarkedPluginUserConfig } from './index-DQgZEBhQ.cjs';
3
- import 'marked';
4
- import '@storm-software/build-tools/types';
5
- import '@storm-software/config-tools/types';
6
- import '@storm-software/config/types';
7
- import '@stryke/types/base';
8
- import '@stryke/types/configuration';
9
- import '@stryke/types/file';
10
- import 'vite';
11
- import '@stryke/env/get-env-paths';
12
- import '@stryke/http/fetch';
13
- import '@stryke/types/package-json';
14
- import 'jiti';
15
- import 'magic-string';
16
- import 'oxc-parser';
17
- import 'semver';
18
- import 'ts-morph';
19
- import 'undici';
20
- import 'unplugin';
21
- import '@stryke/fs/resolve';
22
- import '@stryke/types/tsconfig';
23
- import 'typescript';
24
- import '@stryke/types/array';
1
+ import { a as Plugin, i as MarkedPluginUserConfig, n as MarkedPluginOptions, r as MarkedPluginResolvedConfig, t as MarkedPluginContext } from "./plugin-BdoX0JOd.cjs";
2
+ import "./index-CEgs-Dz2.cjs";
3
+
4
+ //#region src/index.d.ts
25
5
 
26
6
  /**
27
7
  * Marked Plugin
@@ -35,5 +15,6 @@ import '@stryke/types/array';
35
15
  * @returns A Powerlines plugin instance.
36
16
  */
37
17
  declare const plugin: <TContext extends MarkedPluginContext = MarkedPluginContext>(options?: MarkedPluginOptions) => Plugin<TContext>;
38
-
39
- export { MarkedPluginContext, MarkedPluginOptions, plugin as default, plugin };
18
+ //#endregion
19
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig, plugin as default, plugin };
20
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAwCA;;;;;;;;;;cAAa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
@@ -0,0 +1,20 @@
1
+ import { a as Plugin, i as MarkedPluginUserConfig, n as MarkedPluginOptions, r as MarkedPluginResolvedConfig, t as MarkedPluginContext } from "./plugin-CjvEL9F2.mjs";
2
+ import "./index-BgAdqTbb.mjs";
3
+
4
+ //#region src/index.d.ts
5
+
6
+ /**
7
+ * Marked Plugin
8
+ *
9
+ * @remarks
10
+ * A Powerlines plugin to use the Marked markdown transformer during the prepare task.
11
+ *
12
+ * @see https://marked.js.org
13
+ *
14
+ * @param options - The plugin options.
15
+ * @returns A Powerlines plugin instance.
16
+ */
17
+ declare const plugin: <TContext extends MarkedPluginContext = MarkedPluginContext>(options?: MarkedPluginOptions) => Plugin<TContext>;
18
+ //#endregion
19
+ export { MarkedPluginContext, MarkedPluginOptions, MarkedPluginResolvedConfig, MarkedPluginUserConfig, plugin as default, plugin };
20
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAwCA;;;;;;;;;;cAAa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import"./plugin-Bvn-he2n.mjs";import"./types-B7VYa_Pp.mjs";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)}});var r=n;export{r 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/types/plugin\";\nimport {\n MarkedPluginContext,\n MarkedPluginOptions,\n MarkedPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\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":"+GAwCA,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,EAGH,IAAA,EAAe"}