@shopify/cli 3.76.2 → 3.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/{chunk-DTR7ATW4.js → chunk-3ARIMAIR.js} +3 -3
  2. package/dist/{chunk-6RHYOJ63.js → chunk-4BPRKRYD.js} +5 -5
  3. package/dist/{chunk-ZUCWDIGE.js → chunk-57Q6OQG4.js} +2 -2
  4. package/dist/{chunk-KI626P2Z.js → chunk-5ZMRZCPZ.js} +4 -4
  5. package/dist/{chunk-IKXB6S5W.js → chunk-6ZKE2WPK.js} +2 -2
  6. package/dist/{chunk-KTICPCDH.js → chunk-74V7KQLD.js} +4 -4
  7. package/dist/{chunk-TYXJ553W.js → chunk-7IKFEU6I.js} +2 -2
  8. package/dist/{chunk-PNWJ2GZC.js → chunk-ACSVNEID.js} +5 -5
  9. package/dist/{chunk-CBRJA5VT.js → chunk-AUBRXAVZ.js} +4 -4
  10. package/dist/{chunk-SO2JXJNK.js → chunk-AW7SZYGV.js} +7 -7
  11. package/dist/{chunk-3DV6EZ24.js → chunk-AZ33PIX2.js} +7 -7
  12. package/dist/{chunk-MIAZDAJI.js → chunk-CBLCYLJO.js} +2 -2
  13. package/dist/{chunk-JMXX7A4N.js → chunk-DHO2PUCK.js} +2 -2
  14. package/dist/{chunk-WOA7JN7E.js → chunk-FJAIUBHO.js} +12 -8
  15. package/dist/{chunk-AHNHLXEN.js → chunk-GPICPOCE.js} +9 -6
  16. package/dist/{chunk-BJXULBKX.js → chunk-IX7XAR6F.js} +144 -29
  17. package/dist/{chunk-3UYXKXR6.js → chunk-J3C7BGUW.js} +21 -8
  18. package/dist/{chunk-DZC6PFFO.js → chunk-MYIEKIZR.js} +2 -2
  19. package/dist/{chunk-XAK5UQFR.js → chunk-NHMQOM7T.js} +2 -2
  20. package/dist/{chunk-WYLW7KVV.js → chunk-NZVJ77WD.js} +3 -3
  21. package/dist/{chunk-VXUNILLD.js → chunk-O5U2T7LH.js} +6 -3
  22. package/dist/{chunk-WXONIGO7.js → chunk-PHWPEUZI.js} +5 -2
  23. package/dist/{chunk-7ZRFR7FA.js → chunk-QVZW3IVL.js} +7 -7
  24. package/dist/{chunk-EPUCFUDR.js → chunk-RA5UDHSI.js} +3 -3
  25. package/dist/{chunk-SROPQDQ2.js → chunk-RWT677FV.js} +4 -4
  26. package/dist/{chunk-QP45KHVL.js → chunk-S3PY2ULH.js} +214 -121
  27. package/dist/{chunk-XOWOZYS5.js → chunk-SO33Y5TT.js} +3 -3
  28. package/dist/{chunk-J64C3R6H.js → chunk-U7E5RRYF.js} +3 -3
  29. package/dist/{chunk-TKC27SYH.js → chunk-V5G4FJZH.js} +16 -14
  30. package/dist/{chunk-OSETU22I.js → chunk-VTEM2QWG.js} +3 -3
  31. package/dist/{chunk-WFJKWPG7.js → chunk-WN6OLVLP.js} +4 -4
  32. package/dist/{chunk-AZ3SNZKH.js → chunk-YL7TDFFA.js} +3 -3
  33. package/dist/{chunk-J4VMFBCX.js → chunk-YXR557PE.js} +3 -3
  34. package/dist/{chunk-3IUNQ4LM.js → chunk-ZKUNCSWD.js} +4 -4
  35. package/dist/{chunk-2WTNMSEA.js → chunk-ZVNHCLRN.js} +3 -3
  36. package/dist/cli/commands/auth/logout.js +12 -12
  37. package/dist/cli/commands/auth/logout.test.js +13 -13
  38. package/dist/cli/commands/cache/clear.js +11 -11
  39. package/dist/cli/commands/debug/command-flags.js +11 -11
  40. package/dist/cli/commands/docs/generate.js +11 -11
  41. package/dist/cli/commands/docs/generate.test.js +11 -11
  42. package/dist/cli/commands/help.d.ts +1 -0
  43. package/dist/cli/commands/help.js +11 -11
  44. package/dist/cli/commands/kitchen-sink/async.js +12 -12
  45. package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
  46. package/dist/cli/commands/kitchen-sink/index.js +14 -14
  47. package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
  48. package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
  49. package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
  50. package/dist/cli/commands/kitchen-sink/static.js +12 -12
  51. package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
  52. package/dist/cli/commands/notifications/generate.js +12 -12
  53. package/dist/cli/commands/notifications/list.js +12 -12
  54. package/dist/cli/commands/search.d.ts +1 -0
  55. package/dist/cli/commands/search.js +12 -12
  56. package/dist/cli/commands/upgrade.js +12 -12
  57. package/dist/cli/commands/version.js +12 -12
  58. package/dist/cli/commands/version.test.js +12 -12
  59. package/dist/cli/services/commands/notifications.js +7 -7
  60. package/dist/cli/services/commands/search.js +3 -3
  61. package/dist/cli/services/commands/search.test.js +3 -3
  62. package/dist/cli/services/commands/version.js +4 -4
  63. package/dist/cli/services/commands/version.test.js +5 -5
  64. package/dist/cli/services/kitchen-sink/async.js +3 -3
  65. package/dist/cli/services/kitchen-sink/prompts.js +3 -3
  66. package/dist/cli/services/kitchen-sink/static.js +3 -3
  67. package/dist/cli/services/upgrade.js +4 -4
  68. package/dist/cli/services/upgrade.test.js +5 -5
  69. package/dist/configs/all.yml +39 -3
  70. package/dist/configs/recommended.yml +36 -0
  71. package/dist/configs/theme-app-extension.yml +3 -3
  72. package/dist/{custom-oclif-loader-FMEBF4P4.js → custom-oclif-loader-TE6EUPGI.js} +3 -3
  73. package/dist/data/filters.json +270 -327
  74. package/dist/data/latest.json +1 -1
  75. package/dist/data/objects.json +1482 -3709
  76. package/dist/data/preset.json +6 -0
  77. package/dist/data/preset_blocks.json +6 -0
  78. package/dist/data/setting.json +167 -50
  79. package/dist/data/tags.json +45 -101
  80. package/dist/{error-handler-AMKMVQCR.js → error-handler-WC4XSLZQ.js} +9 -9
  81. package/dist/hooks/postrun.js +7 -7
  82. package/dist/hooks/prerun.js +8 -8
  83. package/dist/index.js +5452 -2315
  84. package/dist/{local-2RXSPQ2I.js → local-7Q5JCU62.js} +3 -3
  85. package/dist/{node-X35R6UYP.js → node-MNEYEH5U.js} +13 -13
  86. package/dist/{node-package-manager-3GAIXEER.js → node-package-manager-3SFTB3BW.js} +4 -4
  87. package/dist/{path-GWAZZN2N.js → path-2K5HIMHZ.js} +2 -2
  88. package/dist/tsconfig.tsbuildinfo +1 -1
  89. package/dist/{ui-MTRH5XFP.js → ui-NMP2SY3G.js} +3 -3
  90. package/dist/{workerd-EHYW43DG.js → workerd-NN737W52.js} +13 -13
  91. package/oclif.manifest.json +24 -19
  92. package/package.json +6 -6
