create-tamagui 1.116.0 → 1.116.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -26191,7 +26191,7 @@ var globby2 = Object.assign(function(patterns, options) {
26191
26191
  // package.json
26192
26192
  var package_default = {
26193
26193
  name: "create-tamagui",
26194
- version: "1.115.5",
26194
+ version: "1.116.1",
26195
26195
  bin: "./run.js",
26196
26196
  main: "dist/index.cjs",
26197
26197
  files: [
@@ -26215,7 +26215,7 @@ var package_default = {
26215
26215
  devDependencies: {
26216
26216
  "@expo/package-manager": "^1.1.2",
26217
26217
  "@playwright/test": "^1.45.2",
26218
- "@tamagui/build": "1.115.5",
26218
+ "@tamagui/build": "1.116.1",
26219
26219
  "@types/async-retry": "1.4.2",
26220
26220
  "@types/cross-spawn": "^6.0.2",
26221
26221
  "@types/node": "^22.1.0",
@@ -31183,34 +31183,37 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31183
31183
  }
31184
31184
  let branch = template.repo.branch;
31185
31185
  await (0, import_fs_extra.ensureDir)(tamaguiDir), cd(tamaguiDir);
31186
- let isInSubDir = template.repo.dir.length > 0;
31187
- if (await (0, import_fs_extra.pathExists)(targetGitDir))
31188
- await (0, import_fs_extra.pathExists)((0, import_node_path4.join)(targetGitDir, ".git")) || (console.error(`Corrupt Tamagui directory, please delete ${targetGitDir} and re-run`), process.exit(1));
31186
+ let isInSubDir = template.repo.dir.length > 0, sourceGitRepo = template.repo.url, sourceGitRepoSshFallback = template.repo.sshFallback;
31187
+ if (isRetry)
31188
+ await (0, import_fs_extra.pathExists)(targetGitDir) || exec(`git clone --branch ${branch} ${sourceGitRepo} "${targetGitDir}"`);
31189
31189
  else {
31190
- console.info("Cloning tamagui base directory"), console.info();
31191
- let sourceGitRepo = template.repo.url, sourceGitRepoSshFallback = template.repo.sshFallback, cmd = `git clone --branch ${branch} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
31192
- try {
31190
+ if (await (0, import_fs_extra.pathExists)(targetGitDir))
31191
+ await (0, import_fs_extra.pathExists)((0, import_node_path4.join)(targetGitDir, ".git")) || (console.error(
31192
+ `Corrupt Tamagui directory, please delete ${targetGitDir} and re-run`
31193
+ ), process.exit(1));
31194
+ else {
31195
+ console.info("Cloning tamagui base directory"), console.info();
31196
+ let cmd = `git clone --branch ${branch} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
31193
31197
  try {
31194
- console.info(`$ ${cmd}`), console.info(), exec(cmd);
31198
+ try {
31199
+ console.info(`$ ${cmd}`), console.info(), exec(cmd);
31200
+ } catch (error) {
31201
+ if (cmd.includes("https://")) {
31202
+ console.info("https failed - trying with ssh now...");
31203
+ let sshCmd = cmd.replace(sourceGitRepo, sourceGitRepoSshFallback);
31204
+ console.info(`$ ${sshCmd}`), console.info(), exec(sshCmd);
31205
+ } else
31206
+ throw error;
31207
+ }
31195
31208
  } catch (error) {
31196
- if (cmd.includes("https://")) {
31197
- console.info("https failed - trying with ssh now...");
31198
- let sshCmd = cmd.replace(sourceGitRepo, sourceGitRepoSshFallback);
31199
- console.info(`$ ${sshCmd}`), console.info(), exec(sshCmd);
31200
- } else
31201
- throw error;
31209
+ throw error instanceof Error && template.value === "takeout-starter" && error?.stderr?.includes("Repository not found") && (console.info(
31210
+ import_chalk5.default.yellow(
31211
+ "You don't have access to this starter. Check \u{1F961} Tamagui Takeout (https://tamagui.dev/takeout) for more info."
31212
+ )
31213
+ ), open("https://tamagui.dev/takeout"), process.exit(0)), error;
31202
31214
  }
31203
- } catch (error) {
31204
- throw error instanceof Error && template.value === "takeout-starter" && error?.stderr?.includes("Repository not found") && (console.info(
31205
- import_chalk5.default.yellow(
31206
- "You don't have access to this starter. Check \u{1F961} Tamagui Takeout (https://tamagui.dev/takeout) for more info."
31207
- )
31208
- ), open("https://tamagui.dev/takeout"), process.exit(0)), error;
31209
31215
  }
31210
- }
31211
- if (isInSubDir) {
31212
- let cmd = `git sparse-checkout set ${template.repo.dir[0] ?? "."}`;
31213
- exec(cmd, { cwd: targetGitDir }), console.info();
31216
+ isInSubDir && (exec("git sparse-checkout set code/starters", { cwd: targetGitDir }), console.info());
31214
31217
  }
31215
31218
  try {
31216
31219
  let remoteName = getDefaultRemoteName();
@@ -31225,8 +31228,9 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31225
31228
  );
31226
31229
  } catch (err) {
31227
31230
  console.info(
31228
- `Error updating: ${err.message} ${isRetry ? `failing.
31229
- ${err.stack}` : "trying from fresh."}`
31231
+ `Error updating: ${err.message} ${err.stack} ${isRetry ? "" : `
31232
+
31233
+ retrying...`}`
31230
31234
  ), isRetry && (console.info(
31231
31235
  "Please file an issue: https://github.com/tamagui/tamagui/issues/new?assignees=&labels=&template=bug_report.md&title="
31232
31236
  ), process.exit(1)), await (0, import_fs_extra.remove)(targetGitDir), await setupTamaguiDotDir(template, !0);
@@ -31753,4 +31757,4 @@ imurmurhash/imurmurhash.js:
31753
31757
  * @see http://sites.google.com/site/murmurhash/
31754
31758
  *)
31755
31759
  */
31756
- //# sourceMappingURL=index.cjs.map
31760
+ //# sourceMappingURL=index.js.map