@shopify/cli 3.61.2 → 3.62.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 (197) hide show
  1. package/dist/assets/dev-console/extensions/dev-console/assets/index-dfaab2a5.css +1 -0
  2. package/dist/assets/dev-console/extensions/dev-console/assets/{index-f3e60690.js → index-e3682a83.js} +1 -1
  3. package/dist/assets/dev-console/index.html +2 -2
  4. package/dist/{chokidar-RFZXZKRQ.js → chokidar-5MKSECYV.js} +4 -3
  5. package/dist/{chunk-QDZF6IG4.js → chunk-22PYIFA2.js} +112 -17
  6. package/dist/{chunk-3MBQVTEX.js → chunk-2QVJZ5TG.js} +2 -1
  7. package/dist/{chunk-KBXWK6XB.js → chunk-2ZSNH7CD.js} +4 -5
  8. package/dist/{chunk-BYFLATOA.js → chunk-5FNE3T7E.js} +5 -4
  9. package/dist/{chunk-G4EQLT5B.js → chunk-5X4QXYEZ.js} +9 -7
  10. package/dist/chunk-66NABVCG.js +73 -0
  11. package/dist/{chunk-LAY4AEXX.js → chunk-6UDFXWNE.js} +2 -1
  12. package/dist/{chunk-QQP6JS5H.js → chunk-7MXLRMOY.js} +3 -2
  13. package/dist/{chunk-EHF6FVWH.js → chunk-A5STII7T.js} +3 -2
  14. package/dist/{chunk-UPM6XNBH.js → chunk-ADESJ2KG.js} +6 -5
  15. package/dist/{chunk-BZJX2NV6.js → chunk-AMAYT2P2.js} +3 -2
  16. package/dist/{chunk-QTBH3GO6.js → chunk-B62HZLMM.js} +3 -2
  17. package/dist/{chunk-3RM5SOXY.js → chunk-BMTG2VHL.js} +4 -3
  18. package/dist/{chunk-FWGRGI4R.js → chunk-BYC3NA2Y.js} +2 -1
  19. package/dist/{chunk-NJTSDTDU.js → chunk-BZFXXFUC.js} +6 -5
  20. package/dist/{chunk-7IZTLXJ5.js → chunk-CKFE55FX.js} +4 -3
  21. package/dist/{chunk-YP5UVIUW.js → chunk-CYQRKZVM.js} +6 -5
  22. package/dist/{chunk-HTYJDJRZ.js → chunk-DL3MKXVR.js} +2 -1
  23. package/dist/{chunk-IUHH3PST.js → chunk-DLK3F3DC.js} +2 -1
  24. package/dist/{chunk-4XNS74OG.js → chunk-EARPFFS7.js} +2 -1
  25. package/dist/chunk-EQPYUHNM.js +3642 -0
  26. package/dist/{chunk-LKGDG6WW.js → chunk-FMKVOTQK.js} +2 -1
  27. package/dist/{chunk-I434ZJQI.js → chunk-GEN4RXTD.js} +7 -6
  28. package/dist/{chunk-QSO3GQEK.js → chunk-HJ4AUFE7.js} +94 -160
  29. package/dist/{chunk-FQIRJADJ.js → chunk-JIJ65JT6.js} +2 -1
  30. package/dist/{chunk-JQPQJN44.js → chunk-JKYNFUD3.js} +11 -12
  31. package/dist/{chunk-4L37JOS5.js → chunk-JL3ESOD2.js} +3 -2
  32. package/dist/{chunk-4TTAP7NN.js → chunk-JOOYCYFU.js} +6 -5
  33. package/dist/{chunk-XMJDBJPP.js → chunk-K3GG6Y3J.js} +12 -12
  34. package/dist/{chunk-VQZ2SHRY.js → chunk-K6257PKA.js} +3 -2
  35. package/dist/{chunk-5KRK4DLX.js → chunk-LC6MEJT3.js} +4 -3
  36. package/dist/{chunk-KDOLMUJB.js → chunk-LH533WG4.js} +2 -1
  37. package/dist/{chunk-FBB6KUZG.js → chunk-LSCXQWNO.js} +2 -1
  38. package/dist/{chunk-VC6CC75R.js → chunk-MG6QFKFM.js} +5 -4
  39. package/dist/{chunk-ETSILRIY.js → chunk-MQ2RGCDU.js} +5 -4
  40. package/dist/{chunk-QOHDW3X5.js → chunk-MQGV3PCJ.js} +4 -3
  41. package/dist/{chunk-PBFWVFAQ.js → chunk-NABCTJNW.js} +3 -2
  42. package/dist/{chunk-YZGLFVKK.js → chunk-NNASIYCT.js} +3 -2
  43. package/dist/chunk-PIB2FEJJ.js +4385 -0
  44. package/dist/{chunk-TXXQWILO.js → chunk-PIVNWN2P.js} +4 -3
  45. package/dist/{chunk-Q3KADKQA.js → chunk-PO6SEYU4.js} +4 -3
  46. package/dist/{chunk-FAFQQMD4.js → chunk-PRJ3U7MR.js} +2 -1
  47. package/dist/{chunk-5B2D56W6.js → chunk-Q4XGXPUG.js} +2 -1
  48. package/dist/{chunk-ZE2ZPLYI.js → chunk-QGJLRFY4.js} +19 -89
  49. package/dist/{chunk-RP2ISWQN.js → chunk-QOUOFEGO.js} +3 -2
  50. package/dist/{chunk-CWYZA7C7.js → chunk-RUSG4O2Z.js} +13464 -5175
  51. package/dist/{chunk-CKKROMZF.js → chunk-S4VBXFXP.js} +3 -2
  52. package/dist/{chunk-BE73NZXB.js → chunk-SAR5HGRG.js} +2 -1
  53. package/dist/{chunk-GXPKATXW.js → chunk-T5LLJYYS.js} +2 -1
  54. package/dist/{chunk-NBIE3DNN.js → chunk-TCRWMUKX.js} +4 -3
  55. package/dist/{chunk-4757GPBG.js → chunk-UACSLX64.js} +6 -5
  56. package/dist/{chunk-4KKFUTH7.js → chunk-UJ3QKFA5.js} +2 -1
  57. package/dist/chunk-UNPXLODI.js +121 -0
  58. package/dist/{chunk-RQ24VTW4.js → chunk-VM4POVNV.js} +2 -1
  59. package/dist/{chunk-CTETXMMM.js → chunk-VS6RWOLM.js} +8 -7
  60. package/dist/{chunk-BUWM6JUU.js → chunk-W5VEUSWG.js} +5 -4
  61. package/dist/{chunk-PCQFWMMD.js → chunk-WADS2TV5.js} +63 -5
  62. package/dist/{chunk-M73YMW2C.js → chunk-WAEWSGBK.js} +2579 -1632
  63. package/dist/{chunk-6SL33DOA.js → chunk-XQFDS44U.js} +2 -1
  64. package/dist/{chunk-WCNR75S2.js → chunk-YC4FLMDD.js} +2 -1
  65. package/dist/{chunk-OXZ2SRCK.js → chunk-YECNACSF.js} +3 -2
  66. package/dist/{chunk-QLLSCNEC.js → chunk-YX5VXHSJ.js} +4 -3
  67. package/dist/{chunk-5MODHNUE.js → chunk-ZCMXEGSE.js} +5 -4
  68. package/dist/{chunk-4VEOJ5JD.js → chunk-ZEHQN47F.js} +2 -1
  69. package/dist/{chunk-3JLUTHGR.js → chunk-ZPFJOUKZ.js} +2 -1
  70. package/dist/{chunk-M63RTPGR.js → chunk-ZPL24Y2D.js} +1 -0
  71. package/dist/cli/commands/auth/logout.js +37 -39
  72. package/dist/cli/commands/auth/logout.test.js +39 -41
  73. package/dist/cli/commands/debug/command-flags.js +33 -35
  74. package/dist/cli/commands/demo/catalog.js +36 -38
  75. package/dist/cli/commands/demo/generate-file.js +37 -39
  76. package/dist/cli/commands/demo/index.js +35 -37
  77. package/dist/cli/commands/demo/print-ai-prompt.js +37 -39
  78. package/dist/cli/commands/docs/generate.js +33 -35
  79. package/dist/cli/commands/docs/generate.test.js +34 -36
  80. package/dist/cli/commands/help.js +33 -35
  81. package/dist/cli/commands/kitchen-sink/async.js +34 -36
  82. package/dist/cli/commands/kitchen-sink/async.test.js +35 -37
  83. package/dist/cli/commands/kitchen-sink/index.js +36 -38
  84. package/dist/cli/commands/kitchen-sink/index.test.js +37 -39
  85. package/dist/cli/commands/kitchen-sink/prompts.js +34 -36
  86. package/dist/cli/commands/kitchen-sink/prompts.test.js +35 -37
  87. package/dist/cli/commands/kitchen-sink/static.js +34 -36
  88. package/dist/cli/commands/kitchen-sink/static.test.js +35 -37
  89. package/dist/cli/commands/search.js +34 -36
  90. package/dist/cli/commands/upgrade.js +33 -35
  91. package/dist/cli/commands/upgrade.test.js +5 -4
  92. package/dist/cli/commands/version.js +34 -36
  93. package/dist/cli/commands/version.test.js +35 -37
  94. package/dist/cli/services/commands/search.js +19 -21
  95. package/dist/cli/services/commands/search.test.js +20 -22
  96. package/dist/cli/services/commands/version.js +23 -25
  97. package/dist/cli/services/commands/version.test.js +25 -27
  98. package/dist/cli/services/demo.js +21 -23
  99. package/dist/cli/services/demo.test.js +22 -24
  100. package/dist/cli/services/kitchen-sink/async.js +19 -21
  101. package/dist/cli/services/kitchen-sink/prompts.js +19 -21
  102. package/dist/cli/services/kitchen-sink/static.js +19 -21
  103. package/dist/cli/services/upgrade.js +22 -24
  104. package/dist/cli/services/upgrade.test.js +30 -27
  105. package/dist/{constants-XCWOF7M7.js → constants-3CLHB4LQ.js} +5 -6
  106. package/dist/{custom-oclif-loader-4SQGUQ7D-P5C4NLSX.js → custom-oclif-loader-ZH42ZTTC.js} +25 -28
  107. package/dist/{del-DGT5RCOW.js → del-KSMMBLCD.js} +9 -8
  108. package/dist/{devtools-SJTLOVKU.js → devtools-6ZZ3EAY7.js} +3 -2
  109. package/dist/error-handler-I6WJC3U2.js +43 -0
  110. package/dist/error-handler-JFX2TIYX.js +38 -0
  111. package/dist/hooks/postrun.js +28 -30
  112. package/dist/hooks/prerun.js +23 -25
  113. package/dist/{http-proxy-WYSSUHIT.js → http-proxy-KFHAZRTT.js} +3 -2
  114. package/dist/index.js +138858 -143506
  115. package/dist/lib-E7NFRKVR.js +14 -0
  116. package/dist/{lib-RZNRJEWB.js → lib-LY6ZCPIO.js} +2 -1
  117. package/dist/{lib-AAMRQUES.js → lib-MUDJYT6A.js} +4 -3
  118. package/dist/{local-YKOG4EUR-XRRBWLSI.js → local-QXPV4RF5.js} +18 -14
  119. package/dist/{magic-string.es-6DE547FE.js → magic-string.es-ATGURXGQ.js} +2 -1
  120. package/dist/{morph-DCIZUK2Q.js → morph-WKKSW22O.js} +6 -5
  121. package/dist/{multipart-parser-ENLY4BKU.js → multipart-parser-KYOHF24X.js} +3 -2
  122. package/dist/{node-3DKQAOFU.js → node-5XXX7TNJ.js} +30 -29
  123. package/dist/{node-package-manager-HYTHPJBI.js → node-package-manager-O65VOP6W.js} +23 -23
  124. package/dist/{npa-AYOTDW63.js → npa-L2ZRSPZ2.js} +4 -3
  125. package/dist/{open-B7XFJJCK.js → open-JRS7RW22.js} +3 -2
  126. package/dist/out-AS7GH6TC.js +7 -0
  127. package/dist/{path-2NNC3QGW.js → path-JVVXOELJ.js} +10 -6
  128. package/dist/{source-map-V6UVDDPX.js → source-map-37TX6JEW.js} +2 -1
  129. package/dist/system-EEQBTJMJ.js +31 -0
  130. package/dist/tsconfig.tsbuildinfo +1 -1
  131. package/dist/{ui-5LSDG3C5.js → ui-3BAHGNCQ.js} +20 -20
  132. package/dist/{workerd-TFH7T6NI.js → workerd-WR22YQIS.js} +29 -28
  133. package/oclif.manifest.json +108 -93
  134. package/package.json +15 -5
  135. package/dist/assets/dev-console/extensions/dev-console/assets/index-792a0c8d.css +0 -1
  136. package/dist/chunk-3LWRRBH5.js +0 -75
  137. package/dist/chunk-3PIGYQSE.js +0 -36
  138. package/dist/chunk-CK7MF3LY.js +0 -28803
  139. package/dist/chunk-J4I3URIN.js +0 -893
  140. package/dist/chunk-MHMFNQE3.js +0 -76
  141. package/dist/chunk-MXHK26B3.js +0 -89
  142. package/dist/chunk-NJP5GFNN.js +0 -29224
  143. package/dist/chunk-OC4AY5G7.js +0 -11936
  144. package/dist/chunk-OQBI57X3.js +0 -22
  145. package/dist/chunk-RPRKZ6JC.js +0 -53861
  146. package/dist/chunk-RTZHOWFC.js +0 -5485
  147. package/dist/chunk-SZQX5J7X.js +0 -64
  148. package/dist/chunk-T77LT3XG.js +0 -4743
  149. package/dist/chunk-UV4APOMB.js +0 -273
  150. package/dist/chunk-VF4VWJWS.js +0 -213222
  151. package/dist/chunk-WZBNLCJ5.js +0 -13452
  152. package/dist/chunk-YWPV7MV2.js +0 -16432
  153. package/dist/chunk-ZLGRKPW3.js +0 -68
  154. package/dist/chunk-ZZGXXS5X.js +0 -819
  155. package/dist/cli/commands/auth/logout.js.map +0 -1
  156. package/dist/cli/commands/debug/command-flags.js.map +0 -1
  157. package/dist/cli/commands/demo/catalog.js.map +0 -1
  158. package/dist/cli/commands/demo/generate-file.js.map +0 -1
  159. package/dist/cli/commands/demo/index.js.map +0 -1
  160. package/dist/cli/commands/demo/print-ai-prompt.js.map +0 -1
  161. package/dist/cli/commands/docs/generate.js.map +0 -1
  162. package/dist/cli/commands/help.js.map +0 -1
  163. package/dist/cli/commands/kitchen-sink/async.js.map +0 -1
  164. package/dist/cli/commands/kitchen-sink/index.js.map +0 -1
  165. package/dist/cli/commands/kitchen-sink/prompts.js.map +0 -1
  166. package/dist/cli/commands/kitchen-sink/static.js.map +0 -1
  167. package/dist/cli/commands/search.js.map +0 -1
  168. package/dist/cli/commands/upgrade.js.map +0 -1
  169. package/dist/cli/commands/version.js.map +0 -1
  170. package/dist/cli/services/commands/search.js.map +0 -1
  171. package/dist/cli/services/commands/version.js.map +0 -1
  172. package/dist/cli/services/demo.js.map +0 -1
  173. package/dist/cli/services/kitchen-sink/async.js.map +0 -1
  174. package/dist/cli/services/kitchen-sink/prompts.js.map +0 -1
  175. package/dist/cli/services/kitchen-sink/static.js.map +0 -1
  176. package/dist/cli/services/upgrade.js.map +0 -1
  177. package/dist/custom-oclif-loader-OD47SFAU.js +0 -92
  178. package/dist/del-ICEHOC6W-GYLFYUKX.js +0 -2817
  179. package/dist/devtools-6HZ2IPFU-GLFJP63E.js +0 -3557
  180. package/dist/devtools-IHJDLLT4.js +0 -77
  181. package/dist/error-handler-EPMFPTYX.js +0 -37
  182. package/dist/error-handler-WI4YVJIS-U3BMMYNJ.js +0 -31
  183. package/dist/error-handler-WL3Q25NI.js +0 -45
  184. package/dist/hooks/postrun.js.map +0 -1
  185. package/dist/hooks/prerun.js.map +0 -1
  186. package/dist/index.js.map +0 -1
  187. package/dist/lib-76RCE6WZ-5IYGTKKK.js +0 -17
  188. package/dist/lib-UYK3ZLZK.js +0 -13
  189. package/dist/local-KISH2IRF.js +0 -67
  190. package/dist/multipart-parser-ENLY4BKU-IUS26CJU.js +0 -363
  191. package/dist/node-package-manager-S7TSAUJZ-KKDY6KSF.js +0 -70
  192. package/dist/open-B7XFJJCK-4XEFFVL7.js +0 -295
  193. package/dist/out-LRIJ35RZ.js +0 -6
  194. package/dist/out-M5MRQZP5-YHIOILKU.js +0 -14
  195. package/dist/path-HO4HBKK5-4Q2BBYUA.js +0 -33
  196. package/dist/system-LIP7AECY.js +0 -33
  197. package/dist/ui-FUZYK6S3-PVVDPVD5.js +0 -51
