@shopify/create-app 3.94.3 → 4.0.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 (57) hide show
  1. package/dist/analytics-XLT3JDGP.js +33 -0
  2. package/dist/analytics-XUVDQAYG.js +39 -0
  3. package/dist/chunk-37G3KLO2.js +78 -0
  4. package/dist/chunk-4CS37CS5.js +665 -0
  5. package/dist/chunk-6OOTYTVB.js +1133 -0
  6. package/dist/{chunk-NIYBO6HO.js → chunk-ACS6S42W.js} +3 -3
  7. package/dist/chunk-ANIFE3UR.js +12 -0
  8. package/dist/{chunk-KKIDWI27.js → chunk-DHAC6KEL.js} +47 -12
  9. package/dist/chunk-DJW2W7VA.js +21 -0
  10. package/dist/chunk-DNF3EUMN.js +1771 -0
  11. package/dist/{chunk-LI75HRH4.js → chunk-DWGHKWV5.js} +1 -1
  12. package/dist/chunk-IGDZPTDH.js +371 -0
  13. package/dist/chunk-JCETIRLI.js +30 -0
  14. package/dist/chunk-JUV7D377.js +264 -0
  15. package/dist/{chunk-BRNDLYPU.js → chunk-LNOZTAML.js} +3618 -10143
  16. package/dist/{chunk-IFG7N3S2.js → chunk-OO33NRTL.js} +8 -12671
  17. package/dist/chunk-PES3XMQM.js +70 -0
  18. package/dist/chunk-QMXFPY46.js +55 -0
  19. package/dist/chunk-QN5KFM2B.js +104 -0
  20. package/dist/{chunk-HUNONZYG.js → chunk-STHW3YIX.js} +43773 -43784
  21. package/dist/chunk-UMSYG5WJ.js +110 -0
  22. package/dist/chunk-UX6FRPFM.js +11555 -0
  23. package/dist/{chunk-CXPWSYGC.js → chunk-X2WZCKNE.js} +4 -14
  24. package/dist/chunk-YIHECXVH.js +5652 -0
  25. package/dist/chunk-YUPQUA3D.js +6106 -0
  26. package/dist/conf-store-RAVX2WFV.js +54 -0
  27. package/dist/custom-oclif-loader-354VAVF4.js +54 -0
  28. package/dist/deprecations-2QTB3736.js +55 -0
  29. package/dist/environments-LTWWRWCC.js +26 -0
  30. package/dist/error-handler-KHJE653Z.js +37 -0
  31. package/dist/fs-XENRLBMU.js +109 -0
  32. package/dist/hooks/postrun.js +6 -9
  33. package/dist/hooks/prerun.js +12 -25
  34. package/dist/{http-proxy-node16-U5VBDLS3.js → http-proxy-node16-XB2DSBCB.js} +3 -2
  35. package/dist/index.js +8986 -10517
  36. package/dist/is-global-KZMSAFQT.js +21 -0
  37. package/dist/latest-version-3PFKLJZM.js +7713 -0
  38. package/dist/lib-HWIFANCM.js +11 -0
  39. package/dist/{local-6XZDLEBK.js → local-NQALOHJX.js} +3 -8
  40. package/dist/metadata-FXCUDE5I.js +20 -0
  41. package/dist/{node-package-manager-JVAQNYVX.js → node-package-manager-7R7HDW4R.js} +17 -7
  42. package/dist/notifications-system-7QMDSL5Y.js +40 -0
  43. package/dist/output-PQSQ7U45.js +51 -0
  44. package/dist/{path-NQ6GZ2WO.js → path-EOPO7QNL.js} +2 -2
  45. package/dist/{prettier-67WYXU6J.js → prettier-UAG5TKE4.js} +2 -2
  46. package/dist/system-W4MMMHEV.js +47 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -1
  48. package/dist/typescript-TKTDYKKG.js +6 -0
  49. package/dist/{ui-7HBWZC7M.js → ui-2FROV2IT.js} +15 -6
  50. package/dist/{chunk-PWU6XFUQ.js → upgrade-FAUZ7VAF.js} +77 -125
  51. package/dist/version-HKPHVW5M.js +30 -0
  52. package/dist/version-T73ZLUJK.js +8 -0
  53. package/oclif.manifest.json +63 -66
  54. package/package.json +5 -5
  55. package/dist/chunk-HYOIEQ5O.js +0 -14117
  56. package/dist/error-handler-WFIT65SZ.js +0 -25
  57. package/dist/lib-PPI2FZOR.js +0 -8
