@remotex-labs/xbuild 2.0.2 → 2.0.3
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/bash.js +1 -1
- package/dist/bash.js.map +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bash.js
CHANGED
|
@@ -21,7 +21,7 @@ __ _| |_/ /_ _ _| | __| |
|
|
|
21
21
|
/_/\\_\\____/ \\__,_|_|_|\\__,_|
|
|
22
22
|
`;function Fe(){return`
|
|
23
23
|
\r${tt.burntOrange(Zr)}
|
|
24
|
-
\rVersion: ${tt.brightPink("
|
|
24
|
+
\rVersion: ${tt.brightPink("2.0.3")}
|
|
25
25
|
\r`}function O(){return tt.lightCoral("[xBuild]")}var ei="tsconfig.json",ti="config.xbuild.ts",ke={entryPoints:{describe:"Source files to build (supports glob patterns)",type:"string",array:!0},typeCheck:{describe:"Perform type checking without building output",alias:"tc",type:"boolean"},platform:{describe:"Target platform for the build output",alias:"p",type:"string",choices:["browser","node","neutral"]},serve:{describe:"Start server to the <folder>",alias:"s",type:"string"},outdir:{describe:"Directory for build output files",alias:"o",type:"string"},declaration:{describe:"Generate TypeScript declaration files (.d.ts)",alias:"de",type:"boolean"},watch:{describe:"Watch mode - rebuild on file changes",alias:"w",type:"boolean"},config:{describe:"Path to build configuration file",alias:"c",type:"string",default:ti},tsconfig:{describe:"Path to TypeScript configuration file",alias:"tsc",type:"string",default:ei},minify:{describe:"Minify the build output",alias:"m",type:"boolean"},bundle:{describe:"Bundle dependencies into output files",alias:"b",type:"boolean"},types:{describe:"Enable type checking during build process",alias:"btc",type:"boolean"},failOnError:{describe:"Fail build when TypeScript errors are detected",alias:"foe",type:"boolean"},format:{describe:"Output module format",alias:"f",type:"string",choices:["cjs","esm","iife"]},verbose:{describe:"Verbose error stack traces",alias:"v",type:"boolean"},build:{describe:"Select an build configuration variant by names (as defined in your config file)",alias:"xb",type:"string",array:!0}},At=[["xBuild src/index.ts","Build a single file with default settings"],["xBuild src/**/*.ts --bundle --minify","Bundle and minify all TypeScript files"],["xBuild src/app.ts -s","Development mode with watch and dev server"],["xBuild src/app.ts -s dist","Development mode with watch and dev server from dist folder"],["xBuild src/lib.ts --format esm --declaration","Build ESM library with type definitions"],["xBuild src/server.ts --platform node --outdir dist","Build Node.js application to dist folder"],["xBuild --typeCheck","Type check only without generating output"],["xBuild --config custom.xbuild.ts","Use custom configuration file"]];var Rt,it;Rt=[A({scope:"singleton"})];var Q=class{parseConfigFile(e){return rt(e).help(!1).version(!1).options({config:ke.config}).parseSync()}parseUserArgv(e,t){return t?rt(e).help(!1).version(!1).options(t).parseSync():{}}enhancedParse(e,t={}){let i=rt(ri(e)).locale("en"),o=i.showHelp;return i.showHelp=function(n){return console.log(Fe()),this.group(Object.keys(ke),"xBuild Options:"),this.group(Object.keys(t),"user Options:"),o.call(this,n)},i.usage("Usage: xBuild [files..] [options]").command("* [entryPoints..]","Specific files to build (supports glob patterns)",n=>n.positional("entryPoints",{describe:"Specific files to build (supports glob patterns)",type:"string",array:!0})).options(t).options(ke).epilogue("For more information, check the documentation https://remotex-labs.github.io/xBuild/").help().alias("help","h").strict().version(),At.forEach(([n,s])=>{i.example(n,s)}),i.parseSync()}};it=F(null),Q=P(it,0,"ArgvModule",Rt,Q),k(it,1,Q);import dt from"readline";import{exec as eo}from"child_process";import{cwd as ii}from"process";import{readdirSync as oi}from"fs";import{matchesGlob as ot}from"path";function ni(r){let e=[],t=[];for(let i of r)i.startsWith("!")?t.push(i.slice(1)):e.push(i);return{include:e,exclude:t}}function $t(r,e){for(let t of e)if(ot(r,t))return!0;return!1}function si(r,e){let t=r+"/**";for(let i of e)if(ot(r,i)||ot(t,i))return!0;return!1}function Pe(r,e){let{include:t,exclude:i}=ni(e),o=Object.create(null),s=ii().length+1,a=r.length+1,c=i.length>0;function l(u){let p;try{p=oi(u,{withFileTypes:!0})}catch{return}let x=p.length;for(let m=0;m<x;m++){let W=p[m],te=h(u,W.name),L=te.slice(a);if(W.isDirectory()){(!c||!si(L,i))&&l(te);continue}if(!(c&&$t(L,i))&&$t(L,t)){let We=te.slice(s),w=L.lastIndexOf("."),le=w>0?L.slice(0,w):L;o[le]=We}}}return l(r),o}var V=class r extends Error{diagnostics;constructor(e,t=[]){super(e),this.name="TypesError",this.diagnostics=t,Object.setPrototypeOf(this,r.prototype)}};var Ae=class extends g{constructor(e){super(e.text,"esBuildError"),this.errorMetadata=H(e,{withFrameworkFrames:!0}),this.stack=_(this.errorMetadata,this.name,this.message,e.notes)}};var U=class r extends g{constructor(t,i){if(t instanceof g)return t;super(t.message,"VMRuntimeError");this.originalError=t;t instanceof AggregateError&&Array.isArray(t.errors)&&(this.errors=t.errors.map(o=>new r(o,i))),this.stack=t.stack,this.message=t.message,this.reformatStack(t,i)}errors=[];[Symbol.for("nodejs.util.inspect.custom")](){if(this.errors&&this.errors.length>0){let t=this.errors.map(i=>`${i.formattedStack??i.stack}`).join("");return`VMRuntimeError Contains ${this.errors.length} nested errors:
|
|
26
26
|
${t}
|
|
27
27
|
`}return this.formattedStack||this.stack}};function ai(r){return r instanceof g?r:r.detail instanceof g||r.detail instanceof V?r.detail:r.detail&&("errors"in r.detail||r.detail instanceof AggregateError)?new U(r.detail,{withFrameworkFrames:!0}):r.detail instanceof Error?new U(r.detail,{withFrameworkFrames:!0}):r.location?new Ae(r):new U(new Error(r.text))}function he(r=[],e){for(let t of r)e.push(ai(t))}function ve(r){let e={errors:[],warnings:[],metafile:r.metafile,outputFiles:r.outputFiles,mangleCache:r.mangleCache};return he(r.errors,e.errors),he(r.warnings,e.warnings),e}function Z(r){return typeof r=="object"&&r!==null&&"errors"in r}import*as Dt from"http";import*as jt from"https";import{extname as Mt}from"path";import{readFileSync as Nt}from"fs";var Bt=`<!doctype html>
|