@radhya/mach 1.4.22 → 1.4.24

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -732,7 +732,7 @@ ${Te.dim("Note: Links are valid for 7 days.")}`)}else O&&He.warn("Simulator buil
732
732
  `)}if(await H("read_package"),e.nodeVersion){let k=process.env.NVM_DIR||P.join(_e.homedir(),".nvm"),U=P.join(k,"versions","node"),q;if(E.existsSync(U)){let R=E.readdirSync(U).sort().reverse(),Z=e.nodeVersion.startsWith("v")?e.nodeVersion:`v${e.nodeVersion}`,V=R.find(Y=>Y===Z||Y.startsWith(Z+".")||Y.startsWith(`v${e.nodeVersion}.`));V&&(q=P.join(U,V,"bin"))}if(q&&E.existsSync(q)){let R=process.env.PATH||"";process.env.PATH=`${q}:${R}`,await x(`[NODE] Switched to Node ${e.nodeVersion} \u2014 using ${q}
733
733
  `),A.info(S.green(`\u2713 Node switched to ${e.nodeVersion} (${q})`))}else await x(`[NODE] Warning: Node ${e.nodeVersion} not found in nvm. Run: nvm install ${e.nodeVersion} on the build machine.
734
734
  `),A.warn(S.yellow(`Node ${e.nodeVersion} not found in nvm \u2014 using system default`))}await H("deps"),r.start("Checking dependencies...");let w=no(g),I=to(process.cwd()),b=E.existsSync("node_modules"),O=E.existsSync("yarn.lock"),G=E.existsSync("bun.lockb");b&&w.node&&w.node!==I&&(r.stop("Dependency fingerprint changed \u2014 clearing node_modules for clean install..."),await x(`[CACHE] package.json/lockfile changed \u2014 wiping node_modules
735
- `),E.rmSync(P.join(process.cwd(),"node_modules"),{recursive:!0,force:!0}),b=!1);let M="npm",T=["install","--prefer-offline"];O?(M="yarn",T=["install","--prefer-offline"]):G&&(M="bun",T=["install"]),b?r.stop("Cached node_modules found. Syncing dependencies..."):r.stop("No cached dependencies. Running fresh install..."),A.info(S.dim(`Running ${M} ${T.join(" ")}...`)),await X(M,T,process.cwd(),t),w.node=I,bi(g,w),e.preBuild&&(A.info(S.blue("Running pre-install hook...")),A.info(S.dim(`> ${e.preBuild}`)),await H("prebuild"),await X("bash",[e.preBuild],process.cwd(),t));let L=JSON.parse(E.readFileSync("package.json","utf-8")),Q=L.dependencies?.expo||L.devDependencies?.expo,K=e.iosBundleIdentifier||"",j=e.name||"";if(Q){r.start(`Enforcing ${f.name} configuration...`);let k=P.join(process.cwd(),"app.json"),U=null;if(E.existsSync(k)){U=E.readFileSync(k,"utf-8");let R=JSON.parse(U);R.expo=R.expo||{},j||(j=R.expo.name||""),c==="ios"&&!K&&(K=R.expo?.ios?.bundleIdentifier||""),e.name&&(R.expo.name=e.name),e.scheme&&(R.expo.scheme=e.scheme),c==="ios"&&e.iosBundleIdentifier?(R.expo.ios=R.expo.ios||{},R.expo.ios.bundleIdentifier=e.iosBundleIdentifier):c==="android"&&e.androidPackage&&(R.expo.android=R.expo.android||{},R.expo.android.package=e.androidPackage),E.writeFileSync(k,JSON.stringify(R,null,2))}let q=["exec","--","expo","prebuild","--platform",c,"--no-install"];try{if(await H("prebuild"),await X("npm",q,process.cwd(),t),c==="ios"&&E.existsSync("ios")){await H("pods"),A.info(S.blue("Running pod install..."));try{let R=P.resolve("ios"),Z=P.join(R,"Podfile");if(!E.existsSync(Z))throw new Error("ios/Podfile not found. Skipping pod install.");let V=E.readFileSync(Z,"utf-8"),Y=e.iosDeploymentTarget||"13.4";if(!e.developmentClient&&(A.info(S.blue("\u2139\uFE0F Patching Podfile to EXCLUDE expo-dev-client...")),V.includes("use_expo_modules!")&&!V.includes("exclude:"))){let ae=/use_expo_modules!(\s*)$/m;ae.test(V)?V=V.replace(ae,'use_expo_modules!(exclude: ["expo-dev-client"])$1'):V=V.replace("use_expo_modules!",'use_expo_modules!(exclude: ["expo-dev-client"])')}let oe=`
735
+ `),E.rmSync(P.join(process.cwd(),"node_modules"),{recursive:!0,force:!0}),b=!1);let M="npm",T=["install","--prefer-offline"];O?(M="yarn",T=["install","--prefer-offline"]):G&&(M="bun",T=["install"]),b?r.stop("Cached node_modules found. Syncing dependencies..."):r.stop("No cached dependencies. Running fresh install..."),e.preBuild&&(A.info(S.blue("Running pre-install hook...")),A.info(S.dim(`> ${e.preBuild}`)),await H("prebuild"),await X("bash",[e.preBuild],process.cwd(),t)),A.info(S.dim(`Running ${M} ${T.join(" ")}...`)),await X(M,T,process.cwd(),t),w.node=I,bi(g,w);let L=JSON.parse(E.readFileSync("package.json","utf-8")),Q=L.dependencies?.expo||L.devDependencies?.expo,K=e.iosBundleIdentifier||"",j=e.name||"";if(Q){r.start(`Enforcing ${f.name} configuration...`);let k=P.join(process.cwd(),"app.json"),U=null;if(E.existsSync(k)){U=E.readFileSync(k,"utf-8");let R=JSON.parse(U);R.expo=R.expo||{},j||(j=R.expo.name||""),c==="ios"&&!K&&(K=R.expo?.ios?.bundleIdentifier||""),e.name&&(R.expo.name=e.name),e.scheme&&(R.expo.scheme=e.scheme),c==="ios"&&e.iosBundleIdentifier?(R.expo.ios=R.expo.ios||{},R.expo.ios.bundleIdentifier=e.iosBundleIdentifier):c==="android"&&e.androidPackage&&(R.expo.android=R.expo.android||{},R.expo.android.package=e.androidPackage),E.writeFileSync(k,JSON.stringify(R,null,2))}let q=["exec","--","expo","prebuild","--platform",c,"--no-install"];try{if(await H("prebuild"),await X("npm",q,process.cwd(),t),c==="ios"&&E.existsSync("ios")){await H("pods"),A.info(S.blue("Running pod install..."));try{let R=P.resolve("ios"),Z=P.join(R,"Podfile");if(!E.existsSync(Z))throw new Error("ios/Podfile not found. Skipping pod install.");let V=E.readFileSync(Z,"utf-8"),Y=e.iosDeploymentTarget||"13.4";if(!e.developmentClient&&(A.info(S.blue("\u2139\uFE0F Patching Podfile to EXCLUDE expo-dev-client...")),V.includes("use_expo_modules!")&&!V.includes("exclude:"))){let ae=/use_expo_modules!(\s*)$/m;ae.test(V)?V=V.replace(ae,'use_expo_modules!(exclude: ["expo-dev-client"])$1'):V=V.replace("use_expo_modules!",'use_expo_modules!(exclude: ["expo-dev-client"])')}let oe=`
736
736
  installer.generated_projects.each do |project|
737
737
  project.targets.each do |target|
738
738
  target.build_configurations.each do |config|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radhya/mach",
3
- "version": "1.4.22",
3
+ "version": "1.4.24",
4
4
  "description": "Mach CLI: Cloud Build Orchestrator for React Native & Expo",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",