@@ -2,14 +2,14 @@ import {
2
2
  allAPIs,
3
3
  shopifyFetch,
4
4
  z
5
- } from "./chunk-BJXULBKX.js";
5
+ } from "./chunk-IX7XAR6F.js";
6
6
  import {
7
7
  getPackageManager,
8
8
  getSession,
9
9
  packageManagerFromUserAgent,
10
10
  removeSession,
11
11
  setSession
12
- } from "./chunk-KI626P2Z.js";
12
+ } from "./chunk-5ZMRZCPZ.js";
13
13
  import {
14
14
  AbortError,
15
15
  BugError,
@@ -27,6 +27,7 @@ import {
27
27
  hashString,
28
28
  import_ts_error,
29
29
  isAppManagementDisabled,
30
+ isCI,
30
31
  isCloudEnvironment,
31
32
  isSpin,
32
33
  isTTY,
@@ -44,10 +45,10 @@ import {
44
45
  sessionConstants,
45
46
  spinFqdn,
46
47
  themeToken
47
- } from "./chunk-3UYXKXR6.js";
48
+ } from "./chunk-J3C7BGUW.js";
48
49
  import {
49
50
  cwd
50
- } from "./chunk-ZUCWDIGE.js";
51
+ } from "./chunk-57Q6OQG4.js";
51
52
  import {
52
53
  __commonJS,
53
54
  __require,
@@ -264,137 +265,229 @@ init_cjs_shims();
264
265
  // ../cli-kit/dist/public/node/context/fqdn.js
265
266
  init_cjs_shims();
266
267
 
267
- // ../cli-kit/dist/public/node/vendor/dev_server/DevServer.js
268
+ // ../cli-kit/dist/public/node/vendor/dev_server/index.js
269
+ init_cjs_shims();
270
+
271
+ // ../cli-kit/dist/public/node/vendor/dev_server/env.js
272
+ init_cjs_shims();
273
+ var isDevServerEnvironment = process.env.USING_DEV === "1" || process.env.SPIN === "1";
274
+ function assertCompatibleEnvironment() {
275
+ if (!isDevServerEnvironment)
276
+ throw new Error("DevServer is not supported in this environment");
277
+ }
278
+
279
+ // ../cli-kit/dist/public/node/vendor/dev_server/dev-server.js
280
+ init_cjs_shims();
281
+ import fs5 from "node:fs";
282
+
283
+ // ../cli-kit/dist/public/node/vendor/dev_server/dev-server-2024.js
268
284
  init_cjs_shims();
269
285
  var ni = __toESM(require_network_interfaces(), 1);
270
- import fs from "fs";
271
- import * as os from "os";
272
- import { execSync } from "child_process";
273
- var DevServerUtils = class _DevServerUtils {
274
- static assertConnectable(name, addr, port) {
275
- try {
276
- execSync(`nc -z -v -w 1 ${addr} ${port}`, {
277
- timeout: _DevServerUtils.CONNECT_TIMEOUT,
278
- stdio: "ignore"
279
- });
280
- } catch {
281
- throw new Error(`NET FAILED DevServer for '${name}' is not running on ${port} / ${addr}: \`dev up ${name}\` to start it.`);
282
- }
283
- }
284
- static inferenceModeAndProjectIsEdition2016(name) {
285
- try {
286
- fs.accessSync(_DevServerUtils.INFERENCE_MODE_SENTINEL);
287
- try {
288
- return fs.accessSync(`/opt/nginx/etc/manifest/${name}/current/edition-2024`), !1;
289
- } catch {
290
- return !0;
286
+ import fs2 from "node:fs";
287
+
288
+ // ../cli-kit/dist/public/node/vendor/dev_server/network/index.js
289
+ init_cjs_shims();
290
+ import { spawnSync } from "node:child_process";
291
+
292
+ // ../cli-kit/dist/public/node/vendor/dev_server/network/host.js
293
+ init_cjs_shims();
294
+ import fs from "node:fs";
295
+ var HOSTS_FILE = "/etc/hosts", hostToIpCache = {}, lastModifiedTime = 0;
296
+ function loadHostsFile() {
297
+ try {
298
+ let modifiedTime = fs.statSync(HOSTS_FILE).mtimeMs;
299
+ if (modifiedTime === lastModifiedTime)
300
+ return;
301
+ let lines = fs.readFileSync(HOSTS_FILE, "utf8").split(/\r?\n/);
302
+ hostToIpCache = {};
303
+ for (let line of lines) {
304
+ if (line.trim().startsWith("#") || line.trim() === "")
305
+ continue;
306
+ let matches = /^\s*(?<ipAddress>[^\s#]+)\s+(?<matchedHostName>[^\s#]+)\s*(#.*)?$/.exec(line);
307
+ if (matches && matches.groups) {
308
+ let { ipAddress, matchedHostName } = matches.groups;
309
+ matchedHostName && ipAddress && (hostToIpCache[matchedHostName] = ipAddress);
291
310
  }
292
- } catch {
293
- return !1;
294
311
  }
312
+ lastModifiedTime = modifiedTime;
313
+ } catch (error) {
314
+ console.log("Error reading hosts file:", error);
295
315
  }
296
- static getIpFromHosts(hostname) {
297
- try {
298
- let lines = fs.readFileSync(_DevServerUtils.HOSTS_FILE, "utf8").split(/\r?\n/);
299
- for (let line of lines) {
300
- let matches = /^\s*?([^#]+?)\s+([^#]+?)$/.exec(line);
301
- if (matches && matches.length === 3 && matches[2] === hostname)
302
- return matches[1];
303
- }
304
- } catch (error) {
305
- console.error("Error reading hosts file:", error);
306
- }
307
- throw new Error(`No IP found for hostname: ${hostname}`);
316
+ }
317
+ function getIpFromHosts(hostname) {
318
+ loadHostsFile();
319
+ let ipAddress = hostToIpCache[hostname];
320
+ if (ipAddress)
321
+ return ipAddress;
322
+ throw new Error(`No IP found for hostname: ${hostname}`);
323
+ }
324
+
325
+ // ../cli-kit/dist/public/node/vendor/dev_server/network/index.js
326
+ var DEFAULT_CONNECT_TIMEOUT = 100, checkPort;
327
+ function assertConnectable(options) {
328
+ checkPort || (checkPort = getCheckPortHelper());
329
+ let { port, addr, timeout = DEFAULT_CONNECT_TIMEOUT } = options;
330
+ try {
331
+ if (!checkPort(addr === "localhost" ? "127.0.0.1" : addr, port, timeout))
332
+ throw new Error(`DevServer for '${options.projectName}' is not running on ${port} / ${addr}: \`dev up ${options.projectName}\` to start it.`);
333
+ } catch (err2) {
334
+ throw new Error(`DevServer check for '${options.projectName}' on ${port} / ${addr} failed (${err2})`);
308
335
  }
309
- static getAddrPort2024(name) {
310
- try {
311
- let backendIp = _DevServerUtils.resolveBackendHost(name), interfaceName = ni.fromIp(backendIp, {
312
- internal: !0,
313
- ipVersion: 4
314
- });
315
- return [backendIp, _DevServerUtils.BACKEND_PORT];
316
- } catch {
317
- throw new Error(`DevServer for '${name}' is not running: \`dev up ${name}\` to start it.`);
318
- }
336
+ }
337
+ function getCheckPortHelper() {
338
+ return fallbackCheckPort;
339
+ }
340
+ function fallbackCheckPort(address, port, timeout) {
341
+ return spawnSync("nc", ["-z", "-w", "1", address, port.toString()], {
342
+ timeout,
343
+ stdio: "ignore"
344
+ }).status === 0;
345
+ }
346
+
347
+ // ../cli-kit/dist/public/node/vendor/dev_server/dev-server-2024.js
348
+ var NON_SHOP_PREFIXES = ["app", "dev", "shopify"], BACKEND_PORT = 8080;
349
+ function createServer(projectName) {
350
+ return {
351
+ host: (options = {}) => host(projectName, options),
352
+ url: (options = {}) => url(projectName, options)
353
+ };
354
+ }
355
+ function host(projectName, options = {}) {
356
+ assertCompatibleEnvironment(), (assertRunningOverride || assertRunning2024)(projectName);
357
+ let prefix = (options.nonstandardHostPrefix || projectName).replace(/_/g, "-");
358
+ if (projectName === "shopify") {
359
+ if (prefix.endsWith("-dev-api"))
360
+ return `${prefix.replace("-dev-api", "")}.dev-api.shop.dev`;
361
+ if (!NON_SHOP_PREFIXES.includes(prefix))
362
+ return `${prefix}.my.shop.dev`;
319
363
  }
320
- static getAddrPort2016(name) {
321
- try {
322
- let portContent = fs.readFileSync(`${os.homedir()}/.local/run/services/${name}/server/port`, "utf-8");
323
- return ["localhost", parseInt(portContent, 10)];
324
- } catch {
325
- throw new Error(`DevServer for '${name}' is not running: \`dev up ${name}\` to start it.`);
326
- }
364
+ return `${prefix}.shop.dev`;
365
+ }
366
+ function url(projectName, options = {}) {
367
+ return `https://${host(projectName, options)}`;
368
+ }
369
+ function assertRunning2024(projectName) {
370
+ assertConnectable({
371
+ projectName,
372
+ addr: getBackendIp(projectName),
373
+ port: BACKEND_PORT
374
+ });
375
+ }
376
+ function getBackendIp(projectName) {
377
+ try {
378
+ let backendIp = resolveBackendHost(projectName);
379
+ return ni.fromIp(backendIp, { internal: !0, ipVersion: 4 }), backendIp;
380
+ } catch {
381
+ throw new Error(`DevServer for '${projectName}' is not running: \`dev up ${projectName}\` to start it.`);
327
382
  }
328
- static resolveBackendHost(name) {
329
- let host;
330
- try {
331
- host = fs.readlinkSync(`/opt/nginx/etc/manifest/${name}/current`);
332
- } catch {
333
- host = `${name}.root.shopify.dev.internal`;
334
- }
335
- try {
336
- return _DevServerUtils.getIpFromHosts(host);
337
- } catch {
338
- return host;
339
- }
383
+ }
384
+ function resolveBackendHost(name) {
385
+ let host4;
386
+ try {
387
+ host4 = fs2.readlinkSync(`/opt/nginx/etc/manifest/${name}/current`);
388
+ } catch {
389
+ host4 = `${name}.root.shopify.dev.internal`;
340
390
  }
341
- };
342
- DevServerUtils.INFERENCE_MODE_SENTINEL = "/opt/dev/misc/dev-server-inference-mode";
343
- DevServerUtils.BACKEND_PORT = 8080;
344
- DevServerUtils.CONNECT_TIMEOUT = 100;
345
- DevServerUtils.HOSTS_FILE = "/etc/hosts";
346
- var DevServer = class {
347
- constructor(name) {
348
- if (!process.env.SPIN && !process.env.USING_DEV)
349
- throw new Error("DevServer is not supported in this environment");
350
- if (name === "shopify")
351
- throw new Error("Use DevServer.core for the 'shopify' project");
352
- this.name = name;
391
+ try {
392
+ return getIpFromHosts(host4);
393
+ } catch {
394
+ return host4;
353
395
  }
354
- url({ nonstandardHostPrefix } = {}) {
355
- return `https://${this.host({ nonstandardHostPrefix })}`;
396
+ }
397
+ var assertRunningOverride;
398
+
399
+ // ../cli-kit/dist/public/node/vendor/dev_server/dev-server-2016.js
400
+ init_cjs_shims();
401
+ import fs3 from "fs";
402
+ import * as os from "node:os";
403
+ function createServer2(projectName) {
404
+ return {
405
+ host: (options = {}) => host2(projectName, options),
406
+ url: (options = {}) => url2(projectName, options)
407
+ };
408
+ }
409
+ function host2(projectName, options = {}) {
410
+ return assertCompatibleEnvironment(), (assertRunningOverride2 || assertRunning2016)(projectName), `${options.nonstandardHostPrefix || projectName}.myshopify.io`;
411
+ }
412
+ function url2(projectName, options = {}) {
413
+ return `https://${host2(projectName, options)}`;
414
+ }
415
+ function assertRunning2016(projectName) {
416
+ let [addr, port] = getAddrPort(projectName);
417
+ assertConnectable({ projectName, addr, port });
418
+ }
419
+ function getAddrPort(name) {
420
+ try {
421
+ let portContent = fs3.readFileSync(`${os.homedir()}/.local/run/services/${name}/server/port`, "utf-8");
422
+ return ["localhost", parseInt(portContent, 10)];
423
+ } catch {
424
+ throw new Error(`DevServer for '${name}' is not running: \`dev up ${name}\` to start it.`);
356
425
  }
357
- host({ nonstandardHostPrefix } = {}) {
358
- let prefix = nonstandardHostPrefix || this.name;
359
- if (process.env.SPIN === "1") {
360
- let services = fs.readdirSync("/run/ports2").filter((file) => file.endsWith(`--${this.name}`));
361
- if (services.length === 0)
362
- throw new Error(`DevServer for '${this.name}' not present in this spin environment`);
363
- let match = new RegExp(`^(.+)${this.name}$`).exec(services[0]), organization = match ? match[1] : "";
364
- return `${organization !== "shopify--" ? `${organization}` : ""}${this.name}.${process.env.SPIN_FQDN}`;
365
- } else return DevServerUtils.inferenceModeAndProjectIsEdition2016(this.name) ? (this.assertRunningLocally2016(), `${prefix}.myshopify.io`) : (this.assertRunningLocally2024(), `${prefix}.shop.dev`);
426
+ }
427
+ var assertRunningOverride2;
428
+
429
+ // ../cli-kit/dist/public/node/vendor/dev_server/dev-server-spin.js
430
+ init_cjs_shims();
431
+ import fs4 from "node:fs";
432
+ function createServer3(projectName) {
433
+ return {
434
+ host: (options = {}) => host3(projectName, options),
435
+ url: (options = {}) => url3(projectName, options)
436
+ };
437
+ }
438
+ function host3(projectName, { nonstandardHostPrefix } = {}) {
439
+ assertCompatibleEnvironment();
440
+ let services = fs4.readdirSync("/run/ports2").filter((file) => file.endsWith(`--${projectName}`));
441
+ if (services.length === 0)
442
+ throw new Error(`DevServer for '${projectName}' not present in this spin environment`);
443
+ if (projectName === "shopify")
444
+ return `${nonstandardHostPrefix?.replace(/[-_]dev[-_]api$/, "")}.${projectName}.${process.env.SPIN_FQDN}`;
445
+ let match = new RegExp(`^(.+)${projectName}$`).exec(services[0]), organization = match ? match[1] : "";
446
+ return `${organization === "shopify--" ? "" : `${organization}`}${projectName}.${process.env.SPIN_FQDN}`;
447
+ }
448
+ function url3(projectName, options = {}) {
449
+ return `https://${host3(projectName, options)}`;
450
+ }
451
+
452
+ // ../cli-kit/dist/public/node/vendor/dev_server/dev-server.js
453
+ var DevServer = class {
454
+ constructor(projectName) {
455
+ if (this.projectName = projectName, projectName === "shopify")
456
+ throw new Error("Use `import {DevServerCore}` for the 'shopify' project");
457
+ this.serverImpl = inferProjectServer(projectName);
366
458
  }
367
- assertRunningLocally2024() {
368
- let [addr, port] = DevServerUtils.getAddrPort2024(this.name);
369
- DevServerUtils.assertConnectable(this.name, addr, port);
459
+ host(options) {
460
+ return this.serverImpl.host(options);
370
461
  }
371
- assertRunningLocally2016() {
372
- let [addr, port] = DevServerUtils.getAddrPort2016(this.name);
373
- DevServerUtils.assertConnectable(this.name, addr, port);
462
+ url(options) {
463
+ return this.serverImpl.url(options);
374
464
  }
375
465
  }, DevServerCore = class {
376
466
  constructor() {
377
- this.name = "shopify";
378
- }
379
- url(prefix) {
380
- return `https://${this.host(prefix)}`;
467
+ this.serverImpl = inferProjectServer("shopify");
381
468
  }
382
469
  host(prefix) {
383
- if (process.env.SPIN === "1") {
384
- if (!fs.readdirSync("/run/ports2").find((file) => file.endsWith(`--${this.name}`)))
385
- throw new Error(`DevServer for '${this.name}' not present in this spin environment`);
386
- return `${prefix}.${this.name}.${process.env.SPIN_FQDN}`;
387
- } else return DevServerUtils.inferenceModeAndProjectIsEdition2016("shopify") ? (this.assertRunningLocally2016(), `${prefix}.myshopify.io`) : (this.assertRunningLocally2024(), `${prefix}.my.shop.dev`);
470
+ return this.serverImpl.host({ nonstandardHostPrefix: prefix });
388
471
  }
389
- assertRunningLocally2024() {
390
- let [addr, port] = DevServerUtils.getAddrPort2024("shopify");
391
- DevServerUtils.assertConnectable("shopify", addr, port);
472
+ url(prefix) {
473
+ return this.serverImpl.url({ nonstandardHostPrefix: prefix });
392
474
  }
393
- assertRunningLocally2016() {
394
- let [addr, port] = DevServerUtils.getAddrPort2016("shopify");
395
- DevServerUtils.assertConnectable("shopify", addr, port);
475
+ }, INFERENCE_MODE_SENTINEL = "/opt/dev/misc/dev-server-inference-mode";
476
+ function inferProjectServer(projectName) {
477
+ return process.env.SPIN === "1" ? createServer3(projectName) : inferenceModeAndProjectIsEdition2016(projectName) ? createServer2(projectName) : createServer(projectName);
478
+ }
479
+ function inferenceModeAndProjectIsEdition2016(projectName) {
480
+ try {
481
+ fs5.accessSync(INFERENCE_MODE_SENTINEL);
482
+ try {
483
+ return fs5.accessSync(`/opt/nginx/etc/manifest/${projectName}/current/edition-2024`), !1;
484
+ } catch {
485
+ return !0;
486
+ }
487
+ } catch {
488
+ return !1;
396
489
  }
397
- };
490
+ }
398
491
 
399
492
  // ../cli-kit/dist/public/node/context/fqdn.js
400
493
  var CouldntObtainPartnersSpinFQDNError = new AbortError("Couldn't obtain the Spin FQDN for Partners when the CLI is not running from a Spin environment."), CouldntObtainIdentitySpinFQDNError = new AbortError("Couldn't obtain the Spin FQDN for Identity when the CLI is not running from a Spin environment."), CouldntObtainShopifySpinFQDNError = new AbortError("Couldn't obtain the Spin FQDN for Shopify when the CLI is not running from a Spin environment."), NotProvidedStoreFQDNError = new AbortError("Couldn't obtain the Shopify FQDN because the store FQDN was not provided.");
@@ -738,9 +831,9 @@ If you're the store owner, then you need to log in to the store directly using t
738
831
  return error === "invalid_grant" ? new InvalidGrantError() : error === "invalid_request" ? new InvalidRequestError() : error === "invalid_target" ? new InvalidTargetError(invalidTargetErrorMessage) : new AbortError(error);
739
832
  }
740
833
  async function tokenRequest(params) {
741
- let fqdn = await identityFqdn(), url = new URL(`https://${fqdn}/oauth/token`);
742
- url.search = new URLSearchParams(Object.entries(params)).toString();
743
- let res = await shopifyFetch(url.href, { method: "POST" }), payload = await res.json();
834
+ let fqdn = await identityFqdn(), url4 = new URL(`https://${fqdn}/oauth/token`);
835
+ url4.search = new URLSearchParams(Object.entries(params)).toString();
836
+ let res = await shopifyFetch(url4.href, { method: "POST" }), payload = await res.json();
744
837
  return res.ok ? ok(payload) : err(payload.error);
745
838
  }
746
839
  function buildIdentityToken(result, existingUserId) {
@@ -785,7 +878,7 @@ async function remove() {
785
878
  // ../cli-kit/dist/private/node/session/device-authorization.js
786
879
  init_cjs_shims();
787
880
  async function requestDeviceAuthorization(scopes) {
788
- let fqdn = await identityFqdn(), queryParams = { client_id: clientId(), scope: scopes.join(" ") }, url = `https://${fqdn}/oauth/device_authorization`, jsonResult = await (await shopifyFetch(url, {
881
+ let fqdn = await identityFqdn(), queryParams = { client_id: clientId(), scope: scopes.join(" ") }, url4 = `https://${fqdn}/oauth/device_authorization`, jsonResult = await (await shopifyFetch(url4, {
789
882
  method: "POST",
790
883
  headers: { "Content-type": "application/x-www-form-urlencoded" },
791
884
  body: convertRequestToParams(queryParams)
@@ -793,13 +886,13 @@ async function requestDeviceAuthorization(scopes) {
793
886
  if (outputDebug(outputContent`Received device authorization code: ${outputToken.json(jsonResult)}`), !jsonResult.device_code || !jsonResult.verification_uri_complete)
794
887
  throw new BugError("Failed to start authorization process");
795
888
  if (outputInfo(`
796
- To run this command, log in to Shopify.`), !isTTY())
889
+ To run this command, log in to Shopify.`), isCI())
797
890
  throw new AbortError("Authorization is required to continue, but the current environment does not support interactive prompts.", "To resolve this, specify credentials in your environment, or run the command in an interactive environment such as your local terminal.");
798
891
  outputInfo(outputContent`User verification code: ${jsonResult.user_code}`);
799
892
  let linkToken = outputToken.link(jsonResult.verification_uri_complete), cloudMessage = () => {
800
893
  outputInfo(outputContent`👉 Open this link to start the auth process: ${linkToken}`);
801
894
  };
802
- return isCloudEnvironment() ? cloudMessage() : (outputInfo("\u{1F449} Press any key to open the login page on your browser"), await keypress(), await openURL(jsonResult.verification_uri_complete) ? outputInfo(outputContent`Opened link to start the auth process: ${linkToken}`) : cloudMessage()), {
895
+ return isCloudEnvironment() || !isTTY() ? cloudMessage() : (outputInfo("\u{1F449} Press any key to open the login page on your browser"), await keypress(), await openURL(jsonResult.verification_uri_complete) ? outputInfo(outputContent`Opened link to start the auth process: ${linkToken}`) : cloudMessage()), {
803
896
  deviceCode: jsonResult.device_code,
804
897
  userCode: jsonResult.user_code,
805
898
  verificationUri: jsonResult.verification_uri,
@@ -1065,4 +1158,4 @@ export {
1065
1158
  getEnvironmentData,
1066
1159
  getSensitiveEnvironmentData
1067
1160
  };
1068
- //# sourceMappingURL=chunk-QP45KHVL.js.map
1161
+ //# sourceMappingURL=chunk-S3PY2ULH.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  staticService
3
- } from "./chunk-IKXB6S5W.js";
3
+ } from "./chunk-6ZKE2WPK.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-6RHYOJ63.js";
6
+ } from "./chunk-4BPRKRYD.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var KitchenSinkStatic = class extends base_command_default {
25
25
  export {
26
26
  KitchenSinkStatic
27
27
  };
28
- //# sourceMappingURL=chunk-XOWOZYS5.js.map
28
+ //# sourceMappingURL=chunk-SO33Y5TT.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CLI_KIT_VERSION
3
- } from "./chunk-JMXX7A4N.js";
3
+ } from "./chunk-DHO2PUCK.js";
4
4
  import {
5
5
  outputInfo
6
- } from "./chunk-3UYXKXR6.js";
6
+ } from "./chunk-J3C7BGUW.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -17,4 +17,4 @@ async function versionService() {
17
17
  export {
18
18
  versionService
19
19
  };
20
- //# sourceMappingURL=chunk-J64C3R6H.js.map
20
+ //# sourceMappingURL=chunk-U7E5RRYF.js.map
@@ -8,33 +8,35 @@ import {
8
8
  ensureAuthenticatedAdmin,
9
9
  ensureAuthenticatedBusinessPlatform,
10
10
  logout
11
- } from "./chunk-OSETU22I.js";
11
+ } from "./chunk-VTEM2QWG.js";
12
12
  import {
13
13
  base_command_default
14
- } from "./chunk-6RHYOJ63.js";
14
+ } from "./chunk-4BPRKRYD.js";
15
15
  import {
16
16
  fanoutHooks,
17
17
  requestIdsCollection
18
- } from "./chunk-SO2JXJNK.js";
18
+ } from "./chunk-AW7SZYGV.js";
19
19
  import {
20
20
  businessPlatformFqdn,
21
21
  normalizeStoreFqdn,
22
22
  partnersFqdn
23
- } from "./chunk-QP45KHVL.js";
23
+ } from "./chunk-S3PY2ULH.js";
24
24
  import {
25
25
  ClientError,
26
26
  GraphQLClient,
27
27
  GraphQLClientError,
28
+ abortSignalFromRequestBehaviour,
28
29
  buildHeaders,
29
30
  httpsAgent,
31
+ requestMode,
30
32
  resolveRequestDocument,
31
33
  retryAwareRequest,
32
34
  sanitizeURL,
33
35
  sanitizedHeadersOutput
34
- } from "./chunk-BJXULBKX.js";
36
+ } from "./chunk-IX7XAR6F.js";
35
37
  import {
36
38
  CLI_KIT_VERSION
37
- } from "./chunk-JMXX7A4N.js";
39
+ } from "./chunk-DHO2PUCK.js";
38
40
  import {
39
41
  cacheRetrieveOrRepopulate,
40
42
  findUpAndReadPackageJson,
@@ -44,7 +46,7 @@ import {
44
46
  readAndParsePackageJson,
45
47
  timeIntervalToMilliseconds,
46
48
  writePackageJSON
47
- } from "./chunk-KI626P2Z.js";
49
+ } from "./chunk-5ZMRZCPZ.js";
48
50
  import {
49
51
  AbortError,
50
52
  BugError,
@@ -89,7 +91,7 @@ import {
89
91
  stringifyMessage,
90
92
  writeFile,
91
93
  writeFileSync
92
- } from "./chunk-3UYXKXR6.js";
94
+ } from "./chunk-J3C7BGUW.js";
93
95
  import {
94
96
  basename,
95
97
  cwd,
@@ -99,7 +101,7 @@ import {
99
101
  relativePath,
100
102
  relativizePath,
101
103
  resolvePath
102
- } from "./chunk-ZUCWDIGE.js";
104
+ } from "./chunk-57Q6OQG4.js";
103
105
  import {
104
106
  require_lib
105
107
  } from "./chunk-VSKRQ3JT.js";
@@ -136536,15 +136538,15 @@ async function performGraphQLRequest(options2) {
136536
136538
  ...buildHeaders(token)
136537
136539
  };
136538
136540
  debugLogRequestInfo(api, queryAsString, url, variables, headers);
136539
- let clientOptions = { agent: await httpsAgent(), headers }, client = new GraphQLClient(url, clientOptions), performRequest = async () => {
136541
+ let requestBehaviour = requestMode("default"), clientOptions = { agent: await httpsAgent(), headers }, client = new GraphQLClient(url, clientOptions), performRequest = async () => {
136540
136542
  let fullResponse;
136541
136543
  try {
136542
- return fullResponse = await client.rawRequest(queryAsString, variables), await logLastRequestIdFromResponse(fullResponse), fullResponse;
136544
+ return client.requestConfig.signal = abortSignalFromRequestBehaviour(requestBehaviour), fullResponse = await client.rawRequest(queryAsString, variables), await logLastRequestIdFromResponse(fullResponse), fullResponse;
136543
136545
  } catch (error) {
136544
136546
  throw error instanceof ClientError && await logLastRequestIdFromResponse(error.response), error;
136545
136547
  }
136546
136548
  }, executeWithTimer = () => runWithTimer("cmd_all_timing_network_ms")(async () => {
136547
- let response = await retryAwareRequest({ request: performRequest, url }, responseOptions?.handleErrors === !1 ? void 0 : errorHandler(api), unauthorizedHandler);
136549
+ let response = await retryAwareRequest({ request: performRequest, url, ...requestBehaviour }, responseOptions?.handleErrors === !1 ? void 0 : errorHandler(api), unauthorizedHandler);
136548
136550
  return responseOptions?.onResponse && responseOptions.onResponse(response), response.data;
136549
136551
  });
136550
136552
  if (cacheOptions === void 0)
@@ -136916,7 +136918,7 @@ init_cjs_shims();
136916
136918
 
136917
136919
  // ../cli-kit/dist/public/node/api/partners.js
136918
136920
  init_cjs_shims();
136919
- var import_bottleneck = __toESM(require_lib2()), limiter = new import_bottleneck.default({
136921
+ var import_bottleneck = __toESM(require_lib2(), 1), limiter = new import_bottleneck.default({
136920
136922
  minTime: 150,
136921
136923
  maxConcurrent: 10
136922
136924
  });
@@ -142519,4 +142521,4 @@ export {
142519
142521
  getDebugBannerLine,
142520
142522
  getUtilityBannerlines
142521
142523
  };
142522
- //# sourceMappingURL=chunk-TKC27SYH.js.map
142524
+ //# sourceMappingURL=chunk-V5G4FJZH.js.map
@@ -6,7 +6,7 @@ import {
6
6
  remove,
7
7
  setLastSeenAuthMethod,
8
8
  setLastSeenUserIdAfterAuth
9
- } from "./chunk-QP45KHVL.js";
9
+ } from "./chunk-S3PY2ULH.js";
10
10
  import {
11
11
  BugError,
12
12
  getPartnersToken,
@@ -14,7 +14,7 @@ import {
14
14
  outputContent,
15
15
  outputDebug,
16
16
  outputToken
17
- } from "./chunk-3UYXKXR6.js";
17
+ } from "./chunk-J3C7BGUW.js";
18
18
  import {
19
19
  init_cjs_shims
20
20
  } from "./chunk-PKR7KJ6P.js";
@@ -104,4 +104,4 @@ export {
104
104
  ensureAuthenticatedBusinessPlatform,
105
105
  logout
106
106
  };
107
- //# sourceMappingURL=chunk-OSETU22I.js.map
107
+ //# sourceMappingURL=chunk-VTEM2QWG.js.map
@@ -2,10 +2,10 @@ import {
2
2
  fetchNotifications,
3
3
  getNotifications,
4
4
  stringifyFilters
5
- } from "./chunk-WOA7JN7E.js";
5
+ } from "./chunk-FJAIUBHO.js";
6
6
  import {
7
7
  CLI_KIT_VERSION
8
- } from "./chunk-JMXX7A4N.js";
8
+ } from "./chunk-DHO2PUCK.js";
9
9
  import {
10
10
  outputInfo,
11
11
  randomUUID,
@@ -14,7 +14,7 @@ import {
14
14
  renderTable,
15
15
  renderTextPrompt,
16
16
  writeFile
17
- } from "./chunk-3UYXKXR6.js";
17
+ } from "./chunk-J3C7BGUW.js";
18
18
  import {
19
19
  init_cjs_shims
20
20
  } from "./chunk-PKR7KJ6P.js";
@@ -101,4 +101,4 @@ export {
101
101
  generate,
102
102
  list
103
103
  };
104
- //# sourceMappingURL=chunk-WFJKWPG7.js.map
104
+ //# sourceMappingURL=chunk-WN6OLVLP.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-WFJKWPG7.js";
3
+ } from "./chunk-WN6OLVLP.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-6RHYOJ63.js";
6
+ } from "./chunk-4BPRKRYD.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var Generate = class extends base_command_default {
25
25
  export {
26
26
  Generate
27
27
  };
28
- //# sourceMappingURL=chunk-AZ3SNZKH.js.map
28
+ //# sourceMappingURL=chunk-YL7TDFFA.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  asyncTasks
3
- } from "./chunk-DZC6PFFO.js";
3
+ } from "./chunk-MYIEKIZR.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-6RHYOJ63.js";
6
+ } from "./chunk-4BPRKRYD.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var KitchenSinkAsync = class extends base_command_default {
25
25
  export {
26
26
  KitchenSinkAsync
27
27
  };
28
- //# sourceMappingURL=chunk-J4VMFBCX.js.map
28
+ //# sourceMappingURL=chunk-YXR557PE.js.map