create-tamagui 1.1.7 → 1.1.9

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
@@ -22,6 +22,10 @@ var __copyProps = (to, from, except, desc) => {
22
22
  return to;
23
23
  };
24
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
29
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
30
  mod
27
31
  ));
@@ -166,8 +170,10 @@ var require_which = __commonJS({
166
170
  var getPathInfo = (cmd, opt) => {
167
171
  const colon = opt.colon || COLON;
168
172
  const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
173
+ // windows always checks the cwd first
169
174
  ...isWindows ? [process.cwd()] : [],
170
- ...(opt.path || process.env.PATH || "").split(colon)
175
+ ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
176
+ "").split(colon)
171
177
  ];
172
178
  const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
173
179
  const pathExt = isWindows ? pathExtExe.split(colon) : [""];
@@ -2373,6 +2379,8 @@ var require_route = __commonJS({
2373
2379
  var models = Object.keys(conversions);
2374
2380
  for (var len = models.length, i = 0; i < len; i++) {
2375
2381
  graph[models[i]] = {
2382
+ // http://jsperf.com/1-vs-infinity
2383
+ // micro-opt, but this is simple.
2376
2384
  distance: -1,
2377
2385
  parent: null
2378
2386
  };
@@ -2513,6 +2521,7 @@ var require_ansi_styles = __commonJS({
2513
2521
  const styles3 = {
2514
2522
  modifier: {
2515
2523
  reset: [0, 0],
2524
+ // 21 isn't widely supported and 22 does the same thing
2516
2525
  bold: [1, 22],
2517
2526
  dim: [2, 22],
2518
2527
  italic: [3, 23],
@@ -2531,6 +2540,7 @@ var require_ansi_styles = __commonJS({
2531
2540
  cyan: [36, 39],
2532
2541
  white: [37, 39],
2533
2542
  gray: [90, 39],
2543
+ // Bright color
2534
2544
  redBright: [91, 39],
2535
2545
  greenBright: [92, 39],
2536
2546
  yellowBright: [93, 39],
@@ -2548,6 +2558,7 @@ var require_ansi_styles = __commonJS({
2548
2558
  bgMagenta: [45, 49],
2549
2559
  bgCyan: [46, 49],
2550
2560
  bgWhite: [47, 49],
2561
+ // Bright color
2551
2562
  bgBlackBright: [100, 49],
2552
2563
  bgRedBright: [101, 49],
2553
2564
  bgGreenBright: [102, 49],
@@ -5388,6 +5399,9 @@ var require_signals = __commonJS({
5388
5399
  "SIGSYS",
5389
5400
  "SIGQUIT",
5390
5401
  "SIGIOT"
5402
+ // should detect profiler and enable/disable accordingly.
5403
+ // see #21
5404
+ // 'SIGPROF'
5391
5405
  );
5392
5406
  }
5393
5407
  if (process.platform === "linux") {
@@ -5523,7 +5537,8 @@ var require_signal_exit = __commonJS({
5523
5537
  if (!processOk(global.process)) {
5524
5538
  return;
5525
5539
  }
5526
- process4.exitCode = code || 0;
5540
+ process4.exitCode = code || /* istanbul ignore next */
5541
+ 0;
5527
5542
  emit("exit", process4.exitCode, null);
5528
5543
  emit("afterexit", process4.exitCode, null);
5529
5544
  originalProcessReallyExit.call(process4, process4.exitCode);
@@ -6819,50 +6834,97 @@ var require_constants = __commonJS({
6819
6834
  "use strict";
6820
6835
  module2.exports = {
6821
6836
  MAX_LENGTH: 1024 * 64,
6837
+ // Digits
6822
6838
  CHAR_0: "0",
6839
+ /* 0 */
6823
6840
  CHAR_9: "9",
6841
+ /* 9 */
6842
+ // Alphabet chars.
6824
6843
  CHAR_UPPERCASE_A: "A",
6844
+ /* A */
6825
6845
  CHAR_LOWERCASE_A: "a",
6846
+ /* a */
6826
6847
  CHAR_UPPERCASE_Z: "Z",
6848
+ /* Z */
6827
6849
  CHAR_LOWERCASE_Z: "z",
6850
+ /* z */
6828
6851
  CHAR_LEFT_PARENTHESES: "(",
6852
+ /* ( */
6829
6853
  CHAR_RIGHT_PARENTHESES: ")",
6854
+ /* ) */
6830
6855
  CHAR_ASTERISK: "*",
6856
+ /* * */
6857
+ // Non-alphabetic chars.
6831
6858
  CHAR_AMPERSAND: "&",
6859
+ /* & */
6832
6860
  CHAR_AT: "@",
6861
+ /* @ */
6833
6862
  CHAR_BACKSLASH: "\\",
6863
+ /* \ */
6834
6864
  CHAR_BACKTICK: "`",
6865
+ /* ` */
6835
6866
  CHAR_CARRIAGE_RETURN: "\r",
6867
+ /* \r */
6836
6868
  CHAR_CIRCUMFLEX_ACCENT: "^",
6869
+ /* ^ */
6837
6870
  CHAR_COLON: ":",
6871
+ /* : */
6838
6872
  CHAR_COMMA: ",",
6873
+ /* , */
6839
6874
  CHAR_DOLLAR: "$",
6875
+ /* . */
6840
6876
  CHAR_DOT: ".",
6877
+ /* . */
6841
6878
  CHAR_DOUBLE_QUOTE: '"',
6879
+ /* " */
6842
6880
  CHAR_EQUAL: "=",
6881
+ /* = */
6843
6882
  CHAR_EXCLAMATION_MARK: "!",
6883
+ /* ! */
6844
6884
  CHAR_FORM_FEED: "\f",
6885
+ /* \f */
6845
6886
  CHAR_FORWARD_SLASH: "/",
6887
+ /* / */
6846
6888
  CHAR_HASH: "#",
6889
+ /* # */
6847
6890
  CHAR_HYPHEN_MINUS: "-",
6891
+ /* - */
6848
6892
  CHAR_LEFT_ANGLE_BRACKET: "<",
6893
+ /* < */
6849
6894
  CHAR_LEFT_CURLY_BRACE: "{",
6895
+ /* { */
6850
6896
  CHAR_LEFT_SQUARE_BRACKET: "[",
6897
+ /* [ */
6851
6898
  CHAR_LINE_FEED: "\n",
6899
+ /* \n */
6852
6900
  CHAR_NO_BREAK_SPACE: "\xA0",
6901
+ /* \u00A0 */
6853
6902
  CHAR_PERCENT: "%",
6903
+ /* % */
6854
6904
  CHAR_PLUS: "+",
6905
+ /* + */
6855
6906
  CHAR_QUESTION_MARK: "?",
6907
+ /* ? */
6856
6908
  CHAR_RIGHT_ANGLE_BRACKET: ">",
6909
+ /* > */
6857
6910
  CHAR_RIGHT_CURLY_BRACE: "}",
6911
+ /* } */
6858
6912
  CHAR_RIGHT_SQUARE_BRACKET: "]",
6913
+ /* ] */
6859
6914
  CHAR_SEMICOLON: ";",
6915
+ /* ; */
6860
6916
  CHAR_SINGLE_QUOTE: "'",
6917
+ /* ' */
6861
6918
  CHAR_SPACE: " ",
6919
+ /* */
6862
6920
  CHAR_TAB: " ",
6921
+ /* \t */
6863
6922
  CHAR_UNDERSCORE: "_",
6923
+ /* _ */
6864
6924
  CHAR_VERTICAL_LINE: "|",
6925
+ /* | */
6865
6926
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
6927
+ /* \uFEFF */
6866
6928
  };
6867
6929
  }
6868
6930
  });
@@ -6875,17 +6937,29 @@ var require_parse3 = __commonJS({
6875
6937
  var {
6876
6938
  MAX_LENGTH,
6877
6939
  CHAR_BACKSLASH,
6940
+ /* \ */
6878
6941
  CHAR_BACKTICK,
6942
+ /* ` */
6879
6943
  CHAR_COMMA,
6944
+ /* , */
6880
6945
  CHAR_DOT,
6946
+ /* . */
6881
6947
  CHAR_LEFT_PARENTHESES,
6948
+ /* ( */
6882
6949
  CHAR_RIGHT_PARENTHESES,
6950
+ /* ) */
6883
6951
  CHAR_LEFT_CURLY_BRACE,
6952
+ /* { */
6884
6953
  CHAR_RIGHT_CURLY_BRACE,
6954
+ /* } */
6885
6955
  CHAR_LEFT_SQUARE_BRACKET,
6956
+ /* [ */
6886
6957
  CHAR_RIGHT_SQUARE_BRACKET,
6958
+ /* ] */
6887
6959
  CHAR_DOUBLE_QUOTE,
6960
+ /* " */
6888
6961
  CHAR_SINGLE_QUOTE,
6962
+ /* ' */
6889
6963
  CHAR_NO_BREAK_SPACE,
6890
6964
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
6891
6965
  } = require_constants();
@@ -7234,61 +7308,112 @@ var require_constants2 = __commonJS({
7234
7308
  module2.exports = {
7235
7309
  MAX_LENGTH: 1024 * 64,
7236
7310
  POSIX_REGEX_SOURCE,
7311
+ // regular expressions
7237
7312
  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
7238
7313
  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
7239
7314
  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
7240
7315
  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
7241
7316
  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
7242
7317
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
7318
+ // Replace globs with equivalent patterns to reduce parsing time.
7243
7319
  REPLACEMENTS: {
7244
7320
  "***": "*",
7245
7321
  "**/**": "**",
7246
7322
  "**/**/**": "**"
7247
7323
  },
7324
+ // Digits
7248
7325
  CHAR_0: 48,
7326
+ /* 0 */
7249
7327
  CHAR_9: 57,
7328
+ /* 9 */
7329
+ // Alphabet chars.
7250
7330
  CHAR_UPPERCASE_A: 65,
7331
+ /* A */
7251
7332
  CHAR_LOWERCASE_A: 97,
7333
+ /* a */
7252
7334
  CHAR_UPPERCASE_Z: 90,
7335
+ /* Z */
7253
7336
  CHAR_LOWERCASE_Z: 122,
7337
+ /* z */
7254
7338
  CHAR_LEFT_PARENTHESES: 40,
7339
+ /* ( */
7255
7340
  CHAR_RIGHT_PARENTHESES: 41,
7341
+ /* ) */
7256
7342
  CHAR_ASTERISK: 42,
7343
+ /* * */
7344
+ // Non-alphabetic chars.
7257
7345
  CHAR_AMPERSAND: 38,
7346
+ /* & */
7258
7347
  CHAR_AT: 64,
7348
+ /* @ */
7259
7349
  CHAR_BACKWARD_SLASH: 92,
7350
+ /* \ */
7260
7351
  CHAR_CARRIAGE_RETURN: 13,
7352
+ /* \r */
7261
7353
  CHAR_CIRCUMFLEX_ACCENT: 94,
7354
+ /* ^ */
7262
7355
  CHAR_COLON: 58,
7356
+ /* : */
7263
7357
  CHAR_COMMA: 44,
7358
+ /* , */
7264
7359
  CHAR_DOT: 46,
7360
+ /* . */
7265
7361
  CHAR_DOUBLE_QUOTE: 34,
7362
+ /* " */
7266
7363
  CHAR_EQUAL: 61,
7364
+ /* = */
7267
7365
  CHAR_EXCLAMATION_MARK: 33,
7366
+ /* ! */
7268
7367
  CHAR_FORM_FEED: 12,
7368
+ /* \f */
7269
7369
  CHAR_FORWARD_SLASH: 47,
7370
+ /* / */
7270
7371
  CHAR_GRAVE_ACCENT: 96,
7372
+ /* ` */
7271
7373
  CHAR_HASH: 35,
7374
+ /* # */
7272
7375
  CHAR_HYPHEN_MINUS: 45,
7376
+ /* - */
7273
7377
  CHAR_LEFT_ANGLE_BRACKET: 60,
7378
+ /* < */
7274
7379
  CHAR_LEFT_CURLY_BRACE: 123,
7380
+ /* { */
7275
7381
  CHAR_LEFT_SQUARE_BRACKET: 91,
7382
+ /* [ */
7276
7383
  CHAR_LINE_FEED: 10,
7384
+ /* \n */
7277
7385
  CHAR_NO_BREAK_SPACE: 160,
7386
+ /* \u00A0 */
7278
7387
  CHAR_PERCENT: 37,
7388
+ /* % */
7279
7389
  CHAR_PLUS: 43,
7390
+ /* + */
7280
7391
  CHAR_QUESTION_MARK: 63,
7392
+ /* ? */
7281
7393
  CHAR_RIGHT_ANGLE_BRACKET: 62,
7394
+ /* > */
7282
7395
  CHAR_RIGHT_CURLY_BRACE: 125,
7396
+ /* } */
7283
7397
  CHAR_RIGHT_SQUARE_BRACKET: 93,
7398
+ /* ] */
7284
7399
  CHAR_SEMICOLON: 59,
7400
+ /* ; */
7285
7401
  CHAR_SINGLE_QUOTE: 39,
7402
+ /* ' */
7286
7403
  CHAR_SPACE: 32,
7404
+ /* */
7287
7405
  CHAR_TAB: 9,
7406
+ /* \t */
7288
7407
  CHAR_UNDERSCORE: 95,
7408
+ /* _ */
7289
7409
  CHAR_VERTICAL_LINE: 124,
7410
+ /* | */
7290
7411
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
7412
+ /* \uFEFF */
7291
7413
  SEP: path3.sep,
7414
+ /**
7415
+ * Create EXTGLOB_CHARS
7416
+ */
7292
7417
  extglobChars(chars) {
7293
7418
  return {
7294
7419
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -7298,6 +7423,9 @@ var require_constants2 = __commonJS({
7298
7423
  "@": { type: "at", open: "(?:", close: ")" }
7299
7424
  };
7300
7425
  },
7426
+ /**
7427
+ * Create GLOB_CHARS
7428
+ */
7301
7429
  globChars(win32) {
7302
7430
  return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
7303
7431
  }
@@ -7375,20 +7503,35 @@ var require_scan = __commonJS({
7375
7503
  var utils = require_utils2();
7376
7504
  var {
7377
7505
  CHAR_ASTERISK,
7506
+ /* * */
7378
7507
  CHAR_AT,
7508
+ /* @ */
7379
7509
  CHAR_BACKWARD_SLASH,
7510
+ /* \ */
7380
7511
  CHAR_COMMA,
7512
+ /* , */
7381
7513
  CHAR_DOT,
7514
+ /* . */
7382
7515
  CHAR_EXCLAMATION_MARK,
7516
+ /* ! */
7383
7517
  CHAR_FORWARD_SLASH,
7518
+ /* / */
7384
7519
  CHAR_LEFT_CURLY_BRACE,
7520
+ /* { */
7385
7521
  CHAR_LEFT_PARENTHESES,
7522
+ /* ( */
7386
7523
  CHAR_LEFT_SQUARE_BRACKET,
7524
+ /* [ */
7387
7525
  CHAR_PLUS,
7526
+ /* + */
7388
7527
  CHAR_QUESTION_MARK,
7528
+ /* ? */
7389
7529
  CHAR_RIGHT_CURLY_BRACE,
7530
+ /* } */
7390
7531
  CHAR_RIGHT_PARENTHESES,
7532
+ /* ) */
7391
7533
  CHAR_RIGHT_SQUARE_BRACKET
7534
+ /* ] */
7392
7535
  } = require_constants2();
7393
7536
  var isPathSeparator = (code) => {
7394
7537
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
@@ -8958,6 +9101,8 @@ var require_git_host_info = __commonJS({
8958
9101
  "use strict";
8959
9102
  var gitHosts = module2.exports = {
8960
9103
  github: {
9104
+ // First two are insecure and generally shouldn't be used any more, but
9105
+ // they are still supported.
8961
9106
  "protocols": ["git", "http", "git+ssh", "git+https", "ssh", "https"],
8962
9107
  "domain": "github.com",
8963
9108
  "treepath": "tree",
@@ -9591,6 +9736,7 @@ var require_lru_cache = __commonJS({
9591
9736
  this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
9592
9737
  this.reset();
9593
9738
  }
9739
+ // resize the cache when the max changes.
9594
9740
  set max(mL) {
9595
9741
  if (typeof mL !== "number" || mL < 0)
9596
9742
  throw new TypeError("max must be a non-negative number");
@@ -9615,6 +9761,7 @@ var require_lru_cache = __commonJS({
9615
9761
  get maxAge() {
9616
9762
  return this[MAX_AGE];
9617
9763
  }
9764
+ // resize the cache when the lengthCalculator changes.
9618
9765
  set lengthCalculator(lC) {
9619
9766
  if (typeof lC !== "function")
9620
9767
  lC = naiveLength;
@@ -10076,7 +10223,8 @@ var require_semver = __commonJS({
10076
10223
  }
10077
10224
  exports.SEMVER_SPEC_VERSION = "2.0.0";
10078
10225
  var MAX_LENGTH = 256;
10079
- var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
10226
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
10227
+ 9007199254740991;
10080
10228
  var MAX_SAFE_COMPONENT_LENGTH = 16;
10081
10229
  var re = exports.re = [];
10082
10230
  var src = exports.src = [];
@@ -14374,6 +14522,7 @@ var require_NodePackageManagers = __commonJS({
14374
14522
  rimraf_1.default.sync(nodeModulesPath);
14375
14523
  }
14376
14524
  }
14525
+ // Private
14377
14526
  async _runAsync(args) {
14378
14527
  if (!this.options.ignoreStdio) {
14379
14528
  this.log(`> npm ${args.join(" ")}`);
@@ -14487,6 +14636,7 @@ var require_NodePackageManagers = __commonJS({
14487
14636
  rimraf_1.default.sync(nodeModulesPath);
14488
14637
  }
14489
14638
  }
14639
+ // Private
14490
14640
  async _runAsync(args) {
14491
14641
  if (!this.options.ignoreStdio) {
14492
14642
  this.log(`> yarn ${args.join(" ")}`);
@@ -15361,6 +15511,8 @@ var require_route2 = __commonJS({
15361
15511
  const models = Object.keys(conversions);
15362
15512
  for (let len = models.length, i = 0; i < len; i++) {
15363
15513
  graph[models[i]] = {
15514
+ // http://jsperf.com/1-vs-infinity
15515
+ // micro-opt, but this is simple.
15364
15516
  distance: -1,
15365
15517
  parent: null
15366
15518
  };
@@ -15536,6 +15688,7 @@ var require_ansi_styles2 = __commonJS({
15536
15688
  const styles3 = {
15537
15689
  modifier: {
15538
15690
  reset: [0, 0],
15691
+ // 21 isn't widely supported and 22 does the same thing
15539
15692
  bold: [1, 22],
15540
15693
  dim: [2, 22],
15541
15694
  italic: [3, 23],
@@ -15553,6 +15706,7 @@ var require_ansi_styles2 = __commonJS({
15553
15706
  magenta: [35, 39],
15554
15707
  cyan: [36, 39],
15555
15708
  white: [37, 39],
15709
+ // Bright color
15556
15710
  blackBright: [90, 39],
15557
15711
  redBright: [91, 39],
15558
15712
  greenBright: [92, 39],
@@ -15571,6 +15725,7 @@ var require_ansi_styles2 = __commonJS({
15571
15725
  bgMagenta: [45, 49],
15572
15726
  bgCyan: [46, 49],
15573
15727
  bgWhite: [47, 49],
15728
+ // Bright color
15574
15729
  bgBlackBright: [100, 49],
15575
15730
  bgRedBright: [101, 49],
15576
15731
  bgGreenBright: [102, 49],
@@ -16105,6 +16260,8 @@ var require_CocoaPodsPackageManager = __commonJS({
16105
16260
  this.silent = !!silent;
16106
16261
  this.options = {
16107
16262
  cwd,
16263
+ // We use pipe by default instead of inherit so that we can capture stderr/stdout and process it for errors.
16264
+ // Later we'll also pipe the stdout/stderr to the terminal when silent is false.
16108
16265
  stdio: "pipe"
16109
16266
  };
16110
16267
  }
@@ -16198,6 +16355,7 @@ var require_CocoaPodsPackageManager = __commonJS({
16198
16355
  get name() {
16199
16356
  return "CocoaPods";
16200
16357
  }
16358
+ /** Runs `pod install` and attempts to automatically run known troubleshooting steps automatically. */
16201
16359
  async installAsync({ spinner } = {}) {
16202
16360
  await this._installAsync({ spinner });
16203
16361
  }
@@ -16225,6 +16383,7 @@ var require_CocoaPodsPackageManager = __commonJS({
16225
16383
  return await this._installAsync({
16226
16384
  spinner,
16227
16385
  shouldRepoUpdate: true,
16386
+ // Include a boolean to ensure pod install --repo-update isn't invoked in the unlikely case where the pods fail to update.
16228
16387
  shouldUpdate: false,
16229
16388
  updatedPackages
16230
16389
  });
@@ -16285,6 +16444,7 @@ var require_CocoaPodsPackageManager = __commonJS({
16285
16444
  async cleanAsync() {
16286
16445
  throw new Error("Unimplemented");
16287
16446
  }
16447
+ // Private
16288
16448
  async podRepoUpdateAsync() {
16289
16449
  var _a;
16290
16450
  try {
@@ -16294,15 +16454,22 @@ var require_CocoaPodsPackageManager = __commonJS({
16294
16454
  throw new CocoaPodsError("The command `pod install --repo-update` failed", "COMMAND_FAILED", error);
16295
16455
  }
16296
16456
  }
16457
+ // Exposed for testing
16297
16458
  async _runAsync(args) {
16298
16459
  if (!this.silent) {
16299
16460
  console.log(`> pod ${args.join(" ")}`);
16300
16461
  }
16301
16462
  const promise = spawn_async_1.default("pod", [
16302
16463
  ...args,
16464
+ // Enables colors while collecting output.
16303
16465
  "--ansi"
16304
16466
  ], {
16467
+ // Add the cwd and other options to the spawn options.
16305
16468
  ...this.options,
16469
+ // We use pipe by default instead of inherit so that we can capture stderr/stdout and process it for errors.
16470
+ // This is particularly required for the `pod install --repo-update` error.
16471
+ // Later we'll also pipe the stdout/stderr to the terminal when silent is false,
16472
+ // currently this means we lose out on the ansi colors unless passing the `--ansi` flag to every command.
16306
16473
  stdio: "pipe"
16307
16474
  });
16308
16475
  if (!this.silent) {
@@ -17243,6 +17410,7 @@ var require_mkdirs = __commonJS({
17243
17410
  module2.exports = {
17244
17411
  mkdirs: makeDir,
17245
17412
  mkdirsSync: makeDirSync,
17413
+ // alias
17246
17414
  mkdirp: makeDir,
17247
17415
  mkdirpSync: makeDirSync,
17248
17416
  ensureDir: makeDir,
@@ -18475,14 +18643,17 @@ var require_ensure = __commonJS({
18475
18643
  var { createLink, createLinkSync } = require_link();
18476
18644
  var { createSymlink, createSymlinkSync } = require_symlink();
18477
18645
  module2.exports = {
18646
+ // file
18478
18647
  createFile,
18479
18648
  createFileSync,
18480
18649
  ensureFile: createFile,
18481
18650
  ensureFileSync: createFileSync,
18651
+ // link
18482
18652
  createLink,
18483
18653
  createLinkSync,
18484
18654
  ensureLink: createLink,
18485
18655
  ensureLinkSync: createLinkSync,
18656
+ // symlink
18486
18657
  createSymlink,
18487
18658
  createSymlinkSync,
18488
18659
  ensureSymlink: createSymlink,
@@ -18587,6 +18758,7 @@ var require_jsonfile2 = __commonJS({
18587
18758
  "use strict";
18588
18759
  var jsonFile = require_jsonfile();
18589
18760
  module2.exports = {
18761
+ // jsonfile exports
18590
18762
  readJson: jsonFile.readFile,
18591
18763
  readJsonSync: jsonFile.readFileSync,
18592
18764
  writeJson: jsonFile.writeFile,
@@ -18838,7 +19010,9 @@ var require_lib5 = __commonJS({
18838
19010
  "../../node_modules/fs-extra/lib/index.js"(exports, module2) {
18839
19011
  "use strict";
18840
19012
  module2.exports = {
19013
+ // Export promiseified graceful-fs:
18841
19014
  ...require_fs2(),
19015
+ // Export extra methods:
18842
19016
  ...require_copy2(),
18843
19017
  ...require_empty(),
18844
19018
  ...require_ensure(),
@@ -18938,39 +19112,111 @@ var require_dist = __commonJS({
18938
19112
  };
18939
19113
  is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw);
18940
19114
  is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
18941
- is.nativePromise = (value) => isObjectOfType("Promise")(value);
19115
+ is.nativePromise = (value) => isObjectOfType(
19116
+ "Promise"
19117
+ /* Promise */
19118
+ )(value);
18942
19119
  var hasPromiseAPI = (value) => {
18943
19120
  var _a, _b;
18944
19121
  return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch);
18945
19122
  };
18946
19123
  is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
18947
- is.generatorFunction = isObjectOfType("GeneratorFunction");
19124
+ is.generatorFunction = isObjectOfType(
19125
+ "GeneratorFunction"
19126
+ /* GeneratorFunction */
19127
+ );
18948
19128
  is.asyncGeneratorFunction = (value) => getObjectType(value) === "AsyncGeneratorFunction";
18949
19129
  is.asyncFunction = (value) => getObjectType(value) === "AsyncFunction";
18950
19130
  is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty("prototype");
18951
- is.regExp = isObjectOfType("RegExp");
18952
- is.date = isObjectOfType("Date");
18953
- is.error = isObjectOfType("Error");
18954
- is.map = (value) => isObjectOfType("Map")(value);
18955
- is.set = (value) => isObjectOfType("Set")(value);
18956
- is.weakMap = (value) => isObjectOfType("WeakMap")(value);
18957
- is.weakSet = (value) => isObjectOfType("WeakSet")(value);
18958
- is.int8Array = isObjectOfType("Int8Array");
18959
- is.uint8Array = isObjectOfType("Uint8Array");
18960
- is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray");
18961
- is.int16Array = isObjectOfType("Int16Array");
18962
- is.uint16Array = isObjectOfType("Uint16Array");
18963
- is.int32Array = isObjectOfType("Int32Array");
18964
- is.uint32Array = isObjectOfType("Uint32Array");
18965
- is.float32Array = isObjectOfType("Float32Array");
18966
- is.float64Array = isObjectOfType("Float64Array");
18967
- is.bigInt64Array = isObjectOfType("BigInt64Array");
18968
- is.bigUint64Array = isObjectOfType("BigUint64Array");
18969
- is.arrayBuffer = isObjectOfType("ArrayBuffer");
18970
- is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer");
18971
- is.dataView = isObjectOfType("DataView");
19131
+ is.regExp = isObjectOfType(
19132
+ "RegExp"
19133
+ /* RegExp */
19134
+ );
19135
+ is.date = isObjectOfType(
19136
+ "Date"
19137
+ /* Date */
19138
+ );
19139
+ is.error = isObjectOfType(
19140
+ "Error"
19141
+ /* Error */
19142
+ );
19143
+ is.map = (value) => isObjectOfType(
19144
+ "Map"
19145
+ /* Map */
19146
+ )(value);
19147
+ is.set = (value) => isObjectOfType(
19148
+ "Set"
19149
+ /* Set */
19150
+ )(value);
19151
+ is.weakMap = (value) => isObjectOfType(
19152
+ "WeakMap"
19153
+ /* WeakMap */
19154
+ )(value);
19155
+ is.weakSet = (value) => isObjectOfType(
19156
+ "WeakSet"
19157
+ /* WeakSet */
19158
+ )(value);
19159
+ is.int8Array = isObjectOfType(
19160
+ "Int8Array"
19161
+ /* Int8Array */
19162
+ );
19163
+ is.uint8Array = isObjectOfType(
19164
+ "Uint8Array"
19165
+ /* Uint8Array */
19166
+ );
19167
+ is.uint8ClampedArray = isObjectOfType(
19168
+ "Uint8ClampedArray"
19169
+ /* Uint8ClampedArray */
19170
+ );
19171
+ is.int16Array = isObjectOfType(
19172
+ "Int16Array"
19173
+ /* Int16Array */
19174
+ );
19175
+ is.uint16Array = isObjectOfType(
19176
+ "Uint16Array"
19177
+ /* Uint16Array */
19178
+ );
19179
+ is.int32Array = isObjectOfType(
19180
+ "Int32Array"
19181
+ /* Int32Array */
19182
+ );
19183
+ is.uint32Array = isObjectOfType(
19184
+ "Uint32Array"
19185
+ /* Uint32Array */
19186
+ );
19187
+ is.float32Array = isObjectOfType(
19188
+ "Float32Array"
19189
+ /* Float32Array */
19190
+ );
19191
+ is.float64Array = isObjectOfType(
19192
+ "Float64Array"
19193
+ /* Float64Array */
19194
+ );
19195
+ is.bigInt64Array = isObjectOfType(
19196
+ "BigInt64Array"
19197
+ /* BigInt64Array */
19198
+ );
19199
+ is.bigUint64Array = isObjectOfType(
19200
+ "BigUint64Array"
19201
+ /* BigUint64Array */
19202
+ );
19203
+ is.arrayBuffer = isObjectOfType(
19204
+ "ArrayBuffer"
19205
+ /* ArrayBuffer */
19206
+ );
19207
+ is.sharedArrayBuffer = isObjectOfType(
19208
+ "SharedArrayBuffer"
19209
+ /* SharedArrayBuffer */
19210
+ );
19211
+ is.dataView = isObjectOfType(
19212
+ "DataView"
19213
+ /* DataView */
19214
+ );
18972
19215
  is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
18973
- is.urlInstance = (value) => isObjectOfType("URL")(value);
19216
+ is.urlInstance = (value) => isObjectOfType(
19217
+ "URL"
19218
+ /* URL */
19219
+ )(value);
18974
19220
  is.urlString = (value) => {
18975
19221
  if (!is.string(value)) {
18976
19222
  return false;
@@ -19015,6 +19261,7 @@ var require_dist = __commonJS({
19015
19261
  "Float64Array",
19016
19262
  "BigInt64Array",
19017
19263
  "BigUint64Array"
19264
+ /* BigUint64Array */
19018
19265
  ]);
19019
19266
  is.typedArray = (value) => {
19020
19267
  const objectType = getObjectType(value);
@@ -19093,10 +19340,12 @@ var require_dist = __commonJS({
19093
19340
  }
19094
19341
  };
19095
19342
  exports.assert = {
19343
+ // Unknowns.
19096
19344
  undefined: (value) => assertType(is.undefined(value), "undefined", value),
19097
19345
  string: (value) => assertType(is.string(value), "string", value),
19098
19346
  number: (value) => assertType(is.number(value), "number", value),
19099
19347
  bigint: (value) => assertType(is.bigint(value), "bigint", value),
19348
+ // eslint-disable-next-line @typescript-eslint/ban-types
19100
19349
  function_: (value) => assertType(is.function_(value), "Function", value),
19101
19350
  null_: (value) => assertType(is.null_(value), "null", value),
19102
19351
  class_: (value) => assertType(is.class_(value), "Class", value),
@@ -19115,7 +19364,9 @@ var require_dist = __commonJS({
19115
19364
  promise: (value) => assertType(is.promise(value), "Promise", value),
19116
19365
  generatorFunction: (value) => assertType(is.generatorFunction(value), "GeneratorFunction", value),
19117
19366
  asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), "AsyncGeneratorFunction", value),
19367
+ // eslint-disable-next-line @typescript-eslint/ban-types
19118
19368
  asyncFunction: (value) => assertType(is.asyncFunction(value), "AsyncFunction", value),
19369
+ // eslint-disable-next-line @typescript-eslint/ban-types
19119
19370
  boundFunction: (value) => assertType(is.boundFunction(value), "Function", value),
19120
19371
  regExp: (value) => assertType(is.regExp(value), "RegExp", value),
19121
19372
  date: (value) => assertType(is.date(value), "Date", value),
@@ -19164,10 +19415,13 @@ var require_dist = __commonJS({
19164
19415
  nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set", value),
19165
19416
  emptyMap: (value) => assertType(is.emptyMap(value), "empty map", value),
19166
19417
  nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map", value),
19418
+ // Numbers.
19167
19419
  evenInteger: (value) => assertType(is.evenInteger(value), "even integer", value),
19168
19420
  oddInteger: (value) => assertType(is.oddInteger(value), "odd integer", value),
19421
+ // Two arguments.
19169
19422
  directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T", instance),
19170
19423
  inRange: (value, range) => assertType(is.inRange(value, range), "in range", value),
19424
+ // Variadic functions.
19171
19425
  any: (predicate, ...values) => assertType(is.any(predicate, ...values), "predicate returns truthy for any value", values),
19172
19426
  all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values", values)
19173
19427
  };
@@ -19586,6 +19840,8 @@ var require_errors = __commonJS({
19586
19840
  this.code = error.code;
19587
19841
  }
19588
19842
  Object.defineProperty(this, "options", {
19843
+ // This fails because of TS 3.7.2 useDefineForClassFields
19844
+ // Ref: https://github.com/microsoft/TypeScript/issues/34972
19589
19845
  enumerable: false,
19590
19846
  value: options
19591
19847
  });
@@ -19871,6 +20127,7 @@ var require_http_cache_semantics = __commonJS({
19871
20127
  ]);
19872
20128
  var hopByHopHeaders = {
19873
20129
  date: true,
20130
+ // included, because we add Age update Date
19874
20131
  connection: true,
19875
20132
  "keep-alive": true,
19876
20133
  "proxy-authenticate": true,
@@ -19881,6 +20138,7 @@ var require_http_cache_semantics = __commonJS({
19881
20138
  upgrade: true
19882
20139
  };
19883
20140
  var excludedFromRevalidationUpdate = {
20141
+ // Since the old body is reused, it doesn't make sense to change properties of the body
19884
20142
  "content-length": true,
19885
20143
  "content-encoding": true,
19886
20144
  "transfer-encoding": true,
@@ -19967,7 +20225,19 @@ var require_http_cache_semantics = __commonJS({
19967
20225
  return Date.now();
19968
20226
  }
19969
20227
  storable() {
19970
- return !!(!this._reqcc["no-store"] && ("GET" === this._method || "HEAD" === this._method || "POST" === this._method && this._hasExplicitExpiration()) && understoodStatuses.has(this._status) && !this._rescc["no-store"] && (!this._isShared || !this._rescc.private) && (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && (this._resHeaders.expires || this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || statusCodeCacheableByDefault.has(this._status)));
20228
+ return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless:
20229
+ // The request method is understood by the cache and defined as being cacheable, and
20230
+ ("GET" === this._method || "HEAD" === this._method || "POST" === this._method && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and
20231
+ understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and
20232
+ !this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and
20233
+ (!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared,
20234
+ (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either:
20235
+ // contains an Expires header field, or
20236
+ (this._resHeaders.expires || // contains a max-age response directive, or
20237
+ // contains a s-maxage response directive and the cache is shared, or
20238
+ // contains a public response directive.
20239
+ this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default
20240
+ statusCodeCacheableByDefault.has(this._status)));
19971
20241
  }
19972
20242
  _hasExplicitExpiration() {
19973
20243
  return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires;
@@ -19998,7 +20268,9 @@ var require_http_cache_semantics = __commonJS({
19998
20268
  return this._requestMatches(req, false);
19999
20269
  }
20000
20270
  _requestMatches(req, allowHeadMethod) {
20001
- return (!this._url || this._url === req.url) && this._host === req.headers.host && (!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && this._varyMatches(req);
20271
+ return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and
20272
+ (!req.method || this._method === req.method || allowHeadMethod && "HEAD" === req.method) && // selecting header fields nominated by the stored response (if any) match those presented, and
20273
+ this._varyMatches(req);
20002
20274
  }
20003
20275
  _allowsStoringAuthenticated() {
20004
20276
  return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"];
@@ -20052,6 +20324,10 @@ var require_http_cache_semantics = __commonJS({
20052
20324
  headers.date = new Date(this.now()).toUTCString();
20053
20325
  return headers;
20054
20326
  }
20327
+ /**
20328
+ * Value of the Date response header or current time if Date was invalid
20329
+ * @return timestamp
20330
+ */
20055
20331
  date() {
20056
20332
  const serverDate = Date.parse(this._resHeaders.date);
20057
20333
  if (isFinite(serverDate)) {
@@ -20059,6 +20335,12 @@ var require_http_cache_semantics = __commonJS({
20059
20335
  }
20060
20336
  return this._responseTime;
20061
20337
  }
20338
+ /**
20339
+ * Value of the Age header, in seconds, updated for the current time.
20340
+ * May be fractional.
20341
+ *
20342
+ * @return Number
20343
+ */
20062
20344
  age() {
20063
20345
  let age = this._ageValue();
20064
20346
  const residentTime = (this.now() - this._responseTime) / 1e3;
@@ -20067,6 +20349,13 @@ var require_http_cache_semantics = __commonJS({
20067
20349
  _ageValue() {
20068
20350
  return toNumberOrZero(this._resHeaders.age);
20069
20351
  }
20352
+ /**
20353
+ * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`.
20354
+ *
20355
+ * For an up-to-date value, see `timeToLive()`.
20356
+ *
20357
+ * @return Number
20358
+ */
20070
20359
  maxAge() {
20071
20360
  if (!this.storable() || this._rescc["no-cache"]) {
20072
20361
  return 0;
@@ -20163,6 +20452,13 @@ var require_http_cache_semantics = __commonJS({
20163
20452
  reqcc: this._reqcc
20164
20453
  };
20165
20454
  }
20455
+ /**
20456
+ * Headers for sending to the origin server to revalidate stale response.
20457
+ * Allows server to return 304 to allow reuse of the previous response.
20458
+ *
20459
+ * Hop by hop headers are always stripped.
20460
+ * Revalidation headers may be added or removed, depending on request.
20461
+ */
20166
20462
  revalidationHeaders(incomingReq) {
20167
20463
  this._assertRequestHasHeaders(incomingReq);
20168
20464
  const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers);
@@ -20193,6 +20489,15 @@ var require_http_cache_semantics = __commonJS({
20193
20489
  }
20194
20490
  return headers;
20195
20491
  }
20492
+ /**
20493
+ * Creates new CachePolicy with information combined from the previews response,
20494
+ * and the new revalidation response.
20495
+ *
20496
+ * Returns {policy, modified} where modified is a boolean indicating
20497
+ * whether the response body has been modified, and old cached body can't be used.
20498
+ *
20499
+ * @return {Object} {policy: CachePolicy, modified: Boolean}
20500
+ */
20196
20501
  revalidatedPolicy(request, response) {
20197
20502
  this._assertRequestHasHeaders(request);
20198
20503
  if (this._useStaleIfError() && isErrorResponse(response)) {
@@ -20222,6 +20527,9 @@ var require_http_cache_semantics = __commonJS({
20222
20527
  if (!matches) {
20223
20528
  return {
20224
20529
  policy: new this.constructor(request, response),
20530
+ // Client receiving 304 without body, even if it's invalid/mismatched has no option
20531
+ // but to reuse a cached body. We don't have a good way to tell clients to do
20532
+ // error recovery in such case.
20225
20533
  modified: response.status != 304,
20226
20534
  matches: false
20227
20535
  };
@@ -21334,6 +21642,7 @@ var require_normalize_arguments = __commonJS({
21334
21642
  }
21335
21643
  if (options.cache) {
21336
21644
  options.cacheableRequest = new CacheableRequest(
21645
+ // @ts-ignore Cannot properly type a function with multiple definitions yet
21337
21646
  (requestOptions, handler) => requestOptions[types_1.requestSymbol](requestOptions, handler),
21338
21647
  options.cache
21339
21648
  );
@@ -22182,6 +22491,7 @@ var require_p_timeout = __commonJS({
22182
22491
  reject(timeoutError);
22183
22492
  }, milliseconds);
22184
22493
  pFinally(
22494
+ // eslint-disable-next-line promise/prefer-await-to-then
22185
22495
  promise.then(resolve, reject),
22186
22496
  () => {
22187
22497
  clearTimeout(timer);
@@ -23311,6 +23621,7 @@ var require_kleur = __commonJS({
23311
23621
  var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
23312
23622
  var $2 = {
23313
23623
  enabled: !NODE_DISABLE_COLORS && TERM !== "dumb" && FORCE_COLOR !== "0",
23624
+ // modifiers
23314
23625
  reset: init(0, 0),
23315
23626
  bold: init(1, 22),
23316
23627
  dim: init(2, 22),
@@ -23319,6 +23630,7 @@ var require_kleur = __commonJS({
23319
23630
  inverse: init(7, 27),
23320
23631
  hidden: init(8, 28),
23321
23632
  strikethrough: init(9, 29),
23633
+ // colors
23322
23634
  black: init(30, 39),
23323
23635
  red: init(31, 39),
23324
23636
  green: init(32, 39),
@@ -23329,6 +23641,7 @@ var require_kleur = __commonJS({
23329
23641
  white: init(37, 39),
23330
23642
  gray: init(90, 39),
23331
23643
  grey: init(90, 39),
23644
+ // background colors
23332
23645
  bgBlack: init(40, 49),
23333
23646
  bgRed: init(41, 49),
23334
23647
  bgGreen: init(42, 49),
@@ -24157,7 +24470,7 @@ var require_datepart = __commonJS({
24157
24470
  locales
24158
24471
  }) {
24159
24472
  this.token = token;
24160
- this.date = date || new Date();
24473
+ this.date = date || /* @__PURE__ */ new Date();
24161
24474
  this.parts = parts || [this];
24162
24475
  this.locales = locales || {};
24163
24476
  }
@@ -24482,19 +24795,39 @@ var require_date = __commonJS({
24482
24795
  token
24483
24796
  }) => token.replace(/\\(.)/g, "$1"),
24484
24797
  2: (opts) => new Day(opts),
24798
+ // Day // TODO
24485
24799
  3: (opts) => new Month(opts),
24800
+ // Month
24486
24801
  4: (opts) => new Year(opts),
24802
+ // Year
24487
24803
  5: (opts) => new Meridiem(opts),
24804
+ // AM/PM // TODO (special)
24488
24805
  6: (opts) => new Hours(opts),
24806
+ // Hours
24489
24807
  7: (opts) => new Minutes(opts),
24808
+ // Minutes
24490
24809
  8: (opts) => new Seconds(opts),
24810
+ // Seconds
24491
24811
  9: (opts) => new Milliseconds(opts)
24812
+ // Fractional seconds
24492
24813
  };
24493
24814
  var dfltLocales = {
24494
24815
  months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
24495
24816
  monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
24496
24817
  weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
24497
24818
  weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")
24819
+ /**
24820
+ * DatePrompt Base Element
24821
+ * @param {Object} opts Options
24822
+ * @param {String} opts.message Message
24823
+ * @param {Number} [opts.initial] Index of default value
24824
+ * @param {String} [opts.mask] The format mask
24825
+ * @param {object} [opts.locales] The date locales
24826
+ * @param {String} [opts.error] The error message shown on invalid value
24827
+ * @param {Function} [opts.validate] Function to validate the submitted value
24828
+ * @param {Stream} [opts.stdin] The Readable stream to listen to
24829
+ * @param {Stream} [opts.stdout] The Writable stream to write readline data to
24830
+ */
24498
24831
  };
24499
24832
  var DatePrompt = class extends Prompt {
24500
24833
  constructor(opts = {}) {
@@ -24503,7 +24836,7 @@ var require_date = __commonJS({
24503
24836
  this.cursor = 0;
24504
24837
  this.typed = "";
24505
24838
  this.locales = Object.assign(dfltLocales, opts.locales);
24506
- this._date = opts.initial || new Date();
24839
+ this._date = opts.initial || /* @__PURE__ */ new Date();
24507
24840
  this.errorMsg = opts.error || "Please Enter A Valid Value";
24508
24841
  this.validator = opts.validate || (() => true);
24509
24842
  this.mask = opts.mask || "YYYY-MM-DD HH:mm:ss";
@@ -25019,6 +25352,7 @@ Instructions:
25019
25352
  title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
25020
25353
  return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
25021
25354
  }
25355
+ // shared with autocompleteMultiselect
25022
25356
  paginateOptions(options) {
25023
25357
  const c = this.cursor;
25024
25358
  let styledOptions = options.map((v, i) => this.renderOption(c, v, i));
@@ -25042,6 +25376,7 @@ Instructions:
25042
25376
  }
25043
25377
  return "\n" + scopedOptions.join("\n") + "\n" + hint;
25044
25378
  }
25379
+ // shared with autocomleteMultiselect
25045
25380
  renderOptions(options) {
25046
25381
  if (!this.done) {
25047
25382
  return this.paginateOptions(options);
@@ -26448,7 +26783,7 @@ var require_datepart2 = __commonJS({
26448
26783
  var DatePart = class {
26449
26784
  constructor({ token, date, parts, locales }) {
26450
26785
  this.token = token;
26451
- this.date = date || new Date();
26786
+ this.date = date || /* @__PURE__ */ new Date();
26452
26787
  this.parts = parts || [this];
26453
26788
  this.locales = locales || {};
26454
26789
  }
@@ -26727,13 +27062,21 @@ var require_date2 = __commonJS({
26727
27062
  var regexGroups = {
26728
27063
  1: ({ token }) => token.replace(/\\(.)/g, "$1"),
26729
27064
  2: (opts) => new Day(opts),
27065
+ // Day // TODO
26730
27066
  3: (opts) => new Month(opts),
27067
+ // Month
26731
27068
  4: (opts) => new Year(opts),
27069
+ // Year
26732
27070
  5: (opts) => new Meridiem(opts),
27071
+ // AM/PM // TODO (special)
26733
27072
  6: (opts) => new Hours(opts),
27073
+ // Hours
26734
27074
  7: (opts) => new Minutes(opts),
27075
+ // Minutes
26735
27076
  8: (opts) => new Seconds(opts),
27077
+ // Seconds
26736
27078
  9: (opts) => new Milliseconds(opts)
27079
+ // Fractional seconds
26737
27080
  };
26738
27081
  var dfltLocales = {
26739
27082
  months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
@@ -26748,7 +27091,7 @@ var require_date2 = __commonJS({
26748
27091
  this.cursor = 0;
26749
27092
  this.typed = "";
26750
27093
  this.locales = Object.assign(dfltLocales, opts.locales);
26751
- this._date = opts.initial || new Date();
27094
+ this._date = opts.initial || /* @__PURE__ */ new Date();
26752
27095
  this.errorMsg = opts.error || "Please Enter A Valid Value";
26753
27096
  this.validator = opts.validate || (() => true);
26754
27097
  this.mask = opts.mask || "YYYY-MM-DD HH:mm:ss";
@@ -27214,6 +27557,7 @@ Instructions:
27214
27557
  title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
27215
27558
  return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
27216
27559
  }
27560
+ // shared with autocompleteMultiselect
27217
27561
  paginateOptions(options) {
27218
27562
  const c = this.cursor;
27219
27563
  let styledOptions = options.map((v, i) => this.renderOption(c, v, i));
@@ -27237,6 +27581,7 @@ Instructions:
27237
27581
  }
27238
27582
  return "\n" + scopedOptions.join("\n") + "\n" + hint;
27239
27583
  }
27584
+ // shared with autocomleteMultiselect
27240
27585
  renderOptions(options) {
27241
27586
  if (!this.done) {
27242
27587
  return this.paginateOptions(options);
@@ -28419,7 +28764,10 @@ var require_minipass = __commonJS({
28419
28764
  var doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== "1";
28420
28765
  var ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol("asyncIterator not implemented");
28421
28766
  var ITERATOR = doIter && Symbol.iterator || Symbol("iterator not implemented");
28422
- var B = Buffer.alloc ? Buffer : require_safe_buffer().Buffer;
28767
+ var B = Buffer.alloc ? Buffer : (
28768
+ /* istanbul ignore next */
28769
+ require_safe_buffer().Buffer
28770
+ );
28423
28771
  var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
28424
28772
  var isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0;
28425
28773
  var isArrayBufferView = (b) => !B.isBuffer(b) && ArrayBuffer.isView(b);
@@ -28504,7 +28852,8 @@ var require_minipass = __commonJS({
28504
28852
  cb();
28505
28853
  return ret;
28506
28854
  }
28507
- if (typeof chunk === "string" && !this[OBJECTMODE] && !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
28855
+ if (typeof chunk === "string" && !this[OBJECTMODE] && // unless it is a string already ready for us to use
28856
+ !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
28508
28857
  chunk = B.from(chunk, encoding);
28509
28858
  }
28510
28859
  if (B.isBuffer(chunk) && this[ENCODING])
@@ -28569,6 +28918,7 @@ var require_minipass = __commonJS({
28569
28918
  this[MAYBE_EMIT_END]();
28570
28919
  return this;
28571
28920
  }
28921
+ // don't let the internal resume be overwritten
28572
28922
  [RESUME]() {
28573
28923
  if (this[DESTROYED])
28574
28924
  return;
@@ -28716,6 +29066,7 @@ var require_minipass = __commonJS({
28716
29066
  this.removeAllListeners(ev);
28717
29067
  }
28718
29068
  }
29069
+ // const all = await stream.collect()
28719
29070
  collect() {
28720
29071
  const buf = [];
28721
29072
  buf.dataLength = 0;
@@ -28725,9 +29076,11 @@ var require_minipass = __commonJS({
28725
29076
  });
28726
29077
  return this.promise().then(() => buf);
28727
29078
  }
29079
+ // const data = await stream.concat()
28728
29080
  concat() {
28729
29081
  return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then((buf) => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : B.concat(buf, buf.dataLength));
28730
29082
  }
29083
+ // stream.promise().then(() => done, er => emitted error)
28731
29084
  promise() {
28732
29085
  return new Promise((resolve, reject) => {
28733
29086
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
@@ -28735,6 +29088,7 @@ var require_minipass = __commonJS({
28735
29088
  this.on("error", (er) => reject(er));
28736
29089
  });
28737
29090
  }
29091
+ // for await (let chunk of stream)
28738
29092
  [ASYNCITERATOR]() {
28739
29093
  const next = () => {
28740
29094
  const res = this.read();
@@ -28772,6 +29126,7 @@ var require_minipass = __commonJS({
28772
29126
  };
28773
29127
  return { next };
28774
29128
  }
29129
+ // for (let chunk of stream)
28775
29130
  [ITERATOR]() {
28776
29131
  const next = () => {
28777
29132
  const value = this.read();
@@ -28800,7 +29155,8 @@ var require_minipass = __commonJS({
28800
29155
  return this;
28801
29156
  }
28802
29157
  static isStream(s) {
28803
- return !!s && (s instanceof Minipass || s instanceof EE && (typeof s.pipe === "function" || typeof s.write === "function" && typeof s.end === "function"));
29158
+ return !!s && (s instanceof Minipass || s instanceof EE && (typeof s.pipe === "function" || // readable
29159
+ typeof s.write === "function" && typeof s.end === "function"));
28804
29160
  }
28805
29161
  };
28806
29162
  }
@@ -28809,7 +29165,8 @@ var require_minipass = __commonJS({
28809
29165
  // ../../node_modules/tar/node_modules/minizlib/constants.js
28810
29166
  var require_constants3 = __commonJS({
28811
29167
  "../../node_modules/tar/node_modules/minizlib/constants.js"(exports, module2) {
28812
- var realZlibConstants = require("zlib").constants || { ZLIB_VERNUM: 4736 };
29168
+ var realZlibConstants = require("zlib").constants || /* istanbul ignore next */
29169
+ { ZLIB_VERNUM: 4736 };
28813
29170
  module2.exports = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), {
28814
29171
  Z_NO_FLUSH: 0,
28815
29172
  Z_PARTIAL_FLUSH: 1,
@@ -29173,25 +29530,41 @@ var require_types2 = __commonJS({
29173
29530
  "use strict";
29174
29531
  exports.name = /* @__PURE__ */ new Map([
29175
29532
  ["0", "File"],
29533
+ // same as File
29176
29534
  ["", "OldFile"],
29177
29535
  ["1", "Link"],
29178
29536
  ["2", "SymbolicLink"],
29537
+ // Devices and FIFOs aren't fully supported
29538
+ // they are parsed, but skipped when unpacking
29179
29539
  ["3", "CharacterDevice"],
29180
29540
  ["4", "BlockDevice"],
29181
29541
  ["5", "Directory"],
29182
29542
  ["6", "FIFO"],
29543
+ // same as File
29183
29544
  ["7", "ContiguousFile"],
29545
+ // pax headers
29184
29546
  ["g", "GlobalExtendedHeader"],
29185
29547
  ["x", "ExtendedHeader"],
29548
+ // vendor-specific stuff
29549
+ // skip
29186
29550
  ["A", "SolarisACL"],
29551
+ // like 5, but with data, which should be skipped
29187
29552
  ["D", "GNUDumpDir"],
29553
+ // metadata only, skip
29188
29554
  ["I", "Inode"],
29555
+ // data = link path of next file
29189
29556
  ["K", "NextFileHasLongLinkpath"],
29557
+ // data = path of next file
29190
29558
  ["L", "NextFileHasLongPath"],
29559
+ // skip
29191
29560
  ["M", "ContinuationFile"],
29561
+ // like L
29192
29562
  ["N", "OldGnuLongPath"],
29563
+ // skip
29193
29564
  ["S", "SparseFile"],
29565
+ // skip
29194
29566
  ["V", "TapeVolumeHeader"],
29567
+ // like x
29195
29568
  ["X", "OldExtendedHeader"]
29196
29569
  ]);
29197
29570
  exports.code = new Map(Array.from(exports.name).map((kv) => [kv[1], kv[0]]));
@@ -29614,6 +29987,9 @@ var require_pax = __commonJS({
29614
29987
  buf[i] = 0;
29615
29988
  }
29616
29989
  new Header({
29990
+ // XXX split the path
29991
+ // then the path should be PaxHeader + basename, but less than 99,
29992
+ // prepend with the dirname
29617
29993
  path: ("PaxHeader/" + path3.basename(this.path)).slice(0, 99),
29618
29994
  mode: this.mode || 420,
29619
29995
  uid: this.uid || null,
@@ -29838,6 +30214,8 @@ var require_write_entry = __commonJS({
29838
30214
  this.header = new Header({
29839
30215
  path: this.path,
29840
30216
  linkpath: this.linkpath,
30217
+ // only the permissions and setuid/setgid/sticky bitflags
30218
+ // not the higher-order bits that specify file type
29841
30219
  mode: this[MODE](this.stat.mode),
29842
30220
  uid: this.portable ? null : this.stat.uid,
29843
30221
  gid: this.portable ? null : this.stat.gid,
@@ -30044,6 +30422,8 @@ var require_write_entry = __commonJS({
30044
30422
  this.header = new Header({
30045
30423
  path: this.path,
30046
30424
  linkpath: this.linkpath,
30425
+ // only the permissions and setuid/setgid/sticky bitflags
30426
+ // not the higher-order bits that specify file type
30047
30427
  mode: this.mode,
30048
30428
  uid: this.portable ? null : this.uid,
30049
30429
  gid: this.portable ? null : this.gid,
@@ -30358,6 +30738,7 @@ var require_pack = __commonJS({
30358
30738
  if (this[CURRENT] && this[CURRENT].entry)
30359
30739
  this[CURRENT].entry.resume();
30360
30740
  }
30741
+ // like .pipe() but using super, because our write() is special
30361
30742
  [PIPE](job) {
30362
30743
  job.piped = true;
30363
30744
  if (job.readdir)
@@ -30390,6 +30771,7 @@ var require_pack = __commonJS({
30390
30771
  super(opt);
30391
30772
  this[WRITEENTRYCLASS] = WriteEntrySync;
30392
30773
  }
30774
+ // pause/resume are no-ops in sync streams.
30393
30775
  pause() {
30394
30776
  }
30395
30777
  resume() {
@@ -30401,6 +30783,7 @@ var require_pack = __commonJS({
30401
30783
  [READDIR](job, stat) {
30402
30784
  this[ONREADDIR](job, fs4.readdirSync(job.absolute));
30403
30785
  }
30786
+ // gotta get it all in this tick
30404
30787
  [PIPE](job) {
30405
30788
  const source = job.entry;
30406
30789
  const zip = this.zip;
@@ -31543,7 +31926,8 @@ var require_mkdirp = __commonJS({
31543
31926
  }
31544
31927
  if (!made)
31545
31928
  made = null;
31546
- var cb = f || function() {
31929
+ var cb = f || /* istanbul ignore next */
31930
+ function() {
31547
31931
  };
31548
31932
  p = path3.resolve(p);
31549
31933
  xfs.mkdir(p, mode, function(er) {
@@ -32130,7 +32514,7 @@ var require_unpack = __commonJS({
32130
32514
  const fd = stream.fd;
32131
32515
  if (entry.mtime && !this.noMtime) {
32132
32516
  actions++;
32133
- const atime = entry.atime || new Date();
32517
+ const atime = entry.atime || /* @__PURE__ */ new Date();
32134
32518
  const mtime = entry.mtime;
32135
32519
  fs4.futimes(fd, atime, mtime, (er) => er ? fs4.utimes(abs, atime, mtime, (er2) => done(er2 && er)) : done());
32136
32520
  }
@@ -32163,7 +32547,7 @@ var require_unpack = __commonJS({
32163
32547
  };
32164
32548
  if (entry.mtime && !this.noMtime) {
32165
32549
  actions++;
32166
- fs4.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done);
32550
+ fs4.utimes(entry.absolute, entry.atime || /* @__PURE__ */ new Date(), entry.mtime, done);
32167
32551
  }
32168
32552
  if (this[DOCHOWN](entry)) {
32169
32553
  actions++;
@@ -32193,9 +32577,13 @@ var require_unpack = __commonJS({
32193
32577
  this[UNPEND]();
32194
32578
  entry.resume();
32195
32579
  }
32580
+ // Check if we can reuse an existing filesystem entry safely and
32581
+ // overwrite it, rather than unlinking and recreating
32582
+ // Windows doesn't report a useful nlink, so we just never reuse entries
32196
32583
  [ISREUSABLE](entry, st) {
32197
32584
  return entry.type === "File" && !this.unlink && st.isFile() && st.nlink <= 1 && process.platform !== "win32";
32198
32585
  }
32586
+ // check if a thing is there, and if so, try to clobber it
32199
32587
  [CHECKFS](entry) {
32200
32588
  this[PEND]();
32201
32589
  this[MKDIR](path3.dirname(entry.absolute), this.dmode, (er) => {
@@ -32310,7 +32698,7 @@ var require_unpack = __commonJS({
32310
32698
  tx.on("end", (_) => {
32311
32699
  let er = null;
32312
32700
  if (entry.mtime && !this.noMtime) {
32313
- const atime = entry.atime || new Date();
32701
+ const atime = entry.atime || /* @__PURE__ */ new Date();
32314
32702
  const mtime = entry.mtime;
32315
32703
  try {
32316
32704
  fs4.futimesSync(fd, atime, mtime);
@@ -32345,7 +32733,7 @@ var require_unpack = __commonJS({
32345
32733
  return this[ONERROR](er, entry);
32346
32734
  if (entry.mtime && !this.noMtime) {
32347
32735
  try {
32348
- fs4.utimesSync(entry.absolute, entry.atime || new Date(), entry.mtime);
32736
+ fs4.utimesSync(entry.absolute, entry.atime || /* @__PURE__ */ new Date(), entry.mtime);
32349
32737
  } catch (er2) {
32350
32738
  }
32351
32739
  }
@@ -32504,8 +32892,10 @@ var require_which2 = __commonJS({
32504
32892
  var getPathInfo = (cmd, opt) => {
32505
32893
  const colon = opt.colon || COLON;
32506
32894
  const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
32895
+ // windows always checks the cwd first
32507
32896
  ...isWindows ? [process.cwd()] : [],
32508
- ...(opt.path || process.env.PATH || "").split(colon)
32897
+ ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
32898
+ "").split(colon)
32509
32899
  ];
32510
32900
  const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
32511
32901
  const pathExt = isWindows ? pathExtExe.split(colon) : [""];
@@ -32929,7 +33319,8 @@ var require_event_stream = __commonJS({
32929
33319
  es.pause = pause;
32930
33320
  es.split = split;
32931
33321
  es.pipeline = es.connect = es.pipe = pipeline2;
32932
- es.concat = es.merge = function() {
33322
+ es.concat = //actually this should be called concat
33323
+ es.merge = function() {
32933
33324
  var toMerge = [].slice.call(arguments);
32934
33325
  if (toMerge.length === 1 && toMerge[0] instanceof Array) {
32935
33326
  toMerge = toMerge[0];
@@ -33164,6 +33555,7 @@ var require_ps_tree = __commonJS({
33164
33555
  processLister = spawn2("ps", ["-A", "-o", "ppid,pid,stat,comm"]);
33165
33556
  }
33166
33557
  es.connect(
33558
+ // spawn('ps', ['-A', '-o', 'ppid,pid,stat,comm']).stdout,
33167
33559
  processLister.stdout,
33168
33560
  es.split(),
33169
33561
  es.map(function(line, cb) {
@@ -33832,8 +34224,18 @@ var require_tasks = __commonJS({
33832
34224
  const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
33833
34225
  const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
33834
34226
  const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
33835
- const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
33836
- const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
34227
+ const staticTasks = convertPatternsToTasks(
34228
+ staticPatterns,
34229
+ negativePatterns,
34230
+ /* dynamic */
34231
+ false
34232
+ );
34233
+ const dynamicTasks = convertPatternsToTasks(
34234
+ dynamicPatterns,
34235
+ negativePatterns,
34236
+ /* dynamic */
34237
+ true
34238
+ );
33837
34239
  return staticTasks.concat(dynamicTasks);
33838
34240
  }
33839
34241
  exports.generate = generate;
@@ -35966,64 +36368,135 @@ var require_ignore = __commonJS({
35966
36368
  return slashes.slice(0, length - length % 2);
35967
36369
  };
35968
36370
  var REPLACERS = [
36371
+ // > Trailing spaces are ignored unless they are quoted with backslash ("\")
35969
36372
  [
36373
+ // (a\ ) -> (a )
36374
+ // (a ) -> (a)
36375
+ // (a \ ) -> (a )
35970
36376
  /\\?\s+$/,
35971
36377
  (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY
35972
36378
  ],
36379
+ // replace (\ ) with ' '
35973
36380
  [
35974
36381
  /\\\s/g,
35975
36382
  () => SPACE
35976
36383
  ],
36384
+ // Escape metacharacters
36385
+ // which is written down by users but means special for regular expressions.
36386
+ // > There are 12 characters with special meanings:
36387
+ // > - the backslash \,
36388
+ // > - the caret ^,
36389
+ // > - the dollar sign $,
36390
+ // > - the period or dot .,
36391
+ // > - the vertical bar or pipe symbol |,
36392
+ // > - the question mark ?,
36393
+ // > - the asterisk or star *,
36394
+ // > - the plus sign +,
36395
+ // > - the opening parenthesis (,
36396
+ // > - the closing parenthesis ),
36397
+ // > - and the opening square bracket [,
36398
+ // > - the opening curly brace {,
36399
+ // > These special characters are often called "metacharacters".
35977
36400
  [
35978
36401
  /[\\$.|*+(){^]/g,
35979
36402
  (match) => `\\${match}`
35980
36403
  ],
35981
36404
  [
36405
+ // > a question mark (?) matches a single character
35982
36406
  /(?!\\)\?/g,
35983
36407
  () => "[^/]"
35984
36408
  ],
36409
+ // leading slash
35985
36410
  [
36411
+ // > A leading slash matches the beginning of the pathname.
36412
+ // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
36413
+ // A leading slash matches the beginning of the pathname
35986
36414
  /^\//,
35987
36415
  () => "^"
35988
36416
  ],
36417
+ // replace special metacharacter slash after the leading slash
35989
36418
  [
35990
36419
  /\//g,
35991
36420
  () => "\\/"
35992
36421
  ],
35993
36422
  [
36423
+ // > A leading "**" followed by a slash means match in all directories.
36424
+ // > For example, "**/foo" matches file or directory "foo" anywhere,
36425
+ // > the same as pattern "foo".
36426
+ // > "**/foo/bar" matches file or directory "bar" anywhere that is directly
36427
+ // > under directory "foo".
36428
+ // Notice that the '*'s have been replaced as '\\*'
35994
36429
  /^\^*\\\*\\\*\\\//,
36430
+ // '**/foo' <-> 'foo'
35995
36431
  () => "^(?:.*\\/)?"
35996
36432
  ],
36433
+ // starting
35997
36434
  [
36435
+ // there will be no leading '/'
36436
+ // (which has been replaced by section "leading slash")
36437
+ // If starts with '**', adding a '^' to the regular expression also works
35998
36438
  /^(?=[^^])/,
35999
36439
  function startingReplacer() {
36000
36440
  return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
36001
36441
  }
36002
36442
  ],
36443
+ // two globstars
36003
36444
  [
36445
+ // Use lookahead assertions so that we could match more than one `'/**'`
36004
36446
  /\\\/\\\*\\\*(?=\\\/|$)/g,
36447
+ // Zero, one or several directories
36448
+ // should not use '*', or it will be replaced by the next replacer
36449
+ // Check if it is not the last `'/**'`
36005
36450
  (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
36006
36451
  ],
36452
+ // intermediate wildcards
36007
36453
  [
36454
+ // Never replace escaped '*'
36455
+ // ignore rule '\*' will match the path '*'
36456
+ // 'abc.*/' -> go
36457
+ // 'abc.*' -> skip this rule
36008
36458
  /(^|[^\\]+)\\\*(?=.+)/g,
36459
+ // '*.js' matches '.js'
36460
+ // '*.js' doesn't match 'abc'
36009
36461
  (_, p1) => `${p1}[^\\/]*`
36010
36462
  ],
36011
36463
  [
36464
+ // unescape, revert step 3 except for back slash
36465
+ // For example, if a user escape a '\\*',
36466
+ // after step 3, the result will be '\\\\\\*'
36012
36467
  /\\\\\\(?=[$.|*+(){^])/g,
36013
36468
  () => ESCAPE
36014
36469
  ],
36015
36470
  [
36471
+ // '\\\\' -> '\\'
36016
36472
  /\\\\/g,
36017
36473
  () => ESCAPE
36018
36474
  ],
36019
36475
  [
36476
+ // > The range notation, e.g. [a-zA-Z],
36477
+ // > can be used to match one of the characters in a range.
36478
+ // `\` is escaped by step 3
36020
36479
  /(\\)?\[([^\]/]*?)(\\*)($|\])/g,
36021
36480
  (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
36022
36481
  ],
36482
+ // ending
36023
36483
  [
36484
+ // 'js' will not match 'js.'
36485
+ // 'ab' will not match 'abc'
36024
36486
  /(?:[^*])$/,
36487
+ // WTF!
36488
+ // https://git-scm.com/docs/gitignore
36489
+ // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
36490
+ // which re-fixes #24, #38
36491
+ // > If there is a separator at the end of the pattern then the pattern
36492
+ // > will only match directories, otherwise the pattern can match both
36493
+ // > files and directories.
36494
+ // 'js*' will not match 'a.js'
36495
+ // 'js/' will not match 'a.js'
36496
+ // 'js' will match 'a.js' and 'a.js/'
36025
36497
  (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
36026
36498
  ],
36499
+ // trailing wildcard
36027
36500
  [
36028
36501
  /(\^|\\\/)?\\\*$/,
36029
36502
  (_, p1) => {
@@ -36124,6 +36597,7 @@ var require_ignore = __commonJS({
36124
36597
  this._rules.push(rule);
36125
36598
  }
36126
36599
  }
36600
+ // @param {Array<string> | string | Ignore} pattern
36127
36601
  add(pattern) {
36128
36602
  this._added = false;
36129
36603
  makeArray(
@@ -36134,9 +36608,23 @@ var require_ignore = __commonJS({
36134
36608
  }
36135
36609
  return this;
36136
36610
  }
36611
+ // legacy
36137
36612
  addPattern(pattern) {
36138
36613
  return this.add(pattern);
36139
36614
  }
36615
+ // | ignored : unignored
36616
+ // negative | 0:0 | 0:1 | 1:0 | 1:1
36617
+ // -------- | ------- | ------- | ------- | --------
36618
+ // 0 | TEST | TEST | SKIP | X
36619
+ // 1 | TESTIF | SKIP | TEST | X
36620
+ // - SKIP: always skip
36621
+ // - TEST: always test
36622
+ // - TESTIF: only test if checkUnignored
36623
+ // - X: that never happen
36624
+ // @param {boolean} whether should check if the path is unignored,
36625
+ // setting `checkUnignored` to `false` could reduce additional
36626
+ // path matching.
36627
+ // @returns {TestResult} true if a file is ignored
36140
36628
  _testOne(path3, checkUnignored) {
36141
36629
  let ignored = false;
36142
36630
  let unignored = false;
@@ -36156,6 +36644,7 @@ var require_ignore = __commonJS({
36156
36644
  unignored
36157
36645
  };
36158
36646
  }
36647
+ // @returns {TestResult}
36159
36648
  _test(originalPath, cache, checkUnignored, slices) {
36160
36649
  const path3 = originalPath && checkPath.convert(originalPath);
36161
36650
  checkPath(
@@ -36193,6 +36682,7 @@ var require_ignore = __commonJS({
36193
36682
  filter(paths) {
36194
36683
  return makeArray(paths).filter(this.createFilter());
36195
36684
  }
36685
+ // @returns {TestResult}
36196
36686
  test(path3) {
36197
36687
  return this._test(path3, this._testCache, true);
36198
36688
  }
@@ -36202,7 +36692,10 @@ var require_ignore = __commonJS({
36202
36692
  factory.isPathValid = isPathValid;
36203
36693
  factory.default = factory;
36204
36694
  module2.exports = factory;
36205
- if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) {
36695
+ if (
36696
+ // Detect `process` so that it can run in browsers.
36697
+ typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
36698
+ ) {
36206
36699
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
36207
36700
  checkPath.convert = makePosix;
36208
36701
  const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
@@ -36460,6 +36953,7 @@ var require_Node = __commonJS({
36460
36953
  constructor(type) {
36461
36954
  Object.defineProperty(this, NODE_TYPE, { value: type });
36462
36955
  }
36956
+ /** Create a copy of this node. */
36463
36957
  clone() {
36464
36958
  const copy2 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
36465
36959
  if (this.range)
@@ -36673,6 +37167,10 @@ var require_directives = __commonJS({
36673
37167
  copy2.docStart = this.docStart;
36674
37168
  return copy2;
36675
37169
  }
37170
+ /**
37171
+ * During parsing, get a Directives instance for the current document and
37172
+ * update the stream state according to the current version's spec.
37173
+ */
36676
37174
  atDocument() {
36677
37175
  const res = new Directives(this.yaml, this.tags);
36678
37176
  switch (this.yaml.version) {
@@ -36690,6 +37188,10 @@ var require_directives = __commonJS({
36690
37188
  }
36691
37189
  return res;
36692
37190
  }
37191
+ /**
37192
+ * @param onError - May be called even if the action was successful
37193
+ * @returns `true` on success
37194
+ */
36693
37195
  add(line, onError) {
36694
37196
  if (this.atNextDocument) {
36695
37197
  this.yaml = { explicit: Directives.defaultYaml.explicit, version: "1.1" };
@@ -36730,6 +37232,12 @@ var require_directives = __commonJS({
36730
37232
  return false;
36731
37233
  }
36732
37234
  }
37235
+ /**
37236
+ * Resolves a tag, matching handles to those defined in %TAG directives.
37237
+ *
37238
+ * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
37239
+ * `'!local'` tag, or `null` if unresolvable.
37240
+ */
36733
37241
  tagName(source, onError) {
36734
37242
  if (source === "!")
36735
37243
  return "!";
@@ -36758,6 +37266,10 @@ var require_directives = __commonJS({
36758
37266
  onError(`Could not resolve tag: ${source}`);
36759
37267
  return null;
36760
37268
  }
37269
+ /**
37270
+ * Given a fully resolved tag, returns its printable string form,
37271
+ * taking into account current tag prefixes and defaults.
37272
+ */
36761
37273
  tagString(tag) {
36762
37274
  for (const [handle, prefix] of Object.entries(this.tags)) {
36763
37275
  if (tag.startsWith(prefix))
@@ -36837,6 +37349,11 @@ var require_anchors = __commonJS({
36837
37349
  prevAnchors.add(anchor);
36838
37350
  return anchor;
36839
37351
  },
37352
+ /**
37353
+ * With circular references, the source node is only resolved after all
37354
+ * of its child nodes are. This is why anchors are set only after all of
37355
+ * the nodes have been created.
37356
+ */
36840
37357
  setAnchors: () => {
36841
37358
  for (const source of aliasObjects) {
36842
37359
  const ref = sourceObjects.get(source);
@@ -36876,6 +37393,10 @@ var require_Alias = __commonJS({
36876
37393
  }
36877
37394
  });
36878
37395
  }
37396
+ /**
37397
+ * Resolve the value of this alias within `doc`, finding the last
37398
+ * instance of the `source` anchor before this node.
37399
+ */
36879
37400
  resolve(doc) {
36880
37401
  let found = void 0;
36881
37402
  visit.visit(doc, {
@@ -37127,6 +37648,11 @@ var require_Collection = __commonJS({
37127
37648
  writable: true
37128
37649
  });
37129
37650
  }
37651
+ /**
37652
+ * Create a copy of this collection.
37653
+ *
37654
+ * @param schema - If defined, overwrites the original's schema
37655
+ */
37130
37656
  clone(schema) {
37131
37657
  const copy2 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
37132
37658
  if (schema)
@@ -37136,6 +37662,11 @@ var require_Collection = __commonJS({
37136
37662
  copy2.range = this.range.slice();
37137
37663
  return copy2;
37138
37664
  }
37665
+ /**
37666
+ * Adds a value to the collection. For `!!map` and `!!omap` the value must
37667
+ * be a Pair instance or a `{ key, value }` object, which may not have a key
37668
+ * that already exists in the map.
37669
+ */
37139
37670
  addIn(path3, value) {
37140
37671
  if (isEmptyPath(path3))
37141
37672
  this.add(value);
@@ -37150,6 +37681,10 @@ var require_Collection = __commonJS({
37150
37681
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
37151
37682
  }
37152
37683
  }
37684
+ /**
37685
+ * Removes a value from the collection.
37686
+ * @returns `true` if the item was found and removed.
37687
+ */
37153
37688
  deleteIn(path3) {
37154
37689
  const [key, ...rest] = path3;
37155
37690
  if (rest.length === 0)
@@ -37160,6 +37695,11 @@ var require_Collection = __commonJS({
37160
37695
  else
37161
37696
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
37162
37697
  }
37698
+ /**
37699
+ * Returns item at `key`, or `undefined` if not found. By default unwraps
37700
+ * scalar values from their surrounding node; to disable set `keepScalar` to
37701
+ * `true` (collections are always returned intact).
37702
+ */
37163
37703
  getIn(path3, keepScalar) {
37164
37704
  const [key, ...rest] = path3;
37165
37705
  const node = this.get(key, true);
@@ -37176,6 +37716,9 @@ var require_Collection = __commonJS({
37176
37716
  return n == null || allowScalar && Node.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
37177
37717
  });
37178
37718
  }
37719
+ /**
37720
+ * Checks if the collection includes a value with the key `key`.
37721
+ */
37179
37722
  hasIn(path3) {
37180
37723
  const [key, ...rest] = path3;
37181
37724
  if (rest.length === 0)
@@ -37183,6 +37726,10 @@ var require_Collection = __commonJS({
37183
37726
  const node = this.get(key, true);
37184
37727
  return Node.isCollection(node) ? node.hasIn(rest) : false;
37185
37728
  }
37729
+ /**
37730
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
37731
+ * boolean to add/remove the item from the set.
37732
+ */
37186
37733
  setIn(path3, value) {
37187
37734
  const [key, ...rest] = path3;
37188
37735
  if (rest.length === 0) {
@@ -38187,6 +38734,12 @@ var require_YAMLMap = __commonJS({
38187
38734
  static get tagName() {
38188
38735
  return "tag:yaml.org,2002:map";
38189
38736
  }
38737
+ /**
38738
+ * Adds a value to the collection.
38739
+ *
38740
+ * @param overwrite - If not set `true`, using a key that is already in the
38741
+ * collection will throw. Otherwise, overwrites the previous value.
38742
+ */
38190
38743
  add(pair, overwrite) {
38191
38744
  var _a;
38192
38745
  let _pair;
@@ -38233,6 +38786,11 @@ var require_YAMLMap = __commonJS({
38233
38786
  set(key, value) {
38234
38787
  this.add(new Pair.Pair(key, value), true);
38235
38788
  }
38789
+ /**
38790
+ * @param ctx - Conversion context, originally set in Document#toJS()
38791
+ * @param {Class} Type - If set, forces the returned collection type
38792
+ * @returns Instance of Type, Map, or Object
38793
+ */
38236
38794
  toJSON(_, ctx, Type) {
38237
38795
  const map = Type ? new Type() : (ctx == null ? void 0 : ctx.mapAsMap) ? /* @__PURE__ */ new Map() : {};
38238
38796
  if (ctx == null ? void 0 : ctx.onCreate)
@@ -38330,6 +38888,14 @@ var require_YAMLSeq = __commonJS({
38330
38888
  add(value) {
38331
38889
  this.items.push(value);
38332
38890
  }
38891
+ /**
38892
+ * Removes a value from the collection.
38893
+ *
38894
+ * `key` must contain a representation of an integer for this to succeed.
38895
+ * It may be wrapped in a `Scalar`.
38896
+ *
38897
+ * @returns `true` if the item was found and removed.
38898
+ */
38333
38899
  delete(key) {
38334
38900
  const idx = asItemIndex(key);
38335
38901
  if (typeof idx !== "number")
@@ -38344,10 +38910,23 @@ var require_YAMLSeq = __commonJS({
38344
38910
  const it = this.items[idx];
38345
38911
  return !keepScalar && Node.isScalar(it) ? it.value : it;
38346
38912
  }
38913
+ /**
38914
+ * Checks if the collection includes a value with the key `key`.
38915
+ *
38916
+ * `key` must contain a representation of an integer for this to succeed.
38917
+ * It may be wrapped in a `Scalar`.
38918
+ */
38347
38919
  has(key) {
38348
38920
  const idx = asItemIndex(key);
38349
38921
  return typeof idx === "number" && idx < this.items.length;
38350
38922
  }
38923
+ /**
38924
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
38925
+ * boolean to add/remove the item from the set.
38926
+ *
38927
+ * If `key` does not contain a representation of an integer, this will throw.
38928
+ * It may be wrapped in a `Scalar`.
38929
+ */
38351
38930
  set(key, value) {
38352
38931
  const idx = asItemIndex(key);
38353
38932
  if (typeof idx !== "number")
@@ -38711,6 +39290,14 @@ var require_binary = __commonJS({
38711
39290
  identify: (value) => value instanceof Uint8Array,
38712
39291
  default: false,
38713
39292
  tag: "tag:yaml.org,2002:binary",
39293
+ /**
39294
+ * Returns a Buffer in node and an Uint8Array in browsers
39295
+ *
39296
+ * To use the resulting buffer as an image, you'll want to do something like:
39297
+ *
39298
+ * const blob = new Blob([buffer], { type: 'image/jpeg' })
39299
+ * document.querySelector('#photo').src = URL.createObjectURL(blob)
39300
+ */
38714
39301
  resolve(src, onError) {
38715
39302
  if (typeof Buffer === "function") {
38716
39303
  return Buffer.from(src, "base64");
@@ -38852,6 +39439,10 @@ var require_omap = __commonJS({
38852
39439
  this.set = YAMLMap.YAMLMap.prototype.set.bind(this);
38853
39440
  this.tag = YAMLOMap.tag;
38854
39441
  }
39442
+ /**
39443
+ * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
39444
+ * but TypeScript won't allow widening the signature of a child method.
39445
+ */
38855
39446
  toJSON(_, ctx) {
38856
39447
  if (!ctx)
38857
39448
  return super.toJSON(_);
@@ -39090,6 +39681,10 @@ var require_set = __commonJS({
39090
39681
  if (!prev)
39091
39682
  this.items.push(pair);
39092
39683
  }
39684
+ /**
39685
+ * If `keepPair` is `true`, returns the Pair matching `key`.
39686
+ * Otherwise, returns the value of that Pair's key.
39687
+ */
39093
39688
  get(key, keepPair) {
39094
39689
  const pair = YAMLMap.findPair(this.items, key);
39095
39690
  return !keepPair && Node.isPair(pair) ? Node.isScalar(pair.key) ? pair.key.value : pair.key : pair;
@@ -39210,6 +39805,9 @@ var require_timestamp = __commonJS({
39210
39805
  identify: (value) => value instanceof Date,
39211
39806
  default: true,
39212
39807
  tag: "tag:yaml.org,2002:timestamp",
39808
+ // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
39809
+ // may be omitted altogether, resulting in a date format. In such a case, the time part is
39810
+ // assumed to be 00:00:00Z (start of day, UTC).
39213
39811
  test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
39214
39812
  resolve(str) {
39215
39813
  const match = str.match(timestamp.test);
@@ -39578,6 +40176,11 @@ var require_Document = __commonJS({
39578
40176
  this.contents = this.createNode(value, _replacer, options);
39579
40177
  }
39580
40178
  }
40179
+ /**
40180
+ * Create a deep copy of this Document and its contents.
40181
+ *
40182
+ * Custom Node values that inherit from `Object` still refer to their original instances.
40183
+ */
39581
40184
  clone() {
39582
40185
  const copy2 = Object.create(Document.prototype, {
39583
40186
  [Node.NODE_TYPE]: { value: Node.DOC }
@@ -39595,18 +40198,30 @@ var require_Document = __commonJS({
39595
40198
  copy2.range = this.range.slice();
39596
40199
  return copy2;
39597
40200
  }
40201
+ /** Adds a value to the document. */
39598
40202
  add(value) {
39599
40203
  if (assertCollection(this.contents))
39600
40204
  this.contents.add(value);
39601
40205
  }
40206
+ /** Adds a value to the document. */
39602
40207
  addIn(path3, value) {
39603
40208
  if (assertCollection(this.contents))
39604
40209
  this.contents.addIn(path3, value);
39605
40210
  }
40211
+ /**
40212
+ * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
40213
+ *
40214
+ * If `node` already has an anchor, `name` is ignored.
40215
+ * Otherwise, the `node.anchor` value will be set to `name`,
40216
+ * or if an anchor with that name is already present in the document,
40217
+ * `name` will be used as a prefix for a new unique anchor.
40218
+ * If `name` is undefined, the generated anchor will use 'a' as a prefix.
40219
+ */
39606
40220
  createAlias(node, name) {
39607
40221
  if (!node.anchor) {
39608
40222
  const prev = anchors.anchorNames(this);
39609
- node.anchor = !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name;
40223
+ node.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
40224
+ !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name;
39610
40225
  }
39611
40226
  return new Alias.Alias(node.anchor);
39612
40227
  }
@@ -39628,6 +40243,7 @@ var require_Document = __commonJS({
39628
40243
  const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};
39629
40244
  const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(
39630
40245
  this,
40246
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
39631
40247
  anchorPrefix || "a"
39632
40248
  );
39633
40249
  const ctx = {
@@ -39645,14 +40261,26 @@ var require_Document = __commonJS({
39645
40261
  setAnchors();
39646
40262
  return node;
39647
40263
  }
40264
+ /**
40265
+ * Convert a key and a value into a `Pair` using the current schema,
40266
+ * recursively wrapping all values as `Scalar` or `Collection` nodes.
40267
+ */
39648
40268
  createPair(key, value, options = {}) {
39649
40269
  const k = this.createNode(key, null, options);
39650
40270
  const v = this.createNode(value, null, options);
39651
40271
  return new Pair.Pair(k, v);
39652
40272
  }
40273
+ /**
40274
+ * Removes a value from the document.
40275
+ * @returns `true` if the item was found and removed.
40276
+ */
39653
40277
  delete(key) {
39654
40278
  return assertCollection(this.contents) ? this.contents.delete(key) : false;
39655
40279
  }
40280
+ /**
40281
+ * Removes a value from the document.
40282
+ * @returns `true` if the item was found and removed.
40283
+ */
39656
40284
  deleteIn(path3) {
39657
40285
  if (Collection.isEmptyPath(path3)) {
39658
40286
  if (this.contents == null)
@@ -39662,22 +40290,42 @@ var require_Document = __commonJS({
39662
40290
  }
39663
40291
  return assertCollection(this.contents) ? this.contents.deleteIn(path3) : false;
39664
40292
  }
40293
+ /**
40294
+ * Returns item at `key`, or `undefined` if not found. By default unwraps
40295
+ * scalar values from their surrounding node; to disable set `keepScalar` to
40296
+ * `true` (collections are always returned intact).
40297
+ */
39665
40298
  get(key, keepScalar) {
39666
40299
  return Node.isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0;
39667
40300
  }
40301
+ /**
40302
+ * Returns item at `path`, or `undefined` if not found. By default unwraps
40303
+ * scalar values from their surrounding node; to disable set `keepScalar` to
40304
+ * `true` (collections are always returned intact).
40305
+ */
39668
40306
  getIn(path3, keepScalar) {
39669
40307
  if (Collection.isEmptyPath(path3))
39670
40308
  return !keepScalar && Node.isScalar(this.contents) ? this.contents.value : this.contents;
39671
40309
  return Node.isCollection(this.contents) ? this.contents.getIn(path3, keepScalar) : void 0;
39672
40310
  }
40311
+ /**
40312
+ * Checks if the document includes a value with the key `key`.
40313
+ */
39673
40314
  has(key) {
39674
40315
  return Node.isCollection(this.contents) ? this.contents.has(key) : false;
39675
40316
  }
40317
+ /**
40318
+ * Checks if the document includes a value at `path`.
40319
+ */
39676
40320
  hasIn(path3) {
39677
40321
  if (Collection.isEmptyPath(path3))
39678
40322
  return this.contents !== void 0;
39679
40323
  return Node.isCollection(this.contents) ? this.contents.hasIn(path3) : false;
39680
40324
  }
40325
+ /**
40326
+ * Sets a value in this document. For `!!set`, `value` needs to be a
40327
+ * boolean to add/remove the item from the set.
40328
+ */
39681
40329
  set(key, value) {
39682
40330
  if (this.contents == null) {
39683
40331
  this.contents = Collection.collectionFromPath(this.schema, [key], value);
@@ -39685,6 +40333,10 @@ var require_Document = __commonJS({
39685
40333
  this.contents.set(key, value);
39686
40334
  }
39687
40335
  }
40336
+ /**
40337
+ * Sets a value in this document. For `!!set`, `value` needs to be a
40338
+ * boolean to add/remove the item from the set.
40339
+ */
39688
40340
  setIn(path3, value) {
39689
40341
  if (Collection.isEmptyPath(path3))
39690
40342
  this.contents = value;
@@ -39694,6 +40346,13 @@ var require_Document = __commonJS({
39694
40346
  this.contents.setIn(path3, value);
39695
40347
  }
39696
40348
  }
40349
+ /**
40350
+ * Change the YAML version and schema used by the document.
40351
+ * A `null` version disables support for directives, explicit tags, anchors, and aliases.
40352
+ * It also requires the `schema` option to be given as a `Schema` instance value.
40353
+ *
40354
+ * Overrides all previously set schema options.
40355
+ */
39697
40356
  setSchema(version, options = {}) {
39698
40357
  if (typeof version === "number")
39699
40358
  version = String(version);
@@ -39731,6 +40390,7 @@ var require_Document = __commonJS({
39731
40390
  else
39732
40391
  throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
39733
40392
  }
40393
+ // json & jsonArg are only used from toJSON()
39734
40394
  toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
39735
40395
  const ctx = {
39736
40396
  anchors: /* @__PURE__ */ new Map(),
@@ -39747,9 +40407,16 @@ var require_Document = __commonJS({
39747
40407
  onAnchor(res2, count);
39748
40408
  return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
39749
40409
  }
40410
+ /**
40411
+ * A JSON representation of the document `contents`.
40412
+ *
40413
+ * @param jsonArg Used by `JSON.stringify` to indicate the array index or
40414
+ * property name.
40415
+ */
39750
40416
  toJSON(jsonArg, onAnchor) {
39751
40417
  return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });
39752
40418
  }
40419
+ /** A YAML representation of the document. */
39753
40420
  toString(options = {}) {
39754
40421
  if (this.errors.length > 0)
39755
40422
  throw new Error("Document with errors cannot be stringified");
@@ -40280,6 +40947,7 @@ var require_resolve_flow_collection = __commonJS({
40280
40947
  if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))
40281
40948
  onError(
40282
40949
  key,
40950
+ // checked by containsNewline()
40283
40951
  "MULTILINE_IMPLICIT_KEY",
40284
40952
  "Implicit keys of flow sequence pairs need to be on a single line"
40285
40953
  );
@@ -41195,6 +41863,11 @@ ${cb}` : comment;
41195
41863
  this.errors = [];
41196
41864
  this.warnings = [];
41197
41865
  }
41866
+ /**
41867
+ * Current stream status information.
41868
+ *
41869
+ * Mostly useful at the end of input for an empty stream.
41870
+ */
41198
41871
  streamInfo() {
41199
41872
  return {
41200
41873
  comment: parsePrelude(this.prelude).comment,
@@ -41203,11 +41876,18 @@ ${cb}` : comment;
41203
41876
  warnings: this.warnings
41204
41877
  };
41205
41878
  }
41879
+ /**
41880
+ * Compose tokens into documents.
41881
+ *
41882
+ * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
41883
+ * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
41884
+ */
41206
41885
  *compose(tokens, forceDoc = false, endOffset = -1) {
41207
41886
  for (const token of tokens)
41208
41887
  yield* this.next(token);
41209
41888
  yield* this.end(forceDoc, endOffset);
41210
41889
  }
41890
+ /** Advance the composer by one CST token. */
41211
41891
  *next(token) {
41212
41892
  if (process.env.LOG_STREAM)
41213
41893
  console.dir(token, { depth: null });
@@ -41269,6 +41949,12 @@ ${end.comment}` : end.comment;
41269
41949
  this.errors.push(new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
41270
41950
  }
41271
41951
  }
41952
+ /**
41953
+ * Call at end of input to yield any remaining document.
41954
+ *
41955
+ * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
41956
+ * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
41957
+ */
41272
41958
  *end(forceDoc = false, endOffset = -1) {
41273
41959
  if (this.doc) {
41274
41960
  this.decorate(this.doc, true);
@@ -41735,6 +42421,12 @@ var require_lexer = __commonJS({
41735
42421
  this.next = null;
41736
42422
  this.pos = 0;
41737
42423
  }
42424
+ /**
42425
+ * Generate YAML tokens from the `source` string. If `incomplete`,
42426
+ * a part of the last line may be left as a buffer for the next call.
42427
+ *
42428
+ * @returns A generator of lexical tokens
42429
+ */
41738
42430
  *lex(source, incomplete = false) {
41739
42431
  if (source) {
41740
42432
  this.buffer = this.buffer ? this.buffer + source : source;
@@ -42378,6 +43070,10 @@ var require_parser = __commonJS({
42378
43070
  }
42379
43071
  }
42380
43072
  var Parser = class {
43073
+ /**
43074
+ * @param onNewLine - If defined, called separately with the start position of
43075
+ * each new line (in `parse()`, including the start of input).
43076
+ */
42381
43077
  constructor(onNewLine) {
42382
43078
  this.atNewLine = true;
42383
43079
  this.atScalar = false;
@@ -42390,6 +43086,14 @@ var require_parser = __commonJS({
42390
43086
  this.lexer = new lexer.Lexer();
42391
43087
  this.onNewLine = onNewLine;
42392
43088
  }
43089
+ /**
43090
+ * Parse `source` as a YAML stream.
43091
+ * If `incomplete`, a part of the last line may be left as a buffer for the next call.
43092
+ *
43093
+ * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.
43094
+ *
43095
+ * @returns A generator of tokens representing each directive, document, and other structure.
43096
+ */
42393
43097
  *parse(source, incomplete = false) {
42394
43098
  if (this.onNewLine && this.offset === 0)
42395
43099
  this.onNewLine(0);
@@ -42398,6 +43102,9 @@ var require_parser = __commonJS({
42398
43102
  if (!incomplete)
42399
43103
  yield* this.end();
42400
43104
  }
43105
+ /**
43106
+ * Advance the parser by the `source` of one lexical token.
43107
+ */
42401
43108
  *next(source) {
42402
43109
  this.source = source;
42403
43110
  if (process.env.LOG_TOKENS)
@@ -42446,6 +43153,7 @@ var require_parser = __commonJS({
42446
43153
  this.offset += source.length;
42447
43154
  }
42448
43155
  }
43156
+ /** Call at end of input to push out any remaining constructions */
42449
43157
  *end() {
42450
43158
  while (this.stack.length > 0)
42451
43159
  yield* this.pop();
@@ -43306,6 +44014,7 @@ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;$
43306
44014
  var styles = {
43307
44015
  modifier: {
43308
44016
  reset: [0, 0],
44017
+ // 21 isn't widely supported and 22 does the same thing
43309
44018
  bold: [1, 22],
43310
44019
  dim: [2, 22],
43311
44020
  italic: [3, 23],
@@ -43324,9 +44033,12 @@ var styles = {
43324
44033
  magenta: [35, 39],
43325
44034
  cyan: [36, 39],
43326
44035
  white: [37, 39],
44036
+ // Bright color
43327
44037
  blackBright: [90, 39],
43328
44038
  gray: [90, 39],
44039
+ // Alias of `blackBright`
43329
44040
  grey: [90, 39],
44041
+ // Alias of `blackBright`
43330
44042
  redBright: [91, 39],
43331
44043
  greenBright: [92, 39],
43332
44044
  yellowBright: [93, 39],
@@ -43344,9 +44056,12 @@ var styles = {
43344
44056
  bgMagenta: [45, 49],
43345
44057
  bgCyan: [46, 49],
43346
44058
  bgWhite: [47, 49],
44059
+ // Bright color
43347
44060
  bgBlackBright: [100, 49],
43348
44061
  bgGray: [100, 49],
44062
+ // Alias of `bgBlackBright`
43349
44063
  bgGrey: [100, 49],
44064
+ // Alias of `bgBlackBright`
43350
44065
  bgRedBright: [101, 49],
43351
44066
  bgGreenBright: [102, 49],
43352
44067
  bgYellowBright: [103, 49],
@@ -43416,9 +44131,11 @@ function assembleStyles() {
43416
44131
  }
43417
44132
  const integer = Number.parseInt(colorString, 16);
43418
44133
  return [
44134
+ /* eslint-disable no-bitwise */
43419
44135
  integer >> 16 & 255,
43420
44136
  integer >> 8 & 255,
43421
44137
  integer & 255
44138
+ /* eslint-enable no-bitwise */
43422
44139
  ];
43423
44140
  },
43424
44141
  enumerable: false
@@ -44720,7 +45437,7 @@ var globby2 = Object.assign(function globby3(patterns, options) {
44720
45437
  // package.json
44721
45438
  var package_default = {
44722
45439
  name: "create-tamagui",
44723
- version: "1.1.6",
45440
+ version: "1.1.8",
44724
45441
  bin: "./run.js",
44725
45442
  main: "dist",
44726
45443
  files: [
@@ -44754,7 +45471,7 @@ var package_default = {
44754
45471
  },
44755
45472
  devDependencies: {
44756
45473
  "@playwright/test": "^1.29.0",
44757
- "@tamagui/build": "^1.1.6",
45474
+ "@tamagui/build": "^1.1.8",
44758
45475
  "@types/async-retry": "1.4.2",
44759
45476
  "@types/cross-spawn": "^6.0.2",
44760
45477
  "@types/node": "^16.11.9",
@@ -44907,7 +45624,10 @@ ${import_chalk4.default.bold(import_chalk4.default.red(`Please pick a different
44907
45624
  } catch {
44908
45625
  }
44909
45626
  }
44910
- const branch = IS_TEST ? (await $`git rev-parse --abbrev-ref HEAD`).stdout.trim() : `master`;
45627
+ const branch = IS_TEST ? (
45628
+ // use current branch
45629
+ (await $`git rev-parse --abbrev-ref HEAD`).stdout.trim()
45630
+ ) : `master`;
44911
45631
  if (IS_TEST) {
44912
45632
  await (0, import_fs_extra.remove)(targetGitDir);
44913
45633
  if (!await (0, import_fs_extra.pathExists)((0, import_path.join)(repoRoot, ".git"))) {
@@ -45033,48 +45753,68 @@ async function installDependenciesAsync(projectRoot, packageManager2) {
45033
45753
  downloadAndExtractExample,
45034
45754
  installDependenciesAsync
45035
45755
  });
45036
- /*!
45037
- * fill-range <https://github.com/jonschlinkert/fill-range>
45038
- *
45039
- * Copyright (c) 2014-present, Jon Schlinkert.
45040
- * Licensed under the MIT License.
45041
- */
45042
- /*!
45043
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
45044
- *
45045
- * Copyright (c) 2014-2016, Jon Schlinkert.
45046
- * Licensed under the MIT License.
45047
- */
45048
- /*!
45049
- * is-glob <https://github.com/jonschlinkert/is-glob>
45050
- *
45051
- * Copyright (c) 2014-2017, Jon Schlinkert.
45052
- * Released under the MIT License.
45053
- */
45054
- /*!
45055
- * is-number <https://github.com/jonschlinkert/is-number>
45056
- *
45057
- * Copyright (c) 2014-present, Jon Schlinkert.
45058
- * Released under the MIT License.
45059
- */
45060
- /*!
45061
- * to-regex-range <https://github.com/micromatch/to-regex-range>
45062
- *
45063
- * Copyright (c) 2015-present, Jon Schlinkert.
45064
- * Released under the MIT License.
45065
- */
45066
- /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
45067
- /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
45068
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
45069
- /**
45070
- * @preserve
45071
- * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
45072
- *
45073
- * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
45074
- * @see http://github.com/homebrewing/brauhaus-diff
45075
- * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
45076
- * @see http://github.com/garycourt/murmurhash-js
45077
- * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
45078
- * @see http://sites.google.com/site/murmurhash/
45079
- */
45756
+ /*! Bundled license information:
45757
+
45758
+ imurmurhash/imurmurhash.js:
45759
+ (**
45760
+ * @preserve
45761
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
45762
+ *
45763
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
45764
+ * @see http://github.com/homebrewing/brauhaus-diff
45765
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
45766
+ * @see http://github.com/garycourt/murmurhash-js
45767
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
45768
+ * @see http://sites.google.com/site/murmurhash/
45769
+ *)
45770
+
45771
+ is-number/index.js:
45772
+ (*!
45773
+ * is-number <https://github.com/jonschlinkert/is-number>
45774
+ *
45775
+ * Copyright (c) 2014-present, Jon Schlinkert.
45776
+ * Released under the MIT License.
45777
+ *)
45778
+
45779
+ to-regex-range/index.js:
45780
+ (*!
45781
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
45782
+ *
45783
+ * Copyright (c) 2015-present, Jon Schlinkert.
45784
+ * Released under the MIT License.
45785
+ *)
45786
+
45787
+ fill-range/index.js:
45788
+ (*!
45789
+ * fill-range <https://github.com/jonschlinkert/fill-range>
45790
+ *
45791
+ * Copyright (c) 2014-present, Jon Schlinkert.
45792
+ * Licensed under the MIT License.
45793
+ *)
45794
+
45795
+ safe-buffer/index.js:
45796
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
45797
+
45798
+ is-extglob/index.js:
45799
+ (*!
45800
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
45801
+ *
45802
+ * Copyright (c) 2014-2016, Jon Schlinkert.
45803
+ * Licensed under the MIT License.
45804
+ *)
45805
+
45806
+ is-glob/index.js:
45807
+ (*!
45808
+ * is-glob <https://github.com/jonschlinkert/is-glob>
45809
+ *
45810
+ * Copyright (c) 2014-2017, Jon Schlinkert.
45811
+ * Released under the MIT License.
45812
+ *)
45813
+
45814
+ queue-microtask/index.js:
45815
+ (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
45816
+
45817
+ run-parallel/index.js:
45818
+ (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
45819
+ */
45080
45820
  //# sourceMappingURL=index.js.map