create-tamagui 1.123.2 → 1.123.3

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.123.1",
26194
+ version: "1.123.2",
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.49.1",
26218
- "@tamagui/build": "1.123.1",
26218
+ "@tamagui/build": "1.123.2",
26219
26219
  "@types/async-retry": "1.4.2",
26220
26220
  "@types/cross-spawn": "^6.0.2",
26221
26221
  "@types/node": "^22.1.0",
@@ -31165,17 +31165,17 @@ var rimraf_ = wrap((path6, opt) => useNative(opt) ? rimrafNative(path6, opt) : r
31165
31165
  rimraf.rimraf = rimraf;
31166
31166
 
31167
31167
  // src/helpers/cloneStarter.ts
31168
- var open = require_opener(), exec = (cmd, options) => (0, import_node_child_process2.execSync)(cmd, {
31168
+ var open = require_opener(), exec = (cmd, options) => (console.info("$ ", cmd), (0, import_node_child_process2.execSync)(cmd, {
31169
31169
  stdio: process.env.DEBUG ? "inherit" : "ignore",
31170
31170
  ...options
31171
- }), tamaguiDir = (0, import_node_path4.join)((0, import_node_os2.homedir)(), ".tamagui-repo-cache"), targetGitDir = "", cloneStarter = async (template, resolvedProjectPath, projectName) => {
31171
+ })), tamaguiDir = (0, import_node_path4.join)((0, import_node_os2.homedir)(), ".tamagui-repo-cache"), targetGitDir = "", cloneStarter = async (template, resolvedProjectPath, projectName) => {
31172
31172
  targetGitDir = (0, import_node_path4.join)(tamaguiDir, "tamagui", template.repo.url.split("/").at(-1)), console.info(), await setupTamaguiDotDir(template);
31173
31173
  let starterDir = (0, import_node_path4.join)(targetGitDir, ...template.repo.dir);
31174
31174
  console.info(), console.info(
31175
31175
  `Copying starter from ${starterDir} into ${import_chalk5.default.blueBright(projectName)}...`
31176
31176
  ), console.info(), await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath), await rimraf(`${resolvedProjectPath}/.git`), console.info(import_chalk5.default.green(`${projectName} created!`)), console.info();
31177
31177
  };
31178
- async function setupTamaguiDotDir(template, isRetry = !1) {
31178
+ async function setupTamaguiDotDir(template) {
31179
31179
  if (console.info(`Setting up ${import_chalk5.default.blueBright(targetGitDir)}...`), process.env.GITHUB_HEAD_REF)
31180
31180
  try {
31181
31181
  await $`cd ${targetGitDir} && git switch -c ${process.env.GITHUB_HEAD_REF}`;
@@ -31184,37 +31184,31 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31184
31184
  let branch = template.repo.branch;
31185
31185
  await (0, import_fs_extra.ensureDir)(tamaguiDir), cd(tamaguiDir);
31186
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}"`);
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));
31189
31189
  else {
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}"`;
31190
+ console.info("Cloning tamagui base directory"), console.info();
31191
+ let cmd = `git clone --branch ${branch} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
31192
+ try {
31197
31193
  try {
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
- }
31194
+ console.info(`$ ${cmd}`), console.info(), exec(cmd);
31208
31195
  } catch (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;
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;
31214
31202
  }
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;
31215
31209
  }
31216
- isInSubDir && (exec("git sparse-checkout set code/starters", { cwd: targetGitDir }), console.info());
31217
31210
  }
31211
+ isInSubDir && (exec("git sparse-checkout set code/starters", { cwd: targetGitDir }), console.info());
31218
31212
  try {
31219
31213
  let remoteName = getDefaultRemoteName();
31220
31214
  if (await (0, import_fs_extra.pathExists)((0, import_node_path4.join)(targetGitDir, ".git"))) {
@@ -31234,13 +31228,9 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31234
31228
  `Warning: ${targetGitDir} is not a git repository. Skipping pull operation.`
31235
31229
  );
31236
31230
  } catch (err) {
31237
- console.info(
31238
- `Error updating: ${err.message} ${err.stack} ${isRetry ? "" : `
31239
-
31240
- retrying...`}`
31241
- ), isRetry && (console.info(
31242
- "Please file an issue: https://github.com/tamagui/tamagui/issues/new?assignees=&labels=&template=bug_report.md&title="
31243
- ), process.exit(1)), await (0, import_fs_extra.remove)(targetGitDir), await setupTamaguiDotDir(template, !0);
31231
+ await (0, import_fs_extra.remove)(targetGitDir), console.info(`Error updating: ${err.message} ${err.stack}`), console.info(
31232
+ "We removed the old template cache, so re-running may fix. If not, please file an issue: https://github.com/tamagui/tamagui/issues/new?assignees=&labels=&template=bug_report.md&title="
31233
+ ), process.exit(1);
31244
31234
  }
31245
31235
  }
31246
31236
  var getDefaultRemoteName = () => {
@@ -31541,7 +31531,7 @@ var templates = [
31541
31531
  url: process.env.TAMAGUI_REPO_SOURCE || "https://github.com/tamagui/tamagui.git",
31542
31532
  sshFallback: "git@github.com:tamagui/tamagui.git",
31543
31533
  dir: ["code", "starters", "expo-router"],
31544
- branch: "master"
31534
+ branch: "main"
31545
31535
  },
31546
31536
  extraSteps: expo_router_default
31547
31537
  },
@@ -31555,7 +31545,7 @@ var templates = [
31555
31545
  url: process.env.TAMAGUI_REPO_SOURCE || "https://github.com/tamagui/tamagui.git",
31556
31546
  sshFallback: "git@github.com:tamagui/tamagui.git",
31557
31547
  dir: ["code", "starters", "simple-web"],
31558
- branch: "master"
31548
+ branch: "main"
31559
31549
  },
31560
31550
  extraSteps: simple_web_default
31561
31551
  },
@@ -31569,7 +31559,7 @@ var templates = [
31569
31559
  url: process.env.TAMAGUI_REPO_SOURCE || "https://github.com/tamagui/tamagui.git",
31570
31560
  sshFallback: "git@github.com:tamagui/tamagui.git",
31571
31561
  dir: ["code", "starters", "remix"],
31572
- branch: "master"
31562
+ branch: "main"
31573
31563
  },
31574
31564
  extraSteps: remix_default
31575
31565
  }
package/dist/index.js 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.123.1",
26194
+ version: "1.123.2",
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.49.1",
26218
- "@tamagui/build": "1.123.1",
26218
+ "@tamagui/build": "1.123.2",
26219
26219
  "@types/async-retry": "1.4.2",
26220
26220
  "@types/cross-spawn": "^6.0.2",
26221
26221
  "@types/node": "^22.1.0",
@@ -31165,17 +31165,17 @@ var rimraf_ = wrap((path6, opt) => useNative(opt) ? rimrafNative(path6, opt) : r
31165
31165
  rimraf.rimraf = rimraf;
31166
31166
 
31167
31167
  // src/helpers/cloneStarter.ts
31168
- var open = require_opener(), exec = (cmd, options) => (0, import_node_child_process2.execSync)(cmd, {
31168
+ var open = require_opener(), exec = (cmd, options) => (console.info("$ ", cmd), (0, import_node_child_process2.execSync)(cmd, {
31169
31169
  stdio: process.env.DEBUG ? "inherit" : "ignore",
31170
31170
  ...options
31171
- }), tamaguiDir = (0, import_node_path4.join)((0, import_node_os2.homedir)(), ".tamagui-repo-cache"), targetGitDir = "", cloneStarter = async (template, resolvedProjectPath, projectName) => {
31171
+ })), tamaguiDir = (0, import_node_path4.join)((0, import_node_os2.homedir)(), ".tamagui-repo-cache"), targetGitDir = "", cloneStarter = async (template, resolvedProjectPath, projectName) => {
31172
31172
  targetGitDir = (0, import_node_path4.join)(tamaguiDir, "tamagui", template.repo.url.split("/").at(-1)), console.info(), await setupTamaguiDotDir(template);
31173
31173
  let starterDir = (0, import_node_path4.join)(targetGitDir, ...template.repo.dir);
31174
31174
  console.info(), console.info(
31175
31175
  `Copying starter from ${starterDir} into ${import_chalk5.default.blueBright(projectName)}...`
31176
31176
  ), console.info(), await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath), await rimraf(`${resolvedProjectPath}/.git`), console.info(import_chalk5.default.green(`${projectName} created!`)), console.info();
31177
31177
  };
31178
- async function setupTamaguiDotDir(template, isRetry = !1) {
31178
+ async function setupTamaguiDotDir(template) {
31179
31179
  if (console.info(`Setting up ${import_chalk5.default.blueBright(targetGitDir)}...`), process.env.GITHUB_HEAD_REF)
31180
31180
  try {
31181
31181
  await $`cd ${targetGitDir} && git switch -c ${process.env.GITHUB_HEAD_REF}`;
@@ -31184,37 +31184,31 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31184
31184
  let branch = template.repo.branch;
31185
31185
  await (0, import_fs_extra.ensureDir)(tamaguiDir), cd(tamaguiDir);
31186
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}"`);
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));
31189
31189
  else {
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}"`;
31190
+ console.info("Cloning tamagui base directory"), console.info();
31191
+ let cmd = `git clone --branch ${branch} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
31192
+ try {
31197
31193
  try {
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
- }
31194
+ console.info(`$ ${cmd}`), console.info(), exec(cmd);
31208
31195
  } catch (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;
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;
31214
31202
  }
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;
31215
31209
  }
31216
- isInSubDir && (exec("git sparse-checkout set code/starters", { cwd: targetGitDir }), console.info());
31217
31210
  }
31211
+ isInSubDir && (exec("git sparse-checkout set code/starters", { cwd: targetGitDir }), console.info());
31218
31212
  try {
31219
31213
  let remoteName = getDefaultRemoteName();
31220
31214
  if (await (0, import_fs_extra.pathExists)((0, import_node_path4.join)(targetGitDir, ".git"))) {
@@ -31234,13 +31228,9 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31234
31228
  `Warning: ${targetGitDir} is not a git repository. Skipping pull operation.`
31235
31229
  );
31236
31230
  } catch (err) {
31237
- console.info(
31238
- `Error updating: ${err.message} ${err.stack} ${isRetry ? "" : `
31239
-
31240
- retrying...`}`
31241
- ), isRetry && (console.info(
31242
- "Please file an issue: https://github.com/tamagui/tamagui/issues/new?assignees=&labels=&template=bug_report.md&title="
31243
- ), process.exit(1)), await (0, import_fs_extra.remove)(targetGitDir), await setupTamaguiDotDir(template, !0);
31231
+ await (0, import_fs_extra.remove)(targetGitDir), console.info(`Error updating: ${err.message} ${err.stack}`), console.info(
31232
+ "We removed the old template cache, so re-running may fix. If not, please file an issue: https://github.com/tamagui/tamagui/issues/new?assignees=&labels=&template=bug_report.md&title="
31233
+ ), process.exit(1);
31244
31234
  }
31245
31235
  }
31246
31236
  var getDefaultRemoteName = () => {
@@ -31541,7 +31531,7 @@ var templates = [
31541
31531
  url: process.env.TAMAGUI_REPO_SOURCE || "https://github.com/tamagui/tamagui.git",
31542
31532
  sshFallback: "git@github.com:tamagui/tamagui.git",
31543
31533
  dir: ["code", "starters", "expo-router"],
31544
- branch: "master"
31534
+ branch: "main"
31545
31535
  },
31546
31536
  extraSteps: expo_router_default
31547
31537
  },
@@ -31555,7 +31545,7 @@ var templates = [
31555
31545
  url: process.env.TAMAGUI_REPO_SOURCE || "https://github.com/tamagui/tamagui.git",
31556
31546
  sshFallback: "git@github.com:tamagui/tamagui.git",
31557
31547
  dir: ["code", "starters", "simple-web"],
31558
- branch: "master"
31548
+ branch: "main"
31559
31549
  },
31560
31550
  extraSteps: simple_web_default
31561
31551
  },
@@ -31569,7 +31559,7 @@ var templates = [
31569
31559
  url: process.env.TAMAGUI_REPO_SOURCE || "https://github.com/tamagui/tamagui.git",
31570
31560
  sshFallback: "git@github.com:tamagui/tamagui.git",
31571
31561
  dir: ["code", "starters", "remix"],
31572
- branch: "master"
31562
+ branch: "main"
31573
31563
  },
31574
31564
  extraSteps: remix_default
31575
31565
  }