@shopify/create-app 3.66.1 → 3.67.1

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.
Files changed (39) hide show
  1. package/dist/{chunk-FIJKOZJF.js → chunk-2IV4ZS5T.js} +4 -3
  2. package/dist/{chunk-7BASJP2S.js → chunk-3R2K56R4.js} +2 -2
  3. package/dist/{chunk-KFZCBK4T.js → chunk-7TIEQFXZ.js} +4 -4
  4. package/dist/{chunk-CLUGFX6V.js → chunk-AZ47753Z.js} +13 -13
  5. package/dist/{chunk-XLDLHIVF.js → chunk-B5HFPT7G.js} +2 -2
  6. package/dist/{chunk-S3DUCSRO.js → chunk-H3SGNEP3.js} +7 -7
  7. package/dist/{chunk-LGVLNWZU.js → chunk-JHN6JQJ6.js} +4 -4
  8. package/dist/{chunk-GAIGXDXK.js → chunk-NWC4ORCS.js} +11 -11
  9. package/dist/{chunk-VZVGAREJ.js → chunk-OL5GDQRF.js} +27 -17
  10. package/dist/{chunk-RUAGSZKM.js → chunk-QB544PAD.js} +4 -4
  11. package/dist/{chunk-XG23WV6C.js → chunk-QFQCHQ24.js} +230 -89
  12. package/dist/{chunk-QLRYO5KT.js → chunk-QH7VTTGK.js} +24 -11
  13. package/dist/{chunk-257COCSO.js → chunk-R4JYIGZ6.js} +2 -2
  14. package/dist/{chunk-BBE4ZEEU.js → chunk-TV5LJHC5.js} +5 -5
  15. package/dist/{chunk-P5KC5F5V.js → chunk-X4PTOOZW.js} +16 -5
  16. package/dist/{chunk-WT4JHKP5.js → chunk-ZSO54CGJ.js} +22 -7
  17. package/dist/commands/init.js +16 -16
  18. package/dist/commands/init.test.js +16 -16
  19. package/dist/{constants-WG7I7G3O.js → constants-MFMCWLIA.js} +4 -2
  20. package/dist/{custom-oclif-loader-BIG4GFMG.js → custom-oclif-loader-P7CQYRCS.js} +4 -4
  21. package/dist/{error-handler-T4BVXIMP.js → error-handler-73YUB4PB.js} +11 -11
  22. package/dist/hooks/postrun.js +9 -9
  23. package/dist/hooks/prerun.js +7 -7
  24. package/dist/index.js +2 -2
  25. package/dist/{lib-3K5QYF3J.js → lib-FYUAIYTL.js} +2 -2
  26. package/dist/{local-LCGXZ56M.js → local-7ZNEHAZM.js} +4 -4
  27. package/dist/{node-package-manager-PPBMXNJX.js → node-package-manager-EV7MLIUF.js} +5 -5
  28. package/dist/prompts/init.js +4 -4
  29. package/dist/prompts/init.test.js +8 -8
  30. package/dist/services/init.js +10 -10
  31. package/dist/{system-EHKKASQN.js → system-WOOCGJ5M.js} +6 -6
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/dist/{ui-RTRXLPXR.js → ui-YRQ272UN.js} +4 -4
  34. package/dist/utils/template/cleanup.js +4 -4
  35. package/dist/utils/template/cleanup.test.js +4 -4
  36. package/dist/utils/template/npm.js +6 -6
  37. package/dist/utils/template/npm.test.js +6 -6
  38. package/oclif.manifest.json +1 -1
  39. package/package.json +2 -2
@@ -4,9 +4,10 @@ import {
4
4
  import {
5
5
  environmentVariables,
6
6
  pathConstants
7
- } from "./chunk-FIJKOZJF.js";
7
+ } from "./chunk-2IV4ZS5T.js";
8
8
  import {
9
9
  cwd,
10
+ dirname,
10
11
  joinPath,
11
12
  normalizePath,
12
13
  relativizePath,
@@ -22,13 +23,11 @@ import {
22
23
  import {
23
24
  require_brace_expansion,
24
25
  require_cross_spawn,
25
- require_has_flag,
26
26
  require_lib,
27
27
  require_source,
28
28
  require_source_map,
29
- require_supports_color,
30
29
  require_supports_hyperlinks
31
- } from "./chunk-VZVGAREJ.js";
30
+ } from "./chunk-OL5GDQRF.js";
32
31
  import {
33
32
  Queue
34
33
  } from "./chunk-522OB3EU.js";
@@ -4214,6 +4213,208 @@ var require_merge_stream = __commonJS({
4214
4213
  }
4215
4214
  });
