create-chayns-app 1.2.0-beta.1 → 1.2.0-beta.2

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 CHANGED
@@ -70,14 +70,14 @@ ${i.message}`:C,b=[v,e,t].filter(Boolean).join(`
70
70
  ${e}`,A0=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),S0=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),O0=(t,e,r)=>{let i=r===""?"":`with ${r.trim()}() `,s=x0.bind(null,i,e.toString());Object.defineProperty(s,"name",S0);let{writable:n,enumerable:o,configurable:u}=A0;Object.defineProperty(t,"toString",{value:s,writable:n,enumerable:o,configurable:u})};function on(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:i}=t;for(let s of Reflect.ownKeys(e))C0(t,e,s,r);return v0(t,e),O0(t,e,i),t}var Pr=new WeakMap,Dh=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,s=t.displayName||t.name||"<anonymous>",n=function(...o){if(Pr.set(n,++i),i===1)r=t.apply(this,o),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return r};return on(n,t),Pr.set(n,i),n};Dh.callCount=t=>{if(!Pr.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Pr.get(t)};var gh=Dh;var yh=$t.default.stderr.isTTY?$t.default.stderr:$t.default.stdout.isTTY?$t.default.stdout:void 0,P0=yh?gh(()=>{mr(()=>{yh.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},_h=P0;var Br=!1,pt={};pt.show=(t=un.default.stderr)=>{t.isTTY&&(Br=!1,t.write("\x1B[?25h"))};pt.hide=(t=un.default.stderr)=>{t.isTTY&&(_h(),Br=!0,t.write("\x1B[?25l"))};pt.toggle=(t,e)=>{t!==void 0&&(Br=t),Br?pt.show(e):pt.hide(e)};var an=pt;var Lt=j(ln(),1);var de=j(require("node:process"),1);function cn(){return de.default.platform!=="win32"?de.default.env.TERM!=="linux":!!de.default.env.CI||!!de.default.env.WT_SESSION||!!de.default.env.TERMINUS_SUBLIME||de.default.env.ConEmuTask==="{cmd::Cmder}"||de.default.env.TERM_PROGRAM==="Terminus-Sublime"||de.default.env.TERM_PROGRAM==="vscode"||de.default.env.TERM==="xterm-256color"||de.default.env.TERM==="alacritty"||de.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var T0={info:H.blue("\u2139"),success:H.green("\u2714"),warning:H.yellow("\u26A0"),error:H.red("\u2716")},R0={info:H.blue("i"),success:H.green("\u221A"),warning:H.yellow("\u203C"),error:H.red("\xD7")},k0=cn()?T0:R0,It=k0;function hn({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var $0=hn();function fn(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace($0,"")}function pn({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var I0=pn();function dn(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(I0,"")}function Ch(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function wh(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function vh(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101631&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129673||t>=129679&&t<=129734||t>=129742&&t<=129756||t>=129759&&t<=129769||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function j0(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function xh(t,{ambiguousAsWide:e=!1}={}){return j0(t),wh(t)||vh(t)||e&&Ch(t)?2:1}var Oh=j(Sh(),1),L0=new Intl.Segmenter,N0=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function mn(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:i=!1}=e;if(i||(t=dn(t)),t.length===0)return 0;let s=0,n={ambiguousAsWide:!r};for(let{segment:o}of L0.segment(t)){let u=o.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!N0.test(o)){if((0,Oh.default)().test(o)){s+=2;continue}s+=xh(u,n)}}return s}function Dn({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var gn=j(require("node:process"),1);function yn(){let{env:t}=gn.default,{TERM:e,TERM_PROGRAM:r}=t;return gn.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Fe=j(require("node:process"),1),M0=3,_n=class{#o=0;start(){this.#o++,this.#o===1&&this.#r()}stop(){if(this.#o<=0)throw new Error("`stop` called more times than `start`");this.#o--,this.#o===0&&this.#e()}#r(){Fe.default.platform==="win32"||!Fe.default.stdin.isTTY||(Fe.default.stdin.setRawMode(!0),Fe.default.stdin.on("data",this.#s),Fe.default.stdin.resume())}#e(){Fe.default.stdin.isTTY&&(Fe.default.stdin.off("data",this.#s),Fe.default.stdin.pause(),Fe.default.stdin.setRawMode(!1))}#s(e){e[0]===M0&&Fe.default.emit("SIGINT")}},q0=new _n,bn=q0;var H0=j(ln(),1),Fn=class{#o=0;#r=!1;#e=0;#s=-1;#f=0;#t;#n;#i;#p;#m;#l;#c;#h;#D;#u;#a;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:jt.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#i=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Dn({stream:this.#i}),this.#c=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,jt.default.env.NODE_ENV==="test"&&(this._stream=this.#i,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(r){this.#o=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#s}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#h}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#h=e,this.#d()}get interval(){return this.#m??this.#n.interval??100}get spinner(){return this.#n}set spinner(e){if(this.#s=-1,this.#m=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=e}else if(!yn())this.#n=Lt.default.line;else if(e===void 0)this.#n=Lt.default.dots;else if(e!=="default"&&Lt.default[e])this.#n=Lt.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#D}set text(e=""){this.#D=e,this.#d()}get prefixText(){return this.#u}set prefixText(e=""){this.#u=e,this.#d()}get suffixText(){return this.#a}set suffixText(e=""){this.#a=e,this.#d()}get isSpinning(){return this.#p!==void 0}#g(e=this.#u,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}#y(e=this.#a,r=" "){return typeof e=="string"&&e!==""?r+e:typeof e=="function"?r+e():""}#d(){let e=this.#i.columns??80,r=this.#g(this.#u,"-"),i=this.#y(this.#a,"-"),s=" ".repeat(this.#h)+r+"--"+this.#D+"--"+i;this.#e=0;for(let n of fn(s).split(`
