@aurodesignsystem-dev/auro-cli 0.0.0-pr333.5 → 0.0.0-pr333.6

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/auro-cli.js CHANGED
@@ -18,7 +18,7 @@ ${Jr(le,t).trimEnd()}
18
18
  </code></pre>`,t);I=`<!-- AURO-GENERATED-CONTENT:START (CODE:src=${h}) -->
19
19
  <!-- The below code snippet is automatically added from ${h} -->
20
20
  ${$}
21
- <!-- AURO-GENERATED-CONTENT:END -->`}n=n.replace(d,I),o.lastIndex=0,i=!0}else c.includes(h)||c.push(h)}if(c.length>0)throw new Error(`Included file(s) not found: ${c.join(", ")}`);i&&await j.promises.writeFile(e,n),n=await j.promises.readFile(e,"utf8");let l=/^[ \t]*```(\w*)\n([\s\S]*?)^[ \t]*```[ \t]*$/gm,m=n.replace(l,(d,f,h)=>{let g=f||"html",b=h.trimEnd().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return`<pre class="language-${g}"><code class="language-${g}">${b}
21
+ <!-- AURO-GENERATED-CONTENT:END -->`}n=n.replace(d,()=>I),o.lastIndex=0,i=!0}else c.includes(h)||c.push(h)}if(c.length>0)throw new Error(`Included file(s) not found: ${c.join(", ")}`);i&&await j.promises.writeFile(e,n),n=await j.promises.readFile(e,"utf8");let l=/^[ \t]*```(\w*)\n([\s\S]*?)^[ \t]*```[ \t]*$/gm,m=n.replace(l,(d,f,h)=>{let g=f||"html",b=h.trimEnd().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return`<pre class="language-${g}"><code class="language-${g}">${b}
22
22
  </code></pre>`});m!==n&&await j.promises.writeFile(e,m),n=await j.promises.readFile(e,"utf8"),n=n.replace(/(<pre[^>]*><code[^>]*>)([\s\S]*?)(<\/code><\/pre>)/g,(d,f,h,g)=>{let b=h.split(/\r?\n/),S=b.filter(y=>y.trim().length>0);if(S.length===0)return d;let le=Math.min(...S.map(y=>{let $=y.match(/^[ \t]*/);return $?$[0].length:0})),I=b.map(y=>le>0?y.substring(le):y);for(;I.length>0&&I[I.length-1].trim()==="";)I.pop();let T=I.map((y,$)=>$===I.length-1?y:`${y}${y.trim()===""?"&#10;":`
23
23
  `}`).join("");return f+T+g});let u=n.split(`
24
24
  `),p=!1;for(let d=0;d<u.length;d++)/<pre[\s>]/i.test(u[d])&&(p=!0),p||(u[d]=u[d].replace(/^[ \t]+(?=<)/,"")),/<\/pre>/i.test(u[d])&&(p=!1);await j.promises.writeFile(e,u.join(`