@powerlines/plugin-automd 0.1.34 → 0.1.36
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.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
var u=Object.defineProperty;var r=(i,o)=>u(i,"name",{value:o,configurable:true});const w=r((i={})=>({name:"automd",async config(){const o=await automd.loadConfig(joinPaths.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot),i);return (!o.prefix||!Array.isArray(o.prefix))&&(o.prefix=toArray.toArray(o.prefix??[])),o.prefix.includes("automd")||o.prefix.push("automd"),o.prefix.includes("powerlines")||o.prefix.push("powerlines"),{automd:f__default.default(o??{},{configFile:i.configFile,allowIssues:true,dir:this.config.projectRoot,watch:false,input:"README.md",toc:{maxDepth:6,bullets:"-"}})}},async configResolved(){if(this.config.automd.configFile){const{config:o}=await c12.loadConfig({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:["**/node_modules","**/dist","**/.*"],dir:this.config.automd.dir}});this.config.automd=automd.resolveConfig(f__default.default(this.config.automd,{...o,prefix:toArray.toArray(o.prefix??[])}));}this.config.automd.input=(await Promise.all(toArray.toArray(this.config.automd.input).map(async o=>o.includes("*")?listFiles.listFiles(isType.isAbsolutePath(o)?o:append.appendPath(o,this.config.projectRoot),{ignore:this.config.automd.ignore}):isType.isAbsolutePath(o)?o:append.appendPath(o,this.config.projectRoot)))).flat(),this.config.automd.output&&!isType.isAbsolutePath(this.config.automd.output)&&(this.config.automd.output=append.appendPath(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==false&&(this.config.automd.generators.toc??={name:"toc",generate:r(o=>{const t=this.config.automd.toc??{};return {contents:C__default.default(o.block.md,{...t,maxdepth:t.maxDepth,
|
|
7
|
+
var u=Object.defineProperty;var r=(i,o)=>u(i,"name",{value:o,configurable:true});const w=r((i={})=>({name:"automd",async config(){const o=await automd.loadConfig(joinPaths.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot),i);return (!o.prefix||!Array.isArray(o.prefix))&&(o.prefix=toArray.toArray(o.prefix??[])),o.prefix.includes("automd")||o.prefix.push("automd"),o.prefix.includes("powerlines")||o.prefix.push("powerlines"),{automd:f__default.default(o??{},{configFile:i.configFile,allowIssues:true,dir:this.config.projectRoot,watch:false,input:"README.md",toc:{maxDepth:6,bullets:"-"}})}},async configResolved(){if(this.config.automd.configFile){const{config:o}=await c12.loadConfig({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:["**/node_modules","**/dist","**/.*"],dir:this.config.automd.dir}});this.config.automd=automd.resolveConfig(f__default.default(this.config.automd,{...o,prefix:toArray.toArray(o.prefix??[])}));}this.config.automd.input=(await Promise.all(toArray.toArray(this.config.automd.input).map(async o=>o.includes("*")?listFiles.listFiles(isType.isAbsolutePath(o)?o:append.appendPath(o,this.config.projectRoot),{ignore:this.config.automd.ignore}):isType.isAbsolutePath(o)?o:append.appendPath(o,this.config.projectRoot)))).flat(),this.config.automd.output&&!isType.isAbsolutePath(this.config.automd.output)&&(this.config.automd.output=append.appendPath(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==false&&(this.config.automd.generators.toc??={name:"toc",generate:r(o=>{const t=this.config.automd.toc??{};return {contents:C__default.default(o.block.md,{...t,maxdepth:t.maxDepth,first1:t.firstH1}).content}},"generate")});},async docs(){await Promise.all(toArray.toArray(this.config.automd.input).map(async o=>{const t=await this.fs.readFile(o);if(t){const n=await automd.transform(t,this.config.automd);if(n.hasIssues&&this.config.automd.allowIssues===false)throw new Error(`AutoMD found issues in file "${o}". Please resolve the issues or set \`allowIssues\` to true in the plugin configuration to ignore them.`);n.hasChanged&&await this.fs.writeFile(append.appendPath(this.config.automd.output?isFile.isDirectory(this.config.automd.output)?replace.replacePath(o,this.config.automd.output):this.config.automd.output:o,this.config.projectRoot),n.contents,{mode:"fs"});}}));}}),"plugin");var K=w;exports.default=K;exports.plugin=w;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]}})});
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,4 @@ import {toArray}from'@stryke/convert/to-array';import {isDirectory}from'@stryke/
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
var u=Object.defineProperty;var r=(i,o)=>u(i,"name",{value:o,configurable:true});const w=r((i={})=>({name:"automd",async config(){const o=await loadConfig$1(joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot),i);return (!o.prefix||!Array.isArray(o.prefix))&&(o.prefix=toArray(o.prefix??[])),o.prefix.includes("automd")||o.prefix.push("automd"),o.prefix.includes("powerlines")||o.prefix.push("powerlines"),{automd:f(o??{},{configFile:i.configFile,allowIssues:true,dir:this.config.projectRoot,watch:false,input:"README.md",toc:{maxDepth:6,bullets:"-"}})}},async configResolved(){if(this.config.automd.configFile){const{config:o}=await loadConfig({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:["**/node_modules","**/dist","**/.*"],dir:this.config.automd.dir}});this.config.automd=resolveConfig(f(this.config.automd,{...o,prefix:toArray(o.prefix??[])}));}this.config.automd.input=(await Promise.all(toArray(this.config.automd.input).map(async o=>o.includes("*")?listFiles(isAbsolutePath(o)?o:appendPath(o,this.config.projectRoot),{ignore:this.config.automd.ignore}):isAbsolutePath(o)?o:appendPath(o,this.config.projectRoot)))).flat(),this.config.automd.output&&!isAbsolutePath(this.config.automd.output)&&(this.config.automd.output=appendPath(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==false&&(this.config.automd.generators.toc??={name:"toc",generate:r(o=>{const t=this.config.automd.toc??{};return {contents:C(o.block.md,{...t,maxdepth:t.maxDepth,
|
|
7
|
+
var u=Object.defineProperty;var r=(i,o)=>u(i,"name",{value:o,configurable:true});const w=r((i={})=>({name:"automd",async config(){const o=await loadConfig$1(joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot),i);return (!o.prefix||!Array.isArray(o.prefix))&&(o.prefix=toArray(o.prefix??[])),o.prefix.includes("automd")||o.prefix.push("automd"),o.prefix.includes("powerlines")||o.prefix.push("powerlines"),{automd:f(o??{},{configFile:i.configFile,allowIssues:true,dir:this.config.projectRoot,watch:false,input:"README.md",toc:{maxDepth:6,bullets:"-"}})}},async configResolved(){if(this.config.automd.configFile){const{config:o}=await loadConfig({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:["**/node_modules","**/dist","**/.*"],dir:this.config.automd.dir}});this.config.automd=resolveConfig(f(this.config.automd,{...o,prefix:toArray(o.prefix??[])}));}this.config.automd.input=(await Promise.all(toArray(this.config.automd.input).map(async o=>o.includes("*")?listFiles(isAbsolutePath(o)?o:appendPath(o,this.config.projectRoot),{ignore:this.config.automd.ignore}):isAbsolutePath(o)?o:appendPath(o,this.config.projectRoot)))).flat(),this.config.automd.output&&!isAbsolutePath(this.config.automd.output)&&(this.config.automd.output=appendPath(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==false&&(this.config.automd.generators.toc??={name:"toc",generate:r(o=>{const t=this.config.automd.toc??{};return {contents:C(o.block.md,{...t,maxdepth:t.maxDepth,first1:t.firstH1}).content}},"generate")});},async docs(){await Promise.all(toArray(this.config.automd.input).map(async o=>{const t=await this.fs.readFile(o);if(t){const n=await transform(t,this.config.automd);if(n.hasIssues&&this.config.automd.allowIssues===false)throw new Error(`AutoMD found issues in file "${o}". Please resolve the issues or set \`allowIssues\` to true in the plugin configuration to ignore them.`);n.hasChanged&&await this.fs.writeFile(appendPath(this.config.automd.output?isDirectory(this.config.automd.output)?replacePath(o,this.config.automd.output):this.config.automd.output:o,this.config.projectRoot),n.contents,{mode:"fs"});}}));}}),"plugin");var L=w;export{L as default,w as plugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-automd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to maintain a project's markdown files using AutoMD generators.",
|
|
6
6
|
"repository": {
|
|
@@ -107,14 +107,14 @@
|
|
|
107
107
|
"c12": "^3.3.2",
|
|
108
108
|
"defu": "^6.1.4",
|
|
109
109
|
"markdown-toc": "^1.2.0",
|
|
110
|
-
"powerlines": "^0.24.
|
|
110
|
+
"powerlines": "^0.24.8"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@powerlines/nx": "^0.10.
|
|
114
|
-
"@powerlines/plugin-plugin": "^0.11.
|
|
113
|
+
"@powerlines/nx": "^0.10.36",
|
|
114
|
+
"@powerlines/plugin-plugin": "^0.11.44",
|
|
115
115
|
"@types/node": "^24.10.1",
|
|
116
116
|
"automd": "^0.4.2"
|
|
117
117
|
},
|
|
118
118
|
"publishConfig": { "access": "public" },
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "235b04eef51bd5f6833c21dd5a04434127cdea34"
|
|
120
120
|
}
|