@shopify/create-app 3.65.2 → 3.66.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 (86) hide show
  1. package/dist/chunk-2RSJVBMF.js +5625 -0
  2. package/dist/{chunk-Z65QJ5D7.js → chunk-4DRC2PSU.js} +17 -30
  3. package/dist/chunk-4OD45DDO.js +31508 -0
  4. package/dist/chunk-522OB3EU.js +45 -0
  5. package/dist/{chunk-JTKTLA7L.js → chunk-5U24TEX5.js} +5434 -10324
  6. package/dist/{chunk-GJPZCXGT.js → chunk-6A7MXLVB.js} +159 -405
  7. package/dist/{chunk-ZYKRTO5P.js → chunk-7ZCQLP5Y.js} +3 -3
  8. package/dist/{chunk-5LBEKXRW.js → chunk-FIJKOZJF.js} +19 -55
  9. package/dist/{chunk-QSKQTKTB.js → chunk-FT6PCF6E.js} +2441 -5551
  10. package/dist/chunk-GIUM5DCQ.js +2144 -0
  11. package/dist/chunk-HIAKHDLR.js +54 -0
  12. package/dist/chunk-LLSRDN3T.js +15352 -0
  13. package/dist/chunk-LTDD2GRL.js +111 -0
  14. package/dist/{chunk-63QVG2CD.js → chunk-NGBYQF44.js} +9 -9
  15. package/dist/chunk-NLC7NBUB.js +80 -0
  16. package/dist/{chunk-FMKVOTQK.js → chunk-O5K4AU7Q.js} +18 -34
  17. package/dist/chunk-OMDEA7TV.js +10615 -0
  18. package/dist/chunk-PNN7RS7Y.js +105 -0
  19. package/dist/{chunk-ZPL24Y2D.js → chunk-POZ5MGPT.js} +13 -18
  20. package/dist/chunk-T7T35H4F.js +108 -0
  21. package/dist/chunk-UBB7JKND.js +55 -0
  22. package/dist/chunk-VSLR7ET4.js +3034 -0
  23. package/dist/{chunk-SAO7C4LP.js → chunk-VZVGAREJ.js} +46821 -101962
  24. package/dist/{chunk-KDNBKIH4.js → chunk-WBQF4CSV.js} +12 -22
  25. package/dist/chunk-XVNW332R.js +524 -0
  26. package/dist/{chunk-YB6D4XQ7.js → chunk-Y4ECGRAF.js} +13 -23
  27. package/dist/chunk-ZAUZQLNO.js +3774 -0
  28. package/dist/chunk-ZULFH3SL.js +1847 -0
  29. package/dist/commands/init.d.ts +0 -1
  30. package/dist/commands/init.js +27 -27
  31. package/dist/commands/init.test.js +51 -70
  32. package/dist/{constants-24TFXZKQ.js → constants-WG7I7G3O.js} +5 -5
  33. package/dist/custom-oclif-loader-JKRJZ56E.js +47 -0
  34. package/dist/del-NW5KFKFP.js +1820 -0
  35. package/dist/devtools-UBOREV57.js +2572 -0
  36. package/dist/error-handler-26SLAJTC.js +35 -0
  37. package/dist/hooks/postrun.js +35 -42
  38. package/dist/hooks/prerun.js +58 -36
  39. package/dist/index.js +7 -7
  40. package/dist/lib-3K5QYF3J.js +9 -0
  41. package/dist/{local-3VUKCW4R.js → local-H6TW5MNX.js} +13 -13
  42. package/dist/magic-string.es-3RXPUXZF.js +843 -0
  43. package/dist/multipart-parser-QKUAJJP5.js +193 -0
  44. package/dist/{node-package-manager-HYZRZNU6.js → node-package-manager-QAUN6HGS.js} +16 -14
  45. package/dist/open-MZGVNFZO.js +197 -0
  46. package/dist/out-KDGAD475.js +6 -0
  47. package/dist/{path-CFPIDSWV.js → path-L375JOQ2.js} +4 -4
  48. package/dist/prompts/init.js +13 -13
  49. package/dist/prompts/init.test.js +42 -59
  50. package/dist/services/init.js +20 -20
  51. package/dist/services/init.test.js +5 -5
  52. package/dist/system-ZI2HKAKO.js +26 -0
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/dist/{ui-7NEDEALP.js → ui-727JEZUX.js} +13 -13
  55. package/dist/utils/template/cleanup.js +13 -13
  56. package/dist/utils/template/cleanup.test.js +18 -30
  57. package/dist/utils/template/npm.js +15 -15
  58. package/dist/utils/template/npm.test.js +48 -87
  59. package/oclif.manifest.json +1 -1
  60. package/package.json +3 -4
  61. package/dist/chunk-3US34ZNP.js +0 -145
  62. package/dist/chunk-3XYIOBQ2.js +0 -22131
  63. package/dist/chunk-6IZMEXPW.js +0 -105
  64. package/dist/chunk-7DRS5WXI.js +0 -7843
  65. package/dist/chunk-DL3MKXVR.js +0 -4754
  66. package/dist/chunk-HDVJ5FPK.js +0 -63
  67. package/dist/chunk-IKO7JBOJ.js +0 -14788
  68. package/dist/chunk-LSCXQWNO.js +0 -822
  69. package/dist/chunk-M2VKB6RG.js +0 -146
  70. package/dist/chunk-MCED27CG.js +0 -5626
  71. package/dist/chunk-SWNRLCC6.js +0 -61
  72. package/dist/chunk-T5LLJYYS.js +0 -195
  73. package/dist/chunk-U5LTJVWL.js +0 -3185
  74. package/dist/chunk-WR7YKB6H.js +0 -44962
  75. package/dist/chunk-YC4FLMDD.js +0 -74
  76. package/dist/chunk-ZRUHMMSQ.js +0 -2477
  77. package/dist/custom-oclif-loader-5KBN3RSN.js +0 -83
  78. package/dist/del-ZCPTGWOA.js +0 -2847
  79. package/dist/devtools-5N4JAP3R.js +0 -3588
  80. package/dist/error-handler-GTW2KSRC.js +0 -35
  81. package/dist/lib-CTSCLPNV.js +0 -9
  82. package/dist/magic-string.es-ATGURXGQ.js +0 -1353
  83. package/dist/multipart-parser-KYOHF24X.js +0 -360
  84. package/dist/open-JRS7RW22.js +0 -291
  85. package/dist/out-OKI3G7I5.js +0 -6
  86. package/dist/system-4S4YXUXZ.js +0 -26
