create-tamagui 1.1.12 → 1.2.0

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
@@ -17327,20 +17327,30 @@ var require_fs2 = __commonJS({
17327
17327
  });
17328
17328
  });
17329
17329
  };
17330
- if (typeof fs4.writev === "function") {
17331
- exports.writev = function(fd, buffers, ...args) {
17332
- if (typeof args[args.length - 1] === "function") {
17333
- return fs4.writev(fd, buffers, ...args);
17334
- }
17335
- return new Promise((resolve, reject) => {
17336
- fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
17337
- if (err)
17338
- return reject(err);
17339
- resolve({ bytesWritten, buffers: buffers2 });
17340
- });
17330
+ exports.readv = function(fd, buffers, ...args) {
17331
+ if (typeof args[args.length - 1] === "function") {
17332
+ return fs4.readv(fd, buffers, ...args);
17333
+ }
17334
+ return new Promise((resolve, reject) => {
17335
+ fs4.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
17336
+ if (err)
17337
+ return reject(err);
17338
+ resolve({ bytesRead, buffers: buffers2 });
17341
17339
  });
17342
- };
17343
- }
17340
+ });
17341
+ };
17342
+ exports.writev = function(fd, buffers, ...args) {
17343
+ if (typeof args[args.length - 1] === "function") {
17344
+ return fs4.writev(fd, buffers, ...args);
17345
+ }
17346
+ return new Promise((resolve, reject) => {
17347
+ fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
17348
+ if (err)
17349
+ return reject(err);
17350
+ resolve({ bytesWritten, buffers: buffers2 });
17351
+ });
17352
+ });
17353
+ };
17344
17354
  if (typeof fs4.realpath.native === "function") {
17345
17355
  exports.realpath.native = u(fs4.realpath.native);
17346
17356
  } else {
@@ -17638,9 +17648,13 @@ var require_copy = __commonJS({
17638
17648
  stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
17639
17649
  if (err2)
17640
17650
  return cb(err2);
17641
- if (opts.filter)
17642
- return handleFilter(checkParentDir, destStat, src, dest, opts, cb);
17643
- return checkParentDir(destStat, src, dest, opts, cb);
17651
+ runFilter(src, dest, opts, (err3, include) => {
17652
+ if (err3)
17653
+ return cb(err3);
17654
+ if (!include)
17655
+ return cb();
17656
+ checkParentDir(destStat, src, dest, opts, cb);
17657
+ });
17644
17658
  });
17645
17659
  });
17646
17660
  }
@@ -17658,17 +17672,10 @@ var require_copy = __commonJS({
17658
17672
  });
17659
17673
  });
17660
17674
  }
