@shopify/cli-kit 3.0.12 → 3.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @shopify/cli-kit
2
2
 
3
+ ## 3.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - 604d7d97: Fix some unhandled promises and errors
8
+
3
9
  ## 3.0.12
4
10
 
5
11
  ### Patch Changes
@@ -12320,7 +12320,7 @@ var path$w = /*#__PURE__*/Object.freeze({
12320
12320
  });
12321
12321
 
12322
12322
  var name = "@shopify/cli-kit";
12323
- var version$2 = "3.0.12";
12323
+ var version$2 = "3.0.13";
12324
12324
  var description$1 = "A set of utilities, interfaces, and models that are common across all the platform features";
12325
12325
  var keywords = [
12326
12326
  "shopify",
@@ -14663,7 +14663,7 @@ const captureOutput = async (command, args, options) => {
14663
14663
  const result = await buildExec(command, args, options);
14664
14664
  return result.stdout;
14665
14665
  };
14666
- const exec$2 = (command, args, options) => {
14666
+ const exec$2 = async (command, args, options) => {
14667
14667
  const commandProcess = buildExec(command, args, options);
14668
14668
  if (options?.stderr) {
14669
14669
  commandProcess.stderr?.pipe(options.stderr);
@@ -14671,11 +14671,16 @@ const exec$2 = (command, args, options) => {
14671
14671
  if (options?.stdout) {
14672
14672
  commandProcess.stdout?.pipe(options.stdout);
14673
14673
  }
14674
- return commandProcess.catch((processError) => {
14674
+ options?.signal?.addEventListener("abort", () => {
14675
+ commandProcess.kill("SIGTERM", { forceKillAfterTimeout: 1e3 });
14676
+ });
14677
+ try {
14678
+ await commandProcess;
14679
+ } catch (processError) {
14675
14680
  const abortError = new Abort(processError.message);
14676
14681
  abortError.stack = processError.stack;
14677
14682
  throw abortError;
14678
- });
14683
+ }
14679
14684
  };
14680
14685
  const buildExec = (command, args, options) => {
14681
14686
  const env = options?.env ?? process.env;
@@ -21444,8 +21449,10 @@ const message = (content2, level = "info") => {
21444
21449
  consoleLog(stringifyMessage(content2));
21445
21450
  }
21446
21451
  };
21447
- async function concurrent(processes) {
21452
+ async function concurrent(processes, callback = void 0) {
21448
21453
  const abortController = new AbortController$1();
21454
+ if (callback)
21455
+ callback(abortController.signal);
21449
21456
  const concurrentColors = [token.yellow, token.cyan, token.magenta, token.green];
21450
21457
  const prefixColumnSize = Math.max(...processes.map((process2) => process2.prefix.length));
21451
21458
  function linePrefix(prefix, index) {
@@ -21534,7 +21541,7 @@ sourceMapSupport.install();
21534
21541
  class Fatal extends Error {
21535
21542
  constructor(message, type, tryMessage = null) {
21536
21543
  super(stringifyMessage(message));
21537
- this.tryMessage = tryMessage;
21544
+ this.tryMessage = tryMessage ? stringifyMessage(tryMessage) : null;
21538
21545
  this.type = type;
21539
21546
  }
21540
21547
  }
@@ -40810,7 +40817,7 @@ class Body$1 {
40810
40817
  return formData;
40811
40818
  }
40812
40819
 
40813
- const {toFormData} = await import('./multipart-parser-ab287634.js');
40820
+ const {toFormData} = await import('./multipart-parser-cfdda463.js');
40814
40821
  return toFormData(this.body, ct);
40815
40822
  }
40816
40823
 
@@ -173451,10 +173458,12 @@ Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get
173451
173458
 
173452
173459
  }(dist$1));
173453
173460
 
173454
- const UnauthorizedAccessError = () => {
173455
- return new Abort(`You can't use Shopify CLI with development stores if you only have Partner staff member access.
173456
- If you want to use Shopify CLI to work on a development store, then you should be the store owner or create a staff account on the store`, `If you're the store owner, then you need to log in to the store directly using the store URL at least once (for example, using %s.myshopify.com/admin) before you log in using Shopify CLI.
173457
- Logging in to the Shopify admin directly connects the development store with your Shopify login.`);
173461
+ const UnauthorizedAccessError = (store) => {
173462
+ const adminLink = token.link(`URL`, `https://${store}/admin`);
173463
+ const storeName = store.replace(".myshopify.com", "");
173464
+ return new Abort(content`Looks like you need access to this dev store (${token.link(storeName, `https://${store}`)})`, content`• Log in to the store directly from this ${adminLink}. If you're the store owner, then that direct log in should solve your access issue.
173465
+ • If you're not the owner, create a dev store staff account for yourself. Then log in directly from the link above.
173466
+ `);
173458
173467
  };
173459
173468
  const UnknownError = () => {
173460
173469
  return new Bug(`Unknown error connecting to your store`);
@@ -173500,7 +173509,7 @@ Sending Admin GraphQL request to URL ${url} with query:
173500
173509
  ${query}
173501
173510
  `);
173502
173511
  const data = await dist$1.request(url, query, {}, headers).catch((err) => {
173503
- throw err.response.status === 403 ? UnauthorizedAccessError() : UnknownError();
173512
+ throw err.response.status === 403 ? UnauthorizedAccessError(session.storeFqdn) : UnknownError();
173504
173513
  });
173505
173514
  return data.publicApiVersions.filter((item) => item.supported).map((item) => item.handle).sort().reverse()[0];
173506
173515
  }
@@ -174267,7 +174276,7 @@ async function validateRubyEnv() {
174267
174276
  }
174268
174277
  async function getBundlerVersion() {
174269
174278
  try {
174270
- const { stdout } = await exec$2("bundler", ["-v"]);
174279
+ const stdout = await captureOutput("bundler", ["-v"]);
174271
174280
  return coerce_1(stdout);
174272
174281
  } catch {
174273
174282
  throw new Abort("Bundler not found", "Make sure you have Bundler installed on your system: https://bundler.io/");
@@ -174660,4 +174669,4 @@ var vscode = /*#__PURE__*/Object.freeze({
174660
174669
  });
174661
174670
 
174662
174671
  export { semver as A, npm as B, port as C, cli as D, id as E, FormData$3 as F, temporary as G, dotEnv as H, abort as I, constants$2 as J, plugins as K, vscode as L, File$1 as a, string as b, github as c, dependency as d, error$j as e, file$1 as f, git as g, haiku as h, os$2 as i, environment as j, session as k, schema$2 as l, toml as m, store as n, output as o, path$w as p, api as q, http$2 as r, system as s, template as t, ui as u, version$1 as v, archiver as w, checksum as x, yaml as y, ruby as z };
174663
- //# sourceMappingURL=index-26330ff1.js.map
174672
+ //# sourceMappingURL=index-6d1cf8d0.js.map