create-tamagui 1.74.19 → 1.74.21

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.
@@ -25976,7 +25976,7 @@ var globby2 = Object.assign(function(patterns, options) {
25976
25976
  // package.json
25977
25977
  var package_default = {
25978
25978
  name: "create-tamagui",
25979
- version: "1.74.18",
25979
+ version: "1.74.20",
25980
25980
  bin: "./run.js",
25981
25981
  main: "dist",
25982
25982
  files: [
@@ -25997,7 +25997,7 @@ var package_default = {
25997
25997
  devDependencies: {
25998
25998
  "@expo/package-manager": "^0.0.50",
25999
25999
  "@playwright/test": "^1.29.0",
26000
- "@tamagui/build": "1.74.18",
26000
+ "@tamagui/build": "1.74.20",
26001
26001
  "@types/async-retry": "1.4.2",
26002
26002
  "@types/cross-spawn": "^6.0.2",
26003
26003
  "@types/node": "^16.11.9",
@@ -31375,15 +31375,15 @@ rimraf.rimraf = rimraf;
31375
31375
 
31376
31376
  // src/helpers/cloneStarter.ts
31377
31377
  var open = require_opn(), home = (0, import_os2.homedir)(), tamaguiDir = (0, import_path8.join)(home, ".tamagui"), targetGitDir = "", cloneStarter = async (template, resolvedProjectPath, projectName) => {
31378
- targetGitDir = IS_TEST ? (0, import_path8.join)(tamaguiDir, "tamagui-test", template.repo.url.split("/").at(-1)) : (0, import_path8.join)(tamaguiDir, "tamagui", template.repo.url.split("/").at(-1)), console.log(), await setupTamaguiDotDir(template);
31378
+ targetGitDir = IS_TEST ? (0, import_path8.join)(tamaguiDir, "tamagui-test", template.repo.url.split("/").at(-1)) : (0, import_path8.join)(tamaguiDir, "tamagui", template.repo.url.split("/").at(-1)), console.info(), await setupTamaguiDotDir(template);
31379
31379
  let starterDir = (0, import_path8.join)(targetGitDir, ...template.repo.dir);
31380
- console.log(), console.log(
31380
+ console.info(), console.info(
31381
31381
  `Copying starter from ${starterDir} into ${import_chalk7.default.blueBright(projectName)}...`
31382
- ), console.log(), await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath), await rimraf(`${resolvedProjectPath}/.git`), console.log(import_chalk7.default.green(`${projectName} created!`)), console.log();
31382
+ ), console.info(), await (0, import_fs_extra.copy)(starterDir, resolvedProjectPath), await rimraf(`${resolvedProjectPath}/.git`), console.info(import_chalk7.default.green(`${projectName} created!`)), console.info();
31383
31383
  };
31384
31384
  async function setupTamaguiDotDir(template, isRetry = !1) {
31385
31385
  let repoRoot2 = (0, import_path8.join)(__dirname, "..", "..", "..");
31386
- if (console.log(`Setting up ${import_chalk7.default.blueBright(targetGitDir)}...`), IS_TEST && cd(repoRoot2), process.env.GITHUB_HEAD_REF)
31386
+ if (console.info(`Setting up ${import_chalk7.default.blueBright(targetGitDir)}...`), IS_TEST && cd(repoRoot2), process.env.GITHUB_HEAD_REF)
31387
31387
  try {
31388
31388
  await $`git switch -c ${process.env.GITHUB_HEAD_REF}`;
31389
31389
  } catch {
@@ -31392,48 +31392,48 @@ async function setupTamaguiDotDir(template, isRetry = !1) {
31392
31392
  // use current branch
31393
31393
  (await $`git rev-parse --abbrev-ref HEAD`).stdout.trim()
31394
31394
  ) : template.repo.branch;
31395
- if (IS_TEST && (console.log("Test mode: cleaning old tamagui git dir"), await (0, import_fs_extra.remove)(targetGitDir), !await (0, import_fs_extra.pathExists)((0, import_path8.join)(repoRoot2, ".git"))))
31395
+ if (IS_TEST && (console.info("Test mode: cleaning old tamagui git dir"), await (0, import_fs_extra.remove)(targetGitDir), !await (0, import_fs_extra.pathExists)((0, import_path8.join)(repoRoot2, ".git"))))
31396
31396
  throw new Error("Not in a git folder");
31397
31397
  await (0, import_fs_extra.ensureDir)(tamaguiDir), cd(tamaguiDir);
31398
31398
  let isInSubDir = template.repo.dir.length > 0;
31399
31399
  if (await (0, import_fs_extra.pathExists)(targetGitDir))
31400
31400
  await (0, import_fs_extra.pathExists)((0, import_path8.join)(targetGitDir, ".git")) || (console.error(`Corrupt Tamagui directory, please delete ${targetGitDir} and re-run`), process.exit(1));
31401
31401
  else {
31402
- console.log("Cloning tamagui base directory"), console.log();
31402
+ console.info("Cloning tamagui base directory"), console.info();
31403
31403
  let sourceGitRepo = template.repo.url, cmd = `git clone --branch ${branch} ${isInSubDir ? "--depth 1 --sparse --filter=blob:none " : ""}${sourceGitRepo} "${targetGitDir}"`;
31404
31404
  try {
31405
31405
  try {
31406
- console.log(`$ ${cmd}`), console.log(), (0, import_child_process.execSync)(cmd);
31406
+ console.info(`$ ${cmd}`), console.info(), (0, import_child_process.execSync)(cmd);
31407
31407
  } catch (error) {
31408
31408
  if (cmd.includes("https://")) {
31409
- console.log("https failed - trying with ssh now...");
31409
+ console.info("https failed - trying with ssh now...");
31410
31410
  let sshCmd = cmd.replace("https://", "ssh://");
31411
- console.log(`$ ${sshCmd}`), console.log(), (0, import_child_process.execSync)(sshCmd);
31411
+ console.info(`$ ${sshCmd}`), console.info(), (0, import_child_process.execSync)(sshCmd);
31412
31412
  } else
31413
31413
  throw error;
31414
31414
  }
31415
31415
  } catch (error) {
31416
- throw error instanceof Error && template.value === "takeout-starter" && error != null && error.stderr.includes("Repository not found") && (console.log(
31416
+ throw error instanceof Error && template.value === "takeout-starter" && error != null && error.stderr.includes("Repository not found") && (console.info(
31417
31417
  import_chalk7.default.yellow(
31418
31418
  "You don't have access to this starter. Check \u{1F961} Tamagui Takeout (https://tamagui.dev/takeout) for more info."
31419
31419
  )
31420
31420
  ), open("https://tamagui.dev/takeout"), process.exit(0)), error;
31421
31421
  }
31422
31422
  }
31423
- if (console.log(), console.log("Updating tamagui starters repo"), console.log(), isInSubDir) {
31423
+ if (console.info(), console.info("Updating tamagui starters repo"), console.info(), isInSubDir) {
31424
31424
  let cmd = `git sparse-checkout set ${template.repo.dir[0] ?? "."}`;
31425
- (0, import_child_process.execSync)(cmd, { cwd: targetGitDir }), console.log(), console.log(`$ ${cmd}`);
31425
+ (0, import_child_process.execSync)(cmd, { cwd: targetGitDir }), console.info(), console.info(`$ ${cmd}`);
31426
31426
  }
31427
31427
  try {
31428
31428
  let cmd2 = `git pull --rebase --allow-unrelated-histories --depth 1 origin ${branch}`;
31429
31429
  (0, import_child_process.execSync)(cmd2, {
31430
31430
  cwd: targetGitDir
31431
- }), console.log(), console.log(`$ ${cmd2}`);
31431
+ }), console.info(), console.info(`$ ${cmd2}`);
31432
31432
  } catch (err) {
31433
- console.log(
31433
+ console.info(
31434
31434
  `Error updating: ${err.message} ${isRetry ? `failing.
31435
31435
  ${err.stack}` : "trying from fresh."}`
31436
- ), isRetry && (console.log(
31436
+ ), isRetry && (console.info(
31437
31437
  "Please file an issue: https://github.com/tamagui/tamagui/issues/new?assignees=&labels=&template=bug_report.md&title="
31438
31438
  ), process.exit(1)), await (0, import_fs_extra.remove)(targetGitDir), await setupTamaguiDotDir(template, !0);
31439
31439
  }
@@ -31739,16 +31739,16 @@ var program = new import_commander.default.Command(package_default.name).version
31739
31739
  ""
31740
31740
  ).allowUnknownOption().usage(
31741
31741
  `${import_chalk13.default.green("<project-directory>")} [options]
31742
-
31742
+
31743
31743
  Example usage:
31744
31744
 
31745
31745
  ${import_chalk13.default.blueBright(`npx ${package_default.name} next-expo`)}`
31746
31746
  ).parse(process.argv);
31747
- process.argv.includes("--version") && (console.log(package_default.version), process.exit(0));
31747
+ process.argv.includes("--version") && (console.info(package_default.version), process.exit(0));
31748
31748
  var skipCloning = !!program.skipCloning;
31749
31749
  async function run() {
31750
31750
  let packageManager4 = await detect();
31751
- skipCloning || (console.log(), console.log(tamaguiRainbowAsciiArt), console.log(import_chalk13.default.bold("Creating tamagui app...")), parseFloat(
31751
+ skipCloning || (console.info(), console.info(tamaguiRainbowAsciiArt), console.info(import_chalk13.default.bold("Creating tamagui app...")), parseFloat(
31752
31752
  (0, import_child_process3.execSync)("git --version").toString().replace("git version ", "").trim()
31753
31753
  ) < 2.27 && (console.error(`
31754
31754
 
@@ -31763,13 +31763,13 @@ async function run() {
31763
31763
  projectPath: (0, import_process.cwd)()
31764
31764
  });
31765
31765
  else {
31766
- console.log();
31766
+ console.info();
31767
31767
  let resolvedProjectPath = import_path12.default.resolve(process.cwd(), projectPath), projectName = import_path12.default.basename(resolvedProjectPath), { valid, problems } = validateNpmName(projectName);
31768
31768
  valid || (console.error(
31769
31769
  `Could not create a project called ${import_chalk13.default.red(
31770
31770
  `"${projectName}"`
31771
31771
  )} because of npm naming restrictions:`
31772
- ), problems.forEach((p) => console.error(` ${import_chalk13.default.red.bold("*")} ${p}`)), process.exit(1)), import_fs14.default.existsSync(resolvedProjectPath) && (console.log(), console.log(
31772
+ ), problems.forEach((p) => console.error(` ${import_chalk13.default.red.bold("*")} ${p}`)), process.exit(1)), import_fs14.default.existsSync(resolvedProjectPath) && (console.info(), console.info(
31773
31773
  import_chalk13.default.red("\u{1F6A8} [tamagui] error"),
31774
31774
  `You tried to make a project called ${import_chalk13.default.underline(
31775
31775
  import_chalk13.default.blueBright(projectName)
@@ -31778,18 +31778,18 @@ async function run() {
31778
31778
  )}
31779
31779
 
31780
31780
  ${import_chalk13.default.bold(import_chalk13.default.red("Please pick a different project name \u{1F978}"))}`
31781
- ), console.log(), console.log(), process.exit(1)), console.log(), console.log(`Creating a new tamagui app ${import_chalk13.default.blueBright(resolvedProjectPath)}...`), import_fs14.default.mkdirSync(resolvedProjectPath), console.log(import_chalk13.default.green(`${projectName} folder created.`));
31781
+ ), console.info(), console.info(), process.exit(1)), console.info(), console.info(`Creating a new tamagui app ${import_chalk13.default.blueBright(resolvedProjectPath)}...`), import_fs14.default.mkdirSync(resolvedProjectPath), console.info(import_chalk13.default.green(`${projectName} folder created.`));
31782
31782
  let shouldGitInit = await getShouldUseGit();
31783
31783
  try {
31784
- await cloneStarter(template, resolvedProjectPath, projectName), cd(resolvedProjectPath), console.log(), shouldGitInit && await $`git init`;
31784
+ await cloneStarter(template, resolvedProjectPath, projectName), cd(resolvedProjectPath), console.info(), shouldGitInit && await $`git init`;
31785
31785
  } catch (e) {
31786
31786
  console.error(`[tamagui] Failed to copy example into ${resolvedProjectPath}
31787
31787
 
31788
31788
  `, e), process.exit(1);
31789
31789
  }
31790
- updatePackageJsonName(projectName, resolvedProjectPath), console.log("Installing packages. This might take a couple of minutes."), console.log();
31790
+ updatePackageJsonName(projectName, resolvedProjectPath), console.info("Installing packages. This might take a couple of minutes."), console.info();
31791
31791
  try {
31792
- console.log("installing with " + packageManager4), await installDependencies(resolvedProjectPath, packageManager4);
31792
+ console.info("installing with " + packageManager4), await installDependencies(resolvedProjectPath, packageManager4);
31793
31793
  } catch (e) {
31794
31794
  console.error(
31795
31795
  "[tamagui] error installing with " + packageManager4 + `
@@ -31813,7 +31813,7 @@ ${import_chalk13.default.bold(import_chalk13.default.red("Please pick a differen
31813
31813
  projectPath: resolvedProjectPath
31814
31814
  });
31815
31815
  }
31816
- console.log(), console.log(import_chalk13.default.gray(tamaguiDuckAsciiArt));
31816
+ console.info(), console.info(import_chalk13.default.gray(tamaguiDuckAsciiArt));
31817
31817
  }
31818
31818
  function updatePackageJsonName(projectName, dir) {
31819
31819
  let packageJsonPath = import_path12.default.join(dir, "package.json");