@bradhezh/create-prj 1.0.0 → 1.0.4

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.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var r={},o={};function e(n){var s=o[n];if(void 0!==s)return s.exports;var t=o[n]={exports:{}};return r[n](t,t.exports,e),t.exports}e.rv=()=>"1.6.8",e.ruid="bundler=rspack@1.6.8",console.log("Hello scaffolding!")})();
1
+ (()=>{"use strict";var e,t,n,r,o,a={},c={};function i(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return a[e](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.rv=()=>"1.6.8",i.ruid="bundler=rspack@1.6.8";let l=require("@clack/prompts");var s=i.n(l);let u=require("child_process");function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);c=!0);}catch(e){i=!0,r=e}finally{try{c||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,t)||y(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}}var m={type:{node:"node",backend:"backend",frontend:"frontend",mobile:"mobile",monorepo:"monorepo",lib:"lib",cli:"cli"},backend:{express:"express",nest:"nest"},frontend:{react:"react",next:"next"},mobile:{expo:"expo"},lib:{npmjs:"npmjs"},cli:{npmjs:"npmjs"},compulsory:{typescript:{nodecorator:"nodecorator",decorator:"decorator",metadata:"metadata"},builder:{rspack:"rspack"}},optional:{lint:{eslint:"eslint"},test:{jest:"jest"},git:{github:"github"},cicd:{ghactions:"ghactions"},deploy:{render:"render"},docker:{docker:"docker"},orm:{prisma:"prisma"}}},h=(e=m.compulsory,t=m.optional,f({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(m,["compulsory","optional"]),e,t)),v={name:{q:"Project name?",initial:"my-prj",validate:"Please enter a name."},type:{q:"Project type?",node:"Node.js",backend:"Backend",frontend:"Frontend",mobile:"Mobile",monorepo:"Monorepo with backend, frontend, or mobile",lib:"Library",cli:"CLI tool"},backend:{q:"Backend?",express:"Express",nest:"NestJS"},frontend:{q:"Frontend?",react:"React (Vite)",next:"Next.js"},mobile:{q:"Mobile?",expo:"Expo"},lib:{q:"Package registry for library?",npmjs:"npmjs"},cli:{q:"Package registry for CLI tool?",npmjs:"npmjs"},typescript:{q:"TypeScript decorator?",nodecorator:"No decorator",decorator:"Decorator",metadata:"Decorator with emitDecoratorMetadata"},builder:{q:"Builder?",rspack:"Rspack"},lint:{q:"Lint?",eslint:"ESLint"},test:{q:"Test framework?",jest:"Jest"},git:{q:"Git?",github:"GitHub"},cicd:{q:"CI/CD?",ghactions:"GitHub Actions"},deploy:{q:"Cloud for deployment?",render:"Render.com"},docker:{q:"Docker for deployment?",docker:"docker.io"},orm:{q:"ORM?",prisma:"Prisma"},optional:{q:"Accept optional ones with defaults, or configure them one by one, or choose none of them?",default:"Accept defaults (ESLint, Jest, GitHub, GitHub Actions, Render.com, Docker, and Prisma if applicable)",manual:"Configure manually"},opCanceled:"Operation cancelled.",pmUnsupported:"The tool can only support npm or pnpm for now.",pnpmForMono:"The tool can only support pnpm monorepo for now."},g={option:{default:"default",manual:"manual"},default:{lint:m.optional.lint.eslint,test:m.optional.test.jest,git:m.optional.git.github,cicd:m.optional.cicd.ghactions,deploy:m.optional.deploy.render,docker:m.optional.docker.docker,orm:m.optional.orm.prisma}},k={value:void 0,label:"None"},j=(n=f({},Object.fromEntries(Object.entries(h).filter(function(e){var t=b(e,2),n=t[0],r=t[1];return(void 0===r?"undefined":r&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)=="object"&&(Object.keys(r).length>1||n in m.optional)}).map(function(e){var t=b(e,2),n=t[0],r=t[1];return[n,{disable:!1,selection:{message:v[n].q,options:d(Object.values(r).map(function(e){return{value:e,label:v[n][e]}})).concat(d(n in m.optional?[k]:[]))}}]}))),r=r={name:{message:v.name.q,initialValue:v.name.initial,validate:function(e){return e?void 0:v.name.validate}},monoBackend:{message:v.backend.q,options:d(Object.values(m.backend).map(function(e){return{value:e,label:v.backend[e]}})).concat([k])},monoFrontend:{message:v.frontend.q,options:d(Object.values(m.frontend).map(function(e){return{value:e,label:v.frontend[e]}})).concat([k])},monoMobile:{message:v.mobile.q,options:d(Object.values(m.mobile).map(function(e){return{value:e,label:v.mobile[e]}})).concat([k])},optional:{message:v.optional.q,initialValue:g.option.default,options:[{value:g.option.default,label:v.optional.default},{value:g.option.manual,label:v.optional.manual},k]}},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n),w="https://raw.githubusercontent.com/bradhezh/prj-template/master",O={node:"package-node.json",express:"package-express.json",nest:"package-nest.json",monorepo:"package-mono.json",share:"package-share.json",lib:"package-lib.json",cli:"package-cli.json"};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){n(e);return}i.done?t(l):Promise.resolve(l).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){x(a,r,o,c,i,"next",e)}function i(e){x(a,r,o,c,i,"throw",e)}c(void 0)})}}function q(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){var s=[i,l];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}function E(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var A=function(){var e,t,n,r;if(null==(e=process.env.npm_config_user_agent)?void 0:e.includes("pnpm"))n="pnpm";else if(null==(t=process.env.npm_config_user_agent)?void 0:t.includes("npm"))n="npm";else throw Error(v.pmUnsupported);try{(0,u.execSync)("volta -v",{stdio:"ignore"}),r=!0}catch(e){r=!1}return{volta:r,npm:n}},I=function(){s().cancel(v.opCanceled),process.exit(0)};let C=require("node:fs");var D=i.n(C);let T=require("axios");var M=i.n(T);let F=require("yaml");var _=i.n(F);function G(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){n(e);return}i.done?t(l):Promise.resolve(l).then(r,o)}function B(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){G(a,r,o,c,i,"next",e)}function i(e){G(a,r,o,c,i,"throw",e)}c(void 0)})}}function L(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){var s=[i,l];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}var N=function(e){if(e.type===m.type.node||e.type===m.type.lib||e.type===m.type.cli||e.type===m.type.backend)return void D().mkdirSync("src");if(e.type===m.type.monorepo&&(e.backend&&D().mkdirSync("backend/src",{recursive:!0}),(e.backend&&e.frontend||e.backend&&e.mobile||e.frontend&&e.mobile)&&D().mkdirSync("share/src",{recursive:!0})),e.frontend===m.frontend.react?(console.log("create-vite ..."),(0,u.execSync)("".concat(e.npm," create vite ").concat(e.type!==m.type.monorepo?".":"frontend"," --template react-ts"),{stdio:"inherit"})):e.frontend===m.frontend.next&&(console.log("create-next-app ..."),(0,u.execSync)("".concat(e.npm," create next-app ").concat(e.type!==m.type.monorepo?".":"frontend"," --ts --no-react-compiler --no-src-dir -app --api --eslint --tailwind --skip-install --disable-git"),{stdio:"inherit"})),e.mobile===m.mobile.expo){console.log("create-expo-app ...");var t=e.type!==m.type.monorepo?".":"mobile";(0,u.execSync)("".concat(e.npm," create expo-app ").concat(t," --no-install"),{stdio:"inherit"}),D().rmSync("".concat(t,"/.git"),{recursive:!0,force:!0})}},R=function(e,t){if(e.volta){var n=(0,u.execSync)("node -v").toString().trim();(0,u.execSync)("".concat(e.npm,' pkg set "volta.node"="').concat(n.startsWith("v")?n.slice(1):n,'"'),{stdio:"ignore",cwd:t});var r=(0,u.execSync)("".concat(e.npm," -v")).toString().trim();(0,u.execSync)("".concat(e.npm,' pkg set "volta.').concat(e.npm,'"="').concat(r.startsWith("v")?r.slice(1):r,'"'),{stdio:"ignore",cwd:t})}if("pnpm"===e.npm){var o=(0,u.execSync)("pnpm -v").toString().trim();(0,u.execSync)('pnpm pkg set packageManager="pnpm@'.concat(o.startsWith("v")?o.slice(1):o,'"'),{stdio:"ignore",cwd:t})}},H=function(e){R(e),D().existsSync("backend")&&R(e,"backend"),D().existsSync("frontend")&&R(e,"frontend"),D().existsSync("mobile")&&R(e,"mobile"),D().existsSync("shared")&&R(e,"shared")},U=function(e){var t=e.name.includes("/")?e.name.split("/").pop():e.name;(0,u.execSync)("".concat(e.npm,' pkg set "bin.').concat(t,'"="dist/index.js"'),{stdio:"ignore"})},J=function(e){var t={packages:[],onlyBuiltDependencies:[]};D().existsSync("backend")&&t.packages.push("backend"),D().existsSync("frontend")&&t.packages.push("frontend"),D().existsSync("mobile")&&t.packages.push("mobile"),D().existsSync("shared")&&t.packages.push("shared"),e.backend===m.backend.nest&&t.onlyBuiltDependencies.push("@nestjs/core"),D().writeFileSync("pnpm-workspace.yaml",_().stringify(t))};function V(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){n(e);return}i.done?t(l):Promise.resolve(l).then(r,o)}(o=function(){var e;return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){var s=[i,l];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,P(function(){var e;return q(this,function(t){var n,r,o,a;switch(t.label){case 0:return[4,(n=A(),P(function(){return q(this,function(e){switch(e.label){case 0:return[4,s().group({name:function(){return s().text(j.name)},type:function(){return s().select(j.type.selection)}},{onCancel:I})];case 1:var t,r;return[2,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e.sent(),n),r=r={compulsory:Object.fromEntries(Object.entries(m.compulsory).map(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],c=!0,i=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(a.push(n.value),2!==a.length);c=!0);}catch(e){i=!0,r=e}finally{try{c||null==o.return||o.return()}finally{if(i)throw r}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return S(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return[t[0],Object.values(t[1])[0]]}))},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t)]}})})())];case 1:return[4,(r=e=t.sent(),P(function(){var e,t,n;return q(this,function(o){switch(o.label){case 0:if(r.type!==m.type.monorepo)return[3,2];if("pnpm"!==r.npm)throw Error(v.pnpmForMono);return[4,s().group({backend:function(){return s().select(j.monoBackend)},frontend:function(){return s().select(j.monoFrontend)},mobile:function(){return s().select(j.monoMobile)}},{onCancel:I})];case 1:return r.backend=(e=o.sent()).backend,r.frontend=e.frontend,r.mobile=e.mobile,[3,4];case 2:if(!(r.type in m)||(t=r.type,r[t]=Object.values(m[t])[0],!(t in j)))return[3,4];return[4,s().group({selection:function(){return s().select(j[t].selection)}},{onCancel:I})];case 3:n=o.sent(),r[t]=n.selection,o.label=4;case 4:return r.backend===m.backend.nest&&(r.compulsory.typescript=m.compulsory.typescript.metadata,j.typescript.disable=!0),r.type!==m.type.frontend&&r.type!==m.type.mobile&&(r.type!==m.type.monorepo||r.backend)||(j.typescript&&(j.typescript.disable=!0),j.builder&&(j.builder.disable=!0),j.lint.disable=!0,j.test.disable=!0,j.deploy.disable=!0,j.docker.disable=!0),[2]}})})())];case 2:return t.sent(),[4,(o=e,P(function(){var e,t,n,r,a;return q(this,function(c){switch(c.label){case 0:for(n in e=function(e){var t,n;return q(this,function(r){switch(r.label){case 0:if(!((t=e)in j&&!j[t].disable))return[3,2];return[4,s().group({selection:function(){return s().select(j[t].selection)}},{onCancel:I})];case 1:n=r.sent(),o.compulsory[t]=n.selection,r.label=2;case 2:return[2]}})},t=[],m.compulsory)t.push(n);r=0,c.label=1;case 1:if(!(r<t.length))return[3,4];return a=t[r],[5,E(e(a))];case 2:c.sent(),c.label=3;case 3:return r++,[3,1];case 4:return[2]}})})())];case 3:return t.sent(),[4,(a=e,P(function(){var e,t,n,r,o,c,i;return q(this,function(l){switch(l.label){case 0:return[4,s().group({selection:function(){return s().select(j.optional)}},{onCancel:I})];case 1:if((e=l.sent()).selection===g.option.default){for(var u in a.optional||(a.optional={}),g.default)t=u,a.optional[t]||(a.optional[t]=g.default[t]);return[2]}if(e.selection!==g.option.manual)return[3,5];for(o in n=function(e){var t,n;return q(this,function(r){switch(r.label){case 0:if(j[t=e].disable)return[3,2];return[4,s().group({selection:function(){return s().select(j[t].selection)}},{onCancel:I})];case 1:if(!(n=r.sent()).selection)return"git"===t&&(j.cicd.disable=!0,j.deploy.disable=!0,j.docker.disable=!0),"cicd"===t&&(j.deploy.disable=!0,j.docker.disable=!0),[2,"continue"];a.optional||(a.optional={}),a.optional[t]=n.selection,r.label=2;case 2:return[2]}})},r=[],m.optional)r.push(o);c=0,l.label=2;case 2:if(!(c<r.length))return[3,5];return i=r[c],[5,E(n(i))];case 3:l.sent(),l.label=4;case 4:return c++,[3,2];case 5:return[2]}})})())];case 4:return t.sent(),[2,e]}})})()];case 1:return N(e=t.sent()),[4,B(function(){var t,n,r;return L(this,function(o){switch(o.label){case 0:if(n="package.json",(e.type===m.type.node||e.type===m.type.lib||e.type===m.type.cli)&&(t="".concat(w,"/").concat(O[e.type])),e.backend&&(t="".concat(w,"/").concat(O[e.backend]),e.type===m.type.monorepo&&(n="backend/package.json")),!t)return[3,2];return[4,M().get("".concat(t),{responseType:"text"})];case 1:r=o.sent(),D().writeFileSync(n,r.data),o.label=2;case 2:var a;if(e.type!==m.type.monorepo)return(0,u.execSync)("".concat(e.npm,' pkg set name="').concat(e.name,'"'),{stdio:"ignore"}),R(e),(e.type===m.type.lib||e.type===m.type.cli)&&U(e),[2];return[4,(a=e,B(function(){var e,t;return L(this,function(n){switch(n.label){case 0:return[4,M().get("".concat(w,"/").concat(O.monorepo),{responseType:"text"})];case 1:if(e=n.sent(),D().writeFileSync("package.json",e.data),!D().existsSync("shared"))return[3,3];return[4,M().get("".concat(w,"/").concat(O.share),{responseType:"text"})];case 2:t=n.sent(),D().writeFileSync("shared/package.json",t.data),n.label=3;case 3:return(0,u.execSync)('pnpm pkg set name="'.concat(a.name,'"'),{stdio:"ignore"}),H(a),J(a),[2]}})})())];case 3:return o.sent(),[2]}})})()];case 2:return t.sent(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,r){var a=o.apply(e,t);function c(e){V(a,n,r,c,i,"next",e)}function i(e){V(a,n,r,c,i,"throw",e)}c(void 0)})})()})();
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["webpack://@bradhezh/create-prj/webpack/runtime/rspack_version","webpack://@bradhezh/create-prj/webpack/runtime/rspack_unique_id","webpack://@bradhezh/create-prj/./src/index.ts"],"sourcesContent":["__webpack_require__.rv = () => (\"1.6.8\")","__webpack_require__.ruid = \"bundler=rspack@1.6.8\";","console.log(\"Hello scaffolding!\");\n"],"names":["console"],"mappings":"yIAAA,EAAoB,EAAE,CAAG,IAAO,QCAhC,EAAoB,IAAI,CAAG,uBCA3BA,QAAQ,GAAG,CAAC,qB"}
1
+ {"version":3,"file":"index.js","sources":["webpack://@bradhezh/create-prj/./src/conf.ts","webpack://@bradhezh/create-prj/webpack/runtime/compat_get_default_export","webpack://@bradhezh/create-prj/webpack/runtime/define_property_getters","webpack://@bradhezh/create-prj/webpack/runtime/has_own_property","webpack://@bradhezh/create-prj/webpack/runtime/rspack_version","webpack://@bradhezh/create-prj/webpack/runtime/rspack_unique_id","webpack://@bradhezh/create-prj/./src/prompt.ts","webpack://@bradhezh/create-prj/./src/create.ts","webpack://@bradhezh/create-prj/./src/index.ts"],"sourcesContent":["export const option = {\n type: {\n node: \"node\",\n backend: \"backend\",\n frontend: \"frontend\",\n mobile: \"mobile\",\n monorepo: \"monorepo\",\n lib: \"lib\",\n cli: \"cli\",\n },\n backend: {\n express: \"express\",\n nest: \"nest\",\n },\n frontend: {\n react: \"react\",\n next: \"next\",\n },\n mobile: { expo: \"expo\" },\n lib: { npmjs: \"npmjs\" },\n cli: { npmjs: \"npmjs\" },\n compulsory: {\n typescript: {\n nodecorator: \"nodecorator\",\n decorator: \"decorator\",\n metadata: \"metadata\",\n },\n builder: { rspack: \"rspack\" },\n },\n optional: {\n lint: { eslint: \"eslint\" },\n test: { jest: \"jest\" },\n git: { github: \"github\" },\n cicd: { ghactions: \"ghactions\" },\n deploy: { render: \"render\" },\n docker: { docker: \"docker\" },\n orm: { prisma: \"prisma\" },\n },\n} as const;\n\ntype Option = typeof option;\ntype ConfFromOpt<T> = T extends object\n ? T[keyof T] extends object\n ? { [K in keyof T]: ConfFromOpt<T[K]> }\n : T[keyof T]\n : T;\ntype RecursiveWritable<T> = T extends object\n ? { -readonly [K in keyof T]: RecursiveWritable<T[K]> }\n : T;\ntype RecursivePartial<T> = T extends object\n ? { [K in keyof T]?: RecursivePartial<T[K]> }\n : T;\ntype Conf0 = RecursiveWritable<ConfFromOpt<Option>>;\nexport type Conf = {\n name: string;\n volta: boolean;\n npm: \"npm\" | \"pnpm\";\n} & Pick<Conf0, \"type\" | \"compulsory\"> &\n RecursivePartial<Omit<Conf0, \"type\" | \"compulsory\">>;\n\nconst flatOpt = (({ compulsory, optional, ...rest }) => ({\n ...rest,\n ...compulsory,\n ...optional,\n}))(option);\nexport type FlatOpt = typeof flatOpt;\n\nexport const message = {\n name: {\n q: \"Project name?\",\n initial: \"my-prj\",\n validate: \"Please enter a name.\",\n },\n type: {\n q: \"Project type?\",\n node: \"Node.js\",\n backend: \"Backend\",\n frontend: \"Frontend\",\n mobile: \"Mobile\",\n monorepo: \"Monorepo with backend, frontend, or mobile\",\n lib: \"Library\",\n cli: \"CLI tool\",\n },\n backend: {\n q: \"Backend?\",\n express: \"Express\",\n nest: \"NestJS\",\n },\n frontend: {\n q: \"Frontend?\",\n react: \"React (Vite)\",\n next: \"Next.js\",\n },\n mobile: {\n q: \"Mobile?\",\n expo: \"Expo\",\n },\n lib: {\n q: \"Package registry for library?\",\n npmjs: \"npmjs\",\n },\n cli: {\n q: \"Package registry for CLI tool?\",\n npmjs: \"npmjs\",\n },\n typescript: {\n q: \"TypeScript decorator?\",\n nodecorator: \"No decorator\",\n decorator: \"Decorator\",\n metadata: \"Decorator with emitDecoratorMetadata\",\n },\n builder: {\n q: \"Builder?\",\n rspack: \"Rspack\",\n },\n lint: {\n q: \"Lint?\",\n eslint: \"ESLint\",\n },\n test: {\n q: \"Test framework?\",\n jest: \"Jest\",\n },\n git: {\n q: \"Git?\",\n github: \"GitHub\",\n },\n cicd: {\n q: \"CI/CD?\",\n ghactions: \"GitHub Actions\",\n },\n deploy: {\n q: \"Cloud for deployment?\",\n render: \"Render.com\",\n },\n docker: {\n q: \"Docker for deployment?\",\n docker: \"docker.io\",\n },\n orm: {\n q: \"ORM?\",\n prisma: \"Prisma\",\n },\n optional: {\n q: \"Accept optional ones with defaults, or configure them one by one, or choose none of them?\",\n default:\n \"Accept defaults (ESLint, Jest, GitHub, GitHub Actions, Render.com, Docker, and Prisma if applicable)\",\n manual: \"Configure manually\",\n },\n opCanceled: \"Operation cancelled.\",\n pmUnsupported: \"The tool can only support npm or pnpm for now.\",\n pnpmForMono: \"The tool can only support pnpm monorepo for now.\",\n} as const;\n\nexport const optional = {\n option: {\n default: \"default\",\n manual: \"manual\",\n },\n default: {\n lint: option.optional.lint.eslint,\n test: option.optional.test.jest,\n git: option.optional.git.github,\n cicd: option.optional.cicd.ghactions,\n deploy: option.optional.deploy.render,\n docker: option.optional.docker.docker,\n orm: option.optional.orm.prisma,\n },\n} as const;\n\nconst none = {\n value: undefined,\n label: \"None\",\n} as const;\n\nexport const prompt = {\n ...(Object.fromEntries(\n (Object.entries(flatOpt) as [keyof FlatOpt, FlatOpt[keyof FlatOpt]][])\n .filter(\n ([k, v]) =>\n typeof v === \"object\" &&\n (Object.keys(v).length > 1 || k in option.optional),\n )\n .map(([k, v]) => [\n k,\n {\n disable: false,\n selection: {\n message: message[k].q,\n options: [\n ...Object.values(v).map((e) => ({\n value: e,\n label: (message[k] as any)[e],\n })),\n ...(!(k in option.optional) ? [] : [none]),\n ],\n },\n },\n ]),\n ) as {\n [K in keyof FlatOpt]?: {\n disable: boolean;\n selection: {\n message: string;\n options: {\n value: FlatOpt[K][keyof FlatOpt[K]];\n label: string;\n }[];\n };\n };\n }),\n name: {\n message: message.name.q,\n initialValue: message.name.initial,\n validate: (value?: string) => (value ? undefined : message.name.validate),\n },\n monoBackend: {\n message: message.backend.q,\n options: [\n ...Object.values(option.backend).map((e) => ({\n value: e,\n label: message.backend[e],\n })),\n none,\n ],\n },\n monoFrontend: {\n message: message.frontend.q,\n options: [\n ...Object.values(option.frontend).map((e) => ({\n value: e,\n label: message.frontend[e],\n })),\n none,\n ],\n },\n monoMobile: {\n message: message.mobile.q,\n options: [\n ...Object.values(option.mobile).map((e) => ({\n value: e,\n label: message.mobile[e],\n })),\n none,\n ],\n },\n optional: {\n message: message.optional.q,\n initialValue: optional.option.default,\n options: [\n {\n value: optional.option.default,\n label: message.optional.default,\n },\n {\n value: optional.option.manual,\n label: message.optional.manual,\n },\n none,\n ],\n },\n};\n\nexport const template = {\n url: \"https://raw.githubusercontent.com/bradhezh/prj-template/master\",\n package: {\n node: \"package-node.json\",\n express: \"package-express.json\",\n nest: \"package-nest.json\",\n monorepo: \"package-mono.json\",\n share: \"package-share.json\",\n lib: \"package-lib.json\",\n cli: \"package-cli.json\",\n },\n} as const;\n","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","__webpack_require__.rv = () => (\"1.6.8\")","__webpack_require__.ruid = \"bundler=rspack@1.6.8\";","import p from \"@clack/prompts\";\nimport { execSync } from \"child_process\";\n\nimport { prompt, option, message, optional, Conf, FlatOpt } from \"@/conf\";\n\nexport const confFromUser = async () => {\n const env = detectEvn();\n const conf: Conf = await init(env);\n await confType(conf);\n await confCompulsory(conf);\n await confOptional(conf);\n return conf;\n};\n\nconst detectEvn = () => {\n let npm: Conf[\"npm\"];\n if (process.env.npm_config_user_agent?.includes(\"pnpm\")) {\n npm = \"pnpm\";\n } else if (process.env.npm_config_user_agent?.includes(\"npm\")) {\n npm = \"npm\";\n } else {\n throw new Error(message.pmUnsupported);\n }\n let volta: boolean;\n try {\n execSync(\"volta -v\", { stdio: \"ignore\" });\n volta = true;\n } catch {\n volta = false;\n }\n return { volta, npm };\n};\n\nconst init = async (env: Pick<Conf, \"volta\" | \"npm\">) => {\n const answer = await p.group(\n {\n name: () => p.text(prompt.name),\n type: () => p.select(prompt.type!.selection),\n },\n { onCancel },\n );\n return {\n ...answer,\n ...env,\n compulsory: Object.fromEntries(\n Object.entries(option.compulsory).map(([k, v]) => [\n k,\n Object.values(v)[0],\n ]),\n ) as Conf[\"compulsory\"],\n };\n};\n\nconst confType = async (conf: Conf) => {\n if (conf.type === option.type.monorepo) {\n if (conf.npm !== \"pnpm\") {\n throw new Error(message.pnpmForMono);\n }\n const answer = await p.group(\n {\n backend: () => p.select(prompt.monoBackend),\n frontend: () => p.select(prompt.monoFrontend),\n mobile: () => p.select(prompt.monoMobile),\n },\n { onCancel },\n );\n conf.backend = answer.backend;\n conf.frontend = answer.frontend;\n conf.mobile = answer.mobile;\n } else if (conf.type in option) {\n const type = conf.type as keyof FlatOpt;\n (conf as any)[type] = Object.values(option[type as keyof typeof option])[0];\n if (type in prompt) {\n const answer = await p.group(\n { selection: () => p.select(prompt[type]!.selection) },\n { onCancel },\n );\n (conf as any)[type] = answer.selection;\n }\n }\n\n if (conf.backend === option.backend.nest) {\n conf.compulsory.typescript = option.compulsory.typescript.metadata;\n prompt.typescript!.disable = true;\n }\n if (\n conf.type === option.type.frontend ||\n conf.type === option.type.mobile ||\n (conf.type === option.type.monorepo && !conf.backend)\n ) {\n void (prompt.typescript && (prompt.typescript.disable = true));\n void (prompt.builder && (prompt.builder.disable = true));\n prompt.lint!.disable = true;\n prompt.test!.disable = true;\n prompt.deploy!.disable = true;\n prompt.docker!.disable = true;\n }\n};\n\nconst confCompulsory = async (conf: Conf) => {\n for (const key in option.compulsory) {\n const k = key as keyof FlatOpt;\n if (k in prompt && !prompt[k]!.disable) {\n const answer = await p.group(\n { selection: () => p.select(prompt[k]!.selection) },\n { onCancel },\n );\n (conf.compulsory as any)[k] = answer.selection;\n }\n }\n};\n\nconst confOptional = async (conf: Conf) => {\n const optionalAnswer = await p.group(\n { selection: () => p.select(prompt.optional) },\n { onCancel },\n );\n if (optionalAnswer.selection === optional.option.default) {\n if (!conf.optional) {\n conf.optional = {};\n }\n for (const key in optional.default) {\n const k = key as keyof typeof optional.default;\n if (!conf.optional[k]) {\n (conf.optional as any)[k] = optional.default[k];\n }\n }\n return;\n }\n if (optionalAnswer.selection === optional.option.manual) {\n for (const key in option.optional) {\n const k = key as keyof FlatOpt;\n if (!prompt[k]!.disable) {\n const answer = await p.group(\n { selection: () => p.select(prompt[k]!.selection) },\n { onCancel },\n );\n if (!answer.selection) {\n if (k === \"git\") {\n prompt.cicd!.disable = true;\n prompt.deploy!.disable = true;\n prompt.docker!.disable = true;\n }\n if (k === \"cicd\") {\n prompt.deploy!.disable = true;\n prompt.docker!.disable = true;\n }\n continue;\n }\n if (!conf.optional) {\n conf.optional = {};\n }\n (conf.optional as any)[k] = answer.selection;\n }\n }\n }\n};\n\nconst onCancel = () => {\n p.cancel(message.opCanceled);\n process.exit(0);\n};\n","import { execSync } from \"child_process\";\nimport fs from \"node:fs\";\nimport axios from \"axios\";\nimport Yaml from \"yaml\";\n\nimport { Conf, option, template } from \"@/conf\";\n\nexport const createDir = (conf: Conf) => {\n if (\n conf.type === option.type.node ||\n conf.type === option.type.lib ||\n conf.type === option.type.cli ||\n conf.type === option.type.backend\n ) {\n fs.mkdirSync(\"src\");\n return;\n }\n\n if (conf.type === option.type.monorepo) {\n if (conf.backend) {\n fs.mkdirSync(\"backend/src\", { recursive: true });\n }\n if (\n (conf.backend && conf.frontend) ||\n (conf.backend && conf.mobile) ||\n (conf.frontend && conf.mobile)\n ) {\n fs.mkdirSync(\"share/src\", { recursive: true });\n }\n }\n if (conf.frontend === option.frontend.react) {\n console.log(\"create-vite ...\");\n execSync(\n `${conf.npm} create vite ${conf.type !== option.type.monorepo ? \".\" : \"frontend\"} --template react-ts`,\n { stdio: \"inherit\" },\n );\n } else if (conf.frontend === option.frontend.next) {\n console.log(\"create-next-app ...\");\n execSync(\n `${conf.npm} create next-app ${conf.type !== option.type.monorepo ? \".\" : \"frontend\"} --ts --no-react-compiler --no-src-dir -app --api --eslint --tailwind --skip-install --disable-git`,\n { stdio: \"inherit\" },\n );\n }\n if (conf.mobile === option.mobile.expo) {\n console.log(\"create-expo-app ...\");\n const dir = conf.type !== option.type.monorepo ? \".\" : \"mobile\";\n execSync(`${conf.npm} create expo-app ${dir} --no-install`, {\n stdio: \"inherit\",\n });\n fs.rmSync(`${dir}/.git`, { recursive: true, force: true });\n }\n};\n\nexport const createPkg = async (conf: Conf) => {\n let url: string | undefined;\n let file = \"package.json\";\n if (\n conf.type === option.type.node ||\n conf.type === option.type.lib ||\n conf.type === option.type.cli\n ) {\n url = `${template.url}/${template.package[conf.type]}`;\n }\n if (conf.backend) {\n url = `${template.url}/${template.package[conf.backend]}`;\n if (conf.type === option.type.monorepo) {\n file = \"backend/package.json\";\n }\n }\n if (url) {\n const response = await axios.get(`${url}`, { responseType: \"text\" });\n fs.writeFileSync(file, response.data);\n }\n\n if (conf.type !== option.type.monorepo) {\n execSync(`${conf.npm} pkg set name=\"${conf.name}\"`, { stdio: \"ignore\" });\n setPkgVer(conf);\n if (conf.type === option.type.lib || conf.type === option.type.cli) {\n setPkgBin(conf);\n }\n return;\n }\n\n await createPkgMono(conf);\n};\n\nconst createPkgMono = async (conf: Conf) => {\n const response = await axios.get(\n `${template.url}/${template.package.monorepo}`,\n { responseType: \"text\" },\n );\n fs.writeFileSync(\"package.json\", response.data);\n if (fs.existsSync(\"shared\")) {\n const response = await axios.get(\n `${template.url}/${template.package.share}`,\n {\n responseType: \"text\",\n },\n );\n fs.writeFileSync(\"shared/package.json\", response.data);\n }\n execSync(`pnpm pkg set name=\"${conf.name}\"`, { stdio: \"ignore\" });\n setPkgVerMono(conf);\n createWorkspace(conf);\n};\n\nconst setPkgVer = (conf: Conf, cwd?: string) => {\n if (conf.volta) {\n const node = execSync(\"node -v\").toString().trim();\n execSync(\n `${conf.npm} pkg set \"volta.node\"=\"${!node.startsWith(\"v\") ? node : node.slice(1)}\"`,\n {\n stdio: \"ignore\",\n cwd,\n },\n );\n const npm = execSync(`${conf.npm} -v`).toString().trim();\n execSync(\n `${conf.npm} pkg set \"volta.${conf.npm}\"=\"${!npm.startsWith(\"v\") ? npm : npm.slice(1)}\"`,\n {\n stdio: \"ignore\",\n cwd,\n },\n );\n }\n if (conf.npm === \"pnpm\") {\n const pnpm = execSync(\"pnpm -v\").toString().trim();\n execSync(\n `pnpm pkg set packageManager=\"pnpm@${!pnpm.startsWith(\"v\") ? pnpm : pnpm.slice(1)}\"`,\n {\n stdio: \"ignore\",\n cwd,\n },\n );\n }\n};\n\nconst setPkgVerMono = (conf: Conf) => {\n setPkgVer(conf);\n if (fs.existsSync(\"backend\")) {\n setPkgVer(conf, \"backend\");\n }\n if (fs.existsSync(\"frontend\")) {\n setPkgVer(conf, \"frontend\");\n }\n if (fs.existsSync(\"mobile\")) {\n setPkgVer(conf, \"mobile\");\n }\n if (fs.existsSync(\"shared\")) {\n setPkgVer(conf, \"shared\");\n }\n};\n\nconst setPkgBin = (conf: Conf) => {\n const bin = !conf.name.includes(\"/\") ? conf.name : conf.name.split(\"/\").pop();\n execSync(`${conf.npm} pkg set \"bin.${bin}\"=\"dist/index.js\"`, {\n stdio: \"ignore\",\n });\n};\n\nconst createWorkspace = (conf: Conf) => {\n const workspace: {\n packages: string[];\n onlyBuiltDependencies: string[];\n } = {\n packages: [],\n onlyBuiltDependencies: [],\n };\n\n if (fs.existsSync(\"backend\")) {\n workspace.packages.push(\"backend\");\n }\n if (fs.existsSync(\"frontend\")) {\n workspace.packages.push(\"frontend\");\n }\n if (fs.existsSync(\"mobile\")) {\n workspace.packages.push(\"mobile\");\n }\n if (fs.existsSync(\"shared\")) {\n workspace.packages.push(\"shared\");\n }\n if (conf.backend === option.backend.nest) {\n workspace.onlyBuiltDependencies.push(\"@nestjs/core\");\n }\n\n fs.writeFileSync(\"pnpm-workspace.yaml\", Yaml.stringify(workspace));\n};\n","import { confFromUser } from \"@/prompt\";\nimport { createDir, createPkg } from \"@/create\";\n\n(async () => {\n const conf = await confFromUser();\n createDir(conf);\n await createPkg(conf);\n})();\n"],"names":["compulsory","optional","e","Object","option","flatOpt","rest","message","none","undefined","prompt","k","v","_type_of","value","detectEvn","_process_env_npm_config_user_agent","_process_env_npm_config_user_agent1","npm","volta","Error","execSync","onCancel","p","process","createDir","conf","fs","console","dir","setPkgVer","cwd","node","pnpm","setPkgVerMono","setPkgBin","bin","createWorkspace","workspace","Yaml","env","answer","type","answer1","key","optionalAnswer","key1","url","file","response","template","axios","response1"],"mappings":"uBA4DoBA,EAAYC,E,qIC3DhC,EAAoB,CAAC,CAAG,AAAC,IACxB,IAAI,EAAS,GAAU,EAAO,UAAU,CACvC,IAAO,EAAO,OAAU,CACxB,IAAO,EAER,OADA,EAAoB,CAAC,CAAC,EAAQ,CAAE,EAAG,CAAO,GACnC,CACR,ECPA,EAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACL,EAAoB,CAAC,CAAC,EAAY,IAAQ,CAAC,EAAoB,CAAC,CAACA,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNA,EAAoB,CAAC,CAAG,CAAC,EAAK,IAAUC,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCAlF,EAAoB,EAAE,CAAG,IAAO,QCAhC,EAAoB,IAAI,CAAG,uB,uxDLApB,IAAMC,EAAS,CACpB,KAAM,CACJ,KAAM,OACN,QAAS,UACT,SAAU,WACV,OAAQ,SACR,SAAU,WACV,IAAK,MACL,IAAK,KACP,EACA,QAAS,CACP,QAAS,UACT,KAAM,MACR,EACA,SAAU,CACR,MAAO,QACP,KAAM,MACR,EACA,OAAQ,CAAE,KAAM,MAAO,EACvB,IAAK,CAAE,MAAO,OAAQ,EACtB,IAAK,CAAE,MAAO,OAAQ,EACtB,WAAY,CACV,WAAY,CACV,YAAa,cACb,UAAW,YACX,SAAU,UACZ,EACA,QAAS,CAAE,OAAQ,QAAS,CAC9B,EACA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EG,E,iDANS,O,EAAMD,IAAAA,GAAS,CAC7B,GAAkBD,MAAAA,GAAH,KAA6B,OAA1BA,EAAAA,QAAyB,EAC5C,CAAE,aAAc,MAAO,G,WAFnBD,EAAW,SAIjBtB,IAAAA,aAAgB,CAAC,eAAgBsB,EAAS,IAAI,E,CAC1CtB,IAAAA,UAAa,CAAC,UAAdA,MAAAA,C,KACe,O,EAAMwB,IAAAA,GAAS,CAC7B,GAAkBD,MAAAA,GAAH,KAA0B,OAAvBA,EAAAA,KAAsB,EACzC,CACE,aAAc,MAChB,G,QAJIE,EAAW,SAMjBzB,IAAAA,aAAgB,CAAC,sBAAuByB,EAAS,IAAI,E,uBAEvD/B,AAAAA,GAAAA,EAAAA,QAAAA,AAAAA,EAAU,sBAA+B,OAAVK,EAAK,IAAI,CAAC,KAAI,CAAE,MAAO,QAAS,GAC/DQ,EAAcR,GACdW,EAAgBX,G,MAClB,M,eArBE,S,MACF,K,eC9EE,S,MACF,E"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@bradhezh/create-prj",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
+ "repository": "github:bradhezh/create-prj",
4
5
  "description": "",
5
6
  "main": "dist/index.js",
6
7
  "files": [
@@ -17,15 +18,30 @@
17
18
  "pnpm": "10.21.0"
18
19
  },
19
20
  "devDependencies": {
21
+ "@eslint/js": "^9.39.2",
20
22
  "@rspack/cli": "^1.6.8",
21
23
  "@rspack/core": "^1.6.8",
24
+ "@swc/core": "^1.15.7",
25
+ "@swc/jest": "^0.2.39",
26
+ "@types/jest": "^30.0.0",
22
27
  "@types/webpack-node-externals": "^3.0.4",
28
+ "eslint": "^9.39.2",
29
+ "globals": "^16.5.0",
30
+ "jest": "^30.2.0",
23
31
  "run-script-webpack-plugin": "^0.2.3",
24
32
  "ts-checker-rspack-plugin": "^1.2.3",
33
+ "typescript-eslint": "^8.50.0",
25
34
  "webpack-node-externals": "^3.0.0"
26
35
  },
36
+ "dependencies": {
37
+ "@clack/prompts": "^0.11.0",
38
+ "axios": "^1.13.2",
39
+ "yaml": "^2.8.2"
40
+ },
27
41
  "scripts": {
28
42
  "build": "rspack build",
29
- "dev": "rspack dev"
43
+ "dev": "rspack dev",
44
+ "test": "jest --passWithNoTests",
45
+ "lint": "eslint ."
30
46
  }
31
47
  }