@@ -0,0 +1,665 @@
1
+ import {
2
+ joinPath
3
+ } from "./chunk-ACS6S42W.js";
4
+ import {
5
+ __commonJS,
6
+ __require,
7
+ __toESM,
8
+ init_cjs_shims
9
+ } from "./chunk-PKR7KJ6P.js";
10
+
11
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/util.js
12
+ var require_util = __commonJS({
13
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/util.js"(exports, module) {
14
+ "use strict";
15
+ init_cjs_shims();
16
+ var lib = {}, nextTick = process.nextTick || global.setImmediate || global.setTimeout;
17
+ lib.nextTick = function(func) {
18
+ nextTick(func);
19
+ };
20
+ lib.parallel = function(tasks, done) {
21
+ var results = [], errs = [], length = 0, doneLength = 0;
22
+ function doneIt(ix, err, result) {
23
+ err ? errs[ix] = err : results[ix] = result, doneLength += 1, doneLength >= length && done((errs.length > 0, errs), results);
24
+ }
25
+ Object.keys(tasks).forEach(function(key) {
26
+ length += 1;
27
+ var task = tasks[key];
28
+ lib.nextTick(function() {
29
+ task(doneIt.bind(null, key), 1);
30
+ });
31
+ });
32
+ };
33
+ lib.promisify = function(func) {
34
+ return new Promise(function(resolve, reject) {
35
+ func(function(err, data) {
36
+ if (err) {
37
+ !err instanceof Error && (err = new Error(err)), reject(err);
38
+ return;
39
+ }
40
+ resolve(data);
41
+ });
42
+ });
43
+ };
44
+ lib.iterate = function(args, func, callback) {
45
+ var errors = [], f = function() {
46
+ if (args.length === 0) {
47
+ lib.nextTick(callback.bind(null, errors));
48
+ return;
49
+ }
50
+ var arg = args.shift();
51
+ if (typeof arg == "function") {
52
+ arg(function(err, res) {
53
+ if (err)
54
+ errors.push(err);
55
+ else
56
+ for (; res.length > 0; )
57
+ args.unshift(res.pop());
58
+ f();
59
+ });
60
+ return;
61
+ }
62
+ func(arg, function(err, res) {
63
+ err ? (errors.push(err), f()) : lib.nextTick(callback.bind(null, null, res));
64
+ });
65
+ };
66
+ lib.nextTick(f);
67
+ };
68
+ module.exports = lib;
69
+ }
70
+ });
71
+
72
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getmacaddress_windows.js
73
+ var require_getmacaddress_windows = __commonJS({
74
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getmacaddress_windows.js"(exports, module) {
75
+ init_cjs_shims();
76
+ var execFile = __require("child_process").execFile, regexRegex = /[-\/\\^$*+?.()|[\]{}]/g;
77
+ function escape(string) {
78
+ return string.replace(regexRegex, "\\$&");
79
+ }
80
+ module.exports = function(iface, callback) {
81
+ execFile("ipconfig", ["/all"], function(err, out) {
82
+ if (err) {
83
+ callback(err, null);
84
+ return;
85
+ }
86
+ var match = new RegExp(escape(iface)).exec(out);
87
+ if (!match) {
88
+ callback("did not find interface in `ipconfig /all`", null);
89
+ return;
90
+ }
91
+ if (out = out.substring(match.index + iface.length), match = /[A-Fa-f0-9]{2}(\-[A-Fa-f0-9]{2}){5}/.exec(out), !match) {
92
+ callback("did not find a mac address", null);
93
+ return;
94
+ }
95
+ callback(null, match[0].toLowerCase().replace(/\-/g, ":"));
96
+ });
97
+ };
98
+ }
99
+ });
100
+
101
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getmacaddress_linux.js
102
+ var require_getmacaddress_linux = __commonJS({
103
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getmacaddress_linux.js"(exports, module) {
104
+ init_cjs_shims();
105
+ var execFile = __require("child_process").execFile;
106
+ module.exports = function(iface, callback) {
107
+ execFile("/bin/cat", ["/sys/class/net/" + iface + "/address"], function(err, out) {
108
+ if (err) {
109
+ callback(err, null);
110
+ return;
111
+ }
112
+ callback(null, out.trim().toLowerCase());
113
+ });
114
+ };
115
+ }
116
+ });
117
+
118
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getmacaddress_unix.js
119
+ var require_getmacaddress_unix = __commonJS({
120
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getmacaddress_unix.js"(exports, module) {
121
+ init_cjs_shims();
122
+ var execFile = __require("child_process").execFile;
123
+ module.exports = function(iface, callback) {
124
+ execFile("ifconfig", [iface], function(err, out) {
125
+ if (err) {
126
+ callback(err, null);
127
+ return;
128
+ }
129
+ var match = /[a-f0-9]{2}(:[a-f0-9]{2}){5}/.exec(out.toLowerCase());
130
+ if (!match) {
131
+ callback("did not find a mac address", null);
132
+ return;
133
+ }
134
+ callback(null, match[0].toLowerCase());
135
+ });
136
+ };
137
+ }
138
+ });
139
+
140
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getmacaddress.js
141
+ var require_getmacaddress = __commonJS({
142
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getmacaddress.js"(exports, module) {
143
+ init_cjs_shims();
144
+ var os2 = __require("os"), _getMacAddress, _validIfaceRegExp = "^[a-z0-9]+$";
145
+ switch (os2.platform()) {
146
+ case "win32":
147
+ _validIfaceRegExp = "^[a-z0-9 -]+$", _getMacAddress = require_getmacaddress_windows();
148
+ break;
149
+ case "linux":
150
+ _getMacAddress = require_getmacaddress_linux();
151
+ break;
152
+ case "darwin":
153
+ case "sunos":
154
+ case "freebsd":
155
+ _getMacAddress = require_getmacaddress_unix();
156
+ break;
157
+ default:
158
+ console.warn("node-macaddress: Unknown os.platform(), defaulting to 'unix'."), _getMacAddress = require_getmacaddress_unix();
159
+ break;
160
+ }
161
+ var validIfaceRegExp = new RegExp(_validIfaceRegExp, "i");
162
+ module.exports = function(iface, callback) {
163
+ if (!validIfaceRegExp.test(iface)) {
164
+ callback(new Error([
165
+ "invalid iface: '",
166
+ iface,
167
+ "' (must conform to reg exp /",
168
+ validIfaceRegExp,
169
+ "/)"
170
+ ].join("")), null);
171
+ return;
172
+ }
173
+ _getMacAddress(iface, callback);
174
+ };
175
+ }
176
+ });
177
+
178
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getallinterfaces_windows.js
179
+ var require_getallinterfaces_windows = __commonJS({
180
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getallinterfaces_windows.js"(exports, module) {
181
+ "use strict";
182
+ init_cjs_shims();
183
+ var execFile = __require("child_process").execFile;
184
+ module.exports = function(callback) {
185
+ execFile("wmic", ["nic", "get", "NetConnectionID"], function(err, out) {
186
+ if (err) {
187
+ callback(err, null);
188
+ return;
189
+ }
190
+ for (var ifaces = out.trim().replace(/\s{2,}/g, `
191
+ `).split(`
192
+ `).slice(1), result = [], i = 0; i < ifaces.length; i += 1) {
193
+ var iface = ifaces[i].trim();
194
+ iface !== "" && result.push(iface);
195
+ }
196
+ callback(null, result);
197
+ });
198
+ };
199
+ }
200
+ });
201
+
202
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getallinterfaces_linux.js
203
+ var require_getallinterfaces_linux = __commonJS({
204
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getallinterfaces_linux.js"(exports, module) {
205
+ init_cjs_shims();
206
+ var execFile = __require("child_process").execFile;
207
+ module.exports = function(callback) {
208
+ execFile("/bin/ls", ["/sys/class/net"], function(err, out) {
209
+ if (err) {
210
+ callback(err, null);
211
+ return;
212
+ }
213
+ for (var ifaces = out.split(/[ \t\n]+/), result = [], i = 0; i < ifaces.length; i += 1) {
214
+ var iface = ifaces[i].trim();
215
+ iface !== "" && result.push(iface);
216
+ }
217
+ callback(null, result);
218
+ });
219
+ };
220
+ }
221
+ });
222
+
223
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getallinterfaces_unix.js
224
+ var require_getallinterfaces_unix = __commonJS({
225
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/platform/getallinterfaces_unix.js"(exports, module) {
226
+ "use strict";
227
+ init_cjs_shims();
228
+ var execFile = __require("child_process").execFile;
229
+ module.exports = function(callback) {
230
+ execFile("/sbin/ifconfig", ["-l"], function(err, out) {
231
+ if (err) {
232
+ callback(err, null);
233
+ return;
234
+ }
235
+ for (var ifaces = out.split(/[ \t]+/), result = [], i = 0; i < ifaces.length; i += 1) {
236
+ var iface = ifaces[i].trim();
237
+ iface !== "" && result.push(iface);
238
+ }
239
+ callback(null, result);
240
+ });
241
+ };
242
+ }
243
+ });
244
+
245
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getallinterfaces.js
246
+ var require_getallinterfaces = __commonJS({
247
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getallinterfaces.js"(exports, module) {
248
+ init_cjs_shims();
249
+ var os2 = __require("os"), _getAllInterfaces;
250
+ switch (os2.platform()) {
251
+ case "win32":
252
+ _getAllInterfaces = require_getallinterfaces_windows();
253
+ break;
254
+ case "linux":
255
+ _getAllInterfaces = require_getallinterfaces_linux();
256
+ break;
257
+ case "darwin":
258
+ case "sunos":
259
+ case "freebsd":
260
+ _getAllInterfaces = require_getallinterfaces_unix();
261
+ break;
262
+ default:
263
+ console.warn("node-macaddress: Unknown os.platform(), defaulting to 'unix'."), _getAllInterfaces = require_getallinterfaces_unix();
264
+ break;
265
+ }
266
+ module.exports = _getAllInterfaces;
267
+ }
268
+ });
269
+
270
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/networkinterfaces.js
271
+ var require_networkinterfaces = __commonJS({
272
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/networkinterfaces.js"(exports, module) {
273
+ init_cjs_shims();
274
+ var os2 = __require("os");
275
+ module.exports = function() {
276
+ var allAddresses = {};
277
+ try {
278
+ var ifaces = os2.networkInterfaces();
279
+ } catch (e) {
280
+ if (e.syscall === "uv_interface_addresses")
281
+ return allAddresses;
282
+ throw e;
283
+ }
284
+ return Object.keys(ifaces).forEach(function(iface) {
285
+ var addresses = {}, hasAddresses = !1;
286
+ ifaces[iface].forEach(function(address) {
287
+ if (!address.internal) {
288
+ var family = typeof address.family == "number" ? "ipv" + address.family : (address.family || "").toLowerCase();
289
+ addresses[family] = address.address, hasAddresses = !0, address.mac && address.mac !== "00:00:00:00:00:00" && (addresses.mac = address.mac);
290
+ }
291
+ }), hasAddresses && (allAddresses[iface] = addresses);
292
+ }), allAddresses;
293
+ };
294
+ }
295
+ });
296
+
297
+ // ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/index.js
298
+ var require_macaddress = __commonJS({
299
+ "../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/index.js"(exports, module) {
300
+ "use strict";
301
+ init_cjs_shims();
302
+ var util = require_util(), lib = {};
303
+ lib.getMacAddress = require_getmacaddress();
304
+ lib.getAllInterfaces = require_getallinterfaces();
305
+ lib.networkInterfaces = require_networkinterfaces();
306
+ var goodIfaces = new RegExp("^((en|eth)[0-9]+|ethernet)$", "i"), badIfaces = new RegExp("^(vboxnet[0-9]+)$", "i");
307
+ lib.one = function() {
308
+ var iface = null, callback = null;
309
+ if (arguments.length >= 1 && (typeof arguments[0] == "function" ? callback = arguments[0] : typeof arguments[0] == "string" && (iface = arguments[0]), arguments.length >= 2 && typeof arguments[1] == "function" && (callback = arguments[1])), !callback)
310
+ return util.promisify(function(callback2) {
311
+ lib.one(iface, callback2);
312
+ });
313
+ if (iface) {
314
+ lib.getMacAddress(iface, callback);
315
+ return;
316
+ }
317
+ var ifaces = lib.networkInterfaces(), addresses = {}, best = [], args = [];
318
+ if (Object.keys(ifaces).forEach(function(name) {
319
+ args.push(name);
320
+ var score = 0, iface2 = ifaces[name];
321
+ typeof iface2.mac == "string" && iface2.mac !== "00:00:00:00:00:00" && (addresses[name] = iface2.mac, iface2.ipv4 && (score += 1), iface2.ipv6 && (score += 1), goodIfaces.test(name) && (score += 2), badIfaces.test(name) && (score -= 3), best.push({
322
+ name,
323
+ score,
324
+ mac: iface2.mac
325
+ }));
326
+ }), best.length > 0) {
327
+ best.sort(function(left, right) {
328
+ var comparison = right.score - left.score;
329
+ return comparison !== 0 ? comparison : left.name < right.name ? -1 : left.name > right.name ? 1 : 0;
330
+ }), util.nextTick(callback.bind(null, null, best[0].mac));
331
+ return;
332
+ }
333
+ args.push(lib.getAllInterfaces);
334
+ var getMacAddress = function(d, cb) {
335
+ if (addresses[d]) {
336
+ cb(null, addresses[d]);
337
+ return;
338
+ }
339
+ lib.getMacAddress(d, cb);
340
+ };
341
+ util.iterate(args, getMacAddress, callback);
342
+ };
343
+ lib.all = function(callback) {
344
+ if (typeof callback != "function")
345
+ return util.promisify(lib.all);
346
+ var ifaces = lib.networkInterfaces(), resolve = {};
347
+ return Object.keys(ifaces).forEach(function(iface) {
348
+ ifaces[iface].mac || (resolve[iface] = lib.getMacAddress.bind(null, iface));
349
+ }), Object.keys(resolve).length === 0 ? (typeof callback == "function" && util.nextTick(callback.bind(null, null, ifaces)), ifaces) : (util.parallel(resolve, function(err, result) {
350
+ Object.keys(result).forEach(function(iface) {
351
+ ifaces[iface].mac = result[iface];
352
+ }), typeof callback == "function" && callback(null, ifaces);
353
+ }), null);
354
+ };
355
+ module.exports = lib;
356
+ }
357
+ });
358
+
359
+ // ../cli-kit/dist/public/node/context/local.js
360
+ init_cjs_shims();
361
+
362
+ // ../cli-kit/dist/public/node/context/utilities.js
363
+ init_cjs_shims();
364
+ function isTruthy(variable) {
365
+ return variable ? ["1", "true", "TRUE", "yes", "YES"].includes(variable) : !1;
366
+ }
367
+
368
+ // ../cli-kit/dist/private/node/context/utilities.js
369
+ init_cjs_shims();
370
+ function isSet(variable) {
371
+ return !(variable === void 0 || variable.trim() === "");
372
+ }
373
+ function getCIMetadata(envName, envs) {
374
+ switch (envName) {
375
+ case "bitbucket":
376
+ return {
377
+ branch: envs.BITBUCKET_BRANCH,
378
+ build: envs.BITBUCKET_BUILD_NUMBER,
379
+ commitSha: envs.BITBUCKET_COMMIT,
380
+ run: envs.BITBUCKET_BUILD_NUMBER,
381
+ url: `https://bitbucket.org/${envs.BITBUCKET_WORKSPACE}/${envs.BITBUCKET_REPO_SLUG}/pipelines/results/${envs.BITBUCKET_BUILD_NUMBER}`
382
+ };
383
+ case "circleci":
384
+ return {
385
+ actor: envs.CIRCLE_USERNAME,
386
+ branch: envs.CIRCLE_BRANCH,
387
+ build: envs.CIRCLE_BUILD_NUM,
388
+ commitSha: envs.CIRCLE_SHA1,
389
+ run: envs.CIRCLE_WORKFLOW_ID,
390
+ url: envs.CIRCLE_BUILD_URL
391
+ };
392
+ case "github":
393
+ return {
394
+ actor: envs.GITHUB_ACTOR,
395
+ attempt: envs.GITHUB_RUN_ATTEMPT,
396
+ branch: envs.GITHUB_REF_NAME,
397
+ build: envs.GITHUB_RUN_ID,
398
+ commitSha: envs.GITHUB_SHA,
399
+ run: envs.GITHUB_RUN_ID,
400
+ runNumber: envs.GITHUB_RUN_NUMBER,
401
+ url: `${envs.GITHUB_SERVER_URL}/${envs.GITHUB_REPOSITORY}/actions/runs/${envs.GITHUB_RUN_ID}`
402
+ };
403
+ case "gitlab":
404
+ return {
405
+ actor: envs.GITLAB_USER_LOGIN,
406
+ branch: envs.CI_COMMIT_REF_NAME,
407
+ build: envs.CI_PIPELINE_ID,
408
+ commitSha: envs.CI_COMMIT_SHA,
409
+ commitMessage: envs.CI_COMMIT_MESSAGE,
410
+ run: envs.CI_RUNNER_ID,
411
+ url: envs.CI_PIPELINE_URL
412
+ };
413
+ case "buildkite":
414
+ return {
415
+ branch: envs.BUILDKITE_BRANCH,
416
+ build: envs.BUILDKITE_BUILD_NUMBER,
417
+ commitSha: envs.BUILDKITE_COMMIT,
418
+ commitMessage: envs.BUILDKITE_MESSAGE,
419
+ run: envs.BUILDKITE_BUILD_NUMBER,
420
+ url: envs.BUILDKITE_BUILD_URL
421
+ };
422
+ default:
423
+ return {};
424
+ }
425
+ }
426
+
427
+ // ../cli-kit/dist/private/node/constants.js
428
+ init_cjs_shims();
429
+
430
+ // ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
431
+ init_cjs_shims();
432
+ import path from "node:path";
433
+ import os from "node:os";
434
+ import process2 from "node:process";
435
+ var homedir = os.homedir(), tmpdir = os.tmpdir(), { env } = process2, macos = (name) => {
436
+ let library = path.join(homedir, "Library");
437
+ return {
438
+ data: path.join(library, "Application Support", name),
439
+ config: path.join(library, "Preferences", name),
440
+ cache: path.join(library, "Caches", name),
441
+ log: path.join(library, "Logs", name),
442
+ temp: path.join(tmpdir, name)
443
+ };
444
+ }, windows = (name) => {
445
+ let appData = env.APPDATA || path.join(homedir, "AppData", "Roaming"), localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
446
+ return {
447
+ // Data/config/cache/log are invented by me as Windows isn't opinionated about this
448
+ data: path.join(localAppData, name, "Data"),
449
+ config: path.join(appData, name, "Config"),
450
+ cache: path.join(localAppData, name, "Cache"),
451
+ log: path.join(localAppData, name, "Log"),
452
+ temp: path.join(tmpdir, name)
453
+ };
454
+ }, linux = (name) => {
455
+ let username = path.basename(homedir);
456
+ return {
457
+ data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
458
+ config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
459
+ cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
460
+ // https://wiki.debian.org/XDGBaseDirectorySpecification#state
461
+ log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
462
+ temp: path.join(tmpdir, username, name)
463
+ };
464
+ };
465
+ function envPaths(name, { suffix = "nodejs" } = {}) {
466
+ if (typeof name != "string")
467
+ throw new TypeError(`Expected a string, got ${typeof name}`);
468
+ return suffix && (name += `-${suffix}`), process2.platform === "darwin" ? macos(name) : process2.platform === "win32" ? windows(name) : linux(name);
469
+ }
470
+
471
+ // ../cli-kit/dist/private/node/constants.js
472
+ var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ? process.env.XDG_CACHE_HOME : envPaths(identifier).cache;
473
+ var environmentVariables = {
474
+ alwaysLogAnalytics: "SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",
475
+ alwaysLogMetrics: "SHOPIFY_CLI_ALWAYS_LOG_METRICS",
476
+ deviceAuth: "SHOPIFY_CLI_DEVICE_AUTH",
477
+ doctor: "SHOPIFY_CLI_DOCTOR",
478
+ enableCliRedirect: "SHOPIFY_CLI_ENABLE_CLI_REDIRECT",
479
+ env: "SHOPIFY_CLI_ENV",
480
+ firstPartyDev: "SHOPIFY_CLI_1P_DEV",
481
+ hostedApps: "HOSTED_APPS",
482
+ noAnalytics: "SHOPIFY_CLI_NO_ANALYTICS",
483
+ optOutInstrumentation: "OPT_OUT_INSTRUMENTATION",
484
+ appAutomationToken: "SHOPIFY_APP_AUTOMATION_TOKEN",
485
+ partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN",
486
+ runAsUser: "SHOPIFY_RUN_AS_USER",
487
+ serviceEnv: "SHOPIFY_SERVICE_ENV",
488
+ skipCliRedirect: "SHOPIFY_CLI_SKIP_CLI_REDIRECT",
489
+ spinInstance: "SPIN_INSTANCE",
490
+ themeToken: "SHOPIFY_CLI_THEME_TOKEN",
491
+ unitTest: "SHOPIFY_UNIT_TEST",
492
+ verbose: "SHOPIFY_FLAG_VERBOSE",
493
+ // Variables to detect if the CLI is running in a cloud environment
494
+ codespaces: "CODESPACES",
495
+ codespaceName: "CODESPACE_NAME",
496
+ codespacePortForwardingDomain: "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",
497
+ gitpod: "GITPOD_WORKSPACE_URL",
498
+ cloudShell: "CLOUD_SHELL",
499
+ spinAppPort: "SERVER_PORT",
500
+ spinAppHost: "SPIN_APP_HOST",
501
+ organization: "SHOPIFY_CLI_ORGANIZATION",
502
+ identityToken: "SHOPIFY_CLI_IDENTITY_TOKEN",
503
+ refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
504
+ otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
505
+ themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
506
+ json: "SHOPIFY_FLAG_JSON",
507
+ neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API",
508
+ skipNetworkLevelRetry: "SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",
509
+ maxRequestTimeForNetworkCalls: "SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",
510
+ disableImportScanning: "SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"
511
+ }, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
512
+ backendPort: "BACKEND_PORT"
513
+ }, pathConstants = {
514
+ executables: {
515
+ dev: "/opt/dev/bin/dev"
516
+ },
517
+ directories: {
518
+ cache: {
519
+ path: () => cacheFolder(),
520
+ vendor: {
521
+ path: () => joinPath(cacheFolder(), "vendor"),
522
+ binaries: () => joinPath(cacheFolder(), "vendor", "binaries")
523
+ }
524
+ }
525
+ }
526
+ }, sessionConstants = {
527
+ expirationTimeMarginInMinutes: 4
528
+ }, bugsnagApiKey = "9e1e6889176fd0c795d5c659225e0fae", reportingRateLimit = { limit: 300, timeout: { days: 1 } }, themeKitAccessDomain = process.env[environmentVariables.themeKitAccessDomain] ?? defaultThemeKitAccessDomain;
529
+
530
+ // ../cli-kit/dist/public/node/context/local.js
531
+ var import_macaddress = __toESM(require_macaddress(), 1);
532
+ import { homedir as homedir2 } from "os";
533
+ async function lazyFileExists(path2) {
534
+ let { fileExists } = await import("./fs-XENRLBMU.js");
535
+ return fileExists(path2);
536
+ }
537
+ async function lazyExec(command, args) {
538
+ let { exec } = await import("./system-W4MMMHEV.js");
539
+ await exec(command, args);
540
+ }
541
+ function isTerminalInteractive() {
542
+ return !!(process.stdout.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env));
543
+ }
544
+ function homeDirectory() {
545
+ return homedir2();
546
+ }
547
+ function isDevelopment(env2 = process.env) {
548
+ return env2[environmentVariables.env] === "development";
549
+ }
550
+ function isVerbose(env2 = process.env) {
551
+ return isTruthy(env2[environmentVariables.verbose]) || process.argv.includes("--verbose");
552
+ }
553
+ async function isShopify(env2 = process.env) {
554
+ return Object.prototype.hasOwnProperty.call(env2, environmentVariables.runAsUser) ? !isTruthy(env2[environmentVariables.runAsUser]) : await lazyFileExists(pathConstants.executables.dev);
555
+ }
556
+ function isUnitTest(env2 = process.env) {
557
+ return isTruthy(env2[environmentVariables.unitTest]);
558
+ }
559
+ function isHostedAppsMode(env2 = process.env) {
560
+ return isTruthy(env2[environmentVariables.hostedApps]);
561
+ }
562
+ function analyticsDisabled(env2 = process.env) {
563
+ return isTruthy(env2[environmentVariables.noAnalytics]) || isTruthy(env2[environmentVariables.optOutInstrumentation]) || isDevelopment(env2);
564
+ }
565
+ function alwaysLogAnalytics(env2 = process.env) {
566
+ return isTruthy(env2[environmentVariables.alwaysLogAnalytics]);
567
+ }
568
+ function alwaysLogMetrics(env2 = process.env) {
569
+ return isTruthy(env2[environmentVariables.alwaysLogMetrics]);
570
+ }
571
+ function firstPartyDev(env2 = process.env) {
572
+ return isTruthy(env2[environmentVariables.firstPartyDev]);
573
+ }
574
+ function canRunDoctorRelease(env2 = process.env) {
575
+ return isTruthy(env2[environmentVariables.doctor]);
576
+ }
577
+ function gitpodURL(env2 = process.env) {
578
+ return env2[environmentVariables.gitpod];
579
+ }
580
+ function codespaceURL(env2 = process.env) {
581
+ return env2[environmentVariables.codespaceName];
582
+ }
583
+ function codespacePortForwardingDomain(env2 = process.env) {
584
+ return env2[environmentVariables.codespacePortForwardingDomain];
585
+ }
586
+ function isCloudEnvironment(env2 = process.env) {
587
+ return cloudEnvironment(env2).platform !== "localhost";
588
+ }
589
+ function themeToken(env2 = process.env) {
590
+ return env2[environmentVariables.themeToken];
591
+ }
592
+ function cloudEnvironment(env2 = process.env) {
593
+ return isSet(env2[environmentVariables.codespaces]) ? { platform: "codespaces", editor: !0 } : isSet(env2[environmentVariables.gitpod]) ? { platform: "gitpod", editor: !0 } : isSet(env2[environmentVariables.cloudShell]) ? { platform: "cloudShell", editor: !0 } : { platform: "localhost", editor: !1 };
594
+ }
595
+ async function hasGit() {
596
+ try {
597
+ return await lazyExec("git", ["--version"]), !0;
598
+ } catch {
599
+ return !1;
600
+ }
601
+ }
602
+ function ciPlatform(env2 = process.env) {
603
+ if (isTruthy(env2.CI)) {
604
+ let name = "unknown";
605
+ return isSet(env2.BITBUCKET_BUILD_NUMBER) ? name = "bitbucket" : isTruthy(env2.CIRCLECI) ? name = "circleci" : isSet(env2.GITHUB_ACTION) ? name = "github" : isTruthy(env2.GITLAB_CI) ? name = "gitlab" : isSet(env2.BUILDKITE) && (name = "buildkite"), {
606
+ isCI: !0,
607
+ name,
608
+ metadata: getCIMetadata(name, env2)
609
+ };
610
+ } else if (isTruthy(env2.TF_BUILD))
611
+ return {
612
+ isCI: !0,
613
+ name: "azure",
614
+ metadata: getCIMetadata("azure", env2)
615
+ };
616
+ return {
617
+ isCI: !1
618
+ };
619
+ }
620
+ function macAddress() {
621
+ return import_macaddress.default.one();
622
+ }
623
+ function getThemeKitAccessDomain(env2 = process.env) {
624
+ let domain = env2[environmentVariables.themeKitAccessDomain];
625
+ return isSet(domain) ? domain : defaultThemeKitAccessDomain;
626
+ }
627
+ function opentelemetryDomain(env2 = process.env) {
628
+ let domain = env2[environmentVariables.otelURL];
629
+ return isSet(domain) ? domain : "https://otlp-http-production-cli.shopifysvc.com";
630
+ }
631
+
632
+ export {
633
+ isTruthy,
634
+ envPaths,
635
+ environmentVariables,
636
+ systemEnvironmentVariables,
637
+ sessionConstants,
638
+ bugsnagApiKey,
639
+ reportingRateLimit,
640
+ themeKitAccessDomain,
641
+ isTerminalInteractive,
642
+ homeDirectory,
643
+ isDevelopment,
644
+ isVerbose,
645
+ isShopify,
646
+ isUnitTest,
647
+ isHostedAppsMode,
648
+ analyticsDisabled,
649
+ alwaysLogAnalytics,
650
+ alwaysLogMetrics,
651
+ firstPartyDev,
652
+ canRunDoctorRelease,
653
+ gitpodURL,
654
+ codespaceURL,
655
+ codespacePortForwardingDomain,
656
+ isCloudEnvironment,
657
+ themeToken,
658
+ cloudEnvironment,
659
+ hasGit,
660
+ ciPlatform,
661
+ macAddress,
662
+ getThemeKitAccessDomain,
663
+ opentelemetryDomain
664
+ };
665
+ //# sourceMappingURL=chunk-4CS37CS5.js.map