17661
- function handleFilter(onInclude, destStat, src, dest, opts, cb) {
17662
- Promise.resolve(opts.filter(src, dest)).then((include) => {
17663
- if (include)
17664
- return onInclude(destStat, src, dest, opts, cb);
17665
- return cb();
17666
- }, (error) => cb(error));
17667
- }
17668
- function startCopy(destStat, src, dest, opts, cb) {
17669
- if (opts.filter)
17670
- return handleFilter(getStats, destStat, src, dest, opts, cb);
17671
- return getStats(destStat, src, dest, opts, cb);
17675
+ function runFilter(src, dest, opts, cb) {
17676
+ if (!opts.filter)
17677
+ return cb(null, true);
17678
+ Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
17672
17679
  }
17673
17680
  function getStats(destStat, src, dest, opts, cb) {
17674
17681
  const stat2 = opts.dereference ? fs4.stat : fs4.lstat;
@@ -17779,14 +17786,20 @@ var require_copy = __commonJS({
17779
17786
  function copyDirItem(items, item, src, dest, opts, cb) {
17780
17787
  const srcItem = path3.join(src, item);
17781
17788
  const destItem = path3.join(dest, item);
17782
- stat.checkPaths(srcItem, destItem, "copy", opts, (err, stats) => {
17789
+ runFilter(srcItem, destItem, opts, (err, include) => {
17783
17790
  if (err)
17784
17791
  return cb(err);
17785
- const { destStat } = stats;
17786
- startCopy(destStat, srcItem, destItem, opts, (err2) => {
17792
+ if (!include)
17793
+ return copyDirItems(items, src, dest, opts, cb);
17794
+ stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
17787
17795
  if (err2)
17788
17796
  return cb(err2);
17789
- return copyDirItems(items, src, dest, opts, cb);
17797
+ const { destStat } = stats;
17798
+ getStats(destStat, srcItem, destItem, opts, (err3) => {
17799
+ if (err3)
17800
+ return cb(err3);
17801
+ return copyDirItems(items, src, dest, opts, cb);
17802
+ });
17790
17803
  });
17791
17804
  });
17792
17805
  }
@@ -17812,7 +17825,7 @@ var require_copy = __commonJS({
17812
17825
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
17813
17826
  return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
17814
17827
  }
17815
- if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
17828
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
17816
17829
  return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
17817
17830
  }
17818
17831
  return copyLink(resolvedSrc, dest, cb);
@@ -17856,9 +17869,6 @@ var require_copy_sync = __commonJS({
17856
17869
  }
17857
17870
  const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
17858
17871
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
17859
- return handleFilterAndCopy(destStat, src, dest, opts);
17860
- }
17861
- function handleFilterAndCopy(destStat, src, dest, opts) {
17862
17872
  if (opts.filter && !opts.filter(src, dest))
17863
17873
  return;
17864
17874
  const destParent = path3.dirname(dest);
@@ -17866,11 +17876,6 @@ var require_copy_sync = __commonJS({
17866
17876
  mkdirsSync(destParent);
17867
17877
  return getStats(destStat, src, dest, opts);
17868
17878
  }
17869
- function startCopy(destStat, src, dest, opts) {
17870
- if (opts.filter && !opts.filter(src, dest))
17871
- return;
17872
- return getStats(destStat, src, dest, opts);
17873
- }
17874
17879
  function getStats(destStat, src, dest, opts) {
17875
17880
  const statSync = opts.dereference ? fs4.statSync : fs4.lstatSync;
17876
17881
  const srcStat = statSync(src);
@@ -17939,8 +17944,10 @@ var require_copy_sync = __commonJS({
17939
17944
  function copyDirItem(item, src, dest, opts) {
17940
17945
  const srcItem = path3.join(src, item);
17941
17946
  const destItem = path3.join(dest, item);
17947
+ if (opts.filter && !opts.filter(srcItem, destItem))
17948
+ return;
17942
17949
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
17943
- return startCopy(destStat, srcItem, destItem, opts);
17950
+ return getStats(destStat, srcItem, destItem, opts);
17944
17951
  }
17945
17952
  function onLink(destStat, src, dest, opts) {
17946
17953
  let resolvedSrc = fs4.readlinkSync(src);
@@ -17964,7 +17971,7 @@ var require_copy_sync = __commonJS({
17964
17971
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
17965
17972
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
17966
17973
  }
17967
- if (fs4.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
17974
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
17968
17975
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
17969
17976
  }
17970
17977
  return copyLink(resolvedSrc, dest);
@@ -17990,261 +17997,17 @@ var require_copy2 = __commonJS({
17990
17997
  }
17991
17998
  });
17992
17999
 
17993
- // ../../node_modules/fs-extra/lib/remove/rimraf.js
17994
- var require_rimraf2 = __commonJS({
17995
- "../../node_modules/fs-extra/lib/remove/rimraf.js"(exports, module2) {
17996
- "use strict";
17997
- var fs4 = require_graceful_fs();
17998
- var path3 = require("path");
17999
- var assert2 = require("assert");
18000
- var isWindows = process.platform === "win32";
18001
- function defaults2(options) {
18002
- const methods = [
18003
- "unlink",
18004
- "chmod",
18005
- "stat",
18006
- "lstat",
18007
- "rmdir",
18008
- "readdir"
18009
- ];
18010
- methods.forEach((m) => {
18011
- options[m] = options[m] || fs4[m];
18012
- m = m + "Sync";
18013
- options[m] = options[m] || fs4[m];
18014
- });
18015
- options.maxBusyTries = options.maxBusyTries || 3;
18016
- }
18017
- function rimraf(p, options, cb) {
18018
- let busyTries = 0;
18019
- if (typeof options === "function") {
18020
- cb = options;
18021
- options = {};
18022
- }
18023
- assert2(p, "rimraf: missing path");
18024
- assert2.strictEqual(typeof p, "string", "rimraf: path should be a string");
18025
- assert2.strictEqual(typeof cb, "function", "rimraf: callback function required");
18026
- assert2(options, "rimraf: invalid options argument provided");
18027
- assert2.strictEqual(typeof options, "object", "rimraf: options should be object");
18028
- defaults2(options);
18029
- rimraf_(p, options, function CB(er) {
18030
- if (er) {
18031
- if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) {
18032
- busyTries++;
18033
- const time = busyTries * 100;
18034
- return setTimeout(() => rimraf_(p, options, CB), time);
18035
- }
18036
- if (er.code === "ENOENT")
18037
- er = null;
18038
- }
18039
- cb(er);
18040
- });
18041
- }
18042
- function rimraf_(p, options, cb) {
18043
- assert2(p);
18044
- assert2(options);
18045
- assert2(typeof cb === "function");
18046
- options.lstat(p, (er, st) => {
18047
- if (er && er.code === "ENOENT") {
18048
- return cb(null);
18049
- }
18050
- if (er && er.code === "EPERM" && isWindows) {
18051
- return fixWinEPERM(p, options, er, cb);
18052
- }
18053
- if (st && st.isDirectory()) {
18054
- return rmdir(p, options, er, cb);
18055
- }
18056
- options.unlink(p, (er2) => {
18057
- if (er2) {
18058
- if (er2.code === "ENOENT") {
18059
- return cb(null);
18060
- }
18061
- if (er2.code === "EPERM") {
18062
- return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
18063
- }
18064
- if (er2.code === "EISDIR") {
18065
- return rmdir(p, options, er2, cb);
18066
- }
18067
- }
18068
- return cb(er2);
18069
- });
18070
- });
18071
- }
18072
- function fixWinEPERM(p, options, er, cb) {
18073
- assert2(p);
18074
- assert2(options);
18075
- assert2(typeof cb === "function");
18076
- options.chmod(p, 438, (er2) => {
18077
- if (er2) {
18078
- cb(er2.code === "ENOENT" ? null : er);
18079
- } else {
18080
- options.stat(p, (er3, stats) => {
18081
- if (er3) {
18082
- cb(er3.code === "ENOENT" ? null : er);
18083
- } else if (stats.isDirectory()) {
18084
- rmdir(p, options, er, cb);
18085
- } else {
18086
- options.unlink(p, cb);
18087
- }
18088
- });
18089
- }
18090
- });
18091
- }
18092
- function fixWinEPERMSync(p, options, er) {
18093
- let stats;
18094
- assert2(p);
18095
- assert2(options);
18096
- try {
18097
- options.chmodSync(p, 438);
18098
- } catch (er2) {
18099
- if (er2.code === "ENOENT") {
18100
- return;
18101
- } else {
18102
- throw er;
18103
- }
18104
- }
18105
- try {
18106
- stats = options.statSync(p);
18107
- } catch (er3) {
18108
- if (er3.code === "ENOENT") {
18109
- return;
18110
- } else {
18111
- throw er;
18112
- }
18113
- }
18114
- if (stats.isDirectory()) {
18115
- rmdirSync(p, options, er);
18116
- } else {
18117
- options.unlinkSync(p);
18118
- }
18119
- }
18120
- function rmdir(p, options, originalEr, cb) {
18121
- assert2(p);
18122
- assert2(options);
18123
- assert2(typeof cb === "function");
18124
- options.rmdir(p, (er) => {
18125
- if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) {
18126
- rmkids(p, options, cb);
18127
- } else if (er && er.code === "ENOTDIR") {
18128
- cb(originalEr);
18129
- } else {
18130
- cb(er);
18131
- }
18132
- });
18133
- }
18134
- function rmkids(p, options, cb) {
18135
- assert2(p);
18136
- assert2(options);
18137
- assert2(typeof cb === "function");
18138
- options.readdir(p, (er, files) => {
18139
- if (er)
18140
- return cb(er);
18141
- let n = files.length;
18142
- let errState;
18143
- if (n === 0)
18144
- return options.rmdir(p, cb);
18145
- files.forEach((f) => {
18146
- rimraf(path3.join(p, f), options, (er2) => {
18147
- if (errState) {
18148
- return;
18149
- }
18150
- if (er2)
18151
- return cb(errState = er2);
18152
- if (--n === 0) {
18153
- options.rmdir(p, cb);
18154
- }
18155
- });
18156
- });
18157
- });
18158
- }
18159
- function rimrafSync(p, options) {
18160
- let st;
18161
- options = options || {};
18162
- defaults2(options);
18163
- assert2(p, "rimraf: missing path");
18164
- assert2.strictEqual(typeof p, "string", "rimraf: path should be a string");
18165
- assert2(options, "rimraf: missing options");
18166
- assert2.strictEqual(typeof options, "object", "rimraf: options should be object");
18167
- try {
18168
- st = options.lstatSync(p);
18169
- } catch (er) {
18170
- if (er.code === "ENOENT") {
18171
- return;
18172
- }
18173
- if (er.code === "EPERM" && isWindows) {
18174
- fixWinEPERMSync(p, options, er);
18175
- }
18176
- }
18177
- try {
18178
- if (st && st.isDirectory()) {
18179
- rmdirSync(p, options, null);
18180
- } else {
18181
- options.unlinkSync(p);
18182
- }
18183
- } catch (er) {
18184
- if (er.code === "ENOENT") {
18185
- return;
18186
- } else if (er.code === "EPERM") {
18187
- return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er);
18188
- } else if (er.code !== "EISDIR") {
18189
- throw er;
18190
- }
18191
- rmdirSync(p, options, er);
18192
- }
18193
- }
18194
- function rmdirSync(p, options, originalEr) {
18195
- assert2(p);
18196
- assert2(options);
18197
- try {
18198
- options.rmdirSync(p);
18199
- } catch (er) {
18200
- if (er.code === "ENOTDIR") {
18201
- throw originalEr;
18202
- } else if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") {
18203
- rmkidsSync(p, options);
18204
- } else if (er.code !== "ENOENT") {
18205
- throw er;
18206
- }
18207
- }
18208
- }
18209
- function rmkidsSync(p, options) {
18210
- assert2(p);
18211
- assert2(options);
18212
- options.readdirSync(p).forEach((f) => rimrafSync(path3.join(p, f), options));
18213
- if (isWindows) {
18214
- const startTime = Date.now();
18215
- do {
18216
- try {
18217
- const ret = options.rmdirSync(p, options);
18218
- return ret;
18219
- } catch {
18220
- }
18221
- } while (Date.now() - startTime < 500);
18222
- } else {
18223
- const ret = options.rmdirSync(p, options);
18224
- return ret;
18225
- }
18226
- }
18227
- module2.exports = rimraf;
18228
- rimraf.sync = rimrafSync;
18229
- }
18230
- });
18231
-
18232
18000
  // ../../node_modules/fs-extra/lib/remove/index.js
18233
18001
  var require_remove = __commonJS({
18234
18002
  "../../node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
18235
18003
  "use strict";
18236
18004
  var fs4 = require_graceful_fs();
18237
18005
  var u = require_universalify().fromCallback;
18238
- var rimraf = require_rimraf2();
18239
18006
  function remove2(path3, callback) {
18240
- if (fs4.rm)
18241
- return fs4.rm(path3, { recursive: true, force: true }, callback);
18242
- rimraf(path3, callback);
18007
+ fs4.rm(path3, { recursive: true, force: true }, callback);
18243
18008
  }
18244
18009
  function removeSync(path3) {
18245
- if (fs4.rmSync)
18246
- return fs4.rmSync(path3, { recursive: true, force: true });
18247
- rimraf.sync(path3);
18010
+ fs4.rmSync(path3, { recursive: true, force: true });
18248
18011
  }
18249
18012
  module2.exports = {
18250
18013
  remove: u(remove2),
@@ -45437,7 +45200,7 @@ var globby2 = Object.assign(function globby3(patterns, options) {
45437
45200
  // package.json
45438
45201
  var package_default = {
45439
45202
  name: "create-tamagui",
45440
- version: "1.1.11",
45203
+ version: "1.2.0",
45441
45204
  bin: "./run.js",
45442
45205
  main: "dist",
45443
45206
  files: [
@@ -45461,7 +45224,7 @@ var package_default = {
45461
45224
  commander: "2.20.0",
45462
45225
  cpy: "7.3.0",
45463
45226
  "cross-spawn": "6.0.5",
45464
- "fs-extra": "^10.1.0",
45227
+ "fs-extra": "^11.1.0",
45465
45228
  got: "10.7.0",
45466
45229
  prompts: "2.1.0",
45467
45230
  rimraf: "3.0.0",
@@ -45471,7 +45234,7 @@ var package_default = {
45471
45234
  },
45472
45235
  devDependencies: {
45473
45236
  "@playwright/test": "^1.29.0",
45474
- "@tamagui/build": "^1.1.11",
45237
+ "@tamagui/build": "^1.2.0",
45475
45238
  "@types/async-retry": "1.4.2",
45476
45239
  "@types/cross-spawn": "^6.0.2",
45477
45240
  "@types/node": "^16.11.9",