4216
4215
 
4216
+ // ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js
4217
+ var require_posix = __commonJS({
4218
+ "../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js"(exports) {
4219
+ "use strict";
4220
+ init_cjs_shims();
4221
+ Object.defineProperty(exports, "__esModule", { value: !0 });
4222
+ exports.sync = exports.isexe = void 0;
4223
+ var fs_1 = __require("fs"), promises_1 = __require("fs/promises"), isexe = async (path7, options = {}) => {
4224
+ let { ignoreErrors = !1 } = options;
4225
+ try {
4226
+ return checkStat(await (0, promises_1.stat)(path7), options);
4227
+ } catch (e) {
4228
+ let er = e;
4229
+ if (ignoreErrors || er.code === "EACCES")
4230
+ return !1;
4231
+ throw er;
4232
+ }
4233
+ };
4234
+ exports.isexe = isexe;
4235
+ var sync = (path7, options = {}) => {
4236
+ let { ignoreErrors = !1 } = options;
4237
+ try {
4238
+ return checkStat((0, fs_1.statSync)(path7), options);
4239
+ } catch (e) {
4240
+ let er = e;
4241
+ if (ignoreErrors || er.code === "EACCES")
4242
+ return !1;
4243
+ throw er;
4244
+ }
4245
+ };
4246
+ exports.sync = sync;
4247
+ var checkStat = (stat, options) => stat.isFile() && checkMode(stat, options), checkMode = (stat, options) => {
4248
+ let myUid = options.uid ?? process.getuid?.(), myGroups = options.groups ?? process.getgroups?.() ?? [], myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
4249
+ if (myUid === void 0 || myGid === void 0)
4250
+ throw new Error("cannot get uid or gid");
4251
+ let groups = /* @__PURE__ */ new Set([myGid, ...myGroups]), mod = stat.mode, uid = stat.uid, gid = stat.gid, u = parseInt("100", 8), g = parseInt("010", 8), o = parseInt("001", 8), ug = u | g;
4252
+ return !!(mod & o || mod & g && groups.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0);
4253
+ };
4254
+ }
4255
+ });
4256
+
4257
+ // ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js
4258
+ var require_win32 = __commonJS({
4259
+ "../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js"(exports) {
4260
+ "use strict";
4261
+ init_cjs_shims();
4262
+ Object.defineProperty(exports, "__esModule", { value: !0 });
4263
+ exports.sync = exports.isexe = void 0;
4264
+ var fs_1 = __require("fs"), promises_1 = __require("fs/promises"), isexe = async (path7, options = {}) => {
4265
+ let { ignoreErrors = !1 } = options;
4266
+ try {
4267
+ return checkStat(await (0, promises_1.stat)(path7), path7, options);
4268
+ } catch (e) {
4269
+ let er = e;
4270
+ if (ignoreErrors || er.code === "EACCES")
4271
+ return !1;
4272
+ throw er;
4273
+ }
4274
+ };
4275
+ exports.isexe = isexe;
4276
+ var sync = (path7, options = {}) => {
4277
+ let { ignoreErrors = !1 } = options;
4278
+ try {
4279
+ return checkStat((0, fs_1.statSync)(path7), path7, options);
4280
+ } catch (e) {
4281
+ let er = e;
4282
+ if (ignoreErrors || er.code === "EACCES")
4283
+ return !1;
4284
+ throw er;
4285
+ }
4286
+ };
4287
+ exports.sync = sync;
4288
+ var checkPathExt = (path7, options) => {
4289
+ let { pathExt = process.env.PATHEXT || "" } = options, peSplit = pathExt.split(";");
4290
+ if (peSplit.indexOf("") !== -1)
4291
+ return !0;
4292
+ for (let i = 0; i < peSplit.length; i++) {
4293
+ let p = peSplit[i].toLowerCase(), ext2 = path7.substring(path7.length - p.length).toLowerCase();
4294
+ if (p && ext2 === p)
4295
+ return !0;
4296
+ }
4297
+ return !1;
4298
+ }, checkStat = (stat, path7, options) => stat.isFile() && checkPathExt(path7, options);
4299
+ }
4300
+ });
4301
+
4302
+ // ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js
4303
+ var require_options = __commonJS({
4304
+ "../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js"(exports) {
4305
+ "use strict";
4306
+ init_cjs_shims();
4307
+ Object.defineProperty(exports, "__esModule", { value: !0 });
4308
+ }
4309
+ });
4310
+
4311
+ // ../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js
4312
+ var require_cjs = __commonJS({
4313
+ "../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js"(exports) {
4314
+ "use strict";
4315
+ init_cjs_shims();
4316
+ var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
4317
+ k2 === void 0 && (k2 = k);
4318
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4319
+ (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
4320
+ return m[k];
4321
+ } }), Object.defineProperty(o, k2, desc);
4322
+ } : function(o, m, k, k2) {
4323
+ k2 === void 0 && (k2 = k), o[k2] = m[k];
4324
+ }), __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
4325
+ Object.defineProperty(o, "default", { enumerable: !0, value: v });
4326
+ } : function(o, v) {
4327
+ o.default = v;
4328
+ }), __importStar2 = exports && exports.__importStar || function(mod) {
4329
+ if (mod && mod.__esModule)
4330
+ return mod;
4331
+ var result = {};
4332
+ if (mod != null)
4333
+ for (var k in mod)
4334
+ k !== "default" && Object.prototype.hasOwnProperty.call(mod, k) && __createBinding2(result, mod, k);
4335
+ return __setModuleDefault2(result, mod), result;
4336
+ }, __exportStar2 = exports && exports.__exportStar || function(m, exports2) {
4337
+ for (var p in m)
4338
+ p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p) && __createBinding2(exports2, m, p);
4339
+ };
4340
+ Object.defineProperty(exports, "__esModule", { value: !0 });
4341
+ exports.sync = exports.isexe = exports.posix = exports.win32 = void 0;
4342
+ var posix = __importStar2(require_posix());
4343
+ exports.posix = posix;
4344
+ var win32 = __importStar2(require_win32());
4345
+ exports.win32 = win32;
4346
+ __exportStar2(require_options(), exports);
4347
+ var platform2 = process.env._ISEXE_TEST_PLATFORM_ || process.platform, impl = platform2 === "win32" ? win32 : posix;
4348
+ exports.isexe = impl.isexe;
4349
+ exports.sync = impl.sync;
4350
+ }
4351
+ });
4352
+
4353
+ // ../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js
4354
+ var require_lib2 = __commonJS({
4355
+ "../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js"(exports, module) {
4356
+ init_cjs_shims();
4357
+ var { isexe, sync: isexeSync } = require_cjs(), { join: join2, delimiter, sep: sep2, posix } = __require("path"), isWindows2 = process.platform === "win32", rSlash = new RegExp(`[${posix.sep}${sep2 === posix.sep ? "" : sep2}]`.replace(/(\\)/g, "\\$1")), rRel = new RegExp(`^\\.${rSlash.source}`), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, {
4358
+ path: optPath = process.env.PATH,
4359
+ pathExt: optPathExt = process.env.PATHEXT,
4360
+ delimiter: optDelimiter = delimiter
4361
+ }) => {
4362
+ let pathEnv = cmd.match(rSlash) ? [""] : [
4363
+ // windows always checks the cwd first
4364
+ ...isWindows2 ? [process.cwd()] : [],
4365
+ ...(optPath || /* istanbul ignore next: very unusual */
4366
+ "").split(optDelimiter)
4367
+ ];
4368
+ if (isWindows2) {
4369
+ let pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter), pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]);
4370
+ return cmd.includes(".") && pathExt[0] !== "" && pathExt.unshift(""), { pathEnv, pathExt, pathExtExe };
4371
+ }
4372
+ return { pathEnv, pathExt: [""] };
4373
+ }, getPathPart = (raw, cmd) => {
4374
+ let pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
4375
+ return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join2(pathPart, cmd);
4376
+ }, which2 = async (cmd, opt = {}) => {
4377
+ let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [];
4378
+ for (let envPart of pathEnv) {
4379
+ let p = getPathPart(envPart, cmd);
4380
+ for (let ext2 of pathExt) {
4381
+ let withExt = p + ext2;
4382
+ if (await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: !0 })) {
4383
+ if (!opt.all)
4384
+ return withExt;
4385
+ found.push(withExt);
4386
+ }
4387
+ }
4388
+ }
4389
+ if (opt.all && found.length)
4390
+ return found;
4391
+ if (opt.nothrow)
4392
+ return null;
4393
+ throw getNotFoundError(cmd);
4394
+ }, whichSync = (cmd, opt = {}) => {
4395
+ let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [];
4396
+ for (let pathEnvPart of pathEnv) {
4397
+ let p = getPathPart(pathEnvPart, cmd);
4398
+ for (let ext2 of pathExt) {
4399
+ let withExt = p + ext2;
4400
+ if (isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: !0 })) {
4401
+ if (!opt.all)
4402
+ return withExt;
4403
+ found.push(withExt);
4404
+ }
4405
+ }
4406
+ }
4407
+ if (opt.all && found.length)
4408
+ return found;
4409
+ if (opt.nothrow)
4410
+ return null;
4411
+ throw getNotFoundError(cmd);
4412
+ };
4413
+ module.exports = which2;
4414
+ which2.sync = whichSync;
4415
+ }
4416
+ });
4417
+
4217
4418
  // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/util.js