71
71
  `))this.#e+=Math.max(1,Math.ceil(mn(n,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#l&&!this.#c}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=e}get isSilent(){return this.#c}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e}frame(){let e=Date.now();(this.#s===-1||e-this.#f>=this.interval)&&(this.#s=++this.#s%this.#n.frames.length,this.#f=e);let{frames:r}=this.#n,i=r[this.#s];this.color&&(i=H[this.color](i));let s=typeof this.#u=="string"&&this.#u!==""?this.#u+" ":"",n=typeof this.text=="string"?" "+this.text:"",o=typeof this.#a=="string"&&this.#a!==""?" "+this.#a:"";return s+i+n+o}clear(){if(!this.#l||!this.#i.isTTY)return this;this.#i.cursorTo(0);for(let e=0;e<this.#o;e++)e>0&&this.#i.moveCursor(0,-1),this.#i.clearLine(1);return(this.#h||this.lastIndent!==this.#h)&&this.#i.cursorTo(this.#h),this.lastIndent=this.#h,this.#o=0,this}render(){return this.#c?this:(this.clear(),this.#i.write(this.frame()),this.#o=this.#e,this)}start(e){return e&&(this.text=e),this.#c?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&an.hide(this.#i),this.#t.discardStdin&&jt.default.stdin.isTTY&&(this.#r=!0,bn.start()),this.render(),this.#p=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#i.write(`- ${this.text}
72
72
  `),this)}stop(){return this.#l?(clearInterval(this.#p),this.#p=void 0,this.#s=0,this.clear(),this.#t.hideCursor&&an.show(this.#i),this.#t.discardStdin&&jt.default.stdin.isTTY&&this.#r&&(bn.stop(),this.#r=!1),this):this}succeed(e){return this.stopAndPersist({symbol:It.success,text:e})}fail(e){return this.stopAndPersist({symbol:It.error,text:e})}warn(e){return this.stopAndPersist({symbol:It.warning,text:e})}info(e){return this.stopAndPersist({symbol:It.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let r=e.prefixText??this.#u,i=this.#g(r," "),s=e.symbol??" ",n=e.text??this.text,u=typeof n=="string"?(s?" ":"")+n:"",a=e.suffixText??this.#a,l=this.#y(a," "),c=i+s+u+l+`
