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