create-rock 0.11.11 → 0.11.12
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/src/bin.js +1 -1
- package/package.json +3 -3
package/dist/src/bin.js
CHANGED
|
@@ -132,7 +132,7 @@ Please update the "Bundle React Native code and images" build phase manually wit
|
|
|
132
132
|
Available platforms:
|
|
133
133
|
${ol.map(e=>e.name).join(", ")}
|
|
134
134
|
`);if(t.version)return void console.log(`${ua()}`);console.log(""),((e="")=>{process.stdout.write(`${q.gray(eP)} ${e}
|
|
135
|
-
`)})(`Welcome to ${J().bold(ue("Rock"))}!`);let h=tU(t.dir||process.cwd());if(function(t){var i,r;let n=u.join(t,"package.json");if(!e.existsSync(n))return!1;let s=JSON.parse(e.readFileSync(n,"utf8"));return(null==(i=s.dependencies)?void 0:i["@rnef/cli"])!==void 0||(null==(r=s.devDependencies)?void 0:r["@rnef/cli"])!==void 0}(h)){await up(h),await to({message:"Detected existing RNEF project. Would you like to migrate it to Rock?",confirmLabel:"Yes",cancelLabel:"No"})||tc(),await oC(h);return}if(function(t){var i,r;let n=u.join(t,"package.json");if(!e.existsSync(n))return!1;let s=JSON.parse(e.readFileSync(n,"utf8"));return(null==(i=s.dependencies)?void 0:i["react-native"])!==void 0||(null==(r=s.devDependencies)?void 0:r["react-native"])!==void 0}(h)){await up(h),await to({message:"Detected existing React Native project. Would you like to migrate it to Rock?",confirmLabel:"Yes",cancelLabel:"No"})||tc(),await ob(h);return}let c=(t.dir||t.name)??await ul();ox(c)&&(c=await ul(c));let{targetDir:D}=function(e){let t=e.trim().replace(/\/+$/g,"");return{packageName:t.startsWith("@")?t:u.basename(t),targetDir:t}}(c),p=tU(D);!t.override&&e.existsSync(p)&&!function(t){let i=e.readdirSync(t);return 0===i.length||1===i.length&&".git"===i[0]}(p)&&(await to({message:`"${p}" is not empty, please choose:`,confirmLabel:"Continue and override files",cancelLabel:"Cancel operation"})||tc()),op(p),e.mkdirSync(p,{recursive:!0});let m=t.template?oc(oo,t.template):await uh(oo),g=t.platforms?t.platforms.map(e=>oc(ol,e)):await function(e){if(0===e.length)throw new e9("No platforms found");let t=e.filter(e=>"android"===e.name||"ios"===e.name);return tu({message:`What platforms do you want to start with? ${J().dim("(Press <space> to select, <enter> to skip)")}:`,initialValues:t,options:e.map(e=>({value:e,label:e.displayName}))})}(ol),E=t.bundler?oc(oa,t.bundler):await function(e){if(0===e.length)throw new e9("No bundlers found");return ts({message:"Which bundler do you want to use?",initialValues:[e[0]],options:e.map(e=>({value:e,label:e.displayName}))})}(oa),b=t.plugins?t.plugins.map(e=>oc(ou,e)):await (0===ou.length||!e4()?Promise.resolve(null):tu({message:`
|
|
135
|
+
`)})(`Welcome to ${J().bold(ue("Rock"))}!`);let h=tU(t.dir||process.cwd());if(function(t){var i,r;let n=u.join(t,"package.json");if(!e.existsSync(n))return!1;let s=JSON.parse(e.readFileSync(n,"utf8"));return(null==(i=s.dependencies)?void 0:i["@rnef/cli"])!==void 0||(null==(r=s.devDependencies)?void 0:r["@rnef/cli"])!==void 0}(h)){await up(h),await to({message:"Detected existing RNEF project. Would you like to migrate it to Rock?",confirmLabel:"Yes",cancelLabel:"No"})||tc(),await oC(h);return}if(function(t){var i,r;let n=u.join(t,"package.json");if(!e.existsSync(n))return!1;let s=JSON.parse(e.readFileSync(n,"utf8"));return(null==(i=s.dependencies)?void 0:i["react-native"])!==void 0||(null==(r=s.devDependencies)?void 0:r["react-native"])!==void 0}(h)){await up(h),await to({message:"Detected existing React Native project. Would you like to migrate it to Rock?",confirmLabel:"Yes",cancelLabel:"No"})||tc(),await ob(h);return}let c=(t.dir||t.name)??await ul();ox(c)&&(c=await ul(c));let{targetDir:D}=function(e){let t=e.trim().replace(/\/+$/g,"");return{packageName:t.startsWith("@")?t:u.basename(t),targetDir:t}}(c),p=tU(D);!t.override&&e.existsSync(p)&&!function(t){let i=e.readdirSync(t);return 0===i.length||1===i.length&&".git"===i[0]}(p)&&(await to({message:`"${p}" is not empty, please choose:`,confirmLabel:"Continue and override files",cancelLabel:"Cancel operation"})||tc()),op(p),e.mkdirSync(p,{recursive:!0});let m=t.template?oc(oo,t.template):await uh(oo),g=t.platforms?t.platforms.map(e=>oc(ol,e)):await function(e){if(0===e.length)throw new e9("No platforms found");let t=e.filter(e=>"android"===e.name||"ios"===e.name);return tu({message:`What platforms do you want to start with? ${J().dim("(Press <space> to select, <enter> to skip)")}:`,initialValues:t,options:e.map(e=>({value:e,label:e.displayName}))})}(ol),E=t.bundler?oc(oa,t.bundler):await function(e){if(0===e.length)throw new e9("No bundlers found");return ts({message:"Which bundler do you want to use?",initialValues:[e[0]],options:e.map(e=>({value:e,label:e.displayName}))})}(oa),b=t.plugins?t.plugins.map(e=>oc(ou,e)):await (0===ou.length||!e4()?Promise.resolve(null):tu({message:`Which plugins do you want to use? ${J().dim("(Press <space> to select, <enter> to skip)")}:`,options:ou.map(e=>({value:e,label:e.displayName,hint:e.hint})),required:!1})),y=void 0!==t.remoteCacheProvider||!1===t.remoteCacheProvider?null:await ts({message:"What do you want to use as cache for your remote builds?",initialValue:"github-actions",options:[{value:"github-actions",label:"GitHub Actions",hint:"The easiest way to start if you store your code on GitHub"},{value:"s3",label:"S3",hint:"Work with any S3-compatible storage, including AWS S3 and Cloudflare R2"},{value:null,label:"None",hint:"Local cache only which isn't shared across team members or CI/CD environments"}]}),F=y?await function(e){let t="Ensure the below environment variables are set";switch(e){case"github-actions":return tr(`GITHUB_TOKEN Your GitHub personal access token (PAT)
|
|
136
136
|
|
|
137
137
|
\u{1F4A1} Set this in your ${J().bold(".env")} file or pass it as an argument to ${J().bold("run:*")} commands.`,t),ta({owner:()=>tn({message:"GitHub repository owner"}),repository:()=>tn({message:"GitHub repository name"})});case"s3":return tr(`AWS_ACCESS_KEY_ID Your AWS access key ID
|
|
138
138
|
AWS_SECRET_ACCESS_KEY Your AWS secret access key
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rock",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.12",
|
|
4
4
|
"description": "Scaffolding tool for creating new React Native applications with Rock",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"create-rock": "./dist/src/bin.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@rock-js/test-helpers": "^0.11.
|
|
26
|
-
"@rock-js/tools": "^0.11.
|
|
25
|
+
"@rock-js/test-helpers": "^0.11.12",
|
|
26
|
+
"@rock-js/tools": "^0.11.12",
|
|
27
27
|
"@rslib/core": "^0.13.0",
|
|
28
28
|
"@types/gradient-string": "^1.1.6",
|
|
29
29
|
"@types/minimist": "^1.2.5",
|