@@ -1,819 +0,0 @@
1
- import {
2
- __commonJS,
3
- __require,
4
- init_cjs_shims as init_cjs_shims2
5
- } from "./chunk-ZLGRKPW3.js";
6
- import {
7
- init_cjs_shims
8
- } from "./chunk-M63RTPGR.js";
9
-
10
- // ../create-app/dist/chunk-FBB6KUZG.js
11
- init_cjs_shims();
12
- var require_polyfills = __commonJS({
13
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
14
- init_cjs_shims2();
15
- var constants = __require("constants");
16
- var origCwd = process.cwd;
17
- var cwd = null;
18
- var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
19
- process.cwd = function() {
20
- if (!cwd)
21
- cwd = origCwd.call(process);
22
- return cwd;
23
- };
24
- try {
25
- process.cwd();
26
- } catch (er) {
27
- }
28
- if (typeof process.chdir === "function") {
29
- chdir = process.chdir;
30
- process.chdir = function(d) {
31
- cwd = null;
32
- chdir.call(process, d);
33
- };
34
- if (Object.setPrototypeOf)
35
- Object.setPrototypeOf(process.chdir, chdir);
36
- }
37
- var chdir;
38
- module.exports = patch;
39
- function patch(fs) {
40
- if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
41
- patchLchmod(fs);
42
- }
43
- if (!fs.lutimes) {
44
- patchLutimes(fs);
45
- }
46
- fs.chown = chownFix(fs.chown);
47
- fs.fchown = chownFix(fs.fchown);
48
- fs.lchown = chownFix(fs.lchown);
49
- fs.chmod = chmodFix(fs.chmod);
50
- fs.fchmod = chmodFix(fs.fchmod);
51
- fs.lchmod = chmodFix(fs.lchmod);
52
- fs.chownSync = chownFixSync(fs.chownSync);
53
- fs.fchownSync = chownFixSync(fs.fchownSync);
54
- fs.lchownSync = chownFixSync(fs.lchownSync);
55
- fs.chmodSync = chmodFixSync(fs.chmodSync);
56
- fs.fchmodSync = chmodFixSync(fs.fchmodSync);
57
- fs.lchmodSync = chmodFixSync(fs.lchmodSync);
58
- fs.stat = statFix(fs.stat);
59
- fs.fstat = statFix(fs.fstat);
60
- fs.lstat = statFix(fs.lstat);
61
- fs.statSync = statFixSync(fs.statSync);
62
- fs.fstatSync = statFixSync(fs.fstatSync);
63
- fs.lstatSync = statFixSync(fs.lstatSync);
64
- if (fs.chmod && !fs.lchmod) {
65
- fs.lchmod = function(path, mode, cb) {
66
- if (cb)
67
- process.nextTick(cb);
68
- };
69
- fs.lchmodSync = function() {
70
- };
71
- }
72
- if (fs.chown && !fs.lchown) {
73
- fs.lchown = function(path, uid, gid, cb) {
74
- if (cb)
75
- process.nextTick(cb);
76
- };
77
- fs.lchownSync = function() {
78
- };
79
- }
80
- if (platform === "win32") {
81
- fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
82
- function rename(from, to, cb) {
83
- var start = Date.now();
84
- var backoff = 0;
85
- fs$rename(from, to, function CB(er) {
86
- if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
87
- setTimeout(function() {
88
- fs.stat(to, function(stater, st) {
89
- if (stater && stater.code === "ENOENT")
90
- fs$rename(from, to, CB);
91
- else
92
- cb(er);
93
- });
94
- }, backoff);
95
- if (backoff < 100)
96
- backoff += 10;
97
- return;
98
- }
99
- if (cb)
100
- cb(er);
101
- });
102
- }
103
- if (Object.setPrototypeOf)
104
- Object.setPrototypeOf(rename, fs$rename);
105
- return rename;
106
- }(fs.rename);
107
- }
108
- fs.read = typeof fs.read !== "function" ? fs.read : function(fs$read) {
109
- function read(fd, buffer, offset, length, position, callback_) {
110
- var callback;
111
- if (callback_ && typeof callback_ === "function") {
112
- var eagCounter = 0;
113
- callback = function(er, _, __) {
114
- if (er && er.code === "EAGAIN" && eagCounter < 10) {
115
- eagCounter++;
116
- return fs$read.call(fs, fd, buffer, offset, length, position, callback);
117
- }
118
- callback_.apply(this, arguments);
119
- };
120
- }
121
- return fs$read.call(fs, fd, buffer, offset, length, position, callback);
122
- }
123
- if (Object.setPrototypeOf)
124
- Object.setPrototypeOf(read, fs$read);
125
- return read;
126
- }(fs.read);
127
- fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ function(fs$readSync) {
128
- return function(fd, buffer, offset, length, position) {
129
- var eagCounter = 0;
130
- while (true) {
131
- try {
132
- return fs$readSync.call(fs, fd, buffer, offset, length, position);
133
- } catch (er) {
134
- if (er.code === "EAGAIN" && eagCounter < 10) {
135
- eagCounter++;
136
- continue;
137
- }
138
- throw er;
139
- }
140
- }
141
- };
142
- }(fs.readSync);
143
- function patchLchmod(fs2) {
144
- fs2.lchmod = function(path, mode, callback) {
145
- fs2.open(
146
- path,
147
- constants.O_WRONLY | constants.O_SYMLINK,
148
- mode,
149
- function(err, fd) {
150
- if (err) {
151
- if (callback)
152
- callback(err);
153
- return;
154
- }
155
- fs2.fchmod(fd, mode, function(err2) {
156
- fs2.close(fd, function(err22) {
157
- if (callback)
158
- callback(err2 || err22);
159
- });
160
- });
161
- }
162
- );
163
- };
164
- fs2.lchmodSync = function(path, mode) {
165
- var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
166
- var threw = true;
167
- var ret;
168
- try {
169
- ret = fs2.fchmodSync(fd, mode);
170
- threw = false;
171
- } finally {
172
- if (threw) {
173
- try {
174
- fs2.closeSync(fd);
175
- } catch (er) {
176
- }
177
- } else {
178
- fs2.closeSync(fd);
179
- }
180
- }
181
- return ret;
182
- };
183
- }
184
- function patchLutimes(fs2) {
185
- if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
186
- fs2.lutimes = function(path, at, mt, cb) {
187
- fs2.open(path, constants.O_SYMLINK, function(er, fd) {
188
- if (er) {
189
- if (cb)
190
- cb(er);
191
- return;
192
- }
193
- fs2.futimes(fd, at, mt, function(er2) {
194
- fs2.close(fd, function(er22) {
195
- if (cb)
196
- cb(er2 || er22);
197
- });
198
- });
199
- });
200
- };
201
- fs2.lutimesSync = function(path, at, mt) {
202
- var fd = fs2.openSync(path, constants.O_SYMLINK);
203
- var ret;
204
- var threw = true;
205
- try {
206
- ret = fs2.futimesSync(fd, at, mt);
207
- threw = false;
208
- } finally {
209
- if (threw) {
210
- try {
211
- fs2.closeSync(fd);
212
- } catch (er) {
213
- }
214
- } else {
215
- fs2.closeSync(fd);
216
- }
217
- }
218
- return ret;
219
- };
220
- } else if (fs2.futimes) {
221
- fs2.lutimes = function(_a, _b, _c, cb) {
222
- if (cb)
223
- process.nextTick(cb);
224
- };
225
- fs2.lutimesSync = function() {
226
- };
227
- }
228
- }
229
- function chmodFix(orig) {
230
- if (!orig)
231
- return orig;
232
- return function(target, mode, cb) {
233
- return orig.call(fs, target, mode, function(er) {
234
- if (chownErOk(er))
235
- er = null;
236
- if (cb)
237
- cb.apply(this, arguments);
238
- });
239
- };
240
- }
241
- function chmodFixSync(orig) {
242
- if (!orig)
243
- return orig;
244
- return function(target, mode) {
245
- try {
246
- return orig.call(fs, target, mode);
247
- } catch (er) {
248
- if (!chownErOk(er))
249
- throw er;
250
- }
251
- };
252
- }
253
- function chownFix(orig) {
254
- if (!orig)
255
- return orig;
256
- return function(target, uid, gid, cb) {
257
- return orig.call(fs, target, uid, gid, function(er) {
258
- if (chownErOk(er))
259
- er = null;
260
- if (cb)
261
- cb.apply(this, arguments);
262
- });
263
- };
264
- }
265
- function chownFixSync(orig) {
266
- if (!orig)
267
- return orig;
268
- return function(target, uid, gid) {
269
- try {
270
- return orig.call(fs, target, uid, gid);
271
- } catch (er) {
272
- if (!chownErOk(er))
273
- throw er;
274
- }
275
- };
276
- }
277
- function statFix(orig) {
278
- if (!orig)
279
- return orig;
280
- return function(target, options, cb) {
281
- if (typeof options === "function") {
282
- cb = options;
283
- options = null;
284
- }
285
- function callback(er, stats) {
286
- if (stats) {
287
- if (stats.uid < 0)
288
- stats.uid += 4294967296;
289
- if (stats.gid < 0)
290
- stats.gid += 4294967296;
291
- }
292
- if (cb)
293
- cb.apply(this, arguments);
294
- }
295
- return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
296
- };
297
- }
298
- function statFixSync(orig) {
299
- if (!orig)
300
- return orig;
301
- return function(target, options) {
302
- var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
303
- if (stats) {
304
- if (stats.uid < 0)
305
- stats.uid += 4294967296;
306
- if (stats.gid < 0)
307
- stats.gid += 4294967296;
308
- }
309
- return stats;
310
- };
311
- }
312
- function chownErOk(er) {
313
- if (!er)
314
- return true;
315
- if (er.code === "ENOSYS")
316
- return true;
317
- var nonroot = !process.getuid || process.getuid() !== 0;
318
- if (nonroot) {
319
- if (er.code === "EINVAL" || er.code === "EPERM")
320
- return true;
321
- }
322
- return false;
323
- }
324
- }
325
- }
326
- });
327
- var require_legacy_streams = __commonJS({
328
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
329
- init_cjs_shims2();
330
- var Stream = __require("stream").Stream;
331
- module.exports = legacy;
332
- function legacy(fs) {
333
- return {
334
- ReadStream,
335
- WriteStream
336
- };
337
- function ReadStream(path, options) {
338
- if (!(this instanceof ReadStream))
339
- return new ReadStream(path, options);
340
- Stream.call(this);
341
- var self = this;
342
- this.path = path;
343
- this.fd = null;
344
- this.readable = true;
345
- this.paused = false;
346
- this.flags = "r";
347
- this.mode = 438;
348
- this.bufferSize = 64 * 1024;
349
- options = options || {};
350
- var keys = Object.keys(options);
351
- for (var index = 0, length = keys.length; index < length; index++) {
352
- var key = keys[index];
353
- this[key] = options[key];
354
- }
355
- if (this.encoding)
356
- this.setEncoding(this.encoding);
357
- if (this.start !== void 0) {
358
- if ("number" !== typeof this.start) {
359
- throw TypeError("start must be a Number");
360
- }
361
- if (this.end === void 0) {
362
- this.end = Infinity;
363
- } else if ("number" !== typeof this.end) {
364
- throw TypeError("end must be a Number");
365
- }
366
- if (this.start > this.end) {
367
- throw new Error("start must be <= end");
368
- }
369
- this.pos = this.start;
370
- }
371
- if (this.fd !== null) {
372
- process.nextTick(function() {
373
- self._read();
374
- });
375
- return;
376
- }
377
- fs.open(this.path, this.flags, this.mode, function(err, fd) {
378
- if (err) {
379
- self.emit("error", err);
380
- self.readable = false;
381
- return;
382
- }
383
- self.fd = fd;
384
- self.emit("open", fd);
385
- self._read();
386
- });
387
- }
388
- function WriteStream(path, options) {
389
- if (!(this instanceof WriteStream))
390
- return new WriteStream(path, options);
391
- Stream.call(this);
392
- this.path = path;
393
- this.fd = null;
394
- this.writable = true;
395
- this.flags = "w";
396
- this.encoding = "binary";
397
- this.mode = 438;
398
- this.bytesWritten = 0;
399
- options = options || {};
400
- var keys = Object.keys(options);
401
- for (var index = 0, length = keys.length; index < length; index++) {
402
- var key = keys[index];
403
- this[key] = options[key];
404
- }
405
- if (this.start !== void 0) {
406
- if ("number" !== typeof this.start) {
407
- throw TypeError("start must be a Number");
408
- }
409
- if (this.start < 0) {
410
- throw new Error("start must be >= zero");
411
- }
412
- this.pos = this.start;
413
- }
414
- this.busy = false;
415
- this._queue = [];
416
- if (this.fd === null) {
417
- this._open = fs.open;
418
- this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
419
- this.flush();
420
- }
421
- }
422
- }
423
- }
424
- });
425
- var require_clone = __commonJS({
426
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
427
- "use strict";
428
- init_cjs_shims2();
429
- module.exports = clone;
430
- var getPrototypeOf = Object.getPrototypeOf || function(obj) {
431
- return obj.__proto__;
432
- };
433
- function clone(obj) {
434
- if (obj === null || typeof obj !== "object")
435
- return obj;
436
- if (obj instanceof Object)
437
- var copy = { __proto__: getPrototypeOf(obj) };
438
- else
439
- var copy = /* @__PURE__ */ Object.create(null);
440
- Object.getOwnPropertyNames(obj).forEach(function(key) {
441
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
442
- });
443
- return copy;
444
- }
445
- }
446
- });
447
- var require_graceful_fs = __commonJS({
448
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
449
- init_cjs_shims2();
450
- var fs = __require("fs");
451
- var polyfills = require_polyfills();
452
- var legacy = require_legacy_streams();
453
- var clone = require_clone();
454
- var util = __require("util");
455
- var gracefulQueue;
456
- var previousSymbol;
457
- if (typeof Symbol === "function" && typeof Symbol.for === "function") {
458
- gracefulQueue = Symbol.for("graceful-fs.queue");
459
- previousSymbol = Symbol.for("graceful-fs.previous");
460
- } else {
461
- gracefulQueue = "___graceful-fs.queue";
462
- previousSymbol = "___graceful-fs.previous";
463
- }
464
- function noop() {
465
- }
466
- function publishQueue(context, queue2) {
467
- Object.defineProperty(context, gracefulQueue, {
468
- get: function() {
469
- return queue2;
470
- }
471
- });
472
- }
473
- var debug = noop;
474
- if (util.debuglog)
475
- debug = util.debuglog("gfs4");
476
- else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
477
- debug = function() {
478
- var m = util.format.apply(util, arguments);
479
- m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
480
- console.error(m);
481
- };
482
- if (!fs[gracefulQueue]) {
483
- queue = global[gracefulQueue] || [];
484
- publishQueue(fs, queue);
485
- fs.close = function(fs$close) {
486
- function close(fd, cb) {
487
- return fs$close.call(fs, fd, function(err) {
488
- if (!err) {
489
- resetQueue();
490
- }
491
- if (typeof cb === "function")
492
- cb.apply(this, arguments);
493
- });
494
- }
495
- Object.defineProperty(close, previousSymbol, {
496
- value: fs$close
497
- });
498
- return close;
499
- }(fs.close);
500
- fs.closeSync = function(fs$closeSync) {
501
- function closeSync(fd) {
502
- fs$closeSync.apply(fs, arguments);
503
- resetQueue();
504
- }
505
- Object.defineProperty(closeSync, previousSymbol, {
506
- value: fs$closeSync
507
- });
508
- return closeSync;
509
- }(fs.closeSync);
510
- if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
511
- process.on("exit", function() {
512
- debug(fs[gracefulQueue]);
513
- __require("assert").equal(fs[gracefulQueue].length, 0);
514
- });
515
- }
516
- }
517
- var queue;
518
- if (!global[gracefulQueue]) {
519
- publishQueue(global, fs[gracefulQueue]);
520
- }
521
- module.exports = patch(clone(fs));
522
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
523
- module.exports = patch(fs);
524
- fs.__patched = true;
525
- }
526
- function patch(fs2) {
527
- polyfills(fs2);
528
- fs2.gracefulify = patch;
529
- fs2.createReadStream = createReadStream;
530
- fs2.createWriteStream = createWriteStream;
531
- var fs$readFile = fs2.readFile;
532
- fs2.readFile = readFile;
533
- function readFile(path, options, cb) {
534
- if (typeof options === "function")
535
- cb = options, options = null;
536
- return go$readFile(path, options, cb);
537
- function go$readFile(path2, options2, cb2, startTime) {
538
- return fs$readFile(path2, options2, function(err) {
539
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
540
- enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
541
- else {
542
- if (typeof cb2 === "function")
543
- cb2.apply(this, arguments);
544
- }
545
- });
546
- }
547
- }
548
- var fs$writeFile = fs2.writeFile;
549
- fs2.writeFile = writeFile;
550
- function writeFile(path, data, options, cb) {
551
- if (typeof options === "function")
552
- cb = options, options = null;
553
- return go$writeFile(path, data, options, cb);
554
- function go$writeFile(path2, data2, options2, cb2, startTime) {
555
- return fs$writeFile(path2, data2, options2, function(err) {
556
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
557
- enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
558
- else {
559
- if (typeof cb2 === "function")
560
- cb2.apply(this, arguments);
561
- }
562
- });
563
- }
564
- }
565
- var fs$appendFile = fs2.appendFile;
566
- if (fs$appendFile)
567
- fs2.appendFile = appendFile;
568
- function appendFile(path, data, options, cb) {
569
- if (typeof options === "function")
570
- cb = options, options = null;
571
- return go$appendFile(path, data, options, cb);
572
- function go$appendFile(path2, data2, options2, cb2, startTime) {
573
- return fs$appendFile(path2, data2, options2, function(err) {
574
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
575
- enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
576
- else {
577
- if (typeof cb2 === "function")
578
- cb2.apply(this, arguments);
579
- }
580
- });
581
- }
582
- }
583
- var fs$copyFile = fs2.copyFile;
584
- if (fs$copyFile)
585
- fs2.copyFile = copyFile;
586
- function copyFile(src, dest, flags, cb) {
587
- if (typeof flags === "function") {
588
- cb = flags;
589
- flags = 0;
590
- }
591
- return go$copyFile(src, dest, flags, cb);
592
- function go$copyFile(src2, dest2, flags2, cb2, startTime) {
593
- return fs$copyFile(src2, dest2, flags2, function(err) {
594
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
595
- enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
596
- else {
597
- if (typeof cb2 === "function")
598
- cb2.apply(this, arguments);
599
- }
600
- });
601
- }
602
- }
603
- var fs$readdir = fs2.readdir;
604
- fs2.readdir = readdir;
605
- var noReaddirOptionVersions = /^v[0-5]\./;
606
- function readdir(path, options, cb) {
607
- if (typeof options === "function")
608
- cb = options, options = null;
609
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
610
- return fs$readdir(path2, fs$readdirCallback(
611
- path2,
612
- options2,
613
- cb2,
614
- startTime
615
- ));
616
- } : function go$readdir2(path2, options2, cb2, startTime) {
617
- return fs$readdir(path2, options2, fs$readdirCallback(
618
- path2,
619
- options2,
620
- cb2,
621
- startTime
622
- ));
623
- };
624
- return go$readdir(path, options, cb);
625
- function fs$readdirCallback(path2, options2, cb2, startTime) {
626
- return function(err, files) {
627
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
628
- enqueue([
629
- go$readdir,
630
- [path2, options2, cb2],
631
- err,
632
- startTime || Date.now(),
633
- Date.now()
634
- ]);
635
- else {
636
- if (files && files.sort)
637
- files.sort();
638
- if (typeof cb2 === "function")
639
- cb2.call(this, err, files);
640
- }
641
- };
642
- }
643
- }
644
- if (process.version.substr(0, 4) === "v0.8") {
645
- var legStreams = legacy(fs2);
646
- ReadStream = legStreams.ReadStream;
647
- WriteStream = legStreams.WriteStream;
648
- }
649
- var fs$ReadStream = fs2.ReadStream;
650
- if (fs$ReadStream) {
651
- ReadStream.prototype = Object.create(fs$ReadStream.prototype);
652
- ReadStream.prototype.open = ReadStream$open;
653
- }
654
- var fs$WriteStream = fs2.WriteStream;
655
- if (fs$WriteStream) {
656
- WriteStream.prototype = Object.create(fs$WriteStream.prototype);
657
- WriteStream.prototype.open = WriteStream$open;
658
- }
659
- Object.defineProperty(fs2, "ReadStream", {
660
- get: function() {
661
- return ReadStream;
662
- },
663
- set: function(val) {
664
- ReadStream = val;
665
- },
666
- enumerable: true,
667
- configurable: true
668
- });
669
- Object.defineProperty(fs2, "WriteStream", {
670
- get: function() {
671
- return WriteStream;
672
- },
673
- set: function(val) {
674
- WriteStream = val;
675
- },
676
- enumerable: true,
677
- configurable: true
678
- });
679
- var FileReadStream = ReadStream;
680
- Object.defineProperty(fs2, "FileReadStream", {
681
- get: function() {
682
- return FileReadStream;
683
- },
684
- set: function(val) {
685
- FileReadStream = val;
686
- },
687
- enumerable: true,
688
- configurable: true
689
- });
690
- var FileWriteStream = WriteStream;
691
- Object.defineProperty(fs2, "FileWriteStream", {
692
- get: function() {
693
- return FileWriteStream;
694
- },
695
- set: function(val) {
696
- FileWriteStream = val;
697
- },
698
- enumerable: true,
699
- configurable: true
700
- });
701
- function ReadStream(path, options) {
702
- if (this instanceof ReadStream)
703
- return fs$ReadStream.apply(this, arguments), this;
704
- else
705
- return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
706
- }
707
- function ReadStream$open() {
708
- var that = this;
709
- open(that.path, that.flags, that.mode, function(err, fd) {
710
- if (err) {
711
- if (that.autoClose)
712
- that.destroy();
713
- that.emit("error", err);
714
- } else {
715
- that.fd = fd;
716
- that.emit("open", fd);
717
- that.read();
718
- }
719
- });
720
- }
721
- function WriteStream(path, options) {
722
- if (this instanceof WriteStream)
723
- return fs$WriteStream.apply(this, arguments), this;
724
- else
725
- return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
726
- }
727
- function WriteStream$open() {
728
- var that = this;
729
- open(that.path, that.flags, that.mode, function(err, fd) {
730
- if (err) {
731
- that.destroy();
732
- that.emit("error", err);
733
- } else {
734
- that.fd = fd;
735
- that.emit("open", fd);
736
- }
737
- });
738
- }
739
- function createReadStream(path, options) {
740
- return new fs2.ReadStream(path, options);
741
- }
742
- function createWriteStream(path, options) {
743
- return new fs2.WriteStream(path, options);
744
- }
745
- var fs$open = fs2.open;
746
- fs2.open = open;
747
- function open(path, flags, mode, cb) {
748
- if (typeof mode === "function")
749
- cb = mode, mode = null;
750
- return go$open(path, flags, mode, cb);
751
- function go$open(path2, flags2, mode2, cb2, startTime) {
752
- return fs$open(path2, flags2, mode2, function(err, fd) {
753
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
754
- enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
755
- else {
756
- if (typeof cb2 === "function")
757
- cb2.apply(this, arguments);
758
- }
759
- });
760
- }
761
- }
762
- return fs2;
763
- }
764
- function enqueue(elem) {
765
- debug("ENQUEUE", elem[0].name, elem[1]);
766
- fs[gracefulQueue].push(elem);
767
- retry();
768
- }
769
- var retryTimer;
770
- function resetQueue() {
771
- var now = Date.now();
772
- for (var i = 0; i < fs[gracefulQueue].length; ++i) {
773
- if (fs[gracefulQueue][i].length > 2) {
774
- fs[gracefulQueue][i][3] = now;
775
- fs[gracefulQueue][i][4] = now;
776
- }
777
- }
778
- retry();
779
- }
780
- function retry() {
781
- clearTimeout(retryTimer);
782
- retryTimer = void 0;
783
- if (fs[gracefulQueue].length === 0)
784
- return;
785
- var elem = fs[gracefulQueue].shift();
786
- var fn = elem[0];
787
- var args = elem[1];
788
- var err = elem[2];
789
- var startTime = elem[3];
790
- var lastTime = elem[4];
791
- if (startTime === void 0) {
792
- debug("RETRY", fn.name, args);
793
- fn.apply(null, args);
794
- } else if (Date.now() - startTime >= 6e4) {
795
- debug("TIMEOUT", fn.name, args);
796
- var cb = args.pop();
797
- if (typeof cb === "function")
798
- cb.call(null, err);
799
- } else {
800
- var sinceAttempt = Date.now() - lastTime;
801
- var sinceStart = Math.max(lastTime - startTime, 1);
802
- var desiredDelay = Math.min(sinceStart * 1.2, 100);
803
- if (sinceAttempt >= desiredDelay) {
804
- debug("RETRY", fn.name, args);
805
- fn.apply(null, args.concat([startTime]));
806
- } else {
807
- fs[gracefulQueue].push(elem);
808
- }
809
- }
810
- if (retryTimer === void 0) {
811
- retryTimer = setTimeout(retry, 0);
812
- }
813
- }
814
- }
815
- });
816
-
817
- export {
818
- require_graceful_fs
819
- };