73
- `;return this.stop(),this.#i.write(c),this}};function Je(t){return new Fn(t)}var we=j(require("fs"),1),hi=require("fs/promises");var Ph={name:"create-chayns-app",version:"1.2.0-beta.1",private:!1,description:"Create a new chayns\xAE development project in one command.",keywords:["chayns","react","chayns-toolkit","chayns-components","starter-kit"],bugs:{url:"https://github.com/TobitSoftware/create-chayns-app/issues",email:"leonhard.driesch@tobit.com"},repository:{type:"git",url:"git+https://github.com/TobitSoftware/create-chayns-app.git"},license:"MIT",author:{name:"Leonhard Driesch",email:"leonhard.driesch@tobit.com"},main:"index.js",bin:{"create-chayns-app":"dist/index.cjs"},type:"module",files:["dist","templates"],engines:{node:">=18"},scripts:{build:"node ./scripts/build.js",watch:"node ./scripts/watch.js",format:"prettier . --ignore-path .gitignore --write",prepublishOnly:"npm run build",start:"node src/index.js"},devDependencies:{"@eslint/js":"^9.19.0",chalk:"^5.4.1",commander:"^13.1.0",enquirer:"^2.4.1",esbuild:"^0.24.2",eslint:"^9.19.0",execa:"^8.0.1","fast-glob":"^3.3.3","is-npm":"^6.0.0",ora:"^8.1.1",prettier:"^3.4.2","prettier-plugin-packagejson":"^2.5.8","validate-npm-package-name":"^6.0.0"},publishConfig:{access:"public"}};var Nt={page:"A complete page",pagemakerPlugin:"A pagemaker plugin"},Mt={v4:"v4 (Javascript api)",v5:"v5 (React api (new))"},Rr=[{name:"Yes",value:!0},{name:"No",value:!1}];var li=j(require("path"),1),Ft=require("fs/promises"),Ed=j(Fd(),1);async function it({destination:t,templateDir:e,adjustContent:r}){let s=(await(0,Ed.default)("**/*",{cwd:e})).map(async n=>{let o=await(0,Ft.readFile)(li.default.join(e,n),{encoding:"utf-8"});typeof r=="function"&&(o=r(o));let u=li.default.join(t,n);await(0,Ft.mkdir)(li.default.join(u,".."),{recursive:!0}),await(0,Ft.writeFile)(u,o)});await Promise.all(s)}function st(t,e){let r=t;for(let[i,s]of Object.entries(e))r=r.replace(new RegExp(`\\{\\{ ${i} \\}\\}`,"g"),s);return r}var Cd={"chayns-components":"latest","prop-types":"latest",react:"18","react-dom":"18"},wd={"chayns-toolkit":"latest",prettier:"latest","prettier-plugin-packagejson":"latest"},vd=t=>({"@chayns-components/core":"latest","prop-types":"latest",react:String(t),"react-dom":String(t),"chayns-api":"latest"}),xd={"chayns-toolkit":"latest",prettier:"latest","prettier-plugin-packagejson":"latest"},Ad={"react-redux":"latest","@reduxjs/toolkit":"latest"},Sd=t=>({typescript:"latest","@types/react":String(t),"@types/react-dom":String(t)}),Od={"@testing-library/jest-dom":"latest","@testing-library/react":"latest","@testing-library/user-event":"latest","@vitejs/plugin-react":"latest","@vitest/coverage-v8":"latest",jsdom:"latest",vitest:"latest"},Pd={"chayns-logger":"latest","tobit-textstrings":"latest"};var Bd=require("node:child_process"),ou=async(t,e)=>{let r=e?`${t}@${e}`:t,i=await new Promise((o,u)=>{(0,Bd.exec)(`npm view ${r} version --json`,(a,l)=>{a?u(a):o(l.trim())})}),s=JSON.parse(i);return`^${Array.isArray(s)?s.pop():s}`};var Rd=j(require("path"),1),kd=j(require("fs"),1);var YF=(t,e)=>({name:t,version:"1.0.0",private:!0,description:e,keywords:["chayns","chayns-toolkit","react"],scripts:{build:"chayns-toolkit build",dev:"chayns-toolkit dev",start:"chayns-toolkit dev",format:"prettier . --write",lint:"chayns-toolkit lint"},prettier:{proseWrap:"always",singleQuote:!0,tabWidth:4,printWidth:100},eslintConfig:{extends:"@chayns-toolkit"},dependencies:{},devDependencies:{}}),Td=async({name:t,description:e="",devDependencies:r={},dependencies:i={},useTypescript:s,useVitest:n})=>{let o=YF(t,e);for(let[u,a]of Object.entries(r).sort(([l],[c])=>l.localeCompare(c)))o.devDependencies[u]=await ou(u,a);for(let[u,a]of Object.entries(i).sort(([l],[c])=>l.localeCompare(c)))o.dependencies[u]=await ou(u,a);return s&&(o.scripts["check-types"]="tsc"),n&&(o.scripts.test="vitest"),JSON.stringify(o,void 0,4)},uu=async({destination:t,projectVersion:e,reactVersion:r,useRedux:i,tobitInternal:s,...n})=>{let{useTypescript:o,useVitest:u}=n,a=Je("Resolving latest versions of required dependencies").start(),l,c=Rd.default.join(t,"package.json");if(e===Mt.v4)l=await Td({...n,dependencies:Cd,devDependencies:wd});else{let h=vd(r),f={...xd};i&&Object.assign(h,Ad),o&&Object.assign(f,Sd(r)),u&&Object.assign(f,Od),s&&Object.assign(h,Pd),l=await Td({...n,dependencies:h,devDependencies:f})}a.succeed("Resolved latest versions of required dependencies"),kd.default.writeFileSync(c,l)};function ci(t){var e=t.match(/[A-Za-z][a-z]*/g)||[];return e.map(QF).join(" ")}function QF(t){return t.charAt(0).toUpperCase()+t.substring(1)}var $d=({useTypescript:t,moduleFederation:e,useRedux:r,tobitInternal:i,packageNameUnderscore:s})=>{let n=[],o=0,u=[];e&&t&&u.push("ComponentPropsWithoutRef"),i&&u.push("Suspense"),e&&r&&u.push("useState");let a=u.length?`, { ${u.join(", ")} }`:"";return n.push(`import React${a} from 'react';`),r&&n.push("import { Provider } from 'react-redux';"),n.push(`import { ChaynsProvider${e?", withCompatMode":""} } from 'chayns-api';`),n.push("import { PageProvider } from '@chayns-components/core';"),i&&n.push("import { TextStringProvider } from 'tobit-textstrings';"),n.push("import App from './App';"),r&&n.push(`import ${e?"{ createStore }":"store"} from '../redux-modules';`),i&&e&&n.push("import '../utils/logger';"),n.push(""),i&&(n.push("// TODO: insert your libraryName"),n.push("const libraries = ['<libraryName>'];"),n.push("")),e&&r?(n.push(`const AppWrapper = (${e?"props":""}${e&&t?": ComponentPropsWithoutRef<typeof ChaynsProvider>":""}) => {`),o+=4,n.push(`${" ".repeat(o)}const [store] = useState(createStore);`),n.push(""),n.push(`${" ".repeat(o)}return (`)):n.push(`const AppWrapper = (${e?"props":""}${e&&t?": ComponentPropsWithoutRef<typeof ChaynsProvider>":""}) => (`),o+=4,e&&(n.push(`${" ".repeat(o)}<div className="${s}">`),o+=4,n.push(`${" ".repeat(o)}{/* eslint-disable-next-line react/jsx-props-no-spreading */}`)),n.push(`${" ".repeat(o)}<ChaynsProvider${e?" {...props}":""}>`),o+=4,r&&(n.push(`${" ".repeat(o)}<Provider store={store}>`),o+=4),n.push(`${" ".repeat(o)}<PageProvider>`),o+=4,i&&(n.push(`${" ".repeat(o)}<Suspense>`),o+=4,n.push(`${" ".repeat(o)}<TextStringProvider libraries={libraries}>`),o+=4),n.push(`${" ".repeat(o)}<App />`),i&&(o-=4,n.push(`${" ".repeat(o)}</TextStringProvider>`),o-=4,n.push(`${" ".repeat(o)}</Suspense>`)),o-=4,n.push(`${" ".repeat(o)}</PageProvider>`),r&&(o-=4,n.push(`${" ".repeat(o)}</Provider>`)),o-=4,n.push(`${" ".repeat(o)}</ChaynsProvider>`),e&&(o-=4,n.push(`${" ".repeat(o)}</div>`)),e&&r?(o-=4,n.push(`${" ".repeat(o)});`),n.push("};")):n.push(");"),n.push(""),e?n.push("export default withCompatMode(AppWrapper);"):n.push("export default AppWrapper;"),n.push(""),n.join(`
73
+ `;return this.stop(),this.#i.write(c),this}};function Je(t){return new Fn(t)}var we=j(require("fs"),1),hi=require("fs/promises");var Ph={name:"create-chayns-app",version:"1.2.0-beta.2",private:!1,description:"Create a new chayns\xAE development project in one command.",keywords:["chayns","react","chayns-toolkit","chayns-components","starter-kit"],bugs:{url:"https://github.com/TobitSoftware/create-chayns-app/issues",email:"leonhard.driesch@tobit.com"},repository:{type:"git",url:"git+https://github.com/TobitSoftware/create-chayns-app.git"},license:"MIT",author:{name:"Leonhard Driesch",email:"leonhard.driesch@tobit.com"},main:"index.js",bin:{"create-chayns-app":"dist/index.cjs"},type:"module",files:["dist","templates"],engines:{node:">=18"},scripts:{build:"node ./scripts/build.js",watch:"node ./scripts/watch.js",format:"prettier . --ignore-path .gitignore --write",prepublishOnly:"npm run build",start:"node src/index.js"},devDependencies:{"@eslint/js":"^9.19.0",chalk:"^5.4.1",commander:"^13.1.0",enquirer:"^2.4.1",esbuild:"^0.24.2",eslint:"^9.19.0",execa:"^8.0.1","fast-glob":"^3.3.3","is-npm":"^6.0.0",ora:"^8.1.1",prettier:"^3.4.2","prettier-plugin-packagejson":"^2.5.8","validate-npm-package-name":"^6.0.0"},publishConfig:{access:"public"}};var Nt={page:"A complete page",pagemakerPlugin:"A pagemaker plugin"},Mt={v4:"v4 (Javascript api)",v5:"v5 (React api (new))"},Rr=[{name:"Yes",value:!0},{name:"No",value:!1}];var li=j(require("path"),1),Ft=require("fs/promises"),Ed=j(Fd(),1);async function it({destination:t,templateDir:e,adjustContent:r}){let s=(await(0,Ed.default)("**/*",{cwd:e})).map(async n=>{let o=await(0,Ft.readFile)(li.default.join(e,n),{encoding:"utf-8"});typeof r=="function"&&(o=r(o));let u=n.replace("template-gitignore",".gitignore"),a=li.default.join(t,u);await(0,Ft.mkdir)(li.default.join(a,".."),{recursive:!0}),await(0,Ft.writeFile)(a,o)});await Promise.all(s)}function st(t,e){let r=t;for(let[i,s]of Object.entries(e))r=r.replace(new RegExp(`\\{\\{ ${i} \\}\\}`,"g"),s);return r}var Cd={"chayns-components":"latest","prop-types":"latest",react:"18","react-dom":"18"},wd={"chayns-toolkit":"latest",prettier:"latest","prettier-plugin-packagejson":"latest"},vd=t=>({"@chayns-components/core":"latest","prop-types":"latest",react:String(t),"react-dom":String(t),"chayns-api":"latest"}),xd={"chayns-toolkit":"latest",prettier:"latest","prettier-plugin-packagejson":"latest"},Ad={"react-redux":"latest","@reduxjs/toolkit":"latest"},Sd=t=>({typescript:"latest","@types/react":String(t),"@types/react-dom":String(t)}),Od={"@testing-library/jest-dom":"latest","@testing-library/react":"latest","@testing-library/user-event":"latest","@vitejs/plugin-react":"latest","@vitest/coverage-v8":"latest",jsdom:"latest",vitest:"latest"},Pd={"chayns-logger":"latest","tobit-textstrings":"latest"};var Bd=require("node:child_process"),ou=async(t,e)=>{let r=e?`${t}@${e}`:t,i=await new Promise((o,u)=>{(0,Bd.exec)(`npm view ${r} version --json`,(a,l)=>{a?u(a):o(l.trim())})}),s=JSON.parse(i);return`^${Array.isArray(s)?s.pop():s}`};var Rd=j(require("path"),1),kd=j(require("fs"),1);var YF=(t,e)=>({name:t,version:"1.0.0",private:!0,description:e,keywords:["chayns","chayns-toolkit","react"],scripts:{build:"chayns-toolkit build",dev:"chayns-toolkit dev",start:"chayns-toolkit dev",format:"prettier . --write",lint:"chayns-toolkit lint"},prettier:{proseWrap:"always",singleQuote:!0,tabWidth:4,printWidth:100},eslintConfig:{extends:"@chayns-toolkit"},dependencies:{},devDependencies:{}}),Td=async({name:t,description:e="",devDependencies:r={},dependencies:i={},useTypescript:s,useVitest:n})=>{let o=YF(t,e);for(let[u,a]of Object.entries(r).sort(([l],[c])=>l.localeCompare(c)))o.devDependencies[u]=await ou(u,a);for(let[u,a]of Object.entries(i).sort(([l],[c])=>l.localeCompare(c)))o.dependencies[u]=await ou(u,a);return s&&(o.scripts["check-types"]="tsc"),n&&(o.scripts.test="vitest"),JSON.stringify(o,void 0,4)},uu=async({destination:t,projectVersion:e,reactVersion:r,useRedux:i,tobitInternal:s,...n})=>{let{useTypescript:o,useVitest:u}=n,a=Je("Resolving latest versions of required dependencies").start(),l,c=Rd.default.join(t,"package.json");if(e===Mt.v4)l=await Td({...n,dependencies:Cd,devDependencies:wd});else{let h=vd(r),f={...xd};i&&Object.assign(h,Ad),o&&Object.assign(f,Sd(r)),u&&Object.assign(f,Od),s&&Object.assign(h,Pd),l=await Td({...n,dependencies:h,devDependencies:f})}a.succeed("Resolved latest versions of required dependencies"),kd.default.writeFileSync(c,l)};function ci(t){var e=t.match(/[A-Za-z][a-z]*/g)||[];return e.map(QF).join(" ")}function QF(t){return t.charAt(0).toUpperCase()+t.substring(1)}var $d=({useTypescript:t,moduleFederation:e,useRedux:r,tobitInternal:i,packageNameUnderscore:s})=>{let n=[],o=0,u=[];e&&t&&u.push("ComponentPropsWithoutRef"),i&&u.push("Suspense"),e&&r&&u.push("useState");let a=u.length?`, { ${u.join(", ")} }`:"";return n.push(`import React${a} from 'react';`),r&&n.push("import { Provider } from 'react-redux';"),n.push(`import { ChaynsProvider${e?", withCompatMode":""} } from 'chayns-api';`),n.push("import { PageProvider } from '@chayns-components/core';"),i&&n.push("import { TextStringProvider } from 'tobit-textstrings';"),n.push("import App from './App';"),r&&n.push(`import ${e?"{ createStore }":"store"} from '../redux-modules';`),i&&e&&n.push("import '../utils/logger';"),n.push(""),i&&(n.push("// TODO: insert your libraryName"),n.push("const libraries = ['<libraryName>'];"),n.push("")),e&&r?(n.push(`const AppWrapper = (${e?"props":""}${e&&t?": ComponentPropsWithoutRef<typeof ChaynsProvider>":""}) => {`),o+=4,n.push(`${" ".repeat(o)}const [store] = useState(createStore);`),n.push(""),n.push(`${" ".repeat(o)}return (`)):n.push(`const AppWrapper = (${e?"props":""}${e&&t?": ComponentPropsWithoutRef<typeof ChaynsProvider>":""}) => (`),o+=4,e&&(n.push(`${" ".repeat(o)}<div className="${s}">`),o+=4,n.push(`${" ".repeat(o)}{/* eslint-disable-next-line react/jsx-props-no-spreading */}`)),n.push(`${" ".repeat(o)}<ChaynsProvider${e?" {...props}":""}>`),o+=4,r&&(n.push(`${" ".repeat(o)}<Provider store={store}>`),o+=4),n.push(`${" ".repeat(o)}<PageProvider>`),o+=4,i&&(n.push(`${" ".repeat(o)}<Suspense>`),o+=4,n.push(`${" ".repeat(o)}<TextStringProvider libraries={libraries}>`),o+=4),n.push(`${" ".repeat(o)}<App />`),i&&(o-=4,n.push(`${" ".repeat(o)}</TextStringProvider>`),o-=4,n.push(`${" ".repeat(o)}</Suspense>`)),o-=4,n.push(`${" ".repeat(o)}</PageProvider>`),r&&(o-=4,n.push(`${" ".repeat(o)}</Provider>`)),o-=4,n.push(`${" ".repeat(o)}</ChaynsProvider>`),e&&(o-=4,n.push(`${" ".repeat(o)}</div>`)),e&&r?(o-=4,n.push(`${" ".repeat(o)});`),n.push("};")):n.push(");"),n.push(""),e?n.push("export default withCompatMode(AppWrapper);"):n.push("export default AppWrapper;"),n.push(""),n.join(`
74
74
  `)};var{prompt:ze}=Id.default,XF=new mh,Ut=__dirname;XF.version(Ph.version).option("-G, --no-git","initialize the project without a git repository").option("-C, --no-initial-commit","don't perform an initial commit").option("-I, --no-install","don't install packages after initialization").option("-M, --module-federation","install to use as module (only internal)").option("-T, --tobit-internal","includes tobit internal packages (chayns-logger and tobit-textstrings)").option("-p, --package-manager <manager>","specify the package manager to use (`npm` or `yarn`). Defaults to the one used to execute the command.").action(ZF).parse(process.argv);async function ZF({git:t,initialCommit:e,install:r,packageManager:i,moduleFederation:s,tobitInternal:n}){let o,u;if(n)try{(await fetch("https://repo.tobit.ag",{method:"HEAD",signal:AbortSignal.timeout(3e3)})).ok||(n=!1)}catch{n=!1}s||({projectVersion:o}=await ze({type:"select",name:"projectVersion",message:"What api version do you want to use?",choices:Object.values(Mt)}),{projectType:u}=await ze({type:"select",name:"projectType",message:"What type of project do you want to create?",choices:Object.values(Nt)}));let a=!1,l;for(;!a;){let{packageName:m}=await ze([{type:"input",name:"packageName",message:"What should the name of your project be?",initial:"my-awesome-project"}]),{validForNewPackages:C,errors:F=[],warnings:v=[]}=(0,jd.default)(m);if(C)a=!0,l=m;else{console.log(`
75
75
  ${H.hex("#31D1DF")(`\`${m}\``)} is unfortunately not a valid project name, because:`);for(let b of[...F,...v])console.log(H.hex("#94A3B8")(` - ${b}`));console.log("")}}let{summary:c}=await ze({type:"input",message:"How would you summarize this project in a few words?",name:"summary"});function h(m){return st(m,{"package-name":l,"readable-package-name":ci(l),description:c,"install-command":_==="yarn"?"yarn":"npm install","run-command":_==="yarn"?"yarn":"npm run","package-name-underscore":l.replace("-","_"),"logger-import":n?`import './utils/logger';
76
76
  `:""})}let f=M.default.resolve(l),_=i||(hl?"yarn":"npm");if(o===Mt.v4){switch(console.log(`
77
77
  ${H.bold.magentaBright("Awesome!")} Please wait a quick second while we bootstrap your project...
78
- `),u){case Nt.page:await it({destination:f,templateDir:M.default.join(` ${Ut} `.trim(),"../templates/page"),adjustContent:m=>st(h(m),{"tapp-style":""})});break;case Nt.pagemakerPlugin:await it({destination:f,projectName:l,templateDir:M.default.join(` ${Ut} `.trim(),"../templates/page"),adjustContent:m=>st(h(m),{"tapp-style":' style="padding: 0 0 16px !important"'})});break}await uu({name:l,description:c,destination:f,projectVersion:o})}else{let{reactVersion:m}=await ze({type:"select",name:"reactVersion",message:"Which react version do you want to use?",choices:[{name:"v18",value:18},{name:"v19",value:19}],result(A){return this.map(A)[A]}}),{useRedux:C}=await ze({type:"select",name:"useRedux",message:"Do you want to add redux-toolkit?",choices:Rr,result(A){return this.map(A)[A]}}),{useTypescript:F}=await ze({type:"select",name:"useTypescript",message:"Do you want to add typescript?",choices:Rr,result(A){return this.map(A)[A]}}),{useVitest:v}=await ze({type:"select",name:"useVitest",message:"Do you want to add vitest?",choices:Rr,result(A){return this.map(A)[A]}}),b=A=>M.default.join(` ${Ut} `.trim(),A),S=async(A,N,y)=>{let q=await(0,hi.readFile)(A,{encoding:"utf-8"});y&&(q=st(q,{"package-name":l,"readable-package-name":ci(l),description:c,"install-command":_==="yarn"?"yarn":"npm install","run-command":_==="yarn"?"yarn":"npm run"})),await(0,hi.writeFile)(N,q)},x=A=>st(h(A),{"tapp-style":u===Nt.pagemakerPlugin?' style="padding: 0 0 16px !important"':""}),P=F?"ts":"js";if(C){let A=`../templates/api-v5/shared/${P}/src`;if(await it({destination:f+"/src",projectName:l,templateDir:M.default.join(` ${Ut} `.trim(),A)}),await S(b("../templates/api-v5/shared/ts/.eslintrc"),M.default.join(f,".eslintrc")),n){let N=`../templates/api-v5/internal/${P}/src`;await it({destination:f+"/src",projectName:l,templateDir:M.default.join(` ${Ut} `.trim(),N)})}}if(await it({destination:f,projectName:l,templateDir:b(`../templates/api-v5/page${F?"-ts":""}${s?"-module":""}${C?"-redux":""}`),adjustContent:x}),await uu({name:l,description:c,destination:f,projectVersion:o,reactVersion:m,useRedux:C,useTypescript:F,useVitest:v,tobitInternal:n}),await S(b("../templates/shared/README.md"),M.default.join(f,"README.md"),!0),await S(b("../templates/shared/.gitignore"),M.default.join(f,".gitignore"),!0),await S(b("../templates/api-v5/shared/.env"),M.default.join(f,".env")),await S(b("../templates/api-v5/shared/.env.development.local"),M.default.join(f,".env.development.local")),we.default.existsSync(M.default.join(f,"/src/constants"))||we.default.mkdirSync(M.default.join(f,"/src/constants")),await S(b(`../templates/api-v5/shared/${P}/src/constants/serverUrls.${P}`),M.default.join(f,`/src/constants/serverUrls.${P}`)),F&&(await S(b("../templates/api-v5/shared/ts/tsconfig.json"),M.default.join(f,"tsconfig.json")),we.default.existsSync(M.default.join(f,"/src/types"))||we.default.mkdirSync(M.default.join(f,"/src/types")),await S(b("../templates/api-v5/shared/ts/src/types/global.d.ts"),M.default.join(f,"/src/types/global.d.ts")),await S(b("../templates/api-v5/shared/ts/src/types/environment.d.ts"),M.default.join(f,"/src/types/environment.d.ts"))),v&&(we.default.existsSync(M.default.join(f,"/tests"))||we.default.mkdirSync(M.default.join(f,"/tests")),await S(b("../templates/shared/tests/setup.js"),M.default.join(f,"/tests/setup.js")),await S(b("../templates/shared/vitest.config.mjs"),M.default.join(f,`/vitest.config.m${P}`))),n){we.default.existsSync(M.default.join(f,"/src/utils"))||we.default.mkdirSync(M.default.join(f,"/src/utils")),await S(b(`../templates/api-v5/internal/${P}/src/utils/logger.${P}`),M.default.join(f,`/src/utils/logger.${P}`));let A=M.default.join(f,`/src/components/AppWrapper.${P}x`);we.default.writeFileSync(A,$d({useRedux:C,useTypescript:F,moduleFederation:s,tobitInternal:n,packageNameUnderscore:l.replace("-","_")}));let N=M.default.join(f,".npmrc");we.default.writeFileSync(N,`registry=https://repo.tobit.ag/
78
+ `),u){case Nt.page:await it({destination:f,templateDir:M.default.join(` ${Ut} `.trim(),"../templates/page"),adjustContent:m=>st(h(m),{"tapp-style":""})});break;case Nt.pagemakerPlugin:await it({destination:f,projectName:l,templateDir:M.default.join(` ${Ut} `.trim(),"../templates/page"),adjustContent:m=>st(h(m),{"tapp-style":' style="padding: 0 0 16px !important"'})});break}await uu({name:l,description:c,destination:f,projectVersion:o})}else{let{reactVersion:m}=await ze({type:"select",name:"reactVersion",message:"Which react version do you want to use?",choices:[{name:"v18",value:18},{name:"v19",value:19}],result(A){return this.map(A)[A]}}),{useRedux:C}=await ze({type:"select",name:"useRedux",message:"Do you want to add redux-toolkit?",choices:Rr,result(A){return this.map(A)[A]}}),{useTypescript:F}=await ze({type:"select",name:"useTypescript",message:"Do you want to add typescript?",choices:Rr,result(A){return this.map(A)[A]}}),{useVitest:v}=await ze({type:"select",name:"useVitest",message:"Do you want to add vitest?",choices:Rr,result(A){return this.map(A)[A]}}),b=A=>M.default.join(` ${Ut} `.trim(),A),S=async(A,N,y)=>{let q=await(0,hi.readFile)(A,{encoding:"utf-8"});y&&(q=st(q,{"package-name":l,"readable-package-name":ci(l),description:c,"install-command":_==="yarn"?"yarn":"npm install","run-command":_==="yarn"?"yarn":"npm run"})),await(0,hi.writeFile)(N,q)},x=A=>st(h(A),{"tapp-style":u===Nt.pagemakerPlugin?' style="padding: 0 0 16px !important"':""}),P=F?"ts":"js";if(C){let A=`../templates/api-v5/shared/${P}/src`;if(await it({destination:f+"/src",projectName:l,templateDir:M.default.join(` ${Ut} `.trim(),A)}),await S(b("../templates/api-v5/shared/ts/.eslintrc"),M.default.join(f,".eslintrc")),n){let N=`../templates/api-v5/internal/${P}/src`;await it({destination:f+"/src",projectName:l,templateDir:M.default.join(` ${Ut} `.trim(),N)})}}if(await it({destination:f,projectName:l,templateDir:b(`../templates/api-v5/page${F?"-ts":""}${s?"-module":""}${C?"-redux":""}`),adjustContent:x}),await uu({name:l,description:c,destination:f,projectVersion:o,reactVersion:m,useRedux:C,useTypescript:F,useVitest:v,tobitInternal:n}),await S(b("../templates/shared/README.md"),M.default.join(f,"README.md"),!0),await S(b("../templates/shared/template-gitignore"),M.default.join(f,".gitignore"),!0),await S(b("../templates/api-v5/shared/.env"),M.default.join(f,".env")),await S(b("../templates/api-v5/shared/.env.development.local"),M.default.join(f,".env.development.local")),we.default.existsSync(M.default.join(f,"/src/constants"))||we.default.mkdirSync(M.default.join(f,"/src/constants")),await S(b(`../templates/api-v5/shared/${P}/src/constants/serverUrls.${P}`),M.default.join(f,`/src/constants/serverUrls.${P}`)),F&&(await S(b("../templates/api-v5/shared/ts/tsconfig.json"),M.default.join(f,"tsconfig.json")),we.default.existsSync(M.default.join(f,"/src/types"))||we.default.mkdirSync(M.default.join(f,"/src/types")),await S(b("../templates/api-v5/shared/ts/src/types/global.d.ts"),M.default.join(f,"/src/types/global.d.ts")),await S(b("../templates/api-v5/shared/ts/src/types/environment.d.ts"),M.default.join(f,"/src/types/environment.d.ts"))),v&&(we.default.existsSync(M.default.join(f,"/tests"))||we.default.mkdirSync(M.default.join(f,"/tests")),await S(b("../templates/shared/tests/setup.js"),M.default.join(f,"/tests/setup.js")),await S(b("../templates/shared/vitest.config.mjs"),M.default.join(f,`/vitest.config.m${P}`))),n){we.default.existsSync(M.default.join(f,"/src/utils"))||we.default.mkdirSync(M.default.join(f,"/src/utils")),await S(b(`../templates/api-v5/internal/${P}/src/utils/logger.${P}`),M.default.join(f,`/src/utils/logger.${P}`));let A=M.default.join(f,`/src/components/AppWrapper.${P}x`);we.default.writeFileSync(A,$d({useRedux:C,useTypescript:F,moduleFederation:s,tobitInternal:n,packageNameUnderscore:l.replace("-","_")}));let N=M.default.join(f,".npmrc");we.default.writeFileSync(N,`registry=https://repo.tobit.ag/
79
79
  `)}let O=M.default.join(f,"toolkit.config.js");s?await S(b("../templates/api-v5/shared/toolkit.config-module.js"),O):await S(b("../templates/api-v5/shared/toolkit.config.js"),O)}if(t){let m=Je("Initializing Git repository").start();try{await xr("git init",{cwd:f}),m.succeed("Initialized a Git repository")}catch(C){throw m.fail(`Failed to initialize a Git repository. You can do this yourself by running ${H.cyanBright("git init")}.`),C}}if(r){let m=Je(`Installing packages using ${H.blueBright(_)}`).start();try{await xr(`${_} install`,{cwd:f}),m.succeed(`Installed packages with ${H.blueBright(_)}`)}catch{m.fail(`Failed to install packages with ${H.blueBright(_)}. You can do this yourself by running ${H.cyanBright(`${_} install`)}.`)}}if(t&&e){let m=Je("Performing an initial commit").start();try{await xr("git add .",{cwd:f}),await vr("git",["commit","-m",":tada: Initial commit"],{cwd:f}),m.succeed("Perfomed an initial commit")}catch(C){console.error(C),m.fail("Failed to perform an initial commit.")}}console.log(`
80
- ${H.bold.greenBright("Congrats!")} Your new project is ready to go!`);let d=_==="yarn"?"yarn dev":"npm run dev";n?(console.log(`Open the created ${H.yellowBright(`./${l}/`)} folder in your favorite editor.`),console.log(`Initialize ${H.yellowBright("tobit-textstrings")} by calling ${H.cyanBright("`npx tobit-textstrings init`")}.`),console.log(`Search for ${H.greenBright("TODO:")} and follow the instructions.`),console.log(`Start ${H.cyanBright("`"+d+"`")}.
80
+ ${H.bold.greenBright("Congrats!")} Your new project is ready to go!`);let d=_==="yarn"?"yarn dev":"npm run dev";n?(console.log(`Open the created ${H.yellowBright(`./${l}/`)} folder in your favorite editor.`),console.log(`Initialize ${H.yellowBright("tobit-textstrings")} by calling ${H.cyanBright("npx tobit-textstrings init")}.`),console.log(`Search for ${H.greenBright("TODO:")} and follow the instructions.`),console.log(`Start ${H.cyanBright("`"+d+"`")}.
81
81
  `)):console.log(`Open the created ${H.yellowBright(`./${l}/`)} folder in your favorite editor and start ${H.cyanBright("`"+d+"`")}.
82
82
  `)}
83
83
  /*! Bundled license information:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-chayns-app",
3
- "version": "1.2.0-beta.1",
3
+ "version": "1.2.0-beta.2",
4
4
  "private": false,
5
5
  "description": "Create a new chayns® development project in one command.",
6
6
  "keywords": [
@@ -0,0 +1,30 @@
1
+ .cache
2
+ .cache/
3
+ .env.test
4
+ .env*.local
5
+ .eslintcache
6
+ .fusebox/
7
+ .idea/
8
+ .node_repl_history
9
+ .npm
10
+ .vscode-test
11
+ .vscode/
12
+ .yarn-integrity
13
+ *.code-workspace
14
+ *.iws
15
+ *.lcov
16
+ *.log
17
+ *.pid
18
+ *.pid.lock
19
+ *.seed
20
+ *.tgz
21
+ *.tsbuildinfo
22
+ build/
23
+ coverage
24
+ dist
25
+ lib-cov
26
+ logs
27
+ node_modules/
28
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
29
+ yarn-debug.log*
30
+ yarn-error.log*