@apps-in-toss/framework 0.0.13 → 0.0.15

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.
@@ -126,8 +126,8 @@ var require_windows = __commonJS({
126
126
  init_esm_shims();
127
127
  module.exports = isexe;
128
128
  isexe.sync = sync;
129
- var fs6 = __require("fs");
130
- function checkPathExt(path13, options) {
129
+ var fs7 = __require("fs");
130
+ function checkPathExt(path14, options) {
131
131
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
132
132
  if (!pathext) {
133
133
  return true;
@@ -138,25 +138,25 @@ var require_windows = __commonJS({
138
138
  }
139
139
  for (var i2 = 0; i2 < pathext.length; i2++) {
140
140
  var p = pathext[i2].toLowerCase();
141
- if (p && path13.substr(-p.length).toLowerCase() === p) {
141
+ if (p && path14.substr(-p.length).toLowerCase() === p) {
142
142
  return true;
143
143
  }
144
144
  }
145
145
  return false;
146
146
  }
147
- function checkStat(stat, path13, options) {
147
+ function checkStat(stat, path14, options) {
148
148
  if (!stat.isSymbolicLink() && !stat.isFile()) {
149
149
  return false;
150
150
  }
151
- return checkPathExt(path13, options);
151
+ return checkPathExt(path14, options);
152
152
  }
153
- function isexe(path13, options, cb) {
154
- fs6.stat(path13, function(er, stat) {
155
- cb(er, er ? false : checkStat(stat, path13, options));
153
+ function isexe(path14, options, cb) {
154
+ fs7.stat(path14, function(er, stat) {
155
+ cb(er, er ? false : checkStat(stat, path14, options));
156
156
  });
157
157
  }
158
- function sync(path13, options) {
159
- return checkStat(fs6.statSync(path13), path13, options);
158
+ function sync(path14, options) {
159
+ return checkStat(fs7.statSync(path14), path14, options);
160
160
  }
161
161
  }
162
162
  });
@@ -168,14 +168,14 @@ var require_mode = __commonJS({
168
168
  init_esm_shims();
169
169
  module.exports = isexe;
170
170
  isexe.sync = sync;
171
- var fs6 = __require("fs");
172
- function isexe(path13, options, cb) {
173
- fs6.stat(path13, function(er, stat) {
171
+ var fs7 = __require("fs");
172
+ function isexe(path14, options, cb) {
173
+ fs7.stat(path14, function(er, stat) {
174
174
  cb(er, er ? false : checkStat(stat, options));
175
175
  });
176
176
  }
177
- function sync(path13, options) {
178
- return checkStat(fs6.statSync(path13), options);
177
+ function sync(path14, options) {
178
+ return checkStat(fs7.statSync(path14), options);
179
179
  }
180
180
  function checkStat(stat, options) {
181
181
  return stat.isFile() && checkMode(stat, options);
@@ -201,7 +201,7 @@ var require_isexe = __commonJS({
201
201
  "../../.yarn/cache/isexe-npm-2.0.0-ac27b2c17a-228cfa503f.zip/node_modules/isexe/index.js"(exports, module) {
202
202
  "use strict";
203
203
  init_esm_shims();
204
- var fs6 = __require("fs");
204
+ var fs7 = __require("fs");
205
205
  var core;
206
206
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
207
207
  core = require_windows();
@@ -210,7 +210,7 @@ var require_isexe = __commonJS({
210
210
  }
211
211
  module.exports = isexe;
212
212
  isexe.sync = sync;
213
- function isexe(path13, options, cb) {
213
+ function isexe(path14, options, cb) {
214
214
  if (typeof options === "function") {
215
215
  cb = options;
216
216
  options = {};
@@ -220,7 +220,7 @@ var require_isexe = __commonJS({
220
220
  throw new TypeError("callback not provided");
221
221
  }
222
222
  return new Promise(function(resolve2, reject2) {
223
- isexe(path13, options || {}, function(er, is) {
223
+ isexe(path14, options || {}, function(er, is) {
224
224
  if (er) {
225
225
  reject2(er);
226
226
  } else {
@@ -229,7 +229,7 @@ var require_isexe = __commonJS({
229
229
  });
230
230
  });
231
231
  }
232
- core(path13, options || {}, function(er, is) {
232
+ core(path14, options || {}, function(er, is) {
233
233
  if (er) {
234
234
  if (er.code === "EACCES" || options && options.ignoreErrors) {
235
235
  er = null;
@@ -239,9 +239,9 @@ var require_isexe = __commonJS({
239
239
  cb(er, is);
240
240
  });
241
241
  }
242
- function sync(path13, options) {
242
+ function sync(path14, options) {
243
243
  try {
244
- return core.sync(path13, options || {});
244
+ return core.sync(path14, options || {});
245
245
  } catch (er) {
246
246
  if (options && options.ignoreErrors || er.code === "EACCES") {
247
247
  return false;
@@ -259,7 +259,7 @@ var require_which = __commonJS({
259
259
  "use strict";
260
260
  init_esm_shims();
261
261
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
262
- var path13 = __require("path");
262
+ var path14 = __require("path");
263
263
  var COLON = isWindows ? ";" : ":";
264
264
  var isexe = require_isexe();
265
265
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -297,7 +297,7 @@ var require_which = __commonJS({
297
297
  return opt.all && found.length ? resolve2(found) : reject2(getNotFoundError(cmd));
298
298
  const ppRaw = pathEnv[i2];
299
299
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
300
- const pCmd = path13.join(pathPart, cmd);
300
+ const pCmd = path14.join(pathPart, cmd);
301
301
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
302
302
  resolve2(subStep(p, i2, 0));
303
303
  });
@@ -324,7 +324,7 @@ var require_which = __commonJS({
324
324
  for (let i2 = 0; i2 < pathEnv.length; i2++) {
325
325
  const ppRaw = pathEnv[i2];
326
326
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
327
- const pCmd = path13.join(pathPart, cmd);
327
+ const pCmd = path14.join(pathPart, cmd);
328
328
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
329
329
  for (let j = 0; j < pathExt.length; j++) {
330
330
  const cur = p + pathExt[j];
@@ -374,7 +374,7 @@ var require_resolveCommand = __commonJS({
374
374
  "../../.yarn/cache/cross-spawn-npm-7.0.3-68b62748dc-5738c31238.zip/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
375
375
  "use strict";
376
376
  init_esm_shims();
377
- var path13 = __require("path");
377
+ var path14 = __require("path");
378
378
  var which = require_which();
379
379
  var getPathKey = require_path_key();
380
380
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -392,7 +392,7 @@ var require_resolveCommand = __commonJS({
392
392
  try {
393
393
  resolved = which.sync(parsed.command, {
394
394
  path: env[getPathKey({ env })],
395
- pathExt: withoutPathExt ? path13.delimiter : void 0
395
+ pathExt: withoutPathExt ? path14.delimiter : void 0
396
396
  });
397
397
  } catch (e) {
398
398
  } finally {
@@ -401,7 +401,7 @@ var require_resolveCommand = __commonJS({
401
401
  }
402
402
  }
403
403
  if (resolved) {
404
- resolved = path13.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
404
+ resolved = path14.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
405
405
  }
406
406
  return resolved;
407
407
  }
@@ -458,8 +458,8 @@ var require_shebang_command = __commonJS({
458
458
  if (!match) {
459
459
  return null;
460
460
  }
461
- const [path13, argument] = match[0].replace(/#! ?/, "").split(" ");
462
- const binary2 = path13.split("/").pop();
461
+ const [path14, argument] = match[0].replace(/#! ?/, "").split(" ");
462
+ const binary2 = path14.split("/").pop();
463
463
  if (binary2 === "env") {
464
464
  return argument;
465
465
  }
@@ -473,16 +473,16 @@ var require_readShebang = __commonJS({
473
473
  "../../.yarn/cache/cross-spawn-npm-7.0.3-68b62748dc-5738c31238.zip/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
474
474
  "use strict";
475
475
  init_esm_shims();
476
- var fs6 = __require("fs");
476
+ var fs7 = __require("fs");
477
477
  var shebangCommand = require_shebang_command();
478
478
  function readShebang(command) {
479
479
  const size = 150;
480
480
  const buffer = Buffer.alloc(size);
481
481
  let fd;
482
482
  try {
483
- fd = fs6.openSync(command, "r");
484
- fs6.readSync(fd, buffer, 0, size, 0);
485
- fs6.closeSync(fd);
483
+ fd = fs7.openSync(command, "r");
484
+ fs7.readSync(fd, buffer, 0, size, 0);
485
+ fs7.closeSync(fd);
486
486
  } catch (e) {
487
487
  }
488
488
  return shebangCommand(buffer.toString());
@@ -496,7 +496,7 @@ var require_parse = __commonJS({
496
496
  "../../.yarn/cache/cross-spawn-npm-7.0.3-68b62748dc-5738c31238.zip/node_modules/cross-spawn/lib/parse.js"(exports, module) {
497
497
  "use strict";
498
498
  init_esm_shims();
499
- var path13 = __require("path");
499
+ var path14 = __require("path");
500
500
  var resolveCommand = require_resolveCommand();
501
501
  var escape = require_escape();
502
502
  var readShebang = require_readShebang();
@@ -521,7 +521,7 @@ var require_parse = __commonJS({
521
521
  const needsShell = !isExecutableRegExp.test(commandFile);
522
522
  if (parsed.options.forceShell || needsShell) {
523
523
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
524
- parsed.command = path13.normalize(parsed.command);
524
+ parsed.command = path14.normalize(parsed.command);
525
525
  parsed.command = escape.command(parsed.command);
526
526
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
527
527
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -867,8 +867,8 @@ var require_minimatch = __commonJS({
867
867
  return new Minimatch(pattern, options).match(p);
868
868
  };
869
869
  module.exports = minimatch;
870
- var path13 = require_path();
871
- minimatch.sep = path13.sep;
870
+ var path14 = require_path();
871
+ minimatch.sep = path14.sep;
872
872
  var GLOBSTAR = Symbol("globstar **");
873
873
  minimatch.GLOBSTAR = GLOBSTAR;
874
874
  var expand = require_brace_expansion();
@@ -1377,8 +1377,8 @@ var require_minimatch = __commonJS({
1377
1377
  if (this.empty) return f === "";
1378
1378
  if (f === "/" && partial) return true;
1379
1379
  const options = this.options;
1380
- if (path13.sep !== "/") {
1381
- f = f.split(path13.sep).join("/");
1380
+ if (path14.sep !== "/") {
1381
+ f = f.split(path14.sep).join("/");
1382
1382
  }
1383
1383
  f = f.split(slashSplit);
1384
1384
  this.debug(this.pattern, "split", f);
@@ -1418,13 +1418,13 @@ var require_readdir_glob = __commonJS({
1418
1418
  "use strict";
1419
1419
  init_esm_shims();
1420
1420
  module.exports = readdirGlob;
1421
- var fs6 = __require("fs");
1421
+ var fs7 = __require("fs");
1422
1422
  var { EventEmitter: EventEmitter2 } = __require("events");
1423
1423
  var { Minimatch } = require_minimatch();
1424
1424
  var { resolve: resolve2 } = __require("path");
1425
1425
  function readdir(dir2, strict) {
1426
1426
  return new Promise((resolve3, reject2) => {
1427
- fs6.readdir(dir2, { withFileTypes: true }, (err, files) => {
1427
+ fs7.readdir(dir2, { withFileTypes: true }, (err, files) => {
1428
1428
  if (err) {
1429
1429
  switch (err.code) {
1430
1430
  case "ENOTDIR":
@@ -1457,7 +1457,7 @@ var require_readdir_glob = __commonJS({
1457
1457
  }
1458
1458
  function stat(file, followSymlinks) {
1459
1459
  return new Promise((resolve3, reject2) => {
1460
- const statFunc = followSymlinks ? fs6.stat : fs6.lstat;
1460
+ const statFunc = followSymlinks ? fs7.stat : fs7.lstat;
1461
1461
  statFunc(file, (err, stats) => {
1462
1462
  if (err) {
1463
1463
  switch (err.code) {
@@ -1478,8 +1478,8 @@ var require_readdir_glob = __commonJS({
1478
1478
  });
1479
1479
  });
1480
1480
  }
1481
- async function* exploreWalkAsync(dir2, path13, followSymlinks, useStat, shouldSkip, strict) {
1482
- let files = await readdir(path13 + dir2, strict);
1481
+ async function* exploreWalkAsync(dir2, path14, followSymlinks, useStat, shouldSkip, strict) {
1482
+ let files = await readdir(path14 + dir2, strict);
1483
1483
  for (const file of files) {
1484
1484
  let name = file.name;
1485
1485
  if (name === void 0) {
@@ -1488,7 +1488,7 @@ var require_readdir_glob = __commonJS({
1488
1488
  }
1489
1489
  const filename = dir2 + "/" + name;
1490
1490
  const relative = filename.slice(1);
1491
- const absolute = path13 + "/" + relative;
1491
+ const absolute = path14 + "/" + relative;
1492
1492
  let stats = null;
1493
1493
  if (useStat || followSymlinks) {
1494
1494
  stats = await stat(absolute, followSymlinks);
@@ -1502,15 +1502,15 @@ var require_readdir_glob = __commonJS({
1502
1502
  if (stats.isDirectory()) {
1503
1503
  if (!shouldSkip(relative)) {
1504
1504
  yield { relative, absolute, stats };
1505
- yield* exploreWalkAsync(filename, path13, followSymlinks, useStat, shouldSkip, false);
1505
+ yield* exploreWalkAsync(filename, path14, followSymlinks, useStat, shouldSkip, false);
1506
1506
  }
1507
1507
  } else {
1508
1508
  yield { relative, absolute, stats };
1509
1509
  }
1510
1510
  }
1511
1511
  }
1512
- async function* explore(path13, followSymlinks, useStat, shouldSkip) {
1513
- yield* exploreWalkAsync("", path13, followSymlinks, useStat, shouldSkip, true);
1512
+ async function* explore(path14, followSymlinks, useStat, shouldSkip) {
1513
+ yield* exploreWalkAsync("", path14, followSymlinks, useStat, shouldSkip, true);
1514
1514
  }
1515
1515
  function readOptions(options) {
1516
1516
  return {
@@ -3523,54 +3523,54 @@ var require_polyfills = __commonJS({
3523
3523
  }
3524
3524
  var chdir;
3525
3525
  module.exports = patch;
3526
- function patch(fs6) {
3526
+ function patch(fs7) {
3527
3527
  if (constants5.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
3528
- patchLchmod(fs6);
3529
- }
3530
- if (!fs6.lutimes) {
3531
- patchLutimes(fs6);
3532
- }
3533
- fs6.chown = chownFix(fs6.chown);
3534
- fs6.fchown = chownFix(fs6.fchown);
3535
- fs6.lchown = chownFix(fs6.lchown);
3536
- fs6.chmod = chmodFix(fs6.chmod);
3537
- fs6.fchmod = chmodFix(fs6.fchmod);
3538
- fs6.lchmod = chmodFix(fs6.lchmod);
3539
- fs6.chownSync = chownFixSync(fs6.chownSync);
3540
- fs6.fchownSync = chownFixSync(fs6.fchownSync);
3541
- fs6.lchownSync = chownFixSync(fs6.lchownSync);
3542
- fs6.chmodSync = chmodFixSync(fs6.chmodSync);
3543
- fs6.fchmodSync = chmodFixSync(fs6.fchmodSync);
3544
- fs6.lchmodSync = chmodFixSync(fs6.lchmodSync);
3545
- fs6.stat = statFix(fs6.stat);
3546
- fs6.fstat = statFix(fs6.fstat);
3547
- fs6.lstat = statFix(fs6.lstat);
3548
- fs6.statSync = statFixSync(fs6.statSync);
3549
- fs6.fstatSync = statFixSync(fs6.fstatSync);
3550
- fs6.lstatSync = statFixSync(fs6.lstatSync);
3551
- if (fs6.chmod && !fs6.lchmod) {
3552
- fs6.lchmod = function(path13, mode, cb) {
3528
+ patchLchmod(fs7);
3529
+ }
3530
+ if (!fs7.lutimes) {
3531
+ patchLutimes(fs7);
3532
+ }
3533
+ fs7.chown = chownFix(fs7.chown);
3534
+ fs7.fchown = chownFix(fs7.fchown);
3535
+ fs7.lchown = chownFix(fs7.lchown);
3536
+ fs7.chmod = chmodFix(fs7.chmod);
3537
+ fs7.fchmod = chmodFix(fs7.fchmod);
3538
+ fs7.lchmod = chmodFix(fs7.lchmod);
3539
+ fs7.chownSync = chownFixSync(fs7.chownSync);
3540
+ fs7.fchownSync = chownFixSync(fs7.fchownSync);
3541
+ fs7.lchownSync = chownFixSync(fs7.lchownSync);
3542
+ fs7.chmodSync = chmodFixSync(fs7.chmodSync);
3543
+ fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
3544
+ fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
3545
+ fs7.stat = statFix(fs7.stat);
3546
+ fs7.fstat = statFix(fs7.fstat);
3547
+ fs7.lstat = statFix(fs7.lstat);
3548
+ fs7.statSync = statFixSync(fs7.statSync);
3549
+ fs7.fstatSync = statFixSync(fs7.fstatSync);
3550
+ fs7.lstatSync = statFixSync(fs7.lstatSync);
3551
+ if (fs7.chmod && !fs7.lchmod) {
3552
+ fs7.lchmod = function(path14, mode, cb) {
3553
3553
  if (cb) process.nextTick(cb);
3554
3554
  };
3555
- fs6.lchmodSync = function() {
3555
+ fs7.lchmodSync = function() {
3556
3556
  };
3557
3557
  }
3558
- if (fs6.chown && !fs6.lchown) {
3559
- fs6.lchown = function(path13, uid, gid, cb) {
3558
+ if (fs7.chown && !fs7.lchown) {
3559
+ fs7.lchown = function(path14, uid, gid, cb) {
3560
3560
  if (cb) process.nextTick(cb);
3561
3561
  };
3562
- fs6.lchownSync = function() {
3562
+ fs7.lchownSync = function() {
3563
3563
  };
3564
3564
  }
3565
3565
  if (platform2 === "win32") {
3566
- fs6.rename = typeof fs6.rename !== "function" ? fs6.rename : function(fs$rename) {
3566
+ fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : function(fs$rename) {
3567
3567
  function rename(from, to, cb) {
3568
3568
  var start = Date.now();
3569
3569
  var backoff = 0;
3570
3570
  fs$rename(from, to, function CB(er) {
3571
3571
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
3572
3572
  setTimeout(function() {
3573
- fs6.stat(to, function(stater, st) {
3573
+ fs7.stat(to, function(stater, st) {
3574
3574
  if (stater && stater.code === "ENOENT")
3575
3575
  fs$rename(from, to, CB);
3576
3576
  else
@@ -3586,9 +3586,9 @@ var require_polyfills = __commonJS({
3586
3586
  }
3587
3587
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
3588
3588
  return rename;
3589
- }(fs6.rename);
3589
+ }(fs7.rename);
3590
3590
  }
3591
- fs6.read = typeof fs6.read !== "function" ? fs6.read : function(fs$read) {
3591
+ fs7.read = typeof fs7.read !== "function" ? fs7.read : function(fs$read) {
3592
3592
  function read(fd, buffer, offset, length, position, callback_) {
3593
3593
  var callback;
3594
3594
  if (callback_ && typeof callback_ === "function") {
@@ -3596,22 +3596,22 @@ var require_polyfills = __commonJS({
3596
3596
  callback = function(er, _2, __) {
3597
3597
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
3598
3598
  eagCounter++;
3599
- return fs$read.call(fs6, fd, buffer, offset, length, position, callback);
3599
+ return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
3600
3600
  }
3601
3601
  callback_.apply(this, arguments);
3602
3602
  };
3603
3603
  }
3604
- return fs$read.call(fs6, fd, buffer, offset, length, position, callback);
3604
+ return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
3605
3605
  }
3606
3606
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
3607
3607
  return read;
3608
- }(fs6.read);
3609
- fs6.readSync = typeof fs6.readSync !== "function" ? fs6.readSync : /* @__PURE__ */ function(fs$readSync) {
3608
+ }(fs7.read);
3609
+ fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : /* @__PURE__ */ function(fs$readSync) {
3610
3610
  return function(fd, buffer, offset, length, position) {
3611
3611
  var eagCounter = 0;
3612
3612
  while (true) {
3613
3613
  try {
3614
- return fs$readSync.call(fs6, fd, buffer, offset, length, position);
3614
+ return fs$readSync.call(fs7, fd, buffer, offset, length, position);
3615
3615
  } catch (er) {
3616
3616
  if (er.code === "EAGAIN" && eagCounter < 10) {
3617
3617
  eagCounter++;
@@ -3621,11 +3621,11 @@ var require_polyfills = __commonJS({
3621
3621
  }
3622
3622
  }
3623
3623
  };
3624
- }(fs6.readSync);
3625
- function patchLchmod(fs7) {
3626
- fs7.lchmod = function(path13, mode, callback) {
3627
- fs7.open(
3628
- path13,
3624
+ }(fs7.readSync);
3625
+ function patchLchmod(fs8) {
3626
+ fs8.lchmod = function(path14, mode, callback) {
3627
+ fs8.open(
3628
+ path14,
3629
3629
  constants5.O_WRONLY | constants5.O_SYMLINK,
3630
3630
  mode,
3631
3631
  function(err, fd) {
@@ -3633,80 +3633,80 @@ var require_polyfills = __commonJS({
3633
3633
  if (callback) callback(err);
3634
3634
  return;
3635
3635
  }
3636
- fs7.fchmod(fd, mode, function(err2) {
3637
- fs7.close(fd, function(err22) {
3636
+ fs8.fchmod(fd, mode, function(err2) {
3637
+ fs8.close(fd, function(err22) {
3638
3638
  if (callback) callback(err2 || err22);
3639
3639
  });
3640
3640
  });
3641
3641
  }
3642
3642
  );
3643
3643
  };
3644
- fs7.lchmodSync = function(path13, mode) {
3645
- var fd = fs7.openSync(path13, constants5.O_WRONLY | constants5.O_SYMLINK, mode);
3644
+ fs8.lchmodSync = function(path14, mode) {
3645
+ var fd = fs8.openSync(path14, constants5.O_WRONLY | constants5.O_SYMLINK, mode);
3646
3646
  var threw = true;
3647
3647
  var ret;
3648
3648
  try {
3649
- ret = fs7.fchmodSync(fd, mode);
3649
+ ret = fs8.fchmodSync(fd, mode);
3650
3650
  threw = false;
3651
3651
  } finally {
3652
3652
  if (threw) {
3653
3653
  try {
3654
- fs7.closeSync(fd);
3654
+ fs8.closeSync(fd);
3655
3655
  } catch (er) {
3656
3656
  }
3657
3657
  } else {
3658
- fs7.closeSync(fd);
3658
+ fs8.closeSync(fd);
3659
3659
  }
3660
3660
  }
3661
3661
  return ret;
3662
3662
  };
3663
3663
  }
3664
- function patchLutimes(fs7) {
3665
- if (constants5.hasOwnProperty("O_SYMLINK") && fs7.futimes) {
3666
- fs7.lutimes = function(path13, at, mt, cb) {
3667
- fs7.open(path13, constants5.O_SYMLINK, function(er, fd) {
3664
+ function patchLutimes(fs8) {
3665
+ if (constants5.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
3666
+ fs8.lutimes = function(path14, at, mt, cb) {
3667
+ fs8.open(path14, constants5.O_SYMLINK, function(er, fd) {
3668
3668
  if (er) {
3669
3669
  if (cb) cb(er);
3670
3670
  return;
3671
3671
  }
3672
- fs7.futimes(fd, at, mt, function(er2) {
3673
- fs7.close(fd, function(er22) {
3672
+ fs8.futimes(fd, at, mt, function(er2) {
3673
+ fs8.close(fd, function(er22) {
3674
3674
  if (cb) cb(er2 || er22);
3675
3675
  });
3676
3676
  });
3677
3677
  });
3678
3678
  };
3679
- fs7.lutimesSync = function(path13, at, mt) {
3680
- var fd = fs7.openSync(path13, constants5.O_SYMLINK);
3679
+ fs8.lutimesSync = function(path14, at, mt) {
3680
+ var fd = fs8.openSync(path14, constants5.O_SYMLINK);
3681
3681
  var ret;
3682
3682
  var threw = true;
3683
3683
  try {
3684
- ret = fs7.futimesSync(fd, at, mt);
3684
+ ret = fs8.futimesSync(fd, at, mt);
3685
3685
  threw = false;
3686
3686
  } finally {
3687
3687
  if (threw) {
3688
3688
  try {
3689
- fs7.closeSync(fd);
3689
+ fs8.closeSync(fd);
3690
3690
  } catch (er) {
3691
3691
  }
3692
3692
  } else {
3693
- fs7.closeSync(fd);
3693
+ fs8.closeSync(fd);
3694
3694
  }
3695
3695
  }
3696
3696
  return ret;
3697
3697
  };
3698
- } else if (fs7.futimes) {
3699
- fs7.lutimes = function(_a, _b, _c, cb) {
3698
+ } else if (fs8.futimes) {
3699
+ fs8.lutimes = function(_a, _b, _c, cb) {
3700
3700
  if (cb) process.nextTick(cb);
3701
3701
  };
3702
- fs7.lutimesSync = function() {
3702
+ fs8.lutimesSync = function() {
3703
3703
  };
3704
3704
  }
3705
3705
  }
3706
3706
  function chmodFix(orig) {
3707
3707
  if (!orig) return orig;
3708
3708
  return function(target, mode, cb) {
3709
- return orig.call(fs6, target, mode, function(er) {
3709
+ return orig.call(fs7, target, mode, function(er) {
3710
3710
  if (chownErOk(er)) er = null;
3711
3711
  if (cb) cb.apply(this, arguments);
3712
3712
  });
@@ -3716,7 +3716,7 @@ var require_polyfills = __commonJS({
3716
3716
  if (!orig) return orig;
3717
3717
  return function(target, mode) {
3718
3718
  try {
3719
- return orig.call(fs6, target, mode);
3719
+ return orig.call(fs7, target, mode);
3720
3720
  } catch (er) {
3721
3721
  if (!chownErOk(er)) throw er;
3722
3722
  }
@@ -3725,7 +3725,7 @@ var require_polyfills = __commonJS({
3725
3725
  function chownFix(orig) {
3726
3726
  if (!orig) return orig;
3727
3727
  return function(target, uid, gid, cb) {
3728
- return orig.call(fs6, target, uid, gid, function(er) {
3728
+ return orig.call(fs7, target, uid, gid, function(er) {
3729
3729
  if (chownErOk(er)) er = null;
3730
3730
  if (cb) cb.apply(this, arguments);
3731
3731
  });
@@ -3735,7 +3735,7 @@ var require_polyfills = __commonJS({
3735
3735
  if (!orig) return orig;
3736
3736
  return function(target, uid, gid) {
3737
3737
  try {
3738
- return orig.call(fs6, target, uid, gid);
3738
+ return orig.call(fs7, target, uid, gid);
3739
3739
  } catch (er) {
3740
3740
  if (!chownErOk(er)) throw er;
3741
3741
  }
@@ -3755,13 +3755,13 @@ var require_polyfills = __commonJS({
3755
3755
  }
3756
3756
  if (cb) cb.apply(this, arguments);
3757
3757
  }
3758
- return options ? orig.call(fs6, target, options, callback) : orig.call(fs6, target, callback);
3758
+ return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback);
3759
3759
  };
3760
3760
  }
3761
3761
  function statFixSync(orig) {
3762
3762
  if (!orig) return orig;
3763
3763
  return function(target, options) {
3764
- var stats = options ? orig.call(fs6, target, options) : orig.call(fs6, target);
3764
+ var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target);
3765
3765
  if (stats) {
3766
3766
  if (stats.uid < 0) stats.uid += 4294967296;
3767
3767
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -3792,16 +3792,16 @@ var require_legacy_streams = __commonJS({
3792
3792
  init_esm_shims();
3793
3793
  var Stream = __require("stream").Stream;
3794
3794
  module.exports = legacy;
3795
- function legacy(fs6) {
3795
+ function legacy(fs7) {
3796
3796
  return {
3797
3797
  ReadStream,
3798
3798
  WriteStream
3799
3799
  };
3800
- function ReadStream(path13, options) {
3801
- if (!(this instanceof ReadStream)) return new ReadStream(path13, options);
3800
+ function ReadStream(path14, options) {
3801
+ if (!(this instanceof ReadStream)) return new ReadStream(path14, options);
3802
3802
  Stream.call(this);
3803
3803
  var self2 = this;
3804
- this.path = path13;
3804
+ this.path = path14;
3805
3805
  this.fd = null;
3806
3806
  this.readable = true;
3807
3807
  this.paused = false;
@@ -3835,7 +3835,7 @@ var require_legacy_streams = __commonJS({
3835
3835
  });
3836
3836
  return;
3837
3837
  }
3838
- fs6.open(this.path, this.flags, this.mode, function(err, fd) {
3838
+ fs7.open(this.path, this.flags, this.mode, function(err, fd) {
3839
3839
  if (err) {
3840
3840
  self2.emit("error", err);
3841
3841
  self2.readable = false;
@@ -3846,10 +3846,10 @@ var require_legacy_streams = __commonJS({
3846
3846
  self2._read();
3847
3847
  });
3848
3848
  }
3849
- function WriteStream(path13, options) {
3850
- if (!(this instanceof WriteStream)) return new WriteStream(path13, options);
3849
+ function WriteStream(path14, options) {
3850
+ if (!(this instanceof WriteStream)) return new WriteStream(path14, options);
3851
3851
  Stream.call(this);
3852
- this.path = path13;
3852
+ this.path = path14;
3853
3853
  this.fd = null;
3854
3854
  this.writable = true;
3855
3855
  this.flags = "w";
@@ -3874,7 +3874,7 @@ var require_legacy_streams = __commonJS({
3874
3874
  this.busy = false;
3875
3875
  this._queue = [];
3876
3876
  if (this.fd === null) {
3877
- this._open = fs6.open;
3877
+ this._open = fs7.open;
3878
3878
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
3879
3879
  this.flush();
3880
3880
  }
@@ -3912,7 +3912,7 @@ var require_graceful_fs = __commonJS({
3912
3912
  "../../.yarn/cache/graceful-fs-npm-4.2.11-b94d8104d4-386d011a55.zip/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
3913
3913
  "use strict";
3914
3914
  init_esm_shims();
3915
- var fs6 = __require("fs");
3915
+ var fs7 = __require("fs");
3916
3916
  var polyfills = require_polyfills();
3917
3917
  var legacy = require_legacy_streams();
3918
3918
  var clone = require_clone();
@@ -3944,12 +3944,12 @@ var require_graceful_fs = __commonJS({
3944
3944
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
3945
3945
  console.error(m);
3946
3946
  };
3947
- if (!fs6[gracefulQueue]) {
3947
+ if (!fs7[gracefulQueue]) {
3948
3948
  queue2 = global[gracefulQueue] || [];
3949
- publishQueue(fs6, queue2);
3950
- fs6.close = function(fs$close) {
3949
+ publishQueue(fs7, queue2);
3950
+ fs7.close = function(fs$close) {
3951
3951
  function close(fd, cb) {
3952
- return fs$close.call(fs6, fd, function(err) {
3952
+ return fs$close.call(fs7, fd, function(err) {
3953
3953
  if (!err) {
3954
3954
  resetQueue();
3955
3955
  }
@@ -3961,48 +3961,48 @@ var require_graceful_fs = __commonJS({
3961
3961
  value: fs$close
3962
3962
  });
3963
3963
  return close;
3964
- }(fs6.close);
3965
- fs6.closeSync = function(fs$closeSync) {
3964
+ }(fs7.close);
3965
+ fs7.closeSync = function(fs$closeSync) {
3966
3966
  function closeSync(fd) {
3967
- fs$closeSync.apply(fs6, arguments);
3967
+ fs$closeSync.apply(fs7, arguments);
3968
3968
  resetQueue();
3969
3969
  }
3970
3970
  Object.defineProperty(closeSync, previousSymbol, {
3971
3971
  value: fs$closeSync
3972
3972
  });
3973
3973
  return closeSync;
3974
- }(fs6.closeSync);
3974
+ }(fs7.closeSync);
3975
3975
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
3976
3976
  process.on("exit", function() {
3977
- debug(fs6[gracefulQueue]);
3978
- __require("assert").equal(fs6[gracefulQueue].length, 0);
3977
+ debug(fs7[gracefulQueue]);
3978
+ __require("assert").equal(fs7[gracefulQueue].length, 0);
3979
3979
  });
3980
3980
  }
3981
3981
  }
3982
3982
  var queue2;
3983
3983
  if (!global[gracefulQueue]) {
3984
- publishQueue(global, fs6[gracefulQueue]);
3985
- }
3986
- module.exports = patch(clone(fs6));
3987
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs6.__patched) {
3988
- module.exports = patch(fs6);
3989
- fs6.__patched = true;
3990
- }
3991
- function patch(fs7) {
3992
- polyfills(fs7);
3993
- fs7.gracefulify = patch;
3994
- fs7.createReadStream = createReadStream3;
3995
- fs7.createWriteStream = createWriteStream3;
3996
- var fs$readFile = fs7.readFile;
3997
- fs7.readFile = readFile2;
3998
- function readFile2(path13, options, cb) {
3984
+ publishQueue(global, fs7[gracefulQueue]);
3985
+ }
3986
+ module.exports = patch(clone(fs7));
3987
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
3988
+ module.exports = patch(fs7);
3989
+ fs7.__patched = true;
3990
+ }
3991
+ function patch(fs8) {
3992
+ polyfills(fs8);
3993
+ fs8.gracefulify = patch;
3994
+ fs8.createReadStream = createReadStream3;
3995
+ fs8.createWriteStream = createWriteStream3;
3996
+ var fs$readFile = fs8.readFile;
3997
+ fs8.readFile = readFile2;
3998
+ function readFile2(path14, options, cb) {
3999
3999
  if (typeof options === "function")
4000
4000
  cb = options, options = null;
4001
- return go$readFile(path13, options, cb);
4002
- function go$readFile(path14, options2, cb2, startTime) {
4003
- return fs$readFile(path14, options2, function(err) {
4001
+ return go$readFile(path14, options, cb);
4002
+ function go$readFile(path15, options2, cb2, startTime) {
4003
+ return fs$readFile(path15, options2, function(err) {
4004
4004
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4005
- enqueue([go$readFile, [path14, options2, cb2], err, startTime || Date.now(), Date.now()]);
4005
+ enqueue([go$readFile, [path15, options2, cb2], err, startTime || Date.now(), Date.now()]);
4006
4006
  else {
4007
4007
  if (typeof cb2 === "function")
4008
4008
  cb2.apply(this, arguments);
@@ -4010,16 +4010,16 @@ var require_graceful_fs = __commonJS({
4010
4010
  });
4011
4011
  }
4012
4012
  }
4013
- var fs$writeFile = fs7.writeFile;
4014
- fs7.writeFile = writeFile2;
4015
- function writeFile2(path13, data, options, cb) {
4013
+ var fs$writeFile = fs8.writeFile;
4014
+ fs8.writeFile = writeFile2;
4015
+ function writeFile2(path14, data, options, cb) {
4016
4016
  if (typeof options === "function")
4017
4017
  cb = options, options = null;
4018
- return go$writeFile(path13, data, options, cb);
4019
- function go$writeFile(path14, data2, options2, cb2, startTime) {
4020
- return fs$writeFile(path14, data2, options2, function(err) {
4018
+ return go$writeFile(path14, data, options, cb);
4019
+ function go$writeFile(path15, data2, options2, cb2, startTime) {
4020
+ return fs$writeFile(path15, data2, options2, function(err) {
4021
4021
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4022
- enqueue([go$writeFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4022
+ enqueue([go$writeFile, [path15, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4023
4023
  else {
4024
4024
  if (typeof cb2 === "function")
4025
4025
  cb2.apply(this, arguments);
@@ -4027,17 +4027,17 @@ var require_graceful_fs = __commonJS({
4027
4027
  });
4028
4028
  }
4029
4029
  }
4030
- var fs$appendFile = fs7.appendFile;
4030
+ var fs$appendFile = fs8.appendFile;
4031
4031
  if (fs$appendFile)
4032
- fs7.appendFile = appendFile;
4033
- function appendFile(path13, data, options, cb) {
4032
+ fs8.appendFile = appendFile;
4033
+ function appendFile(path14, data, options, cb) {
4034
4034
  if (typeof options === "function")
4035
4035
  cb = options, options = null;
4036
- return go$appendFile(path13, data, options, cb);
4037
- function go$appendFile(path14, data2, options2, cb2, startTime) {
4038
- return fs$appendFile(path14, data2, options2, function(err) {
4036
+ return go$appendFile(path14, data, options, cb);
4037
+ function go$appendFile(path15, data2, options2, cb2, startTime) {
4038
+ return fs$appendFile(path15, data2, options2, function(err) {
4039
4039
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4040
- enqueue([go$appendFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4040
+ enqueue([go$appendFile, [path15, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4041
4041
  else {
4042
4042
  if (typeof cb2 === "function")
4043
4043
  cb2.apply(this, arguments);
@@ -4045,9 +4045,9 @@ var require_graceful_fs = __commonJS({
4045
4045
  });
4046
4046
  }
4047
4047
  }
4048
- var fs$copyFile = fs7.copyFile;
4048
+ var fs$copyFile = fs8.copyFile;
4049
4049
  if (fs$copyFile)
4050
- fs7.copyFile = copyFile;
4050
+ fs8.copyFile = copyFile;
4051
4051
  function copyFile(src, dest, flags, cb) {
4052
4052
  if (typeof flags === "function") {
4053
4053
  cb = flags;
@@ -4065,34 +4065,34 @@ var require_graceful_fs = __commonJS({
4065
4065
  });
4066
4066
  }
4067
4067
  }
4068
- var fs$readdir = fs7.readdir;
4069
- fs7.readdir = readdir;
4068
+ var fs$readdir = fs8.readdir;
4069
+ fs8.readdir = readdir;
4070
4070
  var noReaddirOptionVersions = /^v[0-5]\./;
4071
- function readdir(path13, options, cb) {
4071
+ function readdir(path14, options, cb) {
4072
4072
  if (typeof options === "function")
4073
4073
  cb = options, options = null;
4074
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path14, options2, cb2, startTime) {
4075
- return fs$readdir(path14, fs$readdirCallback(
4076
- path14,
4074
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path15, options2, cb2, startTime) {
4075
+ return fs$readdir(path15, fs$readdirCallback(
4076
+ path15,
4077
4077
  options2,
4078
4078
  cb2,
4079
4079
  startTime
4080
4080
  ));
4081
- } : function go$readdir2(path14, options2, cb2, startTime) {
4082
- return fs$readdir(path14, options2, fs$readdirCallback(
4083
- path14,
4081
+ } : function go$readdir2(path15, options2, cb2, startTime) {
4082
+ return fs$readdir(path15, options2, fs$readdirCallback(
4083
+ path15,
4084
4084
  options2,
4085
4085
  cb2,
4086
4086
  startTime
4087
4087
  ));
4088
4088
  };
4089
- return go$readdir(path13, options, cb);
4090
- function fs$readdirCallback(path14, options2, cb2, startTime) {
4089
+ return go$readdir(path14, options, cb);
4090
+ function fs$readdirCallback(path15, options2, cb2, startTime) {
4091
4091
  return function(err, files) {
4092
4092
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4093
4093
  enqueue([
4094
4094
  go$readdir,
4095
- [path14, options2, cb2],
4095
+ [path15, options2, cb2],
4096
4096
  err,
4097
4097
  startTime || Date.now(),
4098
4098
  Date.now()
@@ -4107,21 +4107,21 @@ var require_graceful_fs = __commonJS({
4107
4107
  }
4108
4108
  }
4109
4109
  if (process.version.substr(0, 4) === "v0.8") {
4110
- var legStreams = legacy(fs7);
4110
+ var legStreams = legacy(fs8);
4111
4111
  ReadStream = legStreams.ReadStream;
4112
4112
  WriteStream = legStreams.WriteStream;
4113
4113
  }
4114
- var fs$ReadStream = fs7.ReadStream;
4114
+ var fs$ReadStream = fs8.ReadStream;
4115
4115
  if (fs$ReadStream) {
4116
4116
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
4117
4117
  ReadStream.prototype.open = ReadStream$open;
4118
4118
  }
4119
- var fs$WriteStream = fs7.WriteStream;
4119
+ var fs$WriteStream = fs8.WriteStream;
4120
4120
  if (fs$WriteStream) {
4121
4121
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
4122
4122
  WriteStream.prototype.open = WriteStream$open;
4123
4123
  }
4124
- Object.defineProperty(fs7, "ReadStream", {
4124
+ Object.defineProperty(fs8, "ReadStream", {
4125
4125
  get: function() {
4126
4126
  return ReadStream;
4127
4127
  },
@@ -4131,7 +4131,7 @@ var require_graceful_fs = __commonJS({
4131
4131
  enumerable: true,
4132
4132
  configurable: true
4133
4133
  });
4134
- Object.defineProperty(fs7, "WriteStream", {
4134
+ Object.defineProperty(fs8, "WriteStream", {
4135
4135
  get: function() {
4136
4136
  return WriteStream;
4137
4137
  },
@@ -4142,7 +4142,7 @@ var require_graceful_fs = __commonJS({
4142
4142
  configurable: true
4143
4143
  });
4144
4144
  var FileReadStream = ReadStream;
4145
- Object.defineProperty(fs7, "FileReadStream", {
4145
+ Object.defineProperty(fs8, "FileReadStream", {
4146
4146
  get: function() {
4147
4147
  return FileReadStream;
4148
4148
  },
@@ -4153,7 +4153,7 @@ var require_graceful_fs = __commonJS({
4153
4153
  configurable: true
4154
4154
  });
4155
4155
  var FileWriteStream = WriteStream;
4156
- Object.defineProperty(fs7, "FileWriteStream", {
4156
+ Object.defineProperty(fs8, "FileWriteStream", {
4157
4157
  get: function() {
4158
4158
  return FileWriteStream;
4159
4159
  },
@@ -4163,7 +4163,7 @@ var require_graceful_fs = __commonJS({
4163
4163
  enumerable: true,
4164
4164
  configurable: true
4165
4165
  });
4166
- function ReadStream(path13, options) {
4166
+ function ReadStream(path14, options) {
4167
4167
  if (this instanceof ReadStream)
4168
4168
  return fs$ReadStream.apply(this, arguments), this;
4169
4169
  else
@@ -4183,7 +4183,7 @@ var require_graceful_fs = __commonJS({
4183
4183
  }
4184
4184
  });
4185
4185
  }
4186
- function WriteStream(path13, options) {
4186
+ function WriteStream(path14, options) {
4187
4187
  if (this instanceof WriteStream)
4188
4188
  return fs$WriteStream.apply(this, arguments), this;
4189
4189
  else
@@ -4201,22 +4201,22 @@ var require_graceful_fs = __commonJS({
4201
4201
  }
4202
4202
  });
4203
4203
  }
4204
- function createReadStream3(path13, options) {
4205
- return new fs7.ReadStream(path13, options);
4204
+ function createReadStream3(path14, options) {
4205
+ return new fs8.ReadStream(path14, options);
4206
4206
  }
4207
- function createWriteStream3(path13, options) {
4208
- return new fs7.WriteStream(path13, options);
4207
+ function createWriteStream3(path14, options) {
4208
+ return new fs8.WriteStream(path14, options);
4209
4209
  }
4210
- var fs$open = fs7.open;
4211
- fs7.open = open;
4212
- function open(path13, flags, mode, cb) {
4210
+ var fs$open = fs8.open;
4211
+ fs8.open = open;
4212
+ function open(path14, flags, mode, cb) {
4213
4213
  if (typeof mode === "function")
4214
4214
  cb = mode, mode = null;
4215
- return go$open(path13, flags, mode, cb);
4216
- function go$open(path14, flags2, mode2, cb2, startTime) {
4217
- return fs$open(path14, flags2, mode2, function(err, fd) {
4215
+ return go$open(path14, flags, mode, cb);
4216
+ function go$open(path15, flags2, mode2, cb2, startTime) {
4217
+ return fs$open(path15, flags2, mode2, function(err, fd) {
4218
4218
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4219
- enqueue([go$open, [path14, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
4219
+ enqueue([go$open, [path15, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
4220
4220
  else {
4221
4221
  if (typeof cb2 === "function")
4222
4222
  cb2.apply(this, arguments);
@@ -4224,20 +4224,20 @@ var require_graceful_fs = __commonJS({
4224
4224
  });
4225
4225
  }
4226
4226
  }
4227
- return fs7;
4227
+ return fs8;
4228
4228
  }
4229
4229
  function enqueue(elem) {
4230
4230
  debug("ENQUEUE", elem[0].name, elem[1]);
4231
- fs6[gracefulQueue].push(elem);
4231
+ fs7[gracefulQueue].push(elem);
4232
4232
  retry2();
4233
4233
  }
4234
4234
  var retryTimer;
4235
4235
  function resetQueue() {
4236
4236
  var now = Date.now();
4237
- for (var i2 = 0; i2 < fs6[gracefulQueue].length; ++i2) {
4238
- if (fs6[gracefulQueue][i2].length > 2) {
4239
- fs6[gracefulQueue][i2][3] = now;
4240
- fs6[gracefulQueue][i2][4] = now;
4237
+ for (var i2 = 0; i2 < fs7[gracefulQueue].length; ++i2) {
4238
+ if (fs7[gracefulQueue][i2].length > 2) {
4239
+ fs7[gracefulQueue][i2][3] = now;
4240
+ fs7[gracefulQueue][i2][4] = now;
4241
4241
  }
4242
4242
  }
4243
4243
  retry2();
@@ -4245,9 +4245,9 @@ var require_graceful_fs = __commonJS({
4245
4245
  function retry2() {
4246
4246
  clearTimeout(retryTimer);
4247
4247
  retryTimer = void 0;
4248
- if (fs6[gracefulQueue].length === 0)
4248
+ if (fs7[gracefulQueue].length === 0)
4249
4249
  return;
4250
- var elem = fs6[gracefulQueue].shift();
4250
+ var elem = fs7[gracefulQueue].shift();
4251
4251
  var fn = elem[0];
4252
4252
  var args = elem[1];
4253
4253
  var err = elem[2];
@@ -4269,7 +4269,7 @@ var require_graceful_fs = __commonJS({
4269
4269
  debug("RETRY", fn.name, args);
4270
4270
  fn.apply(null, args.concat([startTime]));
4271
4271
  } else {
4272
- fs6[gracefulQueue].push(elem);
4272
+ fs7[gracefulQueue].push(elem);
4273
4273
  }
4274
4274
  }
4275
4275
  if (retryTimer === void 0) {
@@ -6353,22 +6353,22 @@ var require_normalize_path = __commonJS({
6353
6353
  "../../.yarn/cache/normalize-path-npm-3.0.0-a747cc5237-e008c8142b.zip/node_modules/normalize-path/index.js"(exports, module) {
6354
6354
  "use strict";
6355
6355
  init_esm_shims();
6356
- module.exports = function(path13, stripTrailing) {
6357
- if (typeof path13 !== "string") {
6356
+ module.exports = function(path14, stripTrailing) {
6357
+ if (typeof path14 !== "string") {
6358
6358
  throw new TypeError("expected path to be a string");
6359
6359
  }
6360
- if (path13 === "\\" || path13 === "/") return "/";
6361
- var len = path13.length;
6362
- if (len <= 1) return path13;
6360
+ if (path14 === "\\" || path14 === "/") return "/";
6361
+ var len = path14.length;
6362
+ if (len <= 1) return path14;
6363
6363
  var prefix = "";
6364
- if (len > 4 && path13[3] === "\\") {
6365
- var ch = path13[2];
6366
- if ((ch === "?" || ch === ".") && path13.slice(0, 2) === "\\\\") {
6367
- path13 = path13.slice(2);
6364
+ if (len > 4 && path14[3] === "\\") {
6365
+ var ch = path14[2];
6366
+ if ((ch === "?" || ch === ".") && path14.slice(0, 2) === "\\\\") {
6367
+ path14 = path14.slice(2);
6368
6368
  prefix = "//";
6369
6369
  }
6370
6370
  }
6371
- var segs = path13.split(/[/\\]+/);
6371
+ var segs = path14.split(/[/\\]+/);
6372
6372
  if (stripTrailing !== false && segs[segs.length - 1] === "") {
6373
6373
  segs.pop();
6374
6374
  }
@@ -14983,11 +14983,11 @@ var require_commonjs = __commonJS({
14983
14983
  return (f) => f.length === len && f !== "." && f !== "..";
14984
14984
  };
14985
14985
  var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
14986
- var path13 = {
14986
+ var path14 = {
14987
14987
  win32: { sep: "\\" },
14988
14988
  posix: { sep: "/" }
14989
14989
  };
14990
- exports.sep = defaultPlatform === "win32" ? path13.win32.sep : path13.posix.sep;
14990
+ exports.sep = defaultPlatform === "win32" ? path14.win32.sep : path14.posix.sep;
14991
14991
  exports.minimatch.sep = exports.sep;
14992
14992
  exports.GLOBSTAR = Symbol("globstar **");
14993
14993
  exports.minimatch.GLOBSTAR = exports.GLOBSTAR;
@@ -18238,12 +18238,12 @@ var require_commonjs4 = __commonJS({
18238
18238
  /**
18239
18239
  * Get the Path object referenced by the string path, resolved from this Path
18240
18240
  */
18241
- resolve(path13) {
18242
- if (!path13) {
18241
+ resolve(path14) {
18242
+ if (!path14) {
18243
18243
  return this;
18244
18244
  }
18245
- const rootPath = this.getRootString(path13);
18246
- const dir2 = path13.substring(rootPath.length);
18245
+ const rootPath = this.getRootString(path14);
18246
+ const dir2 = path14.substring(rootPath.length);
18247
18247
  const dirParts = dir2.split(this.splitSep);
18248
18248
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
18249
18249
  return result;
@@ -18996,8 +18996,8 @@ var require_commonjs4 = __commonJS({
18996
18996
  /**
18997
18997
  * @internal
18998
18998
  */
18999
- getRootString(path13) {
19000
- return node_path_1.win32.parse(path13).root;
18999
+ getRootString(path14) {
19000
+ return node_path_1.win32.parse(path14).root;
19001
19001
  }
19002
19002
  /**
19003
19003
  * @internal
@@ -19044,8 +19044,8 @@ var require_commonjs4 = __commonJS({
19044
19044
  /**
19045
19045
  * @internal
19046
19046
  */
19047
- getRootString(path13) {
19048
- return path13.startsWith("/") ? "/" : "";
19047
+ getRootString(path14) {
19048
+ return path14.startsWith("/") ? "/" : "";
19049
19049
  }
19050
19050
  /**
19051
19051
  * @internal
@@ -19095,8 +19095,8 @@ var require_commonjs4 = __commonJS({
19095
19095
  *
19096
19096
  * @internal
19097
19097
  */
19098
- constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs: fs6 = defaultFS } = {}) {
19099
- this.#fs = fsFromOption(fs6);
19098
+ constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs: fs7 = defaultFS } = {}) {
19099
+ this.#fs = fsFromOption(fs7);
19100
19100
  if (cwd instanceof URL || cwd.startsWith("file://")) {
19101
19101
  cwd = (0, node_url_1.fileURLToPath)(cwd);
19102
19102
  }
@@ -19135,11 +19135,11 @@ var require_commonjs4 = __commonJS({
19135
19135
  /**
19136
19136
  * Get the depth of a provided path, string, or the cwd
19137
19137
  */
19138
- depth(path13 = this.cwd) {
19139
- if (typeof path13 === "string") {
19140
- path13 = this.cwd.resolve(path13);
19138
+ depth(path14 = this.cwd) {
19139
+ if (typeof path14 === "string") {
19140
+ path14 = this.cwd.resolve(path14);
19141
19141
  }
19142
- return path13.depth();
19142
+ return path14.depth();
19143
19143
  }
19144
19144
  /**
19145
19145
  * Return the cache of child entries. Exposed so subclasses can create
@@ -19626,9 +19626,9 @@ var require_commonjs4 = __commonJS({
19626
19626
  process10();
19627
19627
  return results;
19628
19628
  }
19629
- chdir(path13 = this.cwd) {
19629
+ chdir(path14 = this.cwd) {
19630
19630
  const oldCwd = this.cwd;
19631
- this.cwd = typeof path13 === "string" ? this.cwd.resolve(path13) : path13;
19631
+ this.cwd = typeof path14 === "string" ? this.cwd.resolve(path14) : path14;
19632
19632
  this.cwd[setAsCwd](oldCwd);
19633
19633
  }
19634
19634
  };
@@ -19655,8 +19655,8 @@ var require_commonjs4 = __commonJS({
19655
19655
  /**
19656
19656
  * @internal
19657
19657
  */
19658
- newRoot(fs6) {
19659
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs6 });
19658
+ newRoot(fs7) {
19659
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
19660
19660
  }
19661
19661
  /**
19662
19662
  * Return true if the provided path string is an absolute path
@@ -19685,8 +19685,8 @@ var require_commonjs4 = __commonJS({
19685
19685
  /**
19686
19686
  * @internal
19687
19687
  */
19688
- newRoot(fs6) {
19689
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs6 });
19688
+ newRoot(fs7) {
19689
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs7 });
19690
19690
  }
19691
19691
  /**
19692
19692
  * Return true if the provided path string is an absolute path
@@ -20019,8 +20019,8 @@ var require_processor = __commonJS({
20019
20019
  }
20020
20020
  // match, absolute, ifdir
20021
20021
  entries() {
20022
- return [...this.store.entries()].map(([path13, n2]) => [
20023
- path13,
20022
+ return [...this.store.entries()].map(([path14, n2]) => [
20023
+ path14,
20024
20024
  !!(n2 & 2),
20025
20025
  !!(n2 & 1)
20026
20026
  ]);
@@ -20239,9 +20239,9 @@ var require_walker = __commonJS({
20239
20239
  signal;
20240
20240
  maxDepth;
20241
20241
  includeChildMatches;
20242
- constructor(patterns, path13, opts) {
20242
+ constructor(patterns, path14, opts) {
20243
20243
  this.patterns = patterns;
20244
- this.path = path13;
20244
+ this.path = path14;
20245
20245
  this.opts = opts;
20246
20246
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
20247
20247
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -20260,11 +20260,11 @@ var require_walker = __commonJS({
20260
20260
  });
20261
20261
  }
20262
20262
  }
20263
- #ignored(path13) {
20264
- return this.seen.has(path13) || !!this.#ignore?.ignored?.(path13);
20263
+ #ignored(path14) {
20264
+ return this.seen.has(path14) || !!this.#ignore?.ignored?.(path14);
20265
20265
  }
20266
- #childrenIgnored(path13) {
20267
- return !!this.#ignore?.childrenIgnored?.(path13);
20266
+ #childrenIgnored(path14) {
20267
+ return !!this.#ignore?.childrenIgnored?.(path14);
20268
20268
  }
20269
20269
  // backpressure mechanism
20270
20270
  pause() {
@@ -20480,8 +20480,8 @@ var require_walker = __commonJS({
20480
20480
  exports.GlobUtil = GlobUtil;
20481
20481
  var GlobWalker = class extends GlobUtil {
20482
20482
  matches = /* @__PURE__ */ new Set();
20483
- constructor(patterns, path13, opts) {
20484
- super(patterns, path13, opts);
20483
+ constructor(patterns, path14, opts) {
20484
+ super(patterns, path14, opts);
20485
20485
  }
20486
20486
  matchEmit(e) {
20487
20487
  this.matches.add(e);
@@ -20519,8 +20519,8 @@ var require_walker = __commonJS({
20519
20519
  exports.GlobWalker = GlobWalker;
20520
20520
  var GlobStream = class extends GlobUtil {
20521
20521
  results;
20522
- constructor(patterns, path13, opts) {
20523
- super(patterns, path13, opts);
20522
+ constructor(patterns, path14, opts) {
20523
+ super(patterns, path14, opts);
20524
20524
  this.results = new minipass_1.Minipass({
20525
20525
  signal: this.signal,
20526
20526
  objectMode: true
@@ -20880,8 +20880,8 @@ var require_file = __commonJS({
20880
20880
  "../../.yarn/cache/archiver-utils-npm-5.0.2-c2e6f595a7-3782c5fa99.zip/node_modules/archiver-utils/file.js"(exports, module) {
20881
20881
  "use strict";
20882
20882
  init_esm_shims();
20883
- var fs6 = require_graceful_fs();
20884
- var path13 = __require("path");
20883
+ var fs7 = require_graceful_fs();
20884
+ var path14 = __require("path");
20885
20885
  var flatten = require_flatten();
20886
20886
  var difference = require_difference();
20887
20887
  var union = require_union();
@@ -20906,8 +20906,8 @@ var require_file = __commonJS({
20906
20906
  return result;
20907
20907
  };
20908
20908
  file.exists = function() {
20909
- var filepath = path13.join.apply(path13, arguments);
20910
- return fs6.existsSync(filepath);
20909
+ var filepath = path14.join.apply(path14, arguments);
20910
+ return fs7.existsSync(filepath);
20911
20911
  };
20912
20912
  file.expand = function(...args) {
20913
20913
  var options = isPlainObject2(args[0]) ? args.shift() : {};
@@ -20920,12 +20920,12 @@ var require_file = __commonJS({
20920
20920
  });
20921
20921
  if (options.filter) {
20922
20922
  matches = matches.filter(function(filepath) {
20923
- filepath = path13.join(options.cwd || "", filepath);
20923
+ filepath = path14.join(options.cwd || "", filepath);
20924
20924
  try {
20925
20925
  if (typeof options.filter === "function") {
20926
20926
  return options.filter(filepath);
20927
20927
  } else {
20928
- return fs6.statSync(filepath)[options.filter]();
20928
+ return fs7.statSync(filepath)[options.filter]();
20929
20929
  }
20930
20930
  } catch (e) {
20931
20931
  return false;
@@ -20937,7 +20937,7 @@ var require_file = __commonJS({
20937
20937
  file.expandMapping = function(patterns, destBase, options) {
20938
20938
  options = Object.assign({
20939
20939
  rename: function(destBase2, destPath) {
20940
- return path13.join(destBase2 || "", destPath);
20940
+ return path14.join(destBase2 || "", destPath);
20941
20941
  }
20942
20942
  }, options);
20943
20943
  var files = [];
@@ -20945,14 +20945,14 @@ var require_file = __commonJS({
20945
20945
  file.expand(options, patterns).forEach(function(src) {
20946
20946
  var destPath = src;
20947
20947
  if (options.flatten) {
20948
- destPath = path13.basename(destPath);
20948
+ destPath = path14.basename(destPath);
20949
20949
  }
20950
20950
  if (options.ext) {
20951
20951
  destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
20952
20952
  }
20953
20953
  var dest = options.rename(destBase, destPath, options);
20954
20954
  if (options.cwd) {
20955
- src = path13.join(options.cwd, src);
20955
+ src = path14.join(options.cwd, src);
20956
20956
  }
20957
20957
  dest = dest.replace(pathSeparatorRe, "/");
20958
20958
  src = src.replace(pathSeparatorRe, "/");
@@ -21035,8 +21035,8 @@ var require_archiver_utils = __commonJS({
21035
21035
  "../../.yarn/cache/archiver-utils-npm-5.0.2-c2e6f595a7-3782c5fa99.zip/node_modules/archiver-utils/index.js"(exports, module) {
21036
21036
  "use strict";
21037
21037
  init_esm_shims();
21038
- var fs6 = require_graceful_fs();
21039
- var path13 = __require("path");
21038
+ var fs7 = require_graceful_fs();
21039
+ var path14 = __require("path");
21040
21040
  var isStream2 = require_is_stream();
21041
21041
  var lazystream = require_lazystream();
21042
21042
  var normalizePath = require_normalize_path();
@@ -21084,7 +21084,7 @@ var require_archiver_utils = __commonJS({
21084
21084
  };
21085
21085
  utils.lazyReadStream = function(filepath) {
21086
21086
  return new lazystream.Readable(function() {
21087
- return fs6.createReadStream(filepath);
21087
+ return fs7.createReadStream(filepath);
21088
21088
  });
21089
21089
  };
21090
21090
  utils.normalizeInputSource = function(source) {
@@ -21112,7 +21112,7 @@ var require_archiver_utils = __commonJS({
21112
21112
  callback = base;
21113
21113
  base = dirpath;
21114
21114
  }
21115
- fs6.readdir(dirpath, function(err, list) {
21115
+ fs7.readdir(dirpath, function(err, list) {
21116
21116
  var i2 = 0;
21117
21117
  var file;
21118
21118
  var filepath;
@@ -21124,11 +21124,11 @@ var require_archiver_utils = __commonJS({
21124
21124
  if (!file) {
21125
21125
  return callback(null, results);
21126
21126
  }
21127
- filepath = path13.join(dirpath, file);
21128
- fs6.stat(filepath, function(err2, stats) {
21127
+ filepath = path14.join(dirpath, file);
21128
+ fs7.stat(filepath, function(err2, stats) {
21129
21129
  results.push({
21130
21130
  path: filepath,
21131
- relative: path13.relative(base, filepath).replace(/\\/g, "/"),
21131
+ relative: path14.relative(base, filepath).replace(/\\/g, "/"),
21132
21132
  stats
21133
21133
  });
21134
21134
  if (stats && stats.isDirectory()) {
@@ -21191,10 +21191,10 @@ var require_core = __commonJS({
21191
21191
  "../../.yarn/cache/archiver-npm-7.0.1-dc24339f78-02afd87ca1.zip/node_modules/archiver/lib/core.js"(exports, module) {
21192
21192
  "use strict";
21193
21193
  init_esm_shims();
21194
- var fs6 = __require("fs");
21194
+ var fs7 = __require("fs");
21195
21195
  var glob = require_readdir_glob();
21196
21196
  var async = (init_async(), __toCommonJS(async_exports));
21197
- var path13 = __require("path");
21197
+ var path14 = __require("path");
21198
21198
  var util2 = require_archiver_utils();
21199
21199
  var inherits = __require("util").inherits;
21200
21200
  var ArchiverError = require_error();
@@ -21255,7 +21255,7 @@ var require_core = __commonJS({
21255
21255
  data.sourcePath = filepath;
21256
21256
  task.data = data;
21257
21257
  this._entriesCount++;
21258
- if (data.stats && data.stats instanceof fs6.Stats) {
21258
+ if (data.stats && data.stats instanceof fs7.Stats) {
21259
21259
  task = this._updateQueueTaskWithStats(task, data.stats);
21260
21260
  if (task) {
21261
21261
  if (data.stats.size) {
@@ -21426,7 +21426,7 @@ var require_core = __commonJS({
21426
21426
  callback();
21427
21427
  return;
21428
21428
  }
21429
- fs6.lstat(task.filepath, function(err, stats) {
21429
+ fs7.lstat(task.filepath, function(err, stats) {
21430
21430
  if (this._state.aborted) {
21431
21431
  setImmediate(callback);
21432
21432
  return;
@@ -21469,10 +21469,10 @@ var require_core = __commonJS({
21469
21469
  task.data.sourceType = "buffer";
21470
21470
  task.source = Buffer.concat([]);
21471
21471
  } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
21472
- var linkPath = fs6.readlinkSync(task.filepath);
21473
- var dirName = path13.dirname(task.filepath);
21472
+ var linkPath = fs7.readlinkSync(task.filepath);
21473
+ var dirName = path14.dirname(task.filepath);
21474
21474
  task.data.type = "symlink";
21475
- task.data.linkname = path13.relative(dirName, path13.resolve(dirName, linkPath));
21475
+ task.data.linkname = path14.relative(dirName, path14.resolve(dirName, linkPath));
21476
21476
  task.data.sourceType = "buffer";
21477
21477
  task.source = Buffer.concat([]);
21478
21478
  } else {
@@ -25660,11 +25660,11 @@ var require_validateReport = __commonJS({
25660
25660
  Object.defineProperty(exports, "__esModule", { value: true });
25661
25661
  exports._validateReport = void 0;
25662
25662
  var _validateReport2 = (array) => {
25663
- const reportable = (path13) => {
25663
+ const reportable = (path14) => {
25664
25664
  if (array.length === 0)
25665
25665
  return true;
25666
25666
  const last = array[array.length - 1].path;
25667
- return path13.length > last.length || last.substring(0, path13.length) !== path13;
25667
+ return path14.length > last.length || last.substring(0, path14.length) !== path14;
25668
25668
  };
25669
25669
  return (exceptable, error) => {
25670
25670
  if (exceptable && reportable(error.path))
@@ -25682,8 +25682,8 @@ init_esm_shims();
25682
25682
  // src/plugins/appsInToss.ts
25683
25683
  init_esm_shims();
25684
25684
  var import_picocolors = __toESM(require_picocolors(), 1);
25685
- import fs5 from "fs";
25686
- import path12 from "path";
25685
+ import fs6 from "fs";
25686
+ import path13 from "path";
25687
25687
 
25688
25688
  // src/plugins/constants.ts
25689
25689
  init_esm_shims();
@@ -30206,13 +30206,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
30206
30206
  }
30207
30207
  };
30208
30208
  var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
30209
- for (const { path: path13, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
30210
- const pathString = typeof path13 === "string" ? path13 : path13.toString();
30209
+ for (const { path: path14, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
30210
+ const pathString = typeof path14 === "string" ? path14 : path14.toString();
30211
30211
  if (append || outputFiles.has(pathString)) {
30212
- appendFileSync(path13, serializedResult);
30212
+ appendFileSync(path14, serializedResult);
30213
30213
  } else {
30214
30214
  outputFiles.add(pathString);
30215
- writeFileSync(path13, serializedResult);
30215
+ writeFileSync(path14, serializedResult);
30216
30216
  }
30217
30217
  }
30218
30218
  };
@@ -33366,6 +33366,36 @@ function generateDeploymentId() {
33366
33366
  return uuidv7();
33367
33367
  }
33368
33368
 
33369
+ // src/plugins/utils/setupRuntimeSetupScript.ts
33370
+ init_esm_shims();
33371
+ import fs5 from "node:fs";
33372
+ import path12 from "node:path";
33373
+ function setupRuntimeSetupScript(config) {
33374
+ const packageRoot = getPackageRoot();
33375
+ const envFilePath = path12.join(packageRoot, ".bedrock/.apps-in-toss.env.js");
33376
+ const script = `
33377
+ (function (global) {
33378
+ global.__appsInToss = ${JSON.stringify({
33379
+ deploymentId: config.deploymentId,
33380
+ bridgeColorMode: config.brand.bridgeColorMode,
33381
+ brandDisplayName: config.brand.displayName,
33382
+ brandPrimaryColor: config.brand.primaryColor,
33383
+ brandIcon: config.brand.icon
33384
+ })};
33385
+ })(
33386
+ typeof globalThis !== 'undefined'
33387
+ ? globalThis
33388
+ : typeof global !== 'undefined'
33389
+ ? global
33390
+ : typeof window !== 'undefined'
33391
+ ? window
33392
+ : this
33393
+ );
33394
+ `;
33395
+ fs5.writeFileSync(envFilePath, script, "utf-8");
33396
+ return { contents: script, path: envFilePath };
33397
+ }
33398
+
33369
33399
  // src/plugins/appsInToss.ts
33370
33400
  function appsInTossCreateArtifact(deploymentId) {
33371
33401
  const packageRoot = getPackageRoot();
@@ -33382,8 +33412,8 @@ function appsInTossCreateArtifact(deploymentId) {
33382
33412
  path: buildResult.outfile,
33383
33413
  platform: buildResult.platform
33384
33414
  })),
33385
- outfile: path12.join(cwd, `${appName}.ait`),
33386
- appJsonPath: path12.join(packageRoot, ".bedrock", APP_MANIFEST_NAME)
33415
+ outfile: path13.join(cwd, `${appName}.ait`),
33416
+ appJsonPath: path13.join(packageRoot, ".bedrock", APP_MANIFEST_NAME)
33387
33417
  },
33388
33418
  {
33389
33419
  compileHbcFn: compileHbc
@@ -33392,36 +33422,31 @@ function appsInTossCreateArtifact(deploymentId) {
33392
33422
  if (!artifactOutfile) {
33393
33423
  throw new Error("\uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC5B4\uC694.");
33394
33424
  }
33395
- const filename = path12.basename(artifactOutfile);
33425
+ const filename = path13.basename(artifactOutfile);
33396
33426
  console.log(`\u2705 ${import_picocolors.default.green(`${filename}`)} \uBE4C\uB4DC \uC644\uB8CC`);
33397
33427
  }
33398
33428
  }
33399
33429
  };
33400
33430
  }
33401
- function getRuntimeSetupScript(deploymentId) {
33402
- return `
33403
- (function (global) {
33404
- global.__appsInToss = {
33405
- deploymentId: ${JSON.stringify(deploymentId)}
33406
- };
33407
- })(
33408
- typeof globalThis !== 'undefined'
33409
- ? globalThis
33410
- : typeof global !== 'undefined'
33411
- ? global
33412
- : typeof window !== 'undefined'
33413
- ? window
33414
- : this
33415
- );
33416
- `;
33417
- }
33418
- function appsInTossEsbuildConfig(deploymentId) {
33431
+ function appsInTossEsbuildConfig(envScript) {
33419
33432
  return {
33420
33433
  name: "apps-in-toss:esbuild-config",
33421
33434
  config: {
33422
33435
  esbuild: {
33423
33436
  banner: {
33424
- js: getRuntimeSetupScript(deploymentId)
33437
+ js: envScript
33438
+ }
33439
+ }
33440
+ }
33441
+ };
33442
+ }
33443
+ function appsInTossMetroConfig(envScriptPath) {
33444
+ return {
33445
+ name: "apps-in-toss:metro-config",
33446
+ config: {
33447
+ metro: {
33448
+ serializer: {
33449
+ getPolyfills: () => [envScriptPath]
33425
33450
  }
33426
33451
  }
33427
33452
  }
@@ -33445,14 +33470,14 @@ function appsInTossDevServer(options) {
33445
33470
  async function appsInTossAppJson(options) {
33446
33471
  const packageRoot = getPackageRoot();
33447
33472
  const handleAppJson = async (appName) => {
33448
- const appJsonPath = path12.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
33473
+ const appJsonPath = path13.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
33449
33474
  const appJsonObject = {
33450
33475
  appName,
33451
33476
  permissions: options.permissions
33452
33477
  };
33453
- await fs5.promises.mkdir(path12.dirname(appJsonPath), { recursive: true });
33478
+ await fs6.promises.mkdir(path13.dirname(appJsonPath), { recursive: true });
33454
33479
  try {
33455
- const existingAppJson = await fs5.promises.readFile(appJsonPath, "utf8");
33480
+ const existingAppJson = await fs6.promises.readFile(appJsonPath, "utf8");
33456
33481
  const existingAppJsonObject = JSON.parse(existingAppJson);
33457
33482
  Object.assign(appJsonObject, existingAppJsonObject, {
33458
33483
  appName,
@@ -33460,7 +33485,7 @@ async function appsInTossAppJson(options) {
33460
33485
  });
33461
33486
  } catch (error) {
33462
33487
  }
33463
- await fs5.promises.writeFile(appJsonPath, JSON.stringify(appJsonObject, null, 2), "utf8");
33488
+ await fs6.promises.writeFile(appJsonPath, JSON.stringify(appJsonObject, null, 2), "utf8");
33464
33489
  };
33465
33490
  return {
33466
33491
  name: "apps-in-toss:app-json",
@@ -33480,17 +33505,25 @@ async function appsInTossAppJson(options) {
33480
33505
  }
33481
33506
  function appsInToss(options) {
33482
33507
  const deploymentId = generateDeploymentId();
33508
+ const { contents, path: envFilePath } = setupRuntimeSetupScript({
33509
+ brand: options.brand,
33510
+ deploymentId
33511
+ });
33483
33512
  return [
33484
33513
  appsInTossAppJson(options),
33485
33514
  appsInTossDevServer(options),
33486
33515
  appsInTossCreateArtifact(deploymentId),
33487
- appsInTossEsbuildConfig(deploymentId)
33516
+ appsInTossEsbuildConfig(contents),
33517
+ appsInTossMetroConfig(envFilePath)
33488
33518
  ];
33489
33519
  }
33490
33520
  export {
33491
33521
  appsInToss,
33492
33522
  appsInTossAppJson,
33523
+ appsInTossEsbuildConfig,
33524
+ appsInTossMetroConfig,
33493
33525
  createArtifact,
33526
+ setupRuntimeSetupScript,
33494
33527
  validateAppManifest,
33495
33528
  validateZip
33496
33529
  };