@@ -2,32 +2,30 @@ import {
2
2
  execa,
3
3
  outputContent,
4
4
  outputDebug
5
- } from "./chunk-WR7YKB6H.js";
5
+ } from "./chunk-4OD45DDO.js";
6
6
  import {
7
7
  init_cjs_shims
8
- } from "./chunk-ZPL24Y2D.js";
8
+ } from "./chunk-POZ5MGPT.js";
9
9
 
10
10
  // ../cli-kit/src/public/node/os.ts
11
11
  init_cjs_shims();
12
12
  import { userInfo as osUserInfo } from "os";
13
13
  async function username(platform = process.platform) {
14
14
  outputDebug(outputContent`Obtaining user name...`);
15
- const environmentVariable = getEnvironmentVariable();
16
- if (environmentVariable) {
15
+ let environmentVariable = getEnvironmentVariable();
16
+ if (environmentVariable)
17
17
  return environmentVariable;
18
- }
19
- const userInfoUsername = getUsernameFromOsUserInfo();
20
- if (userInfoUsername) {
18
+ let userInfoUsername = getUsernameFromOsUserInfo();
19
+ if (userInfoUsername)
21
20
  return userInfoUsername;
22
- }
23
21
  try {
24
22
  if (platform === "win32") {
25
- const { stdout } = await execa("whoami");
23
+ let { stdout } = await execa("whoami");
26
24
  return cleanWindowsCommand(stdout);
27
25
  }
28
- const { stdout: userId } = await execa("id", ["-u"]);
26
+ let { stdout: userId } = await execa("id", ["-u"]);
29
27
  try {
30
- const { stdout } = await execa("id", ["-un", userId]);
28
+ let { stdout } = await execa("id", ["-un", userId]);
31
29
  return stdout;
32
30
  } catch {
33
31
  }
@@ -38,18 +36,10 @@ async function username(platform = process.platform) {
38
36
  }
39
37
  function platformAndArch(platform = process.platform, arch = process.arch) {
40
38
  let archString;
41
- if (arch === "x64") {
42
- archString = "amd64";
43
- } else if (arch === "ia32") {
44
- archString = "386";
45
- } else {
46
- archString = arch;
47
- }
48
- const platformString = platform.match(/^win.+/) ? "windows" : platform;
49
- return { platform: platformString, arch: archString };
39
+ return arch === "x64" ? archString = "amd64" : arch === "ia32" ? archString = "386" : archString = arch, { platform: platform.match(/^win.+/) ? "windows" : platform, arch: archString };
50
40
  }
51
41
  function getEnvironmentVariable() {
52
- const { env } = process;
42
+ let { env } = process;
53
43
  return env.SUDO_USER || env.C9_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
54
44
  }
55
45
  function getUsernameFromOsUserInfo() {
@@ -70,4 +60,4 @@ export {
70
60
  username,
71
61
  platformAndArch
72
62
  };
73
- //# sourceMappingURL=chunk-KDNBKIH4.js.map
63
+ //# sourceMappingURL=chunk-WBQF4CSV.js.map
@@ -0,0 +1,524 @@
1
+ import {
2
+ __commonJS,
3
+ __require,
4
+ init_cjs_shims
5
+ } from "./chunk-POZ5MGPT.js";
6
+
7
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
8
+ var require_polyfills = __commonJS({
9
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
10
+ init_cjs_shims();
11
+ var constants = __require("constants"), origCwd = process.cwd, cwd = null, platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
12
+ process.cwd = function() {
13
+ return cwd || (cwd = origCwd.call(process)), cwd;
14
+ };
15
+ try {
16
+ process.cwd();
17
+ } catch {
18
+ }
19
+ typeof process.chdir == "function" && (chdir = process.chdir, process.chdir = function(d) {
20
+ cwd = null, chdir.call(process, d);
21
+ }, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, chdir));
22
+ var chdir;
23
+ module.exports = patch;
24
+ function patch(fs) {
25
+ constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && patchLchmod(fs), fs.lutimes || patchLutimes(fs), fs.chown = chownFix(fs.chown), fs.fchown = chownFix(fs.fchown), fs.lchown = chownFix(fs.lchown), fs.chmod = chmodFix(fs.chmod), fs.fchmod = chmodFix(fs.fchmod), fs.lchmod = chmodFix(fs.lchmod), fs.chownSync = chownFixSync(fs.chownSync), fs.fchownSync = chownFixSync(fs.fchownSync), fs.lchownSync = chownFixSync(fs.lchownSync), fs.chmodSync = chmodFixSync(fs.chmodSync), fs.fchmodSync = chmodFixSync(fs.fchmodSync), fs.lchmodSync = chmodFixSync(fs.lchmodSync), fs.stat = statFix(fs.stat), fs.fstat = statFix(fs.fstat), fs.lstat = statFix(fs.lstat), fs.statSync = statFixSync(fs.statSync), fs.fstatSync = statFixSync(fs.fstatSync), fs.lstatSync = statFixSync(fs.lstatSync), fs.chmod && !fs.lchmod && (fs.lchmod = function(path, mode, cb) {
26
+ cb && process.nextTick(cb);
27
+ }, fs.lchmodSync = function() {
28
+ }), fs.chown && !fs.lchown && (fs.lchown = function(path, uid, gid, cb) {
29
+ cb && process.nextTick(cb);
30
+ }, fs.lchownSync = function() {
31
+ }), platform === "win32" && (fs.rename = typeof fs.rename != "function" ? fs.rename : function(fs$rename) {
32
+ function rename(from, to, cb) {
33
+ var start = Date.now(), backoff = 0;
34
+ fs$rename(from, to, function CB(er) {
35
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
36
+ setTimeout(function() {
37
+ fs.stat(to, function(stater, st) {
38
+ stater && stater.code === "ENOENT" ? fs$rename(from, to, CB) : cb(er);
39
+ });
40
+ }, backoff), backoff < 100 && (backoff += 10);
41
+ return;
42
+ }
43
+ cb && cb(er);
44
+ });
45
+ }
46
+ return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
47
+ }(fs.rename)), fs.read = typeof fs.read != "function" ? fs.read : function(fs$read) {
48
+ function read(fd, buffer, offset, length, position, callback_) {
49
+ var callback;
50
+ if (callback_ && typeof callback_ == "function") {
51
+ var eagCounter = 0;
52
+ callback = function(er, _, __) {
53
+ if (er && er.code === "EAGAIN" && eagCounter < 10)
54
+ return eagCounter++, fs$read.call(fs, fd, buffer, offset, length, position, callback);
55
+ callback_.apply(this, arguments);
56
+ };
57
+ }
58
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
59
+ }
60
+ return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
61
+ }(fs.read), fs.readSync = typeof fs.readSync != "function" ? fs.readSync : /* @__PURE__ */ function(fs$readSync) {
62
+ return function(fd, buffer, offset, length, position) {
63
+ for (var eagCounter = 0; ; )
64
+ try {
65
+ return fs$readSync.call(fs, fd, buffer, offset, length, position);
66
+ } catch (er) {
67
+ if (er.code === "EAGAIN" && eagCounter < 10) {
68
+ eagCounter++;
69
+ continue;
70
+ }
71
+ throw er;
72
+ }
73
+ };
74
+ }(fs.readSync);
75
+ function patchLchmod(fs2) {
76
+ fs2.lchmod = function(path, mode, callback) {
77
+ fs2.open(
78
+ path,
79
+ constants.O_WRONLY | constants.O_SYMLINK,
80
+ mode,
81
+ function(err, fd) {
82
+ if (err) {
83
+ callback && callback(err);
84
+ return;
85
+ }
86
+ fs2.fchmod(fd, mode, function(err2) {
87
+ fs2.close(fd, function(err22) {
88
+ callback && callback(err2 || err22);
89
+ });
90
+ });
91
+ }
92
+ );
93
+ }, fs2.lchmodSync = function(path, mode) {
94
+ var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode), threw = !0, ret;
95
+ try {
96
+ ret = fs2.fchmodSync(fd, mode), threw = !1;
97
+ } finally {
98
+ if (threw)
99
+ try {
100
+ fs2.closeSync(fd);
101
+ } catch {
102
+ }
103
+ else
104
+ fs2.closeSync(fd);
105
+ }
106
+ return ret;
107
+ };
108
+ }
109
+ function patchLutimes(fs2) {
110
+ constants.hasOwnProperty("O_SYMLINK") && fs2.futimes ? (fs2.lutimes = function(path, at, mt, cb) {
111
+ fs2.open(path, constants.O_SYMLINK, function(er, fd) {
112
+ if (er) {
113
+ cb && cb(er);
114
+ return;
115
+ }
116
+ fs2.futimes(fd, at, mt, function(er2) {
117
+ fs2.close(fd, function(er22) {
118
+ cb && cb(er2 || er22);
119
+ });
120
+ });
121
+ });
122
+ }, fs2.lutimesSync = function(path, at, mt) {
123
+ var fd = fs2.openSync(path, constants.O_SYMLINK), ret, threw = !0;
124
+ try {
125
+ ret = fs2.futimesSync(fd, at, mt), threw = !1;
126
+ } finally {
127
+ if (threw)
128
+ try {
129
+ fs2.closeSync(fd);
130
+ } catch {
131
+ }
132
+ else
133
+ fs2.closeSync(fd);
134
+ }
135
+ return ret;
136
+ }) : fs2.futimes && (fs2.lutimes = function(_a, _b, _c, cb) {
137
+ cb && process.nextTick(cb);
138
+ }, fs2.lutimesSync = function() {
139
+ });
140
+ }
141
+ function chmodFix(orig) {
142
+ return orig && function(target, mode, cb) {
143
+ return orig.call(fs, target, mode, function(er) {
144
+ chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
145
+ });
146
+ };
147
+ }
148
+ function chmodFixSync(orig) {
149
+ return orig && function(target, mode) {
150
+ try {
151
+ return orig.call(fs, target, mode);
152
+ } catch (er) {
153
+ if (!chownErOk(er))
154
+ throw er;
155
+ }
156
+ };
157
+ }
158
+ function chownFix(orig) {
159
+ return orig && function(target, uid, gid, cb) {
160
+ return orig.call(fs, target, uid, gid, function(er) {
161
+ chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
162
+ });
163
+ };
164
+ }
165
+ function chownFixSync(orig) {
166
+ return orig && function(target, uid, gid) {
167
+ try {
168
+ return orig.call(fs, target, uid, gid);
169
+ } catch (er) {
170
+ if (!chownErOk(er))
171
+ throw er;
172
+ }
173
+ };
174
+ }
175
+ function statFix(orig) {
176
+ return orig && function(target, options, cb) {
177
+ typeof options == "function" && (cb = options, options = null);
178
+ function callback(er, stats) {
179
+ stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), cb && cb.apply(this, arguments);
180
+ }
181
+ return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
182
+ };
183
+ }
184
+ function statFixSync(orig) {
185
+ return orig && function(target, options) {
186
+ var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
187
+ return stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), stats;
188
+ };
189
+ }
190
+ function chownErOk(er) {
191
+ if (!er || er.code === "ENOSYS")
192
+ return !0;
193
+ var nonroot = !process.getuid || process.getuid() !== 0;
194
+ return !!(nonroot && (er.code === "EINVAL" || er.code === "EPERM"));
195
+ }
196
+ }
197
+ }
198
+ });
199
+
200
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
201
+ var require_legacy_streams = __commonJS({
202
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
203
+ init_cjs_shims();
204
+ var Stream = __require("stream").Stream;
205
+ module.exports = legacy;
206
+ function legacy(fs) {
207
+ return {
208
+ ReadStream,
209
+ WriteStream
210
+ };
211
+ function ReadStream(path, options) {
212
+ if (!(this instanceof ReadStream))
213
+ return new ReadStream(path, options);
214
+ Stream.call(this);
215
+ var self = this;
216
+ this.path = path, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, options = options || {};
217
+ for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
218
+ var key = keys[index];
219
+ this[key] = options[key];
220
+ }
221
+ if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
222
+ if (typeof this.start != "number")
223
+ throw TypeError("start must be a Number");
224
+ if (this.end === void 0)
225
+ this.end = 1 / 0;
226
+ else if (typeof this.end != "number")
227
+ throw TypeError("end must be a Number");
228
+ if (this.start > this.end)
229
+ throw new Error("start must be <= end");
230
+ this.pos = this.start;
231
+ }
232
+ if (this.fd !== null) {
233
+ process.nextTick(function() {
234
+ self._read();
235
+ });
236
+ return;
237
+ }
238
+ fs.open(this.path, this.flags, this.mode, function(err, fd) {
239
+ if (err) {
240
+ self.emit("error", err), self.readable = !1;
241
+ return;
242
+ }
243
+ self.fd = fd, self.emit("open", fd), self._read();
244
+ });
245
+ }
246
+ function WriteStream(path, options) {
247
+ if (!(this instanceof WriteStream))
248
+ return new WriteStream(path, options);
249
+ Stream.call(this), this.path = path, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, options = options || {};
250
+ for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
251
+ var key = keys[index];
252
+ this[key] = options[key];
253
+ }
254
+ if (this.start !== void 0) {
255
+ if (typeof this.start != "number")
256
+ throw TypeError("start must be a Number");
257
+ if (this.start < 0)
258
+ throw new Error("start must be >= zero");
259
+ this.pos = this.start;
260
+ }
261
+ this.busy = !1, this._queue = [], this.fd === null && (this._open = fs.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
262
+ }
263
+ }
264
+ }
265
+ });
266
+
267
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
268
+ var require_clone = __commonJS({
269
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
270
+ "use strict";
271
+ init_cjs_shims();
272
+ module.exports = clone;
273
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
274
+ return obj.__proto__;
275
+ };
276
+ function clone(obj) {
277
+ if (obj === null || typeof obj != "object")
278
+ return obj;
279
+ if (obj instanceof Object)
280
+ var copy = { __proto__: getPrototypeOf(obj) };
281
+ else
282
+ var copy = /* @__PURE__ */ Object.create(null);
283
+ return Object.getOwnPropertyNames(obj).forEach(function(key) {
284
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
285
+ }), copy;
286
+ }
287
+ }
288
+ });
289
+
290
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
291
+ var require_graceful_fs = __commonJS({
292
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
293
+ init_cjs_shims();
294
+ var fs = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
295
+ typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = Symbol.for("graceful-fs.queue"), previousSymbol = Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
296
+ function noop() {
297
+ }
298
+ function publishQueue(context, queue2) {
299
+ Object.defineProperty(context, gracefulQueue, {
300
+ get: function() {
301
+ return queue2;
302
+ }
303
+ });
304
+ }
305
+ var debug = noop;
306
+ util.debuglog ? debug = util.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (debug = function() {
307
+ var m = util.format.apply(util, arguments);
308
+ m = "GFS4: " + m.split(/\n/).join(`
309
+ GFS4: `), console.error(m);
310
+ });
311
+ fs[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs, queue), fs.close = function(fs$close) {
312
+ function close(fd, cb) {
313
+ return fs$close.call(fs, fd, function(err) {
314
+ err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
315
+ });
316
+ }
317
+ return Object.defineProperty(close, previousSymbol, {
318
+ value: fs$close
319
+ }), close;
320
+ }(fs.close), fs.closeSync = function(fs$closeSync) {
321
+ function closeSync(fd) {
322
+ fs$closeSync.apply(fs, arguments), resetQueue();
323
+ }
324
+ return Object.defineProperty(closeSync, previousSymbol, {
325
+ value: fs$closeSync
326
+ }), closeSync;
327
+ }(fs.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
328
+ debug(fs[gracefulQueue]), __require("assert").equal(fs[gracefulQueue].length, 0);
329
+ }));
330
+ var queue;
331
+ global[gracefulQueue] || publishQueue(global, fs[gracefulQueue]);
332
+ module.exports = patch(clone(fs));
333
+ process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched && (module.exports = patch(fs), fs.__patched = !0);
334
+ function patch(fs2) {
335
+ polyfills(fs2), fs2.gracefulify = patch, fs2.createReadStream = createReadStream, fs2.createWriteStream = createWriteStream;
336
+ var fs$readFile = fs2.readFile;
337
+ fs2.readFile = readFile;
338
+ function readFile(path, options, cb) {
339
+ return typeof options == "function" && (cb = options, options = null), go$readFile(path, options, cb);
340
+ function go$readFile(path2, options2, cb2, startTime) {
341
+ return fs$readFile(path2, options2, function(err) {
342
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
343
+ });
344
+ }
345
+ }
346
+ var fs$writeFile = fs2.writeFile;
347
+ fs2.writeFile = writeFile;
348
+ function writeFile(path, data, options, cb) {
349
+ return typeof options == "function" && (cb = options, options = null), go$writeFile(path, data, options, cb);
350
+ function go$writeFile(path2, data2, options2, cb2, startTime) {
351
+ return fs$writeFile(path2, data2, options2, function(err) {
352
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
353
+ });
354
+ }
355
+ }
356
+ var fs$appendFile = fs2.appendFile;
357
+ fs$appendFile && (fs2.appendFile = appendFile);
358
+ function appendFile(path, data, options, cb) {
359
+ return typeof options == "function" && (cb = options, options = null), go$appendFile(path, data, options, cb);
360
+ function go$appendFile(path2, data2, options2, cb2, startTime) {
361
+ return fs$appendFile(path2, data2, options2, function(err) {
362
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
363
+ });
364
+ }
365
+ }
366
+ var fs$copyFile = fs2.copyFile;
367
+ fs$copyFile && (fs2.copyFile = copyFile);
368
+ function copyFile(src, dest, flags, cb) {
369
+ return typeof flags == "function" && (cb = flags, flags = 0), go$copyFile(src, dest, flags, cb);
370
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
371
+ return fs$copyFile(src2, dest2, flags2, function(err) {
372
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
373
+ });
374
+ }
375
+ }
376
+ var fs$readdir = fs2.readdir;
377
+ fs2.readdir = readdir;
378
+ var noReaddirOptionVersions = /^v[0-5]\./;
379
+ function readdir(path, options, cb) {
380
+ typeof options == "function" && (cb = options, options = null);
381
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function(path2, options2, cb2, startTime) {
382
+ return fs$readdir(path2, fs$readdirCallback(
383
+ path2,
384
+ options2,
385
+ cb2,
386
+ startTime
387
+ ));
388
+ } : function(path2, options2, cb2, startTime) {
389
+ return fs$readdir(path2, options2, fs$readdirCallback(
390
+ path2,
391
+ options2,
392
+ cb2,
393
+ startTime
394
+ ));
395
+ };
396
+ return go$readdir(path, options, cb);
397
+ function fs$readdirCallback(path2, options2, cb2, startTime) {
398
+ return function(err, files) {
399
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([
400
+ go$readdir,
401
+ [path2, options2, cb2],
402
+ err,
403
+ startTime || Date.now(),
404
+ Date.now()
405
+ ]) : (files && files.sort && files.sort(), typeof cb2 == "function" && cb2.call(this, err, files));
406
+ };
407
+ }
408
+ }
409
+ if (process.version.substr(0, 4) === "v0.8") {
410
+ var legStreams = legacy(fs2);
411
+ ReadStream = legStreams.ReadStream, WriteStream = legStreams.WriteStream;
412
+ }
413
+ var fs$ReadStream = fs2.ReadStream;
414
+ fs$ReadStream && (ReadStream.prototype = Object.create(fs$ReadStream.prototype), ReadStream.prototype.open = ReadStream$open);
415
+ var fs$WriteStream = fs2.WriteStream;
416
+ fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(fs2, "ReadStream", {
417
+ get: function() {
418
+ return ReadStream;
419
+ },
420
+ set: function(val) {
421
+ ReadStream = val;
422
+ },
423
+ enumerable: !0,
424
+ configurable: !0
425
+ }), Object.defineProperty(fs2, "WriteStream", {
426
+ get: function() {
427
+ return WriteStream;
428
+ },
429
+ set: function(val) {
430
+ WriteStream = val;
431
+ },
432
+ enumerable: !0,
433
+ configurable: !0
434
+ });
435
+ var FileReadStream = ReadStream;
436
+ Object.defineProperty(fs2, "FileReadStream", {
437
+ get: function() {
438
+ return FileReadStream;
439
+ },
440
+ set: function(val) {
441
+ FileReadStream = val;
442
+ },
443
+ enumerable: !0,
444
+ configurable: !0
445
+ });
446
+ var FileWriteStream = WriteStream;
447
+ Object.defineProperty(fs2, "FileWriteStream", {
448
+ get: function() {
449
+ return FileWriteStream;
450
+ },
451
+ set: function(val) {
452
+ FileWriteStream = val;
453
+ },
454
+ enumerable: !0,
455
+ configurable: !0
456
+ });
457
+ function ReadStream(path, options) {
458
+ return this instanceof ReadStream ? (fs$ReadStream.apply(this, arguments), this) : ReadStream.apply(Object.create(ReadStream.prototype), arguments);
459
+ }
460
+ function ReadStream$open() {
461
+ var that = this;
462
+ open(that.path, that.flags, that.mode, function(err, fd) {
463
+ err ? (that.autoClose && that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd), that.read());
464
+ });
465
+ }
466
+ function WriteStream(path, options) {
467
+ return this instanceof WriteStream ? (fs$WriteStream.apply(this, arguments), this) : WriteStream.apply(Object.create(WriteStream.prototype), arguments);
468
+ }
469
+ function WriteStream$open() {
470
+ var that = this;
471
+ open(that.path, that.flags, that.mode, function(err, fd) {
472
+ err ? (that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd));
473
+ });
474
+ }
475
+ function createReadStream(path, options) {
476
+ return new fs2.ReadStream(path, options);
477
+ }
478
+ function createWriteStream(path, options) {
479
+ return new fs2.WriteStream(path, options);
480
+ }
481
+ var fs$open = fs2.open;
482
+ fs2.open = open;
483
+ function open(path, flags, mode, cb) {
484
+ return typeof mode == "function" && (cb = mode, mode = null), go$open(path, flags, mode, cb);
485
+ function go$open(path2, flags2, mode2, cb2, startTime) {
486
+ return fs$open(path2, flags2, mode2, function(err, fd) {
487
+ err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
488
+ });
489
+ }
490
+ }
491
+ return fs2;
492
+ }
493
+ function enqueue(elem) {
494
+ debug("ENQUEUE", elem[0].name, elem[1]), fs[gracefulQueue].push(elem), retry();
495
+ }
496
+ var retryTimer;
497
+ function resetQueue() {
498
+ for (var now = Date.now(), i = 0; i < fs[gracefulQueue].length; ++i)
499
+ fs[gracefulQueue][i].length > 2 && (fs[gracefulQueue][i][3] = now, fs[gracefulQueue][i][4] = now);
500
+ retry();
501
+ }
502
+ function retry() {
503
+ if (clearTimeout(retryTimer), retryTimer = void 0, fs[gracefulQueue].length !== 0) {
504
+ var elem = fs[gracefulQueue].shift(), fn = elem[0], args = elem[1], err = elem[2], startTime = elem[3], lastTime = elem[4];
505
+ if (startTime === void 0)
506
+ debug("RETRY", fn.name, args), fn.apply(null, args);
507
+ else if (Date.now() - startTime >= 6e4) {
508
+ debug("TIMEOUT", fn.name, args);
509
+ var cb = args.pop();
510
+ typeof cb == "function" && cb.call(null, err);
511
+ } else {
512
+ var sinceAttempt = Date.now() - lastTime, sinceStart = Math.max(lastTime - startTime, 1), desiredDelay = Math.min(sinceStart * 1.2, 100);
513
+ sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) : fs[gracefulQueue].push(elem);
514
+ }
515
+ retryTimer === void 0 && (retryTimer = setTimeout(retry, 0));
516
+ }
517
+ }
518
+ }
519
+ });
520
+
521
+ export {
522
+ require_graceful_fs
523
+ };
524
+ //# sourceMappingURL=chunk-XVNW332R.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  platformAndArch
3
- } from "./chunk-KDNBKIH4.js";
3
+ } from "./chunk-WBQF4CSV.js";
4
4
  import {
5
5
  getPackageManager,
6
6
  packageManagerFromUserAgent
7
- } from "./chunk-3XYIOBQ2.js";
7
+ } from "./chunk-LLSRDN3T.js";
8
8
  import {
9
9
  addPublicMetadata,
10
10
  addSensitiveMetadata,
@@ -12,13 +12,13 @@ import {
12
12
  cloudEnvironment,
13
13
  currentProcessIsGlobal,
14
14
  macAddress
15
- } from "./chunk-WR7YKB6H.js";
15
+ } from "./chunk-4OD45DDO.js";
16
16
  import {
17
17
  cwd
18
- } from "./chunk-Z65QJ5D7.js";
18
+ } from "./chunk-4DRC2PSU.js";
19
19
  import {
20
20
  init_cjs_shims
21
- } from "./chunk-ZPL24Y2D.js";
21
+ } from "./chunk-POZ5MGPT.js";
22
22
 
