@shopify/cli 3.76.1 → 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.
- package/dist/{chunk-RDHYYXFE.js → chunk-3ARIMAIR.js} +3 -3
- package/dist/{chunk-EHL6XSBG.js → chunk-4BPRKRYD.js} +4 -4
- package/dist/{chunk-WWI2QVFK.js → chunk-5ZMRZCPZ.js} +2 -2
- package/dist/{chunk-T2LQCR7X.js → chunk-6ZKE2WPK.js} +2 -2
- package/dist/{chunk-FZT5AGA5.js → chunk-74V7KQLD.js} +4 -4
- package/dist/{chunk-LUCMIGZJ.js → chunk-7IKFEU6I.js} +2 -2
- package/dist/{chunk-JBS4NEJX.js → chunk-ACSVNEID.js} +5 -5
- package/dist/{chunk-PDQLM7DM.js → chunk-AUBRXAVZ.js} +3 -3
- package/dist/{chunk-6TPMZTXG.js → chunk-AW7SZYGV.js} +7 -7
- package/dist/{chunk-ACGZSEHA.js → chunk-AZ33PIX2.js} +7 -7
- package/dist/{chunk-MVZ4LGIM.js → chunk-CBLCYLJO.js} +2 -2
- package/dist/{chunk-DFFXOFLT.js → chunk-DHO2PUCK.js} +2 -2
- package/dist/{chunk-IROPFRNN.js → chunk-FJAIUBHO.js} +34 -18
- package/dist/{chunk-ZQU7DVLN.js → chunk-GPICPOCE.js} +8 -5
- package/dist/{chunk-W6WCETMJ.js → chunk-IX7XAR6F.js} +143 -28
- package/dist/{chunk-LXQWZFLX.js → chunk-J3C7BGUW.js} +22 -10
- package/dist/{chunk-ULBY4CUT.js → chunk-MYIEKIZR.js} +2 -2
- package/dist/{chunk-RB5K7TGA.js → chunk-NHMQOM7T.js} +2 -2
- package/dist/{chunk-3THHNKSL.js → chunk-NZVJ77WD.js} +3 -3
- package/dist/{chunk-742MYXOA.js → chunk-O5U2T7LH.js} +6 -3
- package/dist/{chunk-FUA76K3T.js → chunk-PHWPEUZI.js} +5 -2
- package/dist/{chunk-3Q5TSFEN.js → chunk-QVZW3IVL.js} +7 -7
- package/dist/{chunk-LTIYNGCV.js → chunk-RA5UDHSI.js} +3 -3
- package/dist/{chunk-4OD4TP6T.js → chunk-RWT677FV.js} +4 -4
- package/dist/{chunk-5TZDSORY.js → chunk-S3PY2ULH.js} +213 -120
- package/dist/{chunk-7UIQNXWE.js → chunk-SO33Y5TT.js} +3 -3
- package/dist/{chunk-6KV6OKFB.js → chunk-U7E5RRYF.js} +3 -3
- package/dist/{chunk-VX5SZCUI.js → chunk-V5G4FJZH.js} +14 -12
- package/dist/{chunk-4SFWD6RY.js → chunk-VTEM2QWG.js} +3 -3
- package/dist/{chunk-A44GEDKW.js → chunk-WN6OLVLP.js} +4 -4
- package/dist/{chunk-BJG7ZRQ2.js → chunk-YL7TDFFA.js} +3 -3
- package/dist/{chunk-EJU7LVJW.js → chunk-YXR557PE.js} +3 -3
- package/dist/chunk-ZKUNCSWD.js +52 -0
- package/dist/{chunk-WOG2LQ3X.js → chunk-ZVNHCLRN.js} +3 -3
- package/dist/cli/commands/auth/logout.js +11 -11
- package/dist/cli/commands/auth/logout.test.js +12 -12
- package/dist/cli/commands/cache/clear.js +10 -10
- package/dist/cli/commands/debug/command-flags.js +10 -10
- package/dist/cli/commands/docs/generate.js +10 -10
- package/dist/cli/commands/docs/generate.test.js +10 -10
- package/dist/cli/commands/help.d.ts +1 -0
- package/dist/cli/commands/help.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/index.js +13 -13
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
- package/dist/cli/commands/notifications/generate.js +11 -11
- package/dist/cli/commands/notifications/list.d.ts +3 -0
- package/dist/cli/commands/notifications/list.js +11 -11
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +11 -11
- package/dist/cli/commands/upgrade.js +11 -11
- package/dist/cli/commands/version.js +11 -11
- package/dist/cli/commands/version.test.js +11 -11
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +4 -4
- package/dist/configs/all.yml +39 -3
- package/dist/configs/recommended.yml +36 -0
- package/dist/configs/theme-app-extension.yml +3 -3
- package/dist/{custom-oclif-loader-BXHJERI2.js → custom-oclif-loader-TE6EUPGI.js} +2 -2
- package/dist/data/filters.json +270 -327
- package/dist/data/latest.json +1 -1
- package/dist/data/objects.json +1482 -3709
- package/dist/data/preset.json +6 -0
- package/dist/data/preset_blocks.json +6 -0
- package/dist/data/setting.json +167 -50
- package/dist/data/tags.json +45 -101
- package/dist/{error-handler-FV3FJ3VW.js → error-handler-WC4XSLZQ.js} +8 -8
- package/dist/hooks/postrun.js +6 -6
- package/dist/hooks/prerun.js +8 -8
- package/dist/index.js +5451 -2314
- package/dist/{local-PMOJBQT6.js → local-7Q5JCU62.js} +2 -2
- package/dist/{node-5MJ6ATKS.js → node-MNEYEH5U.js} +12 -12
- package/dist/{node-package-manager-FZRL3EQB.js → node-package-manager-3SFTB3BW.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-5VMS7DNB.js → ui-NMP2SY3G.js} +2 -2
- package/dist/{workerd-JHDITYBC.js → workerd-NN737W52.js} +12 -12
- package/oclif.manifest.json +32 -19
- package/package.json +6 -6
- package/dist/chunk-UAZUB5EV.js +0 -28
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
allAPIs,
|
|
3
3
|
shopifyFetch,
|
|
4
4
|
z
|
|
5
|
-
} from "./chunk-
|
|
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-
|
|
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,7 +45,7 @@ import {
|
|
|
44
45
|
sessionConstants,
|
|
45
46
|
spinFqdn,
|
|
46
47
|
themeToken
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-J3C7BGUW.js";
|
|
48
49
|
import {
|
|
49
50
|
cwd
|
|
50
51
|
} from "./chunk-57Q6OQG4.js";
|
|
@@ -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/
|
|
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
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
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
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
-
|
|
355
|
-
|
|
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
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
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
|
-
|
|
368
|
-
|
|
369
|
-
DevServerUtils.assertConnectable(this.name, addr, port);
|
|
459
|
+
host(options) {
|
|
460
|
+
return this.serverImpl.host(options);
|
|
370
461
|
}
|
|
371
|
-
|
|
372
|
-
|
|
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.
|
|
378
|
-
}
|
|
379
|
-
url(prefix) {
|
|
380
|
-
return `https://${this.host(prefix)}`;
|
|
467
|
+
this.serverImpl = inferProjectServer("shopify");
|
|
381
468
|
}
|
|
382
469
|
host(prefix) {
|
|
383
|
-
|
|
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
|
-
|
|
390
|
-
|
|
391
|
-
DevServerUtils.assertConnectable("shopify", addr, port);
|
|
472
|
+
url(prefix) {
|
|
473
|
+
return this.serverImpl.url({ nonstandardHostPrefix: prefix });
|
|
392
474
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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(),
|
|
742
|
-
|
|
743
|
-
let res = await shopifyFetch(
|
|
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(" ") },
|
|
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.`),
|
|
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-
|
|
1161
|
+
//# sourceMappingURL=chunk-S3PY2ULH.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
staticService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6ZKE2WPK.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
28
|
+
//# sourceMappingURL=chunk-SO33Y5TT.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLI_KIT_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DHO2PUCK.js";
|
|
4
4
|
import {
|
|
5
5
|
outputInfo
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
20
|
+
//# sourceMappingURL=chunk-U7E5RRYF.js.map
|
|
@@ -8,33 +8,35 @@ import {
|
|
|
8
8
|
ensureAuthenticatedAdmin,
|
|
9
9
|
ensureAuthenticatedBusinessPlatform,
|
|
10
10
|
logout
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VTEM2QWG.js";
|
|
12
12
|
import {
|
|
13
13
|
base_command_default
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4BPRKRYD.js";
|
|
15
15
|
import {
|
|
16
16
|
fanoutHooks,
|
|
17
17
|
requestIdsCollection
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AW7SZYGV.js";
|
|
19
19
|
import {
|
|
20
20
|
businessPlatformFqdn,
|
|
21
21
|
normalizeStoreFqdn,
|
|
22
22
|
partnersFqdn
|
|
23
|
-
} from "./chunk-
|
|
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-
|
|
36
|
+
} from "./chunk-IX7XAR6F.js";
|
|
35
37
|
import {
|
|
36
38
|
CLI_KIT_VERSION
|
|
37
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
94
|
+
} from "./chunk-J3C7BGUW.js";
|
|
93
95
|
import {
|
|
94
96
|
basename,
|
|
95
97
|
cwd,
|
|
@@ -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)
|
|
@@ -142519,4 +142521,4 @@ export {
|
|
|
142519
142521
|
getDebugBannerLine,
|
|
142520
142522
|
getUtilityBannerlines
|
|
142521
142523
|
};
|
|
142522
|
-
//# sourceMappingURL=chunk-
|
|
142524
|
+
//# sourceMappingURL=chunk-V5G4FJZH.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
remove,
|
|
7
7
|
setLastSeenAuthMethod,
|
|
8
8
|
setLastSeenUserIdAfterAuth
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
107
|
+
//# sourceMappingURL=chunk-VTEM2QWG.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
fetchNotifications,
|
|
3
3
|
getNotifications,
|
|
4
4
|
stringifyFilters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FJAIUBHO.js";
|
|
6
6
|
import {
|
|
7
7
|
CLI_KIT_VERSION
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
104
|
+
//# sourceMappingURL=chunk-WN6OLVLP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WN6OLVLP.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
28
|
+
//# sourceMappingURL=chunk-YL7TDFFA.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asyncTasks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MYIEKIZR.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
28
|
+
//# sourceMappingURL=chunk-YXR557PE.js.map
|