@pplancq/create-react-app 2.0.0 → 2.0.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## @pplancq/create-react-app [2.0.1](https://github.com/pplancq/dev-tools/compare/@pplancq/create-react-app@2.0.0...@pplancq/create-react-app@2.0.1) (2025-11-03)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **create-react-app:** fix version of create react app ([5f2b3ba](https://github.com/pplancq/dev-tools/commit/5f2b3bad525436b58b2e8504f65bf3bd9a1baed0))
6
+
1
7
  ## @pplancq/create-react-app [2.0.0](https://github.com/pplancq/dev-tools/compare/@pplancq/create-react-app@1.5.1...@pplancq/create-react-app@2.0.0) (2025-09-15)
2
8
 
3
9
  ### ⚠ BREAKING CHANGES
package/dist/main.js CHANGED
@@ -6,7 +6,7 @@ Expecting one of '${u.join("', '")}'`);return this._lifeCycleHooks[t]?this._life
6
6
  - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,e,u){if(s.existsSync(t))return;let i=e?`searched for local subcommand relative to directory '${e}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";throw Error(`'${t}' does not exist
7
7
  - if '${u}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
8
8
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
9
- - ${i}`)}_executeSubCommand(t,e){let u;e=e.slice();let i=!1,o=[".js",".ts",".tsx",".mjs",".cjs"];function a(t,e){let u=r.resolve(t,e);if(s.existsSync(u))return u;if(o.includes(r.extname(e)))return;let i=o.find(t=>s.existsSync(`${u}${t}`));if(i)return`${u}${i}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`,p=this._executableDir||"";if(this._scriptPath){let t;try{t=s.realpathSync(this._scriptPath)}catch{t=this._scriptPath}p=r.resolve(r.dirname(t),p)}if(p){let e=a(p,h);if(!e&&!t._executableFile&&this._scriptPath){let u=r.basename(this._scriptPath,r.extname(this._scriptPath));u!==this._name&&(e=a(p,`${u}-${t._name}`))}h=e||h}i=o.includes(r.extname(h)),"win32"!==n.platform?i?(e.unshift(h),e=F(n.execArgv).concat(e),u=D.spawn(n.argv[0],e,{stdio:"inherit"})):u=D.spawn(h,e,{stdio:"inherit"}):(this._checkForMissingExecutable(h,p,t._name),e.unshift(h),e=F(n.execArgv).concat(e),u=D.spawn(n.execPath,e,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(t=>{n.on(t,()=>{!1===u.killed&&null===u.exitCode&&u.kill(t)})});let m=this._exitCallback;u.on("close",t=>{t=t??1,m?m(new l(t,"commander.executeSubCommandAsync","(close)")):n.exit(t)}),u.on("error",e=>{if("ENOENT"===e.code)this._checkForMissingExecutable(h,p,t._name);else if("EACCES"===e.code)throw Error(`'${h}' not executable`);if(m){let t=new l(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e,m(t)}else n.exit(1)}),this.runningCommand=u}_dispatchSubcommand(t,e,u){let i,D=this._findCommand(t);return D||this.help({error:!0}),D._prepareForParse(),i=this._chainOrCallSubCommandHook(i,D,"preSubcommand"),i=this._chainOrCall(i,()=>{if(!D._executableHandler)return D._parseCommand(e,u);this._executeSubCommand(D,e.concat(u))})}_dispatchHelpCommand(t){t||this.help();let e=this._findCommand(t);return e&&!e._executableHandler&&e.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,e)=>{t.required&&null==this.args[e]&&this.missingArgument(t.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(t,e,u)=>{let i=e;if(null!==e&&t.parseArg){let D=`error: command-argument value '${e}' is invalid for argument '${t.name()}'.`;i=this._callParseArg(t,e,u,D)}return i};this._checkNumberOfArguments();let e=[];this.registeredArguments.forEach((u,i)=>{let D=u.defaultValue;u.variadic?i<this.args.length?(D=this.args.slice(i),u.parseArg&&(D=D.reduce((e,i)=>t(u,i,e),u.defaultValue))):void 0===D&&(D=[]):i<this.args.length&&(D=this.args[i],u.parseArg&&(D=t(u,D,u.defaultValue))),e[i]=D}),this.processedArgs=e}_chainOrCall(t,e){return t?.then&&"function"==typeof t.then?t.then(()=>e()):e()}_chainOrCallHooks(t,e){let u=t,i=[];return this._getCommandAndAncestors().reverse().filter(t=>void 0!==t._lifeCycleHooks[e]).forEach(t=>{t._lifeCycleHooks[e].forEach(e=>{i.push({hookedCommand:t,callback:e})})}),"postAction"===e&&i.reverse(),i.forEach(t=>{u=this._chainOrCall(u,()=>t.callback(t.hookedCommand,this))}),u}_chainOrCallSubCommandHook(t,e,u){let i=t;return void 0!==this._lifeCycleHooks[u]&&this._lifeCycleHooks[u].forEach(t=>{i=this._chainOrCall(i,()=>t(this,e))}),i}_parseCommand(t,e){let u=this.parseOptions(e);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(u.operands),e=u.unknown,this.args=t.concat(e),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),e);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(e),this._dispatchSubcommand(this._defaultCommandName,t,e);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(u.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{u.unknown.length>0&&this.unknownOption(u.unknown[0])},D=`command:${this.name()}`;if(this._actionHandler){let u;return i(),this._processArguments(),u=this._chainOrCallHooks(u,"preAction"),u=this._chainOrCall(u,()=>this._actionHandler(this.processedArgs)),this.parent&&(u=this._chainOrCall(u,()=>{this.parent.emit(D,t,e)})),u=this._chainOrCallHooks(u,"postAction")}if(this.parent?.listenerCount(D))i(),this._processArguments(),this.parent.emit(D,t,e);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,e);this.listenerCount("command:*")?this.emit("command:*",t,e):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(e=>e._name===t||e._aliases.includes(t))}_findOption(t){return this.options.find(e=>e.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(e=>{e.mandatory&&void 0===t.getOptionValue(e.attributeName())&&t.missingMandatoryOptionValue(e)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(t=>{let e=t.attributeName();return void 0!==this.getOptionValue(e)&&"default"!==this.getOptionValueSource(e)});t.filter(t=>t.conflictsWith.length>0).forEach(e=>{let u=t.find(t=>e.conflictsWith.includes(t.attributeName()));u&&this._conflictingOption(e,u)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let e=[],u=[],i=e;function D(t){return t.length>1&&"-"===t[0]}let r=t=>!!/^-\d*\.?\d+(e[+-]?\d+)?$/.test(t)&&!this._getCommandAndAncestors().some(t=>t.options.map(t=>t.short).some(t=>/^-\d$/.test(t))),s=null,n=null,o=0;for(;o<t.length||n;){let a=n??t[o++];if(n=null,"--"===a){i===u&&i.push(a),i.push(...t.slice(o));break}if(s&&(!D(a)||r(a))){this.emit(`option:${s.name()}`,a);continue}if(s=null,D(a)){let e=this._findOption(a);if(e){if(e.required){let u=t[o++];void 0===u&&this.optionMissingArgument(e),this.emit(`option:${e.name()}`,u)}else if(e.optional){let u=null;o<t.length&&(!D(t[o])||r(t[o]))&&(u=t[o++]),this.emit(`option:${e.name()}`,u)}else this.emit(`option:${e.name()}`);s=e.variadic?e:null;continue}}if(a.length>2&&"-"===a[0]&&"-"!==a[1]){let t=this._findOption(`-${a[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,a.slice(2)):(this.emit(`option:${t.name()}`),n=`-${a.slice(2)}`);continue}}if(/^--[^=]+=/.test(a)){let t=a.indexOf("="),e=this._findOption(a.slice(0,t));if(e&&(e.required||e.optional)){this.emit(`option:${e.name()}`,a.slice(t+1));continue}}if(i===e&&D(a)&&!(0===this.commands.length&&r(a))&&(i=u),(this._enablePositionalOptions||this._passThroughOptions)&&0===e.length&&0===u.length){if(this._findCommand(a)){e.push(a),u.push(...t.slice(o));break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){e.push(a,...t.slice(o));break}else if(this._defaultCommandName){u.push(a,...t.slice(o));break}}if(this._passThroughOptions){i.push(a,...t.slice(o));break}i.push(a)}return{operands:e,unknown:u}}opts(){if(this._storeOptionsAsProperties){let t={},e=this.options.length;for(let u=0;u<e;u++){let e=this.options[u].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,e)=>Object.assign(t,e.opts()),{})}error(t,e){this._outputConfiguration.outputError(`${t}
9
+ - ${i}`)}_executeSubCommand(t,e){let u;e=e.slice();let i=!1,o=[".js",".ts",".tsx",".mjs",".cjs"];function a(t,e){let u=r.resolve(t,e);if(s.existsSync(u))return u;if(o.includes(r.extname(e)))return;let i=o.find(t=>s.existsSync(`${u}${t}`));if(i)return`${u}${i}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`,p=this._executableDir||"";if(this._scriptPath){let t;try{t=s.realpathSync(this._scriptPath)}catch{t=this._scriptPath}p=r.resolve(r.dirname(t),p)}if(p){let e=a(p,h);if(!e&&!t._executableFile&&this._scriptPath){let u=r.basename(this._scriptPath,r.extname(this._scriptPath));u!==this._name&&(e=a(p,`${u}-${t._name}`))}h=e||h}i=o.includes(r.extname(h)),"win32"!==n.platform?i?(e.unshift(h),e=F(n.execArgv).concat(e),u=D.spawn(n.argv[0],e,{stdio:"inherit"})):u=D.spawn(h,e,{stdio:"inherit"}):(this._checkForMissingExecutable(h,p,t._name),e.unshift(h),e=F(n.execArgv).concat(e),u=D.spawn(n.execPath,e,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(t=>{n.on(t,()=>{!1===u.killed&&null===u.exitCode&&u.kill(t)})});let m=this._exitCallback;u.on("close",t=>{t=t??1,m?m(new l(t,"commander.executeSubCommandAsync","(close)")):n.exit(t)}),u.on("error",e=>{if("ENOENT"===e.code)this._checkForMissingExecutable(h,p,t._name);else if("EACCES"===e.code)throw Error(`'${h}' not executable`);if(m){let t=new l(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e,m(t)}else n.exit(1)}),this.runningCommand=u}_dispatchSubcommand(t,e,u){let i,D=this._findCommand(t);return D||this.help({error:!0}),D._prepareForParse(),i=this._chainOrCallSubCommandHook(i,D,"preSubcommand"),i=this._chainOrCall(i,()=>{if(!D._executableHandler)return D._parseCommand(e,u);this._executeSubCommand(D,e.concat(u))})}_dispatchHelpCommand(t){t||this.help();let e=this._findCommand(t);return e&&!e._executableHandler&&e.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,e)=>{t.required&&null==this.args[e]&&this.missingArgument(t.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(t,e,u)=>{let i=e;if(null!==e&&t.parseArg){let D=`error: command-argument value '${e}' is invalid for argument '${t.name()}'.`;i=this._callParseArg(t,e,u,D)}return i};this._checkNumberOfArguments();let e=[];this.registeredArguments.forEach((u,i)=>{let D=u.defaultValue;u.variadic?i<this.args.length?(D=this.args.slice(i),u.parseArg&&(D=D.reduce((e,i)=>t(u,i,e),u.defaultValue))):void 0===D&&(D=[]):i<this.args.length&&(D=this.args[i],u.parseArg&&(D=t(u,D,u.defaultValue))),e[i]=D}),this.processedArgs=e}_chainOrCall(t,e){return t?.then&&"function"==typeof t.then?t.then(()=>e()):e()}_chainOrCallHooks(t,e){let u=t,i=[];return this._getCommandAndAncestors().reverse().filter(t=>void 0!==t._lifeCycleHooks[e]).forEach(t=>{t._lifeCycleHooks[e].forEach(e=>{i.push({hookedCommand:t,callback:e})})}),"postAction"===e&&i.reverse(),i.forEach(t=>{u=this._chainOrCall(u,()=>t.callback(t.hookedCommand,this))}),u}_chainOrCallSubCommandHook(t,e,u){let i=t;return void 0!==this._lifeCycleHooks[u]&&this._lifeCycleHooks[u].forEach(t=>{i=this._chainOrCall(i,()=>t(this,e))}),i}_parseCommand(t,e){let u=this.parseOptions(e);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(u.operands),e=u.unknown,this.args=t.concat(e),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),e);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(e),this._dispatchSubcommand(this._defaultCommandName,t,e);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(u.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{u.unknown.length>0&&this.unknownOption(u.unknown[0])},D=`command:${this.name()}`;if(this._actionHandler){let u;return i(),this._processArguments(),u=this._chainOrCallHooks(u,"preAction"),u=this._chainOrCall(u,()=>this._actionHandler(this.processedArgs)),this.parent&&(u=this._chainOrCall(u,()=>{this.parent.emit(D,t,e)})),u=this._chainOrCallHooks(u,"postAction")}if(this.parent?.listenerCount(D))i(),this._processArguments(),this.parent.emit(D,t,e);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,e);this.listenerCount("command:*")?this.emit("command:*",t,e):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(e=>e._name===t||e._aliases.includes(t))}_findOption(t){return this.options.find(e=>e.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(e=>{e.mandatory&&void 0===t.getOptionValue(e.attributeName())&&t.missingMandatoryOptionValue(e)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(t=>{let e=t.attributeName();return void 0!==this.getOptionValue(e)&&"default"!==this.getOptionValueSource(e)});t.filter(t=>t.conflictsWith.length>0).forEach(e=>{let u=t.find(t=>e.conflictsWith.includes(t.attributeName()));u&&this._conflictingOption(e,u)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let e=[],u=[],i=e;function D(t){return t.length>1&&"-"===t[0]}let r=t=>!!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(t)&&!this._getCommandAndAncestors().some(t=>t.options.map(t=>t.short).some(t=>/^-\d$/.test(t))),s=null,n=null,o=0;for(;o<t.length||n;){let a=n??t[o++];if(n=null,"--"===a){i===u&&i.push(a),i.push(...t.slice(o));break}if(s&&(!D(a)||r(a))){this.emit(`option:${s.name()}`,a);continue}if(s=null,D(a)){let e=this._findOption(a);if(e){if(e.required){let u=t[o++];void 0===u&&this.optionMissingArgument(e),this.emit(`option:${e.name()}`,u)}else if(e.optional){let u=null;o<t.length&&(!D(t[o])||r(t[o]))&&(u=t[o++]),this.emit(`option:${e.name()}`,u)}else this.emit(`option:${e.name()}`);s=e.variadic?e:null;continue}}if(a.length>2&&"-"===a[0]&&"-"!==a[1]){let t=this._findOption(`-${a[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,a.slice(2)):(this.emit(`option:${t.name()}`),n=`-${a.slice(2)}`);continue}}if(/^--[^=]+=/.test(a)){let t=a.indexOf("="),e=this._findOption(a.slice(0,t));if(e&&(e.required||e.optional)){this.emit(`option:${e.name()}`,a.slice(t+1));continue}}if(i===e&&D(a)&&!(0===this.commands.length&&r(a))&&(i=u),(this._enablePositionalOptions||this._passThroughOptions)&&0===e.length&&0===u.length){if(this._findCommand(a)){e.push(a),u.push(...t.slice(o));break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){e.push(a,...t.slice(o));break}else if(this._defaultCommandName){u.push(a,...t.slice(o));break}}if(this._passThroughOptions){i.push(a,...t.slice(o));break}i.push(a)}return{operands:e,unknown:u}}opts(){if(this._storeOptionsAsProperties){let t={},e=this.options.length;for(let u=0;u<e;u++){let e=this.options[u].attributeName();t[e]=e===this._versionOptionName?this._version:this[e]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,e)=>Object.assign(t,e.opts()),{})}error(t,e){this._outputConfiguration.outputError(`${t}
10
10
  `,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
11
11
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));let u=e||{},i=u.exitCode||1,D=u.code||"commander.error";this._exit(i,D,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in n.env){let e=t.attributeName();(void 0===this.getOptionValue(e)||["default","config","env"].includes(this.getOptionValueSource(e)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,n.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new c(this.options),e=t=>void 0!==this.getOptionValue(t)&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter(u=>void 0!==u.implied&&e(u.attributeName())&&t.valueFromOption(this.getOptionValue(u.attributeName()),u)).forEach(t=>{Object.keys(t.implied).filter(t=>!e(t)).forEach(e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")})})}missingArgument(t){let e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}optionMissingArgument(t){let e=`error: option '${t.flags}' argument missing`;this.error(e,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let e=`error: required option '${t.flags}' not specified`;this.error(e,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,e){let u=t=>{let e=t.attributeName(),u=this.getOptionValue(e),i=this.options.find(t=>t.negate&&e===t.attributeName()),D=this.options.find(t=>!t.negate&&e===t.attributeName());return i&&(void 0===i.presetArg&&!1===u||void 0!==i.presetArg&&u===i.presetArg)?i:D||t},i=t=>{let e=u(t),i=e.attributeName();return"env"===this.getOptionValueSource(i)?`environment variable '${e.envVar}'`:`option '${e.flags}'`},D=`error: ${i(t)} cannot be used with ${i(e)}`;this.error(D,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let u=[],i=this;do{let t=i.createHelp().visibleOptions(i).filter(t=>t.long).map(t=>t.long);u=u.concat(t),i=i.parent}while(i&&!i._enablePositionalOptions);e=d(t,u)}let u=`error: unknown option '${t}'${e}`;this.error(u,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let e=this.registeredArguments.length,u=this.parent?` for '${this.name()}'`:"",i=`error: too many arguments${u}. Expected ${e} argument${1===e?"":"s"} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],e="";if(this._showSuggestionAfterError){let u=[];this.createHelp().visibleCommands(this).forEach(t=>{u.push(t.name()),t.alias()&&u.push(t.alias())}),e=d(t,u)}let u=`error: unknown command '${t}'${e}`;this.error(u,{code:"commander.unknownCommand"})}version(t,e,u){if(void 0===t)return this._version;this._version=t,e=e||"-V, --version",u=u||"output the version number";let i=this.createOption(e,u);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${t}
12
12
  `),this._exit(0,"commander.version",t)}),this}description(t,e){return void 0===t&&void 0===e?this._description:(this._description=t,e&&(this._argsDescription=e),this)}summary(t){return void 0===t?this._summary:(this._summary=t,this)}alias(t){if(void 0===t)return this._aliases[0];let e=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(e=this.commands[this.commands.length-1]),t===e._name)throw Error("Command alias can't be the same as its name");let u=this.parent?._findCommand(t);if(u){let e=[u.name()].concat(u.aliases()).join("|");throw Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${e}'`)}return e._aliases.push(t),this}aliases(t){return void 0===t?this._aliases:(t.forEach(t=>this.alias(t)),this)}usage(t){if(void 0===t){if(this._usage)return this._usage;let t=this.registeredArguments.map(t=>a(t));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=t,this}name(t){return void 0===t?this._name:(this._name=t,this)}helpGroup(t){return void 0===t?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return void 0===t?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return void 0===t?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=r.basename(t,r.extname(t)),this}executableDir(t){return void 0===t?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let e=this.createHelp(),u=this._getOutputContext(t);e.prepareContext({error:u.error,helpWidth:u.helpWidth,outputHasColors:u.hasColors});let i=e.formatHelp(this,e);return u.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(t){let e,u,i,D=!!(t=t||{}).error;return D?(e=t=>this._outputConfiguration.writeErr(t),u=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(e=t=>this._outputConfiguration.writeOut(t),u=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:D,write:t=>(u||(t=this._outputConfiguration.stripColor(t)),e(t)),hasColors:u,helpWidth:i}}outputHelp(t){let e;"function"==typeof t&&(e=t,t=void 0);let u=this._getOutputContext(t),i={error:u.error,write:u.write,command:this};this._getCommandAndAncestors().reverse().forEach(t=>t.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let D=this.helpInformation({error:u.error});if(e&&"string"!=typeof(D=e(D))&&!Buffer.isBuffer(D))throw Error("outputHelp callback must return a string or a Buffer");u.write(D),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(t=>t.emit("afterAllHelp",i))}helpOption(t,e){return"boolean"==typeof t?t?(null===this._helpOption&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null:(this._helpOption=this.createOption(t??"-h, --help",e??"display help for command"),(t||e)&&this._initOptionGroup(this._helpOption)),this}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let e=Number(n.exitCode??0);0===e&&t&&"function"!=typeof t&&t.error&&(e=1),this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){let u=["beforeAll","before","after","afterAll"];if(!u.includes(t))throw Error(`Unexpected value for position to addHelpText.
@@ -52,23 +52,23 @@ ${b.gray(to)} ${t}
52
52
  `)},tA={message:(t="",{symbol:e=b.gray(tn)}={})=>{let u=[`${b.gray(tn)}`];if(t){let[i,...D]=t.split(`
53
53
  `);u.push(`${e} ${i}`,...D.map(t=>`${b.gray(tn)} ${t}`))}process.stdout.write(`${u.join(`
54
54
  `)}
55
- `)},info:t=>{tA.message(t,{symbol:b.blue(td)})},success:t=>{tA.message(t,{symbol:b.green(tC)})},step:t=>{tA.message(t,{symbol:b.green(tr)})},warn:t=>{tA.message(t,{symbol:b.yellow(tF)})},warning:t=>{tA.warn(t)},error:t=>{tA.message(t,{symbol:b.red(tg)})}},tB=(b.gray(tn),({indicator:t="dots"}={})=>{let e=tt?["◒","◐","◓","◑"]:["•","o","O","0"],u=tt?80:120,i="true"===process.env.CI,D,r,s=!1,n="",p,m=performance.now(),c=t=>{s&&A(t>1?"Something went wrong":"Canceled",t)},d=()=>c(2),C=()=>c(1),F=()=>{if(void 0===p)return;i&&process.stdout.write(`
55
+ `)},info:t=>{tA.message(t,{symbol:b.blue(td)})},success:t=>{tA.message(t,{symbol:b.green(tC)})},step:t=>{tA.message(t,{symbol:b.green(tr)})},warn:t=>{tA.message(t,{symbol:b.yellow(tF)})},warning:t=>{tA.warn(t)},error:t=>{tA.message(t,{symbol:b.red(tg)})}},tB=(b.gray(tn),({indicator:t="dots"}={})=>{let e=tt?["◒","◐","◓","◑"]:["•","o","O","0"],u=tt?80:120,i="true"===process.env.CI,D,r,s=!1,n="",p,m=performance.now(),c=t=>{s&&E(t>1?"Something went wrong":"Canceled",t)},d=()=>c(2),C=()=>c(1),F=()=>{if(void 0===p)return;i&&process.stdout.write(`
56
56
  `);let t=p.split(`
57
- `);process.stdout.write(f.cursor.move(-999,t.length-1)),process.stdout.write(f.erase.down(t.length))},g=t=>t.replace(/\.+$/,""),E=t=>{let e=(performance.now()-t)/1e3,u=Math.floor(e/60),i=Math.floor(e%60);return u>0?`[${u}m ${i}s]`:`[${i}s]`},A=(e="",u=0)=>{s=!1,clearInterval(r),F();let i=0===u?b.green(tr):1===u?b.red(ti):b.red(tD);n=g(e??n),"timer"===t?process.stdout.write(`${i} ${n} ${E(m)}
57
+ `);process.stdout.write(f.cursor.move(-999,t.length-1)),process.stdout.write(f.erase.down(t.length))},g=t=>{let e=(performance.now()-t)/1e3,u=Math.floor(e/60),i=Math.floor(e%60);return u>0?`[${u}m ${i}s]`:`[${i}s]`},E=(e="",u=0)=>{s=!1,clearInterval(r),F();let i=0===u?b.green(tr):1===u?b.red(ti):b.red(tD);n=(e??n).replace(/\.+$/,""),"timer"===t?process.stdout.write(`${i} ${n} ${g(m)}
58
58
  `):process.stdout.write(`${i} ${n}
59
- `),process.removeListener("uncaughtExceptionMonitor",d),process.removeListener("unhandledRejection",d),process.removeListener("SIGINT",C),process.removeListener("SIGTERM",C),process.removeListener("exit",c),D()};return{start:(A="")=>{s=!0,D=function({input:t=_.stdin,output:e=_.stdout,overwrite:u=!0,hideCursor:i=!0}={}){let D=a({input:t,output:e,prompt:"",tabSize:1});l(t,D),t.isTTY&&t.setRawMode(!0);let r=(D,{name:s,sequence:n})=>{if(q([String(D),s,n],"cancel")){i&&e.write(f.cursor.show),process.exit(0);return}u&&h(e,"return"===s?0:-1,"return"===s?-1:0,()=>{o(e,1,()=>{t.once("keypress",r)})})};return i&&e.write(f.cursor.hide),t.once("keypress",r),()=>{t.off("keypress",r),i&&e.write(f.cursor.show),t.isTTY&&!U&&t.setRawMode(!1),D.terminal=!1,D.close()}}(),n=g(A),m=performance.now(),process.stdout.write(`${b.gray(tn)}
60
- `);let B=0,v=0;process.on("uncaughtExceptionMonitor",d),process.on("unhandledRejection",d),process.on("SIGINT",C),process.on("SIGTERM",C),process.on("exit",c),r=setInterval(()=>{if(i&&n===p)return;F(),p=n;let u=b.magenta(e[B]);if(i)process.stdout.write(`${u} ${n}...`);else if("timer"===t)process.stdout.write(`${u} ${n} ${E(m)}`);else{let t=".".repeat(Math.floor(v)).slice(0,3);process.stdout.write(`${u} ${n}${t}`)}B=B+1<e.length?B+1:0,v=v<e.length?v+.125:0},u)},stop:A,message:(t="")=>{n=g(t??n)}}}),tv=async(t,e)=>{let u={};for(let i of Object.keys(t)){let D=t[i],r=await D({results:u})?.catch(t=>{throw t});if("function"==typeof e?.onCancel&&r===z){u[i]="canceled",e.onCancel({results:u});continue}u[i]=r}return u};var tx=d("node:fs"),ty=d("node:path");let tw=async t=>{let e=tB(),u=(0,ty.resolve)(_.default.cwd(),t);return e.start(`Creating a React App in ${A().green(u)}.`),(0,tx.mkdirSync)(u),await E("npm",["init","-y"],{cwd:u}),e.stop(`React App created in ${A().green(u)}.`),{repoDir:u}},tO=t=>(t===z&&(((t="")=>{process.stdout.write(`${b.gray(to)} ${b.red(t)}
59
+ `),process.removeListener("uncaughtExceptionMonitor",d),process.removeListener("unhandledRejection",d),process.removeListener("SIGINT",C),process.removeListener("SIGTERM",C),process.removeListener("exit",c),D()};return{start:(E="")=>{s=!0,D=function({input:t=_.stdin,output:e=_.stdout,overwrite:u=!0,hideCursor:i=!0}={}){let D=a({input:t,output:e,prompt:"",tabSize:1});l(t,D),t.isTTY&&t.setRawMode(!0);let r=(D,{name:s,sequence:n})=>{if(q([String(D),s,n],"cancel")){i&&e.write(f.cursor.show),process.exit(0);return}u&&h(e,"return"===s?0:-1,"return"===s?-1:0,()=>{o(e,1,()=>{t.once("keypress",r)})})};return i&&e.write(f.cursor.hide),t.once("keypress",r),()=>{t.off("keypress",r),i&&e.write(f.cursor.show),t.isTTY&&!U&&t.setRawMode(!1),D.terminal=!1,D.close()}}(),n=E.replace(/\.+$/,""),m=performance.now(),process.stdout.write(`${b.gray(tn)}
60
+ `);let A=0,B=0;process.on("uncaughtExceptionMonitor",d),process.on("unhandledRejection",d),process.on("SIGINT",C),process.on("SIGTERM",C),process.on("exit",c),r=setInterval(()=>{if(i&&n===p)return;F(),p=n;let u=b.magenta(e[A]);if(i)process.stdout.write(`${u} ${n}...`);else if("timer"===t)process.stdout.write(`${u} ${n} ${g(m)}`);else{let t=".".repeat(Math.floor(B)).slice(0,3);process.stdout.write(`${u} ${n}${t}`)}A=A+1<e.length?A+1:0,B=B<e.length?B+.125:0},u)},stop:E,message:(t="")=>{n=(t??n).replace(/\.+$/,"")}}}),tv=async(t,e)=>{let u={};for(let i of Object.keys(t)){let D=t[i],r=await D({results:u})?.catch(t=>{throw t});if("function"==typeof e?.onCancel&&r===z){u[i]="canceled",e.onCancel({results:u});continue}u[i]=r}return u};var tx=d("node:fs"),ty=d("node:path");let tw=async t=>{let e=tB(),u=(0,ty.resolve)(_.default.cwd(),t);return e.start(`Creating a React App in ${A().green(u)}.`),(0,tx.mkdirSync)(u),await E("npm",["init","-y"],{cwd:u}),e.stop(`React App created in ${A().green(u)}.`),{repoDir:u}},tO=t=>(t===z&&(((t="")=>{process.stdout.write(`${b.gray(to)} ${b.red(t)}
61
61
 
62
62
  `)})("Operation cancelled."),C()),t),t$=t=>"string"==typeof t&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(t)?(0,tx.existsSync)((0,ty.resolve)(_.default.cwd(),t))?`The directory ${A().green(t)} already exists.
63
63
  Either try using a new directory name, or remove the files listed above.`:"":`The project name '${t}' is not valid.
64
64
 
65
65
  A valid npm project name must start with a lowercase letter, a number, a hyphen, or a tilde, and can include dots, hyphens, tildes, or underscores.
66
66
 
67
- If the project name starts with '@', it must be followed by a valid scope name and a '/'.`,tk=t=>"string"==typeof t&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*(?:@[^\s@][^\s]*)?$/.test(t)?"":`The template name '${t}' is not valid.`,tS=async({projectName:t,skipDepInstall:e,skipGitInit:u,template:i})=>({projectName:t||tO(await tf({message:"What is the name of your project?",placeholder:"my-project",validate:t$})).toString(),skipDepInstall:e||!!tO(await t_({message:"Do you want to skip installing dependencies (npm install)?",initialValue:!1})),skipGitInit:u||!!tO(await t_({message:"Do you want to skip initializing a git repository?",initialValue:!1})),template:i||tO((await tv({useCustomTemplate:async()=>!!await t_({message:"Do you want to use a custom template?",initialValue:!1}),template:async({results:t})=>t.useCustomTemplate?(await tf({message:"Enter the custom template name (e.g., @pplancq/react-template):",placeholder:"@pplancq/react-template",validate:tk})).toString():"@pplancq/react-template"})).template)}),{program:tT,createCommand:tH,createArgument:tV,createOption:tj,CommanderError:tM,InvalidArgumentError:tG,InvalidOptionArgumentError:tW,Command:tP,Argument:tI,Option:tN,Help:tR}=d("../../node_modules/commander/index.js");var tL=JSON.parse('{"UU":"@pplancq/create-react-app","rE":"1.5.1"}');let tq=async(t,e)=>{if(e)return;let u=tB();u.start("Creating git commit."),await E("git",["add","."],{cwd:t}),await E("git",["commit","--no-verify","--message","Initial commit"],{cwd:t}),u.stop("Git commit created.")},tU=async(t,e)=>{if(e)return;let u=tB();u.start("Initializing git repository."),await E("git",["init","--initial-branch=main"],{cwd:t}),u.stop("Git repository initialized.")},tz=async(t,e)=>{if(e)return;let u=tB();u.start("Installing packages. This might take a couple of minutes."),await E("npm",["install"],{cwd:t}),u.stop("Packages installed.")},tY=async(t,e)=>{let u=tB(),i=(0,ty.resolve)(t,`node_modules/${e}`);u.start(`Installing react template from ${A().green(e)}. This might take a couple of minutes.`),await E("npm",["install",e,"--install-strategy=nested"],{cwd:t}),(0,tx.cpSync)(i,t,{recursive:!0,dereference:!0}),(0,tx.rmSync)(`${t}/package-lock.json`),(0,tx.rmSync)(`${t}/node_modules`,{recursive:!0}),u.stop("React template installed.")},tJ=async(t,e)=>{let u=tB(),i=!1,D=JSON.parse((0,tx.readFileSync)((0,ty.resolve)(e,"package.json"),{encoding:"utf-8"}));if(D?.bin?.["template-install"]===void 0)return void tA.warn("No post install template script found.");u.start("Running post install template script...");try{await E("npx",["template-install",t],{cwd:e})}catch(t){if(i=!0,!(t instanceof F))throw t;tA.error("Failed to run template-install command")}finally{u.stop(i?"Failed to run post install template script.":"Post install template script finished.")}};class tK extends Error{constructor(t){super(t),this.name="InvalidProjectNameError"}}class tZ extends Error{constructor(t){super(t),this.name="InvalidTemplateNameError"}}(async()=>{let t=(()=>{let t={};return new tP(tL.UU).argument("[project-name]","The name of the project to create.").option("-t, --template <template>","Specify a template for the project.").option("--skip-dep-install","Skip installing dependencies (npm install).").option("--skip-git-init","Skip initializing a git repository.").version(tL.rE,"-v, --version").name(A().green("create-react-app")).usage(`[options] ${A().yellow("[project-name]")}`).addHelpText("after",`
67
+ If the project name starts with '@', it must be followed by a valid scope name and a '/'.`,tk=t=>"string"==typeof t&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*(?:@[^\s@][^\s]*)?$/.test(t)?"":`The template name '${t}' is not valid.`,tS=async({projectName:t,skipDepInstall:e,skipGitInit:u,template:i})=>({projectName:t||tO(await tf({message:"What is the name of your project?",placeholder:"my-project",validate:t$})).toString(),skipDepInstall:e||!!tO(await t_({message:"Do you want to skip installing dependencies (npm install)?",initialValue:!1})),skipGitInit:u||!!tO(await t_({message:"Do you want to skip initializing a git repository?",initialValue:!1})),template:i||tO((await tv({useCustomTemplate:async()=>!!await t_({message:"Do you want to use a custom template?",initialValue:!1}),template:async({results:t})=>t.useCustomTemplate?(await tf({message:"Enter the custom template name (e.g., @pplancq/react-template):",placeholder:"@pplancq/react-template",validate:tk})).toString():"@pplancq/react-template"})).template)}),{program:tT,createCommand:tH,createArgument:tV,createOption:tj,CommanderError:tM,InvalidArgumentError:tG,InvalidOptionArgumentError:tW,Command:tP,Argument:tI,Option:tN,Help:tR}=d("../../node_modules/commander/index.js");var tL=JSON.parse('{"UU":"@pplancq/create-react-app","rE":"2.0.1"}');let tq=async(t,e)=>{if(e)return;let u=tB();u.start("Creating git commit."),await E("git",["add","."],{cwd:t}),await E("git",["commit","--no-verify","--message","Initial commit"],{cwd:t}),u.stop("Git commit created.")},tU=async(t,e)=>{if(e)return;let u=tB();u.start("Initializing git repository."),await E("git",["init","--initial-branch=main"],{cwd:t}),u.stop("Git repository initialized.")},tz=async(t,e)=>{if(e)return;let u=tB();u.start("Installing packages. This might take a couple of minutes."),await E("npm",["install"],{cwd:t}),u.stop("Packages installed.")},tY=async(t,e)=>{let u=tB(),i=(0,ty.resolve)(t,`node_modules/${e}`);u.start(`Installing react template from ${A().green(e)}. This might take a couple of minutes.`),await E("npm",["install",e,"--install-strategy=nested"],{cwd:t}),(0,tx.cpSync)(i,t,{recursive:!0,dereference:!0}),(0,tx.rmSync)(`${t}/package-lock.json`),(0,tx.rmSync)(`${t}/node_modules`,{recursive:!0}),u.stop("React template installed.")},tJ=async(t,e)=>{let u=tB(),i=!1,D=JSON.parse((0,tx.readFileSync)((0,ty.resolve)(e,"package.json"),{encoding:"utf-8"}));if(D?.bin?.["template-install"]===void 0)return void tA.warn("No post install template script found.");u.start("Running post install template script...");try{await E("npx",["template-install",t],{cwd:e})}catch(t){if(i=!0,!(t instanceof F))throw t;tA.error("Failed to run template-install command")}finally{u.stop(i?"Failed to run post install template script.":"Post install template script finished.")}};class tK extends Error{constructor(t){super(t),this.name="InvalidProjectNameError"}}class tZ extends Error{constructor(t){super(t),this.name="InvalidTemplateNameError"}}(async()=>{let t,e=(t={},new tP(tL.UU).argument("[project-name]","The name of the project to create.").option("-t, --template <template>","Specify a template for the project.").option("--skip-dep-install","Skip installing dependencies (npm install).").option("--skip-git-init","Skip initializing a git repository.").version(tL.rE,"-v, --version").name(A().green("create-react-app")).usage(`[options] ${A().yellow("[project-name]")}`).addHelpText("after",`
68
68
  Examples:
69
69
  $ npm create @pplancq/react-app my-project
70
- $ npx @pplancq/create-react-app my-project`).action((e,u)=>{e&&(t.projectName=e),u?.skipDepInstall&&(t.skipDepInstall=u.skipDepInstall),u?.skipGitInit&&(t.skipGitInit=u.skipGitInit),u?.template&&(t.template=u.template)}).parse(_.default.argv),t})();((t="")=>{process.stdout.write(`${b.gray(ts)} ${t}
71
- `)})(`Create ${A().blue("React")} App`),(({projectName:t,template:e})=>{if(t){let e=t$(t);if(""!==e)throw new tK(e)}if(e){let t=tk(e);if(""!==t)throw new tZ(t)}})(t);let{projectName:e,skipDepInstall:u,skipGitInit:i,template:D}=await tS(t),{repoDir:r}=await tw(e);await tY(r,D),await tJ(e,r),await tU(r,i),await tz(r,u),await tq(r,i),tA.success(`${A().yellow("Success \\o/")} Created ${A().green(e)} at ${A().green(r)}`),((t="",e="")=>{let u=`
70
+ $ npx @pplancq/create-react-app my-project`).action((e,u)=>{e&&(t.projectName=e),u?.skipDepInstall&&(t.skipDepInstall=u.skipDepInstall),u?.skipGitInit&&(t.skipGitInit=u.skipGitInit),u?.template&&(t.template=u.template)}).parse(_.default.argv),t);((t="")=>{process.stdout.write(`${b.gray(ts)} ${t}
71
+ `)})(`Create ${A().blue("React")} App`),(({projectName:t,template:e})=>{if(t){let e=t$(t);if(""!==e)throw new tK(e)}if(e){let t=tk(e);if(""!==t)throw new tZ(t)}})(e);let{projectName:u,skipDepInstall:i,skipGitInit:D,template:r}=await tS(e),{repoDir:n}=await tw(u);await tY(n,r),await tJ(u,n),await tU(n,D),await tz(n,i),await tq(n,D),tA.success(`${A().yellow("Success \\o/")} Created ${A().green(u)} at ${A().green(n)}`),((t="",e="")=>{let u=`
72
72
  ${t}
73
73
  `.split(`
74
74
  `),i=s(e).length,D=Math.max(u.reduce((t,e)=>{let u=s(e);return u.length>t?u.length:t},0),i)+2,r=u.map(t=>`${b.gray(tn)} ${b.dim(t)}${" ".repeat(D-s(t).length)}${b.gray(tn)}`).join(`
@@ -77,6 +77,6 @@ ${b.green(tr)} ${b.reset(e)} ${b.gray(th.repeat(Math.max(D-i-1,1))+tp)}
77
77
  ${r}
78
78
  ${b.gray(tm+th.repeat(D+2)+tc)}
79
79
  `)})(`We suggest that you begin by typing:
80
- ${A().cyan("cd")} ${e}${u?`
80
+ ${A().cyan("cd")} ${u}${i?`
81
81
  ${A().cyan("npm install")}`:""}
82
82
  ${A().cyan("npm start")}`,"What next?")})().then(()=>{tb("Happy hacking!"),C()}).catch(t=>{tA.error(t.message),tb("Please check and try again."),C(!0)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pplancq/create-react-app",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "license": "MIT",
5
5
  "description": "pplancq create-react-app",
6
6
  "author": "pplancq <paul.plancq@outlook.fr>",
@@ -25,7 +25,8 @@
25
25
  "lint:eslint": "eslint \"**/*.{js,mjs,ts}\"",
26
26
  "lint:eslint:fix": "eslint \"**/*.{js,mjs,ts}\" --fix",
27
27
  "lint:prettier": "prettier \"**/*.!(js|mjs|ts)\" --check --ignore-unknown",
28
- "lint:prettier:fix": "prettier \"**/*.!(js|mjs|ts)\" --write --ignore-unknown"
28
+ "lint:prettier:fix": "prettier \"**/*.!(js|mjs|ts)\" --write --ignore-unknown",
29
+ "prepublishOnly": "npm run build"
29
30
  },
30
31
  "keywords": [
31
32
  "create",
@@ -40,19 +41,19 @@
40
41
  ],
41
42
  "devDependencies": {
42
43
  "@clack/prompts": "^0.11.0",
43
- "@rslib/core": "^0.13.2",
44
- "@vitest/coverage-v8": "^3.2.4",
45
- "commander": "^14.0.1",
46
- "eslint": "^9.35.0",
44
+ "@rslib/core": "^0.17.0",
45
+ "@vitest/coverage-v8": "^4.0.5",
46
+ "commander": "^14.0.2",
47
+ "eslint": "^9.38.0",
47
48
  "eslint-plugin-prettier": "^5.5.4",
48
- "lint-staged": "^16.1.6",
49
+ "lint-staged": "^16.2.6",
49
50
  "picocolors": "^1.1.1",
50
51
  "prettier": "^3.6.2",
51
52
  "tsc-files": "^1.1.4",
52
- "typescript": "^5.9.2",
53
+ "typescript": "^5.9.3",
53
54
  "vite-tsconfig-paths": "^5.1.4",
54
- "vitest": "^3.2.4",
55
- "vitest-sonar-reporter": "^2.0.4"
55
+ "vitest": "^4.0.5",
56
+ "vitest-sonar-reporter": "^3.0.0"
56
57
  },
57
58
  "engines": {
58
59
  "node": ">=20.12.2"