23
23
  // ../cli-kit/src/private/node/analytics.ts
24
24
  init_cjs_shims();
@@ -38,21 +38,15 @@ async function startAnalytics({
38
38
  commandClass
39
39
  }) {
40
40
  let startCommand = commandContent.command;
41
- if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsNameOverride")) {
42
- startCommand = commandClass.analyticsNameOverride() ?? commandContent.command;
43
- }
41
+ commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsNameOverride") && (startCommand = commandClass.analyticsNameOverride() ?? commandContent.command);
44
42
  let pluginName = commandClass?.plugin?.name;
45
- if (commandClass && "customPluginName" in commandClass) {
46
- pluginName = commandClass.customPluginName;
47
- }
48
- await addSensitiveMetadata(() => ({
43
+ commandClass && "customPluginName" in commandClass && (pluginName = commandClass.customPluginName), await addSensitiveMetadata(() => ({
49
44
  commandStartOptions: {
50
45
  startTime: currentTime,
51
46
  startCommand,
52
47
  startArgs: args
53
48
  }
54
- }));
55
- await addPublicMetadata(() => ({
49
+ })), await addPublicMetadata(() => ({
56
50
  cmd_all_launcher: packageManagerFromUserAgent(),
57
51
  cmd_all_alias_used: commandContent.alias,
58
52
  cmd_all_topic: commandContent.topic,
@@ -61,10 +55,7 @@ async function startAnalytics({
61
55
  }));
62
56
  }
63
57
  async function getEnvironmentData(config) {
64
- const ciplatform = ciPlatform();
65
- const pluginNames = getPluginNames(config);
66
- const shopifyPlugins = pluginNames.filter((plugin) => plugin.startsWith("@shopify/"));
67
- const { platform, arch } = platformAndArch();
58
+ let ciplatform = ciPlatform(), pluginNames = getPluginNames(config), shopifyPlugins = pluginNames.filter((plugin) => plugin.startsWith("@shopify/")), { platform, arch } = platformAndArch();
68
59
  return {
69
60
  uname: `${platform} ${arch}`,
70
61
  env_ci: ciplatform.isCI,
@@ -85,13 +76,12 @@ async function getSensitiveEnvironmentData(config) {
85
76
  };
86
77
  }
87
78
  function getPluginNames(config) {
88
- const pluginNames = [...config.plugins.keys()];
89
- return pluginNames.sort().filter((plugin) => !plugin.startsWith("@oclif/"));
79
+ return [...config.plugins.keys()].sort().filter((plugin) => !plugin.startsWith("@oclif/"));
90
80
  }
91
81
  function flagIncluded(flag, commandClass) {
92
82
  if (!commandClass)
93
- return false;
94
- const commandFlags = commandClass.flags ?? {};
83
+ return !1;
84
+ let commandFlags = commandClass.flags ?? {};
95
85
  return Object.keys(commandFlags).includes(flag);
96
86
  }
97
87
 
@@ -101,4 +91,4 @@ export {
101
91
  getEnvironmentData,
102
92
  getSensitiveEnvironmentData
103
93
  };
104
- //# sourceMappingURL=chunk-YB6D4XQ7.js.map
94
+ //# sourceMappingURL=chunk-Y4ECGRAF.js.map