4218
4419
  var require_util = __commonJS({
4219
4420
  "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/util.js"(exports, module) {
@@ -20838,73 +21039,6 @@ var require_dist16 = __commonJS({
20838
21039
  }
20839
21040
  });
20840
21041
 
20841
- // ../../node_modules/.pnpm/supports-hyperlinks@3.0.0/node_modules/supports-hyperlinks/index.js
20842
- var require_supports_hyperlinks2 = __commonJS({
20843
- "../../node_modules/.pnpm/supports-hyperlinks@3.0.0/node_modules/supports-hyperlinks/index.js"(exports, module) {
20844
- "use strict";
20845
- init_cjs_shims();
20846
- var supportsColor3 = require_supports_color(), hasFlag2 = require_has_flag();
20847
- function parseVersion(versionString) {
20848
- if (/^\d{3,4}$/.test(versionString)) {
20849
- let m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
20850
- return {
20851
- major: 0,
20852
- minor: parseInt(m[1], 10),
20853
- patch: parseInt(m[2], 10)
20854
- };
20855
- }
20856
- let versions = (versionString || "").split(".").map((n) => parseInt(n, 10));
20857
- return {
20858
- major: versions[0],
20859
- minor: versions[1],
20860
- patch: versions[2]
20861
- };
20862
- }
20863
- function supportsHyperlink(stream2) {
20864
- let {
20865
- CI,
20866
- FORCE_HYPERLINK,
20867
- NETLIFY,
20868
- TEAMCITY_VERSION,
20869
- TERM_PROGRAM,
20870
- TERM_PROGRAM_VERSION,
20871
- VTE_VERSION
20872
- } = process.env;
20873
- if (FORCE_HYPERLINK)
20874
- return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
20875
- if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never"))
20876
- return !1;
20877
- if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always") || NETLIFY)
20878
- return !0;
20879
- if (!supportsColor3.supportsColor(stream2) || stream2 && !stream2.isTTY || process.platform === "win32" || CI || TEAMCITY_VERSION)
20880
- return !1;
20881
- if (TERM_PROGRAM) {
20882
- let version = parseVersion(TERM_PROGRAM_VERSION || "");
20883
- switch (TERM_PROGRAM) {
20884
- case "iTerm.app":
20885
- return version.major === 3 ? version.minor >= 1 : version.major > 3;
20886
- case "WezTerm":
20887
- return version.major >= 20200620;
20888
- case "vscode":
20889
- return version.major > 1 || version.major === 1 && version.minor >= 72;
20890
- }
20891
- }
20892
- if (VTE_VERSION) {
20893
- if (VTE_VERSION === "0.50.0")
20894
- return !1;
20895
- let version = parseVersion(VTE_VERSION);
20896
- return version.major > 0 || version.minor >= 50;
20897
- }
20898
- return !1;
20899
- }
20900
- module.exports = {
20901
- supportsHyperlink,
20902
- stdout: supportsHyperlink(process.stdout),
20903
- stderr: supportsHyperlink(process.stderr)
20904
- };
20905
- }
20906
- });
20907
-
20908
21042
  // ../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/helpers.js
20909
21043
  var require_helpers = __commonJS({
20910
21044
  "../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/helpers.js"(exports) {
@@ -20956,7 +21090,7 @@ var require_helpers = __commonJS({
20956
21090
  });
20957
21091
 
20958
21092
  // ../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/cjs.js
20959
- var require_cjs = __commonJS({
21093
+ var require_cjs2 = __commonJS({
20960
21094
  "../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/cjs.js"(exports) {
20961
21095
  "use strict";
20962
21096
  init_cjs_shims();
@@ -23941,22 +24075,22 @@ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/, regExpEscape2 = (s) => s.replace(/[-[
23941
24075
  return globParts.filter((gs) => gs.length);
23942
24076
  }
23943
24077
  partsMatch(a, b, emptyGSMatch = !1) {
23944
- let ai = 0, bi = 0, result = [], which = "";
24078
+ let ai = 0, bi = 0, result = [], which2 = "";
23945
24079
  for (; ai < a.length && bi < b.length; )
23946
24080
  if (a[ai] === b[bi])
23947
- result.push(which === "b" ? b[bi] : a[ai]), ai++, bi++;
24081
+ result.push(which2 === "b" ? b[bi] : a[ai]), ai++, bi++;
23948
24082
  else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1])
23949
24083
  result.push(a[ai]), ai++;
23950
24084
  else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1])
23951
24085
  result.push(b[bi]), bi++;
23952
24086
  else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
23953
- if (which === "b")
24087
+ if (which2 === "b")
23954
24088
  return !1;
23955
- which = "a", result.push(a[ai]), ai++, bi++;
24089
+ which2 = "a", result.push(a[ai]), ai++, bi++;
23956
24090
  } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
23957
- if (which === "a")
24091
+ if (which2 === "a")
23958
24092
  return !1;
23959
- which = "b", result.push(b[bi]), ai++, bi++;
24093
+ which2 = "b", result.push(b[bi]), ai++, bi++;
23960
24094
  } else
23961
24095
  return !1;
23962
24096
  return a.length === b.length && result;
@@ -25132,6 +25266,7 @@ function create$(options) {
25132
25266
  var $ = create$();
25133
25267
 
25134
25268
  // ../cli-kit/src/public/node/system.ts
25269
+ var import_which = __toESM(require_lib2(), 1);
25135
25270
  async function openURL(url) {
25136
25271
  await (await import("./open-MZGVNFZO.js")).default(url);
25137
25272
  }
@@ -25161,7 +25296,7 @@ async function exec2(command, args, options) {
25161
25296
  }
25162
25297
  function buildExec(command, args, options) {
25163
25298
  let env2 = options?.env ?? process.env;
25164
- shouldDisplayColors() && (env2.FORCE_COLOR = "1");
25299
+ shouldDisplayColors() && (env2.FORCE_COLOR = "1"), checkCommandSafety(command);
25165
25300
  let commandProcess = execa(command, args, {
25166
25301
  env: env2,
25167
25302
  cwd: options?.cwd,
@@ -25180,13 +25315,19 @@ Running system process:
25180
25315
  \xB7 Working directory: ${options?.cwd ?? cwd()}
25181
25316
  `), commandProcess;
25182
25317
  }
25318
+ function checkCommandSafety(command) {
25319
+ if (dirname(import_which.default.sync(command)) === cwd()) {
25320
+ let headline = ["Skipped run of unsecure binary", { command }, "found in the current directory."], body = "Please remove that file or review your current PATH.";
25321
+ throw renderWarning({ headline, body }), new AbortError(headline, body);
25322
+ }
25323
+ }
25183
25324
  async function sleep(seconds) {
25184
25325
  return new Promise((resolve) => {
25185
25326
  setTimeout(resolve, 1e3 * seconds);
25186
25327
  });
25187
25328
  }
25188
- function terminalSupportsRawMode(stdin, env2 = process.env) {
25189
- return isTruthy(env2.CI) ? !1 : stdin ? !!stdin.isTTY : process.stdin.isTTY;
25329
+ function terminalSupportsPrompting() {
25330
+ return isTruthy(process.env.CI) ? !1 : !!(process.stdin.isTTY && process.stdout.isTTY);
25190
25331
  }
25191
25332
 
25192
25333
  // ../cli-kit/src/private/node/context/spin-cache.ts
@@ -25377,7 +25518,7 @@ async function installGlobalShopifyCLI(packageManager) {
25377
25518
  outputInfo(`Running ${packageManager} ${args.join(" ")}...`), await exec2(packageManager, args, { stdio: "inherit" });
25378
25519
  }
25379
25520
  async function installGlobalCLIPrompt() {
25380
- return terminalSupportsRawMode() ? await isGlobalCLIInstalled() ? { install: !1, alreadyInstalled: !0 } : { install: await renderSelectPrompt({
25521
+ return terminalSupportsPrompting() ? await isGlobalCLIInstalled() ? { install: !1, alreadyInstalled: !0 } : { install: await renderSelectPrompt({
25381
25522
  message: "We recommend installing Shopify CLI globally in your system. Would you like to install it now?",
25382
25523
  choices: [
25383
25524
  { value: "yes", label: "Yes" },
@@ -29299,7 +29440,7 @@ var import_react23 = __toESM(require_react(), 1), LinksContext = import_react23.
29299
29440
 
29300
29441
  // ../cli-kit/src/private/node/ui/components/Link.tsx
29301
29442
  var import_react24 = __toESM(require_react(), 1);
29302
- var import_supports_hyperlinks2 = __toESM(require_supports_hyperlinks2(), 1);
29443
+ var import_supports_hyperlinks2 = __toESM(require_supports_hyperlinks(), 1);
29303
29444
  function link(label, url, linksContext) {
29304
29445
  if (!import_supports_hyperlinks2.default.stdout) {
29305
29446
  if (linksContext === null)
@@ -29577,7 +29718,7 @@ function shouldDisplayColors(_process = process) {
29577
29718
  }
29578
29719
 
29579
29720
  // ../cli-kit/src/public/node/error.ts
29580
- var import_core2 = __toESM(require_lib(), 1), import_ts_error = __toESM(require_cjs(), 1);
29721
+ var import_core2 = __toESM(require_lib(), 1), import_ts_error = __toESM(require_cjs2(), 1);
29581
29722
  var CancelExecution = class extends Error {
29582
29723
  }, FatalError = class extends Error {
29583
29724
  /**
@@ -29681,7 +29822,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
29681
29822
  try {
29682
29823
  await getAndSet();
29683
29824
  } catch (error) {
29684
- let { sendErrorToBugsnag } = await import("./error-handler-T4BVXIMP.js");
29825
+ let { sendErrorToBugsnag } = await import("./error-handler-73YUB4PB.js");
29685
29826
  await sendErrorToBugsnag(error, "unexpected_error");
29686
29827
  }
29687
29828
  }, durationStack = [];
@@ -31304,7 +31445,7 @@ var keypress = async (stdin = process.stdin, uiDebugOptions = defaultUIDebugOpti
31304
31445
  stdin.setRawMode(!0), stdin.once("data", handler2), stdin.ref();
31305
31446
  })));
31306
31447
  function isTTY({ stdin = void 0, uiDebugOptions = defaultUIDebugOptions } = {}) {
31307
- return !!(uiDebugOptions.skipTTYCheck || stdin || terminalSupportsRawMode());
31448
+ return !!(uiDebugOptions.skipTTYCheck || stdin || terminalSupportsPrompting());
31308
31449
  }
31309
31450
  function throwInNonTTY({ message, stdin = void 0 }, uiDebugOptions) {
31310
31451
  if (isTTY({ stdin, uiDebugOptions }))
@@ -31313,7 +31454,7 @@ function throwInNonTTY({ message, stdin = void 0 }, uiDebugOptions) {
31313
31454
 
31314
31455
  ${outputContent`${outputToken.cyan(promptText)}`.value}
31315
31456
 
31316
- This usually happens when running a command non-interactively, for example in a CI environment, or when piping input from another process.`;
31457
+ This usually happens when running a command non-interactively, for example in a CI environment, or when piping to or from another process.`;
31317
31458
  throw new AbortError(
31318
31459
  errorMessage,
31319
31460
  "To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal."
@@ -31368,7 +31509,7 @@ export {
31368
31509
  captureOutput,
31369
31510
  exec2 as exec,
31370
31511
  sleep,
31371
- terminalSupportsRawMode,
31512
+ terminalSupportsPrompting,
31372
31513
  isSpinEnvironment,
31373
31514
  isTerminalInteractive,
31374
31515
  homeDirectory,
@@ -31505,4 +31646,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
31505
31646
  * LICENSE file in the root directory of this source tree.
31506
31647
  *)
31507
31648
  */
31508
- //# sourceMappingURL=chunk-XG23WV6C.js.map
31649
+ //# sourceMappingURL=chunk-QFQCHQ24.js.map
@@ -4,13 +4,16 @@ import {
4
4
  import {
5
5
  fanoutHooks,
6
6
  reportAnalyticsEvent
7
- } from "./chunk-WT4JHKP5.js";
7
+ } from "./chunk-ZSO54CGJ.js";
8
8
  import {
9
9
  getEnvironmentData
10
- } from "./chunk-LGVLNWZU.js";
10
+ } from "./chunk-JHN6JQJ6.js";
11
11
  import {
12
12
  CLI_KIT_VERSION
13
- } from "./chunk-7BASJP2S.js";
13
+ } from "./chunk-3R2K56R4.js";
14
+ import {
15
+ runWithRateLimit
16
+ } from "./chunk-X4PTOOZW.js";
14
17
  import {
15
18
  AbortSilentError,
16
19
  CancelExecution,
@@ -23,10 +26,11 @@ import {
23
26
  outputInfo,
24
27
  require_stacktracey,
25
28
  shouldReportError
26
- } from "./chunk-XG23WV6C.js";
29
+ } from "./chunk-QFQCHQ24.js";
27
30
  import {
28
- bugsnagApiKey
29
- } from "./chunk-FIJKOZJF.js";
31
+ bugsnagApiKey,
32
+ reportingRateLimit
33
+ } from "./chunk-2IV4ZS5T.js";
30
34
  import {
31
35
  cwd,
32
36
  isAbsolutePath,
@@ -39,7 +43,7 @@ import {
39
43
  } from "./chunk-LTDD2GRL.js";
40
44
  import {
41
45
  require_lib
42
- } from "./chunk-VZVGAREJ.js";
46
+ } from "./chunk-OL5GDQRF.js";
43
47
  import {
44
48
  __commonJS,
45
49
  __require,
@@ -2065,8 +2069,16 @@ async function sendErrorToBugsnag(error, exitMode) {
2065
2069
  return ` at ${item.callee} (${filePath}:${item.line}:${item.column})`;
2066
2070
  }).join(`
2067
2071
  `);
2068
- return reportableError.stack = `Error: ${reportableError.message}
2069
- ${formattedStacktrace}`, report && (initializeBugsnag(), await new Promise((resolve, reject) => {
2072
+ reportableError.stack = `Error: ${reportableError.message}
2073
+ ${formattedStacktrace}`;
2074
+ let withinRateLimit = !1;
2075
+ return await runWithRateLimit({
2076
+ key: "send-error-to-bugsnag",
2077
+ ...reportingRateLimit,
2078
+ task: async () => {
2079
+ withinRateLimit = !0;
2080
+ }
2081
+ }), withinRateLimit || (outputDebug("Skipping Bugsnag report due to rate limiting"), report = !1), report && (initializeBugsnag(), await new Promise((resolve, reject) => {
2070
2082
  outputDebug(`Reporting ${unhandled ? "unhandled" : "handled"} error to Bugsnag: ${reportableError.message}`);
2071
2083
  let eventHandler = (event) => {
2072
2084
  event.severity = "error", event.unhandled = unhandled;
@@ -2130,7 +2142,8 @@ function initializeBugsnag() {
2130
2142
  logger: null,
2131
2143
  appVersion: CLI_KIT_VERSION,
2132
2144
  autoTrackSessions: !1,
2133
- autoDetectErrors: !1
2145
+ autoDetectErrors: !1,
2146
+ enabledReleaseStages: ["production"]
2134
2147
  });
2135
2148
  }
2136
2149
 
@@ -2141,4 +2154,4 @@ export {
2141
2154
  registerCleanBugsnagErrorsFromWithinPlugins,
2142
2155
  addBugsnagMetadata
2143
2156
  };
2144
- //# sourceMappingURL=chunk-QLRYO5KT.js.map
2157
+ //# sourceMappingURL=chunk-QH7VTTGK.js.map
@@ -2,7 +2,7 @@ import {
2
2
  execa,
3
3
  outputContent,
4
4
  outputDebug
5
- } from "./chunk-XG23WV6C.js";
5
+ } from "./chunk-QFQCHQ24.js";
6
6
  import {
7
7
  init_cjs_shims
8
8
  } from "./chunk-POZ5MGPT.js";
@@ -60,4 +60,4 @@ export {
60
60
  username,
61
61
  platformAndArch
62
62
  };
63
- //# sourceMappingURL=chunk-257COCSO.js.map
63
+ //# sourceMappingURL=chunk-R4JYIGZ6.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-LTDD2GRL.js";
5
5
  import {
6
6
  require_lib
7
- } from "./chunk-VZVGAREJ.js";
7
+ } from "./chunk-OL5GDQRF.js";
8
8
  import {
9
9
  __toESM,
10
10
  init_cjs_shims
@@ -17,7 +17,7 @@ import { fileURLToPath } from "url";
17
17
  async function warnIfOldNodeVersion() {
18
18
  let nodeVersion = process.versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
19
19
  if (nodeMajorVersion < 18) {
20
- let { renderWarning } = await import("./ui-RTRXLPXR.js");
20
+ let { renderWarning } = await import("./ui-YRQ272UN.js");
21
21
  renderWarning({
22
22
  headline: "Upgrade to a supported Node version now.",
23
23
  body: [
@@ -42,7 +42,7 @@ function forceNoColor() {
42
42
  }
43
43
  async function runCLI(options) {
44
44
  setupEnvironmentVariables(options), forceNoColor(), await warnIfOldNodeVersion();
45
- let { errorHandler } = await import("./error-handler-T4BVXIMP.js"), { isDevelopment } = await import("./local-LCGXZ56M.js"), oclif = await import("./lib-3K5QYF3J.js"), { ShopifyConfig } = await import("./custom-oclif-loader-BIG4GFMG.js");
45
+ let { errorHandler } = await import("./error-handler-73YUB4PB.js"), { isDevelopment } = await import("./local-7ZNEHAZM.js"), oclif = await import("./lib-FYUAIYTL.js"), { ShopifyConfig } = await import("./custom-oclif-loader-P7CQYRCS.js");
46
46
  isDevelopment() && (oclif.default.settings.debug = !0);
47
47
  try {
48
48
  let config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
@@ -53,7 +53,7 @@ async function runCLI(options) {
53
53
  }
54
54
  async function runCreateCLI(options) {
55
55
  setupEnvironmentVariables(options);
56
- let { findUpAndReadPackageJson } = await import("./node-package-manager-PPBMXNJX.js"), { moduleDirectory } = await import("./path-L375JOQ2.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
56
+ let { findUpAndReadPackageJson } = await import("./node-package-manager-EV7MLIUF.js"), { moduleDirectory } = await import("./path-L375JOQ2.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
57
57
  if (process.argv.findIndex((arg) => arg.includes("init")) === -1) {
58
58
  let initIndex2 = process.argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
59
59
  process.argv.splice(initIndex2, 0, "init");
@@ -77,4 +77,4 @@ export {
77
77
  runCreateCLI,
78
78
  globalFlags
79
79
  };
80
- //# sourceMappingURL=chunk-BBE4ZEEU.js.map
80
+ //# sourceMappingURL=chunk-TV5LJHC5.js.map
@@ -16,10 +16,10 @@ import {
16
16
  require_get_stream,
17
17
  runWithTimer,
18
18
  writeFile
19
- } from "./chunk-XG23WV6C.js";
19
+ } from "./chunk-QFQCHQ24.js";
20
20
  import {
21
21
  envPaths
22
- } from "./chunk-FIJKOZJF.js";
22
+ } from "./chunk-2IV4ZS5T.js";
23
23
  import {
24
24
  dirname,
25
25
  joinPath
@@ -11307,8 +11307,18 @@ function timeIntervalToMilliseconds({ days = 0, hours = 0, minutes = 0, seconds
11307
11307
  }
11308
11308
  async function runAtMinimumInterval(key, timeout, task, config = cliKitStore()) {
11309
11309
  let cache = config.get("cache") || {}, cacheKey = `most-recent-occurrence-${key}`, cached = cache[cacheKey];
11310
- if (!(cached?.value !== void 0 && Date.now() - cached.timestamp < timeIntervalToMilliseconds(timeout)))
11311
- return await task(), cache[cacheKey] = { value: !0, timestamp: Date.now() }, config.set("cache", cache), !0;
11310
+ return cached?.value !== void 0 && Date.now() - cached.timestamp < timeIntervalToMilliseconds(timeout) ? !1 : (await task(), cache[cacheKey] = { value: !0, timestamp: Date.now() }, config.set("cache", cache), !0);
11311
+ }
11312
+ async function runWithRateLimit(options, config = cliKitStore()) {
11313
+ let { key, limit, timeout, task } = options, cache = config.get("cache") || {}, cacheKey = `rate-limited-occurrences-${key}`, cached = cache[cacheKey], now = Date.now();
11314
+ if (cached?.value) {
11315
+ let windowStart = now - timeIntervalToMilliseconds(timeout), occurrences = cached.value.filter((occurrence) => occurrence >= windowStart);
11316
+ if (occurrences.length >= limit)
11317
+ return cache[cacheKey] = { value: occurrences, timestamp: Date.now() }, config.set("cache", cache), !1;
11318
+ await task(), cache[cacheKey] = { value: [...occurrences, now], timestamp: now };
11319
+ } else
11320
+ await task(), cache[cacheKey] = { value: [now], timestamp: now };
11321
+ return config.set("cache", cache), !0;
11312
11322
  }
11313
11323
 
11314
11324
  // ../../node_modules/.pnpm/latest-version@7.0.0/node_modules/latest-version/index.js
@@ -15287,6 +15297,7 @@ export {
15287
15297
  require_semver2 as require_semver,
15288
15298
  LocalStorage,
15289
15299
  runAtMinimumInterval,
15300
+ runWithRateLimit,
15290
15301
  yarnLockfile,
15291
15302
  npmLockfile,
15292
15303
  pnpmLockfile,
@@ -15349,4 +15360,4 @@ deep-extend/lib/deep-extend.js:
15349
15360
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15350
15361
  *)
15351
15362
  */
15352
- //# sourceMappingURL=chunk-P5KC5F5V.js.map
15363
+ //# sourceMappingURL=chunk-X4PTOOZW.js.map