@shopify/cli 3.80.3 → 3.80.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hydrogen/starter/.cursor/rules/hydrogen-react-router.mdc +52 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +35 -0
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/Footer.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +1 -6
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +9 -4
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +1 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +4 -4
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -7
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +14 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +7 -2
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes.ts +2 -2
- package/dist/assets/hydrogen/starter/env.d.ts +12 -2
- package/dist/assets/hydrogen/starter/eslint.config.js +2 -0
- package/dist/assets/hydrogen/starter/package.json +11 -12
- package/dist/assets/hydrogen/starter/react-router.config.ts +7 -0
- package/dist/assets/hydrogen/starter/server.ts +2 -5
- package/dist/assets/hydrogen/starter/tsconfig.json +18 -6
- package/dist/assets/hydrogen/starter/vite.config.ts +3 -24
- package/dist/assets/hydrogen/tailwind/package.json +4 -1
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/layout.jsx +1 -7
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/routes/subrequest-profiler.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +1 -1
- package/dist/assets/hydrogen/vite/vite.config.js +1 -1
- package/dist/{chunk-S2VPJHP3.js → chunk-2ZXZ6TMG.js} +6 -6
- package/dist/{chunk-NWLJH5W5.js → chunk-3Y3XPRQ6.js} +4 -4
- package/dist/{chunk-ZQLRXAT4.js → chunk-4QN5J4PQ.js} +4 -4
- package/dist/{chunk-6N54IMG5.js → chunk-52XNWDUG.js} +2 -2
- package/dist/{chunk-W2JK2Y2P.js → chunk-7VUAPVO6.js} +6 -6
- package/dist/{chunk-F3TFLWNH.js → chunk-BK4IIAID.js} +3 -3
- package/dist/{chunk-UUNEYHYM.js → chunk-BR2NBKUW.js} +4 -4
- package/dist/{chunk-EIRCYG3C.js → chunk-D5NBHTIZ.js} +2 -2
- package/dist/{chunk-4WGX6J2C.js → chunk-DCBKCTEJ.js} +2 -2
- package/dist/{chunk-SHG4WGA5.js → chunk-EXAGVZF6.js} +4 -4
- package/dist/{chunk-IQZJA4WJ.js → chunk-F5KMS2TZ.js} +2 -2
- package/dist/{chunk-YAKZ5LBE.js → chunk-HHXHFCPT.js} +305 -473
- package/dist/{chunk-ANEEPS5R.js → chunk-HK5IHRTT.js} +5 -5
- package/dist/{chunk-IVP6O724.js → chunk-I2MST2WP.js} +3 -3
- package/dist/{chunk-YIOA4IG2.js → chunk-I726U4UA.js} +3 -3
- package/dist/{chunk-MMKJLJOU.js → chunk-IWJSMR4L.js} +3 -3
- package/dist/{chunk-ZVNTBN7P.js → chunk-JATT3FYX.js} +3 -3
- package/dist/{chunk-3R7MN6NF.js → chunk-KBENE52L.js} +3 -3
- package/dist/{chunk-6BBSMP74.js → chunk-KYH3WDGK.js} +4 -4
- package/dist/{chunk-EXSNWLDD.js → chunk-L6ROCMDO.js} +5 -5
- package/dist/{chunk-P5WXXASN.js → chunk-N4CSAPLU.js} +3 -3
- package/dist/{chunk-36JX5ZL3.js → chunk-N6LDKETI.js} +3 -3
- package/dist/{chunk-HZH4EZRH.js → chunk-ONMISMO4.js} +6 -6
- package/dist/{chunk-36A3YXBJ.js → chunk-PMIAZTDQ.js} +2 -2
- package/dist/{chunk-TBYDOGMF.js → chunk-PUMTB3YW.js} +7 -7
- package/dist/{chunk-NK3XLCW4.js → chunk-Q43ZURCK.js} +2 -2
- package/dist/{chunk-EP3PUZCH.js → chunk-SELFIPBY.js} +2 -2
- package/dist/{chunk-STFQ3LDD.js → chunk-T3LVGAPV.js} +3 -3
- package/dist/{chunk-L52YIB6L.js → chunk-TX7PPGUZ.js} +4 -4
- package/dist/{chunk-6TBBYLQ6.js → chunk-UEIMUAER.js} +2 -2
- package/dist/{chunk-WBXXSY5O.js → chunk-VAUXWFOM.js} +3 -3
- package/dist/{chunk-T2OTVMC3.js → chunk-WI6TASTN.js} +2 -2
- package/dist/{chunk-2MZ6KVDM.js → chunk-YYB2DPLI.js} +3 -3
- package/dist/{chunk-FRYAHHLJ.js → chunk-ZXVXGNY4.js} +5 -5
- package/dist/cli/commands/auth/logout.js +11 -11
- package/dist/cli/commands/auth/logout.test.js +12 -12
- package/dist/cli/commands/cache/clear.js +10 -10
- package/dist/cli/commands/debug/command-flags.js +10 -10
- package/dist/cli/commands/docs/generate.js +10 -10
- package/dist/cli/commands/docs/generate.test.js +10 -10
- package/dist/cli/commands/help.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/index.js +13 -13
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
- package/dist/cli/commands/notifications/generate.js +11 -11
- package/dist/cli/commands/notifications/list.js +11 -11
- package/dist/cli/commands/search.js +11 -11
- package/dist/cli/commands/upgrade.js +11 -11
- package/dist/cli/commands/version.js +11 -11
- package/dist/cli/commands/version.test.js +11 -11
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +4 -4
- package/dist/{custom-oclif-loader-LEBCVICA.js → custom-oclif-loader-NRWKTMWK.js} +2 -2
- package/dist/{error-handler-RPKNZNPJ.js → error-handler-AVFBYBX3.js} +8 -8
- package/dist/hooks/postrun.js +6 -6
- package/dist/hooks/prerun.js +7 -7
- package/dist/index.js +768 -1122
- package/dist/{local-DMUVO2RC.js → local-IZUQBMP3.js} +2 -2
- package/dist/{morph-EB6ON4RE.js → morph-3VOLMA55.js} +9 -9
- package/dist/{node-package-manager-KM7I5LPO.js → node-package-manager-F7U753X4.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-F4QPST3C.js → ui-JUF2QSGU.js} +2 -2
- package/dist/{workerd-VQLKP2OR.js → workerd-MVGKDJ7H.js} +13 -13
- package/oclif.manifest.json +3 -23
- package/package.json +7 -7
- package/dist/assets/hydrogen/starter/.cursor/rules/cookbook-recipe-subscriptions.mdc +0 -921
- package/dist/chunk-NOSVFQH5.js +0 -107
- package/dist/node-MTCU4HTA.js +0 -166
package/dist/index.js
CHANGED
|
@@ -4,9 +4,6 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
require_normalize_path
|
|
6
6
|
} from "./chunk-X7YTIMNN.js";
|
|
7
|
-
import {
|
|
8
|
-
findPort
|
|
9
|
-
} from "./chunk-NOSVFQH5.js";
|
|
10
7
|
import {
|
|
11
8
|
ALIAS_NAME,
|
|
12
9
|
ALL_ROUTE_CHOICES,
|
|
@@ -20,18 +17,17 @@ import {
|
|
|
20
17
|
I18N_STRATEGY_NAME_MAP,
|
|
21
18
|
LANGUAGES,
|
|
22
19
|
Link as Link2,
|
|
20
|
+
REMIX_COMPILER_ERROR_MESSAGE,
|
|
23
21
|
SETUP_CSS_STRATEGIES,
|
|
24
22
|
SETUP_I18N_STRATEGIES,
|
|
25
23
|
STYLING_CHOICES,
|
|
26
24
|
TUNNEL_DOMAIN,
|
|
27
25
|
addCursorAndFiltersToAppLogsUrl,
|
|
28
26
|
adminRequest,
|
|
29
|
-
assertOxygenChecks,
|
|
30
27
|
businessPlatformOrganizationsRequest,
|
|
31
28
|
businessPlatformOrganizationsRequestDoc,
|
|
32
29
|
businessPlatformRequestDoc,
|
|
33
30
|
checkIfIgnoredInGitRepository,
|
|
34
|
-
checkRemixVersions,
|
|
35
31
|
commitAll,
|
|
36
32
|
commonFlags,
|
|
37
33
|
createAbortHandler,
|
|
@@ -39,7 +35,6 @@ import {
|
|
|
39
35
|
createEnvironmentCliChoiceLabel,
|
|
40
36
|
createInitialCommit,
|
|
41
37
|
createPlatformShortcut,
|
|
42
|
-
createRemixLogger,
|
|
43
38
|
createStorefront,
|
|
44
39
|
downloadGitRepository,
|
|
45
40
|
enhanceAuthLogs,
|
|
@@ -86,7 +81,6 @@ import {
|
|
|
86
81
|
handleLanguage,
|
|
87
82
|
handleMiniOxygenImportFail,
|
|
88
83
|
handleProjectLocation,
|
|
89
|
-
handleRemixImportFail,
|
|
90
84
|
handleRouteGeneration,
|
|
91
85
|
handleStorefrontLink,
|
|
92
86
|
hasViteConfig,
|
|
@@ -110,7 +104,6 @@ import {
|
|
|
110
104
|
mergePackageJson,
|
|
111
105
|
mergeTsConfig,
|
|
112
106
|
muteDevLogs,
|
|
113
|
-
muteRemixLogs,
|
|
114
107
|
notifyIssueWithTunnelAndMockShop,
|
|
115
108
|
orderEnvironmentsBySafety,
|
|
116
109
|
overrideFlag,
|
|
@@ -136,7 +129,7 @@ import {
|
|
|
136
129
|
supressNodeExperimentalWarnings,
|
|
137
130
|
unsetStorefront,
|
|
138
131
|
waitForJob
|
|
139
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-HHXHFCPT.js";
|
|
140
133
|
import {
|
|
141
134
|
require_ms,
|
|
142
135
|
require_src
|
|
@@ -155,69 +148,69 @@ import {
|
|
|
155
148
|
} from "./chunk-3GXB4ZRP.js";
|
|
156
149
|
import {
|
|
157
150
|
List
|
|
158
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-KYH3WDGK.js";
|
|
159
152
|
import {
|
|
160
153
|
Search
|
|
161
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-IWJSMR4L.js";
|
|
162
155
|
import {
|
|
163
156
|
Upgrade
|
|
164
|
-
} from "./chunk-
|
|
165
|
-
import "./chunk-
|
|
157
|
+
} from "./chunk-BR2NBKUW.js";
|
|
158
|
+
import "./chunk-T3LVGAPV.js";
|
|
166
159
|
import {
|
|
167
160
|
Version
|
|
168
|
-
} from "./chunk-
|
|
169
|
-
import "./chunk-
|
|
170
|
-
import "./chunk-
|
|
161
|
+
} from "./chunk-VAUXWFOM.js";
|
|
162
|
+
import "./chunk-N6LDKETI.js";
|
|
163
|
+
import "./chunk-DCBKCTEJ.js";
|
|
171
164
|
import {
|
|
172
165
|
KitchenSinkAll
|
|
173
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-L6ROCMDO.js";
|
|
174
167
|
import {
|
|
175
168
|
KitchenSinkPrompts
|
|
176
|
-
} from "./chunk-
|
|
177
|
-
import "./chunk-
|
|
169
|
+
} from "./chunk-I2MST2WP.js";
|
|
170
|
+
import "./chunk-Q43ZURCK.js";
|
|
178
171
|
import {
|
|
179
172
|
KitchenSinkStatic
|
|
180
|
-
} from "./chunk-
|
|
181
|
-
import "./chunk-
|
|
173
|
+
} from "./chunk-KBENE52L.js";
|
|
174
|
+
import "./chunk-PMIAZTDQ.js";
|
|
182
175
|
import {
|
|
183
176
|
Generate
|
|
184
|
-
} from "./chunk-
|
|
185
|
-
import "./chunk-
|
|
177
|
+
} from "./chunk-YYB2DPLI.js";
|
|
178
|
+
import "./chunk-ZXVXGNY4.js";
|
|
186
179
|
import {
|
|
187
180
|
Logout
|
|
188
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-EXAGVZF6.js";
|
|
189
182
|
import {
|
|
190
183
|
ensureAuthenticatedAdmin,
|
|
191
184
|
ensureAuthenticatedAppManagementAndBusinessPlatform,
|
|
192
185
|
ensureAuthenticatedPartners,
|
|
193
186
|
ensureAuthenticatedStorefront,
|
|
194
187
|
ensureAuthenticatedThemes
|
|
195
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-3Y3XPRQ6.js";
|
|
196
189
|
import {
|
|
197
190
|
ClearCache,
|
|
198
191
|
globalFlags,
|
|
199
192
|
jsonFlag,
|
|
200
193
|
runCLI
|
|
201
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-PUMTB3YW.js";
|
|
202
195
|
import {
|
|
203
196
|
CommandFlags
|
|
204
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-N4CSAPLU.js";
|
|
205
198
|
import {
|
|
206
199
|
DocsGenerate
|
|
207
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-BK4IIAID.js";
|
|
208
201
|
import {
|
|
209
202
|
HelpCommand
|
|
210
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-SELFIPBY.js";
|
|
211
204
|
import {
|
|
212
205
|
KitchenSinkAsync
|
|
213
|
-
} from "./chunk-
|
|
214
|
-
import "./chunk-
|
|
206
|
+
} from "./chunk-JATT3FYX.js";
|
|
207
|
+
import "./chunk-D5NBHTIZ.js";
|
|
215
208
|
import {
|
|
216
209
|
base_command_default,
|
|
217
210
|
decodeToml,
|
|
218
211
|
encodeToml,
|
|
219
212
|
loadEnvironment
|
|
220
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-HK5IHRTT.js";
|
|
221
214
|
import {
|
|
222
215
|
require_byline,
|
|
223
216
|
require_end_of_stream,
|
|
@@ -225,7 +218,7 @@ import {
|
|
|
225
218
|
require_iserror,
|
|
226
219
|
require_pump,
|
|
227
220
|
require_stack_generator
|
|
228
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-7VUAPVO6.js";
|
|
229
222
|
import {
|
|
230
223
|
require_once
|
|
231
224
|
} from "./chunk-SHWOPMLQ.js";
|
|
@@ -233,7 +226,7 @@ import {
|
|
|
233
226
|
fanoutHooks,
|
|
234
227
|
getListOfTunnelPlugins,
|
|
235
228
|
reportAnalyticsEvent
|
|
236
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-ONMISMO4.js";
|
|
237
230
|
import {
|
|
238
231
|
adminFqdn,
|
|
239
232
|
appDevFqdn,
|
|
@@ -244,10 +237,10 @@ import {
|
|
|
244
237
|
normalizeStoreFqdn,
|
|
245
238
|
ok,
|
|
246
239
|
partnersFqdn
|
|
247
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-4QN5J4PQ.js";
|
|
248
241
|
import {
|
|
249
242
|
showNotificationsIfNeeded
|
|
250
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-2ZXZ6TMG.js";
|
|
251
244
|
import {
|
|
252
245
|
ClientError,
|
|
253
246
|
FetchError,
|
|
@@ -269,11 +262,11 @@ import {
|
|
|
269
262
|
require_mime_types,
|
|
270
263
|
shopifyFetch,
|
|
271
264
|
z
|
|
272
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-TX7PPGUZ.js";
|
|
273
266
|
import "./chunk-25IMI7TH.js";
|
|
274
267
|
import {
|
|
275
268
|
CLI_KIT_VERSION
|
|
276
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-UEIMUAER.js";
|
|
277
270
|
import {
|
|
278
271
|
LocalStorage,
|
|
279
272
|
UnknownPackageManagerError,
|
|
@@ -297,7 +290,7 @@ import {
|
|
|
297
290
|
usesWorkspaces,
|
|
298
291
|
versionSatisfies,
|
|
299
292
|
writePackageJSON
|
|
300
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-52XNWDUG.js";
|
|
301
294
|
import {
|
|
302
295
|
AbortController as AbortController2,
|
|
303
296
|
AbortError,
|
|
@@ -511,7 +504,7 @@ import {
|
|
|
511
504
|
username,
|
|
512
505
|
writeFile,
|
|
513
506
|
writeFileSync
|
|
514
|
-
} from "./chunk-
|
|
507
|
+
} from "./chunk-WI6TASTN.js";
|
|
515
508
|
import {
|
|
516
509
|
require_semver
|
|
517
510
|
} from "./chunk-HMDWNGIV.js";
|
|
@@ -5502,10 +5495,10 @@ var require_main = __commonJS({
|
|
|
5502
5495
|
t: () => t18
|
|
5503
5496
|
});
|
|
5504
5497
|
module.exports = __toCommonJS2(main_exports4);
|
|
5505
|
-
var
|
|
5498
|
+
var import_fs98 = __require("fs"), import_promises13 = __require("fs/promises");
|
|
5506
5499
|
async function readFileFromUri(uri) {
|
|
5507
5500
|
if (uri.protocol === "file:")
|
|
5508
|
-
return await (0,
|
|
5501
|
+
return await (0, import_promises13.readFile)(uri, "utf8");
|
|
5509
5502
|
if (uri.protocol === "http:" || uri.protocol === "https:") {
|
|
5510
5503
|
let res = await fetch(uri.toString(), {
|
|
5511
5504
|
headers: {
|
|
@@ -5527,7 +5520,7 @@ var require_main = __commonJS({
|
|
|
5527
5520
|
throw new Error("Unsupported protocol");
|
|
5528
5521
|
}
|
|
5529
5522
|
function readFileFromFsPath(fsPath) {
|
|
5530
|
-
return (0,
|
|
5523
|
+
return (0, import_fs98.readFileSync)(fsPath, "utf8");
|
|
5531
5524
|
}
|
|
5532
5525
|
var bundle;
|
|
5533
5526
|
function config2(config22) {
|
|
@@ -13091,8 +13084,8 @@ var require_semanticsDeferredInit = __commonJS({
|
|
|
13091
13084
|
formals: optFormals.children.map((c) => c.parse())[0] || []
|
|
13092
13085
|
};
|
|
13093
13086
|
},
|
|
13094
|
-
Formals(oparen,
|
|
13095
|
-
return
|
|
13087
|
+
Formals(oparen, fs8, cparen) {
|
|
13088
|
+
return fs8.asIteration().children.map((c) => c.parse());
|
|
13096
13089
|
},
|
|
13097
13090
|
name(first, rest) {
|
|
13098
13091
|
return this.sourceString;
|
|
@@ -13280,20 +13273,20 @@ var require_main2 = __commonJS({
|
|
|
13280
13273
|
decl.withSuperGrammar(namespace[superGrammarName]);
|
|
13281
13274
|
}
|
|
13282
13275
|
},
|
|
13283
|
-
Rule_define(n,
|
|
13284
|
-
currentRuleName = n.visit(), currentRuleFormals =
|
|
13276
|
+
Rule_define(n, fs8, d, _3, b) {
|
|
13277
|
+
currentRuleName = n.visit(), currentRuleFormals = fs8.children.map((c) => c.visit())[0] || [], !decl.defaultStartRule && decl.ensureSuperGrammar() !== Grammar.ProtoBuiltInRules && decl.withDefaultStartRule(currentRuleName);
|
|
13285
13278
|
let body = b.visit(), description = d.children.map((c) => c.visit())[0], source = this.source.trimmed();
|
|
13286
13279
|
return decl.define(currentRuleName, currentRuleFormals, body, description, source);
|
|
13287
13280
|
},
|
|
13288
|
-
Rule_override(n,
|
|
13289
|
-
currentRuleName = n.visit(), currentRuleFormals =
|
|
13281
|
+
Rule_override(n, fs8, _3, b) {
|
|
13282
|
+
currentRuleName = n.visit(), currentRuleFormals = fs8.children.map((c) => c.visit())[0] || [];
|
|
13290
13283
|
let source = this.source.trimmed();
|
|
13291
13284
|
decl.ensureSuperGrammarRuleForOverriding(currentRuleName, source), overriding = !0;
|
|
13292
13285
|
let body = b.visit();
|
|
13293
13286
|
return overriding = !1, decl.override(currentRuleName, currentRuleFormals, body, null, source);
|
|
13294
13287
|
},
|
|
13295
|
-
Rule_extend(n,
|
|
13296
|
-
currentRuleName = n.visit(), currentRuleFormals =
|
|
13288
|
+
Rule_extend(n, fs8, _3, b) {
|
|
13289
|
+
currentRuleName = n.visit(), currentRuleFormals = fs8.children.map((c) => c.visit())[0] || [];
|
|
13297
13290
|
let body = b.visit(), source = this.source.trimmed();
|
|
13298
13291
|
return decl.extend(currentRuleName, currentRuleFormals, body, null, source);
|
|
13299
13292
|
},
|
|
@@ -13315,8 +13308,8 @@ var require_main2 = __commonJS({
|
|
|
13315
13308
|
} else
|
|
13316
13309
|
return builder.alt(...args).withSource(this.source);
|
|
13317
13310
|
},
|
|
13318
|
-
Formals(opointy,
|
|
13319
|
-
return
|
|
13311
|
+
Formals(opointy, fs8, cpointy) {
|
|
13312
|
+
return fs8.visit();
|
|
13320
13313
|
},
|
|
13321
13314
|
Params(opointy, ps, cpointy) {
|
|
13322
13315
|
return ps.visit();
|
|
@@ -16227,17 +16220,17 @@ var require_context_utils = __commonJS({
|
|
|
16227
16220
|
init_cjs_shims();
|
|
16228
16221
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
16229
16222
|
exports.makeGetMetafieldDefinitions = exports.FETCHED_METAFIELD_CATEGORIES = exports.isDirectory = exports.recursiveReadDirectory = exports.makeGetDefaultSchemaTranslations = exports.makeGetDefaultTranslations = exports.makeGetDefaultSchemaLocale = exports.makeGetDefaultLocale = exports.makeFileSize = exports.makeFileExists = void 0;
|
|
16230
|
-
var vscode_uri_1 = require_umd(), AbstractFileSystem_1 = require_AbstractFileSystem(), json_1 = require_json(), path_1 = require_path(), types_1 = require_types4(), utils_1 = require_utils(), makeFileExists = (
|
|
16223
|
+
var vscode_uri_1 = require_umd(), AbstractFileSystem_1 = require_AbstractFileSystem(), json_1 = require_json(), path_1 = require_path(), types_1 = require_types4(), utils_1 = require_utils(), makeFileExists = (fs8) => async function(uri) {
|
|
16231
16224
|
try {
|
|
16232
|
-
return await
|
|
16225
|
+
return await fs8.stat(uri), !0;
|
|
16233
16226
|
} catch {
|
|
16234
16227
|
return !1;
|
|
16235
16228
|
}
|
|
16236
16229
|
};
|
|
16237
16230
|
exports.makeFileExists = makeFileExists;
|
|
16238
|
-
var makeFileSize = (
|
|
16231
|
+
var makeFileSize = (fs8) => async function(uri) {
|
|
16239
16232
|
try {
|
|
16240
|
-
return (await
|
|
16233
|
+
return (await fs8.stat(uri)).size;
|
|
16241
16234
|
} catch {
|
|
16242
16235
|
return 0;
|
|
16243
16236
|
}
|
|
@@ -16246,38 +16239,38 @@ var require_context_utils = __commonJS({
|
|
|
16246
16239
|
exports.makeGetDefaultLocale = getDefaultLocaleFactoryFactory(".default.json");
|
|
16247
16240
|
exports.makeGetDefaultSchemaLocale = getDefaultLocaleFactoryFactory(".default.schema.json");
|
|
16248
16241
|
function getDefaultLocaleFactoryFactory(postfix = ".default.json") {
|
|
16249
|
-
return function(
|
|
16250
|
-
return cached(() => getDefaultLocale(
|
|
16242
|
+
return function(fs8, rootUri) {
|
|
16243
|
+
return cached(() => getDefaultLocale(fs8, rootUri, postfix));
|
|
16251
16244
|
};
|
|
16252
16245
|
}
|
|
16253
16246
|
exports.makeGetDefaultTranslations = getDefaultTranslationsFactoryFactory(".default.json");
|
|
16254
16247
|
exports.makeGetDefaultSchemaTranslations = getDefaultTranslationsFactoryFactory(".default.schema.json");
|
|
16255
16248
|
function getDefaultTranslationsFactoryFactory(postfix = ".default.json") {
|
|
16256
|
-
return function(
|
|
16257
|
-
return cached(() => getDefaultTranslations(
|
|
16249
|
+
return function(fs8, theme, rootUri) {
|
|
16250
|
+
return cached(() => getDefaultTranslations(fs8, theme, rootUri, postfix));
|
|
16258
16251
|
};
|
|
16259
16252
|
}
|
|
16260
|
-
async function getDefaultLocaleFile(
|
|
16253
|
+
async function getDefaultLocaleFile(fs8, rootUri, postfix = ".default.json") {
|
|
16261
16254
|
var _a42;
|
|
16262
|
-
return (_a42 = (await
|
|
16255
|
+
return (_a42 = (await fs8.readDirectory((0, path_1.join)(rootUri, "locales"))).find(([uri]) => uri.endsWith(postfix))) === null || _a42 === void 0 ? void 0 : _a42[0];
|
|
16263
16256
|
}
|
|
16264
|
-
async function getDefaultLocale(
|
|
16257
|
+
async function getDefaultLocale(fs8, rootUri, postfix) {
|
|
16265
16258
|
try {
|
|
16266
|
-
let defaultLocaleFile = await getDefaultLocaleFile(
|
|
16259
|
+
let defaultLocaleFile = await getDefaultLocaleFile(fs8, rootUri, postfix);
|
|
16267
16260
|
return defaultLocaleFile ? vscode_uri_1.Utils.basename(vscode_uri_1.URI.parse(defaultLocaleFile)).split(".")[0] : "en";
|
|
16268
16261
|
} catch (error) {
|
|
16269
16262
|
return console.error(error), "en";
|
|
16270
16263
|
}
|
|
16271
16264
|
}
|
|
16272
|
-
async function getDefaultTranslations(
|
|
16265
|
+
async function getDefaultTranslations(fs8, theme, rootUri, postfix) {
|
|
16273
16266
|
try {
|
|
16274
16267
|
let bufferTranslations = getDefaultTranslationsFromBuffer(theme, postfix);
|
|
16275
16268
|
if (bufferTranslations)
|
|
16276
16269
|
return bufferTranslations;
|
|
16277
|
-
let defaultLocaleFile = await getDefaultLocaleFile(
|
|
16270
|
+
let defaultLocaleFile = await getDefaultLocaleFile(fs8, rootUri, postfix);
|
|
16278
16271
|
if (!defaultLocaleFile)
|
|
16279
16272
|
return {};
|
|
16280
|
-
let defaultTranslationsFile = await
|
|
16273
|
+
let defaultTranslationsFile = await fs8.readFile(defaultLocaleFile);
|
|
16281
16274
|
return (0, json_1.parseJSON)(defaultTranslationsFile, {});
|
|
16282
16275
|
} catch (error) {
|
|
16283
16276
|
return console.error(error), {};
|
|
@@ -16295,9 +16288,9 @@ var require_context_utils = __commonJS({
|
|
|
16295
16288
|
let cachedPromise;
|
|
16296
16289
|
return async (...args) => (cachedPromise || (cachedPromise = fn(...args)), cachedPromise);
|
|
16297
16290
|
}
|
|
16298
|
-
async function recursiveReadDirectory(
|
|
16299
|
-
let files = (await
|
|
16300
|
-
return (await Promise.all(files.map((ft) => isDirectory2(ft) ? recursiveReadDirectory(
|
|
16291
|
+
async function recursiveReadDirectory(fs8, uri, filter) {
|
|
16292
|
+
let files = (await fs8.readDirectory(uri)).filter((ft) => !isIgnored(ft) && (isDirectory2(ft) || filter(ft)));
|
|
16293
|
+
return (await Promise.all(files.map((ft) => isDirectory2(ft) ? recursiveReadDirectory(fs8, ft[0], filter) : Promise.resolve([ft[0]])))).flat();
|
|
16301
16294
|
}
|
|
16302
16295
|
exports.recursiveReadDirectory = recursiveReadDirectory;
|
|
16303
16296
|
function isDirectory2([_3, type]) {
|
|
@@ -16322,7 +16315,7 @@ var require_context_utils = __commonJS({
|
|
|
16322
16315
|
"variant",
|
|
16323
16316
|
"shop"
|
|
16324
16317
|
];
|
|
16325
|
-
var makeGetMetafieldDefinitions = (
|
|
16318
|
+
var makeGetMetafieldDefinitions = (fs8) => async function(rootUri) {
|
|
16326
16319
|
let definitions = {
|
|
16327
16320
|
article: [],
|
|
16328
16321
|
blog: [],
|
|
@@ -16338,7 +16331,7 @@ var require_context_utils = __commonJS({
|
|
|
16338
16331
|
shop: []
|
|
16339
16332
|
};
|
|
16340
16333
|
try {
|
|
16341
|
-
let content = await
|
|
16334
|
+
let content = await fs8.readFile((0, path_1.join)(rootUri, ".shopify", "metafields.json")), json = (0, json_1.parseJSON)(content);
|
|
16342
16335
|
return (0, utils_1.isError)(json) ? definitions : exports.FETCHED_METAFIELD_CATEGORIES.reduce((definitions2, group) => {
|
|
16343
16336
|
try {
|
|
16344
16337
|
definitions2[group] = json[group].map((definition) => ({
|
|
@@ -23388,16 +23381,16 @@ var require_dist3 = __commonJS({
|
|
|
23388
23381
|
};
|
|
23389
23382
|
async function check2(theme, config2, injectedDependencies) {
|
|
23390
23383
|
var _a42;
|
|
23391
|
-
let pipelines = [], offenses = [], { fs:
|
|
23384
|
+
let pipelines = [], offenses = [], { fs: fs8 } = injectedDependencies, { rootUri } = config2, dependencies = {
|
|
23392
23385
|
...injectedDependencies,
|
|
23393
23386
|
mode: config2.context,
|
|
23394
|
-
fileExists: (0, context_utils_1.makeFileExists)(
|
|
23395
|
-
fileSize: (0, context_utils_1.makeFileSize)(
|
|
23396
|
-
getDefaultLocale: (0, context_utils_1.makeGetDefaultLocale)(
|
|
23397
|
-
getDefaultTranslations: (0, context_utils_1.makeGetDefaultTranslations)(
|
|
23398
|
-
getDefaultSchemaLocale: (0, context_utils_1.makeGetDefaultSchemaLocale)(
|
|
23399
|
-
getDefaultSchemaTranslations: (0, context_utils_1.makeGetDefaultSchemaTranslations)(
|
|
23400
|
-
getMetafieldDefinitions: (_a42 = injectedDependencies.getMetafieldDefinitions) !== null && _a42 !== void 0 ? _a42 : (0, context_utils_1.makeGetMetafieldDefinitions)(
|
|
23387
|
+
fileExists: (0, context_utils_1.makeFileExists)(fs8),
|
|
23388
|
+
fileSize: (0, context_utils_1.makeFileSize)(fs8),
|
|
23389
|
+
getDefaultLocale: (0, context_utils_1.makeGetDefaultLocale)(fs8, rootUri),
|
|
23390
|
+
getDefaultTranslations: (0, context_utils_1.makeGetDefaultTranslations)(fs8, theme, rootUri),
|
|
23391
|
+
getDefaultSchemaLocale: (0, context_utils_1.makeGetDefaultSchemaLocale)(fs8, rootUri),
|
|
23392
|
+
getDefaultSchemaTranslations: (0, context_utils_1.makeGetDefaultSchemaTranslations)(fs8, theme, rootUri),
|
|
23393
|
+
getMetafieldDefinitions: (_a42 = injectedDependencies.getMetafieldDefinitions) !== null && _a42 !== void 0 ? _a42 : (0, context_utils_1.makeGetMetafieldDefinitions)(fs8)
|
|
23401
23394
|
}, { DisabledChecksVisitor, isDisabled } = (0, disabled_checks_1.createDisabledChecksModule)(), jsonValidator = await JSONValidator_1.JSONValidator.create(dependencies.jsonValidationSet, config2), validateJSON = jsonValidator?.validate;
|
|
23402
23395
|
dependencies.themeDocset && !dependencies.themeDocset.isAugmented && (dependencies.themeDocset = new AugmentedThemeDocset_1.AugmentedThemeDocset(dependencies.themeDocset));
|
|
23403
23396
|
for (let type of Object.values(types_1.SourceCodeType))
|
|
@@ -23485,7 +23478,7 @@ var require_env_paths = __commonJS({
|
|
|
23485
23478
|
"../../node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports, module) {
|
|
23486
23479
|
"use strict";
|
|
23487
23480
|
init_cjs_shims();
|
|
23488
|
-
var path4 = __require("path"),
|
|
23481
|
+
var path4 = __require("path"), os2 = __require("os"), homedir = os2.homedir(), tmpdir2 = os2.tmpdir(), { env: env4 } = process, macos = (name) => {
|
|
23489
23482
|
let library = path4.join(homedir, "Library");
|
|
23490
23483
|
return {
|
|
23491
23484
|
data: path4.join(library, "Application Support", name),
|
|
@@ -24103,7 +24096,7 @@ var require_common2 = __commonJS({
|
|
|
24103
24096
|
function ownProp(obj, field) {
|
|
24104
24097
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
24105
24098
|
}
|
|
24106
|
-
var
|
|
24099
|
+
var fs8 = __require("fs"), path4 = __require("path"), minimatch = require_minimatch(), isAbsolute = __require("path").isAbsolute, Minimatch = minimatch.Minimatch;
|
|
24107
24100
|
function alphasort(a2, b) {
|
|
24108
24101
|
return a2.localeCompare(b, "en");
|
|
24109
24102
|
}
|
|
@@ -24127,7 +24120,7 @@ var require_common2 = __commonJS({
|
|
|
24127
24120
|
throw new Error("base matching requires globstar");
|
|
24128
24121
|
pattern = "**/" + pattern;
|
|
24129
24122
|
}
|
|
24130
|
-
self2.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === !1, self2.windowsPathsNoEscape && (pattern = pattern.replace(/\\/g, "/")), self2.silent = !!options.silent, self2.pattern = pattern, self2.strict = options.strict !== !1, self2.realpath = !!options.realpath, self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null), self2.follow = !!options.follow, self2.dot = !!options.dot, self2.mark = !!options.mark, self2.nodir = !!options.nodir, self2.nodir && (self2.mark = !0), self2.sync = !!options.sync, self2.nounique = !!options.nounique, self2.nonull = !!options.nonull, self2.nosort = !!options.nosort, self2.nocase = !!options.nocase, self2.stat = !!options.stat, self2.noprocess = !!options.noprocess, self2.absolute = !!options.absolute, self2.fs = options.fs ||
|
|
24123
|
+
self2.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === !1, self2.windowsPathsNoEscape && (pattern = pattern.replace(/\\/g, "/")), self2.silent = !!options.silent, self2.pattern = pattern, self2.strict = options.strict !== !1, self2.realpath = !!options.realpath, self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null), self2.follow = !!options.follow, self2.dot = !!options.dot, self2.mark = !!options.mark, self2.nodir = !!options.nodir, self2.nodir && (self2.mark = !0), self2.sync = !!options.sync, self2.nounique = !!options.nounique, self2.nonull = !!options.nonull, self2.nosort = !!options.nosort, self2.nocase = !!options.nocase, self2.stat = !!options.stat, self2.noprocess = !!options.noprocess, self2.absolute = !!options.absolute, self2.fs = options.fs || fs8, self2.maxLength = options.maxLength || 1 / 0, self2.cache = options.cache || /* @__PURE__ */ Object.create(null), self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null), self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null), setupIgnores(self2, options), self2.changedCwd = !1;
|
|
24131
24124
|
var cwd3 = process.cwd();
|
|
24132
24125
|
ownProp(options, "cwd") ? (self2.cwd = path4.resolve(options.cwd), self2.changedCwd = self2.cwd !== cwd3) : self2.cwd = path4.resolve(cwd3), self2.root = options.root || path4.resolve(self2.cwd, "/"), self2.root = path4.resolve(self2.root), self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd), self2.nomount = !!options.nomount, process.platform === "win32" && (self2.root = self2.root.replace(/\\/g, "/"), self2.cwd = self2.cwd.replace(/\\/g, "/"), self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/")), options.nonegate = !0, options.nocomment = !0, self2.minimatch = new Minimatch(pattern, options), self2.options = self2.minimatch.options;
|
|
24133
24126
|
}
|
|
@@ -30137,8 +30130,8 @@ var require_parser = __commonJS({
|
|
|
30137
30130
|
case "scalar":
|
|
30138
30131
|
case "single-quoted-scalar":
|
|
30139
30132
|
case "double-quoted-scalar": {
|
|
30140
|
-
let
|
|
30141
|
-
atNextItem || it.value ? (map.items.push({ start, key:
|
|
30133
|
+
let fs8 = this.flowScalar(this.type);
|
|
30134
|
+
atNextItem || it.value ? (map.items.push({ start, key: fs8, sep: [] }), this.onKeyLine = !0) : it.sep ? this.stack.push(fs8) : (Object.assign(it, { key: fs8, sep: [] }), this.onKeyLine = !0);
|
|
30142
30135
|
return;
|
|
30143
30136
|
}
|
|
30144
30137
|
default: {
|
|
@@ -30225,8 +30218,8 @@ var require_parser = __commonJS({
|
|
|
30225
30218
|
case "scalar":
|
|
30226
30219
|
case "single-quoted-scalar":
|
|
30227
30220
|
case "double-quoted-scalar": {
|
|
30228
|
-
let
|
|
30229
|
-
!it || it.value ? fc.items.push({ start: [], key:
|
|
30221
|
+
let fs8 = this.flowScalar(this.type);
|
|
30222
|
+
!it || it.value ? fc.items.push({ start: [], key: fs8, sep: [] }) : it.sep ? this.stack.push(fs8) : Object.assign(it, { key: fs8, sep: [] });
|
|
30230
30223
|
return;
|
|
30231
30224
|
}
|
|
30232
30225
|
case "flow-map-end":
|
|
@@ -32008,8 +32001,8 @@ var require_messageReader = __commonJS({
|
|
|
32008
32001
|
constructor(readable, options) {
|
|
32009
32002
|
super(), this.readable = readable, this.options = ResolvedMessageReaderOptions.fromOptions(options), this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset), this._partialMessageTimeout = 1e4, this.nextMessageLength = -1, this.messageToken = 0, this.readSemaphore = new semaphore_1.Semaphore(1);
|
|
32010
32003
|
}
|
|
32011
|
-
set partialMessageTimeout(
|
|
32012
|
-
this._partialMessageTimeout =
|
|
32004
|
+
set partialMessageTimeout(timeout2) {
|
|
32005
|
+
this._partialMessageTimeout = timeout2;
|
|
32013
32006
|
}
|
|
32014
32007
|
get partialMessageTimeout() {
|
|
32015
32008
|
return this._partialMessageTimeout;
|
|
@@ -32056,8 +32049,8 @@ var require_messageReader = __commonJS({
|
|
|
32056
32049
|
this.partialMessageTimer && (this.partialMessageTimer.dispose(), this.partialMessageTimer = void 0);
|
|
32057
32050
|
}
|
|
32058
32051
|
setPartialMessageTimer() {
|
|
32059
|
-
this.clearPartialMessageTimer(), !(this._partialMessageTimeout <= 0) && (this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token,
|
|
32060
|
-
this.partialMessageTimer = void 0, token === this.messageToken && (this.firePartialMessage({ messageToken: token, waitingTime:
|
|
32052
|
+
this.clearPartialMessageTimer(), !(this._partialMessageTimeout <= 0) && (this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout2) => {
|
|
32053
|
+
this.partialMessageTimer = void 0, token === this.messageToken && (this.firePartialMessage({ messageToken: token, waitingTime: timeout2 }), this.setPartialMessageTimer());
|
|
32061
32054
|
}, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout));
|
|
32062
32055
|
}
|
|
32063
32056
|
};
|
|
@@ -33326,7 +33319,7 @@ var require_main3 = __commonJS({
|
|
|
33326
33319
|
exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0;
|
|
33327
33320
|
var ril_1 = require_ril();
|
|
33328
33321
|
ril_1.default.install();
|
|
33329
|
-
var path4 = __require("path"),
|
|
33322
|
+
var path4 = __require("path"), os2 = __require("os"), crypto_1 = __require("crypto"), net_1 = __require("net"), api_1 = require_api();
|
|
33330
33323
|
__exportStar2(require_api(), exports);
|
|
33331
33324
|
var IPCMessageReader = class extends api_1.AbstractMessageReader {
|
|
33332
33325
|
constructor(process10) {
|
|
@@ -33426,7 +33419,7 @@ var require_main3 = __commonJS({
|
|
|
33426
33419
|
if (process.platform === "win32")
|
|
33427
33420
|
return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
|
|
33428
33421
|
let result;
|
|
33429
|
-
XDG_RUNTIME_DIR ? result = path4.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`) : result = path4.join(
|
|
33422
|
+
XDG_RUNTIME_DIR ? result = path4.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`) : result = path4.join(os2.tmpdir(), `vscode-${randomSuffix}.sock`);
|
|
33430
33423
|
let limit = safeIpcPathLengths.get(process.platform);
|
|
33431
33424
|
return limit !== void 0 && result.length > limit && (0, ril_1.default)().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`), result;
|
|
33432
33425
|
}
|
|
@@ -37162,7 +37155,7 @@ var require_files = __commonJS({
|
|
|
37162
37155
|
init_cjs_shims();
|
|
37163
37156
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
37164
37157
|
exports.resolveModulePath = exports.FileSystem = exports.resolveGlobalYarnPath = exports.resolveGlobalNodePath = exports.resolve = exports.uriToFilePath = void 0;
|
|
37165
|
-
var url = __require("url"), path4 = __require("path"),
|
|
37158
|
+
var url = __require("url"), path4 = __require("path"), fs8 = __require("fs"), child_process_1 = __require("child_process");
|
|
37166
37159
|
function uriToFilePath(uri) {
|
|
37167
37160
|
let parsed = url.parse(uri);
|
|
37168
37161
|
if (parsed.protocol !== "file:" || !parsed.path)
|
|
@@ -37200,7 +37193,7 @@ var require_files = __commonJS({
|
|
|
37200
37193
|
].join("");
|
|
37201
37194
|
return new Promise((resolve3, reject) => {
|
|
37202
37195
|
let env4 = process.env, newEnv = /* @__PURE__ */ Object.create(null);
|
|
37203
|
-
Object.keys(env4).forEach((key) => newEnv[key] = env4[key]), nodePath2 &&
|
|
37196
|
+
Object.keys(env4).forEach((key) => newEnv[key] = env4[key]), nodePath2 && fs8.existsSync(nodePath2) && (newEnv[nodePathKey] ? newEnv[nodePathKey] = nodePath2 + path4.delimiter + newEnv[nodePathKey] : newEnv[nodePathKey] = nodePath2, tracer && tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`)), newEnv.ELECTRON_RUN_AS_NODE = "1";
|
|
37204
37197
|
try {
|
|
37205
37198
|
let cp3 = (0, child_process_1.fork)("", [], {
|
|
37206
37199
|
cwd: cwd3,
|
|
@@ -37287,7 +37280,7 @@ var require_files = __commonJS({
|
|
|
37287
37280
|
(function(FileSystem2) {
|
|
37288
37281
|
let _isCaseSensitive;
|
|
37289
37282
|
function isCaseSensitive() {
|
|
37290
|
-
return _isCaseSensitive !== void 0 || (process.platform === "win32" ? _isCaseSensitive = !1 : _isCaseSensitive = !
|
|
37283
|
+
return _isCaseSensitive !== void 0 || (process.platform === "win32" ? _isCaseSensitive = !1 : _isCaseSensitive = !fs8.existsSync(__filename.toUpperCase()) || !fs8.existsSync(__filename.toLowerCase())), _isCaseSensitive;
|
|
37291
37284
|
}
|
|
37292
37285
|
FileSystem2.isCaseSensitive = isCaseSensitive;
|
|
37293
37286
|
function isParent(parent, child) {
|
|
@@ -47081,14 +47074,14 @@ var require_runChecks = __commonJS({
|
|
|
47081
47074
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
47082
47075
|
exports.makeRunChecks = void 0;
|
|
47083
47076
|
var theme_check_common_1 = require_dist3(), offenseToDiagnostic_1 = require_offenseToDiagnostic();
|
|
47084
|
-
function makeRunChecks(documentManager, diagnosticsManager, { fs:
|
|
47077
|
+
function makeRunChecks(documentManager, diagnosticsManager, { fs: fs8, loadConfig: loadConfig2, themeDocset, jsonValidationSet, getMetafieldDefinitions, cssLanguageService }) {
|
|
47085
47078
|
return async function(triggerURIs) {
|
|
47086
|
-
let fileExists3 = (0, theme_check_common_1.makeFileExists)(
|
|
47079
|
+
let fileExists3 = (0, theme_check_common_1.makeFileExists)(fs8), rootURIs = await Promise.all(triggerURIs.map((uri) => (0, theme_check_common_1.findRoot)(uri, fileExists3))), deduplicatedRootURIs = new Set(rootURIs);
|
|
47087
47080
|
await Promise.all([...deduplicatedRootURIs].map(runChecksForRoot));
|
|
47088
47081
|
return;
|
|
47089
47082
|
async function runChecksForRoot(configFileRootUri) {
|
|
47090
|
-
let config2 = await loadConfig2(configFileRootUri,
|
|
47091
|
-
fs:
|
|
47083
|
+
let config2 = await loadConfig2(configFileRootUri, fs8), theme = documentManager.theme(config2.rootUri), cssOffenses = cssLanguageService ? await Promise.all(theme.map((sourceCode) => getCSSDiagnostics(cssLanguageService, sourceCode))).then((offenses2) => offenses2.flat()) : [], offenses = [...await (0, theme_check_common_1.check)(theme, config2, {
|
|
47084
|
+
fs: fs8,
|
|
47092
47085
|
themeDocset,
|
|
47093
47086
|
jsonValidationSet,
|
|
47094
47087
|
getMetafieldDefinitions,
|
|
@@ -47432,18 +47425,18 @@ var require_DocumentManager = __commonJS({
|
|
|
47432
47425
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
47433
47426
|
exports.DocumentManager = void 0;
|
|
47434
47427
|
var theme_check_common_1 = require_dist3(), vscode_languageserver_textdocument_1 = (init_main3(), __toCommonJS(main_exports2)), progress_1 = require_progress2(), theme_check_common_2 = require_dist3(), sleep2 = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms)), DocumentManager = class {
|
|
47435
|
-
constructor(
|
|
47436
|
-
this.fs =
|
|
47428
|
+
constructor(fs8, connection, clientCapabilities, getModeForUri, isValidSchema) {
|
|
47429
|
+
this.fs = fs8, this.connection = connection, this.clientCapabilities = clientCapabilities, this.getModeForUri = getModeForUri, this.isValidSchema = isValidSchema, this.preload = (0, theme_check_common_1.memoize)(async (rootUri) => {
|
|
47437
47430
|
if (!this.fs)
|
|
47438
47431
|
throw new Error("Cannot call preload without a FileSystem");
|
|
47439
|
-
let { fs:
|
|
47432
|
+
let { fs: fs9, connection: connection2, clientCapabilities: clientCapabilities2 } = this, progress = progress_1.Progress.create(connection2, clientCapabilities2, `preload#${rootUri}`);
|
|
47440
47433
|
progress.start("Initializing Liquid LSP");
|
|
47441
47434
|
let filesToLoad = await (0, theme_check_common_1.recursiveReadDirectory)(this.fs, rootUri, ([uri]) => /\.(liquid|json)$/.test(uri) && !this.sourceCodes.has(uri));
|
|
47442
47435
|
progress.report(10, "Preloading files");
|
|
47443
47436
|
let [i, n] = [0, filesToLoad.length];
|
|
47444
47437
|
await Promise.all(filesToLoad.map(async (file) => {
|
|
47445
47438
|
try {
|
|
47446
|
-
this.set(file, await
|
|
47439
|
+
this.set(file, await fs9.readFile(file), void 0);
|
|
47447
47440
|
} catch (error) {
|
|
47448
47441
|
console.error("Failed to preload", file, error);
|
|
47449
47442
|
}
|
|
@@ -85193,8 +85186,8 @@ var require_CachedFileSystem = __commonJS({
|
|
|
85193
85186
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
85194
85187
|
exports.CachedFileSystem = void 0;
|
|
85195
85188
|
var CachedFileSystem = class {
|
|
85196
|
-
constructor(
|
|
85197
|
-
this.readFile = cachedByUri(
|
|
85189
|
+
constructor(fs8) {
|
|
85190
|
+
this.readFile = cachedByUri(fs8.readFile.bind(fs8)), this.readDirectory = cachedByUri(fs8.readDirectory.bind(fs8)), this.stat = cachedByUri(fs8.stat.bind(fs8));
|
|
85198
85191
|
}
|
|
85199
85192
|
};
|
|
85200
85193
|
exports.CachedFileSystem = CachedFileSystem;
|
|
@@ -85299,7 +85292,7 @@ var require_startServer = __commonJS({
|
|
|
85299
85292
|
var theme_check_common_1 = require_dist3(), vscode_languageserver_1 = require_main5(), ClientCapabilities_1 = require_ClientCapabilities(), codeActions_1 = require_codeActions(), commands_1 = require_commands(), completions_1 = require_completions(), diagnostics_1 = require_diagnostics(), DocumentHighlightsProvider_1 = require_DocumentHighlightsProvider(), documentLinks_1 = require_documentLinks(), documents_1 = require_documents(), formatting_1 = require_formatting(), hover_1 = require_hover(), JSONLanguageService_1 = require_JSONLanguageService(), CSSLanguageService_1 = require_CSSLanguageService(), LinkedEditingRangesProvider_1 = require_LinkedEditingRangesProvider(), RenameProvider_1 = require_RenameProvider(), RenameHandler_1 = require_RenameHandler(), utils_1 = require_utils7(), uri_1 = require_uri2(), version_1 = require_version2(), CachedFileSystem_1 = require_CachedFileSystem(), Configuration_1 = require_Configuration(), safe_1 = require_safe(), defaultLogger = () => {
|
|
85300
85293
|
}, hasUnsupportedDocument = (params) => "textDocument" in params && "uri" in params.textDocument && typeof params.textDocument.uri == "string" && params.textDocument.uri.startsWith("git:");
|
|
85301
85294
|
function startServer2(connection, { fs: injectedFs, loadConfig: loadConfig2, log = defaultLogger, jsonValidationSet, themeDocset: remoteThemeDocset, fetchMetafieldDefinitionsForURI }) {
|
|
85302
|
-
let
|
|
85295
|
+
let fs8 = new CachedFileSystem_1.CachedFileSystem(injectedFs), fileExists3 = (0, theme_check_common_1.makeFileExists)(fs8), clientCapabilities = new ClientCapabilities_1.ClientCapabilities(), configuration = new Configuration_1.Configuration(connection, clientCapabilities), documentManager = new documents_1.DocumentManager(fs8, connection, clientCapabilities, getModeForURI, isValidSchema), diagnosticsManager = new diagnostics_1.DiagnosticsManager(connection), documentLinksProvider = new documentLinks_1.DocumentLinksProvider(documentManager, findThemeRootURI), codeActionsProvider = new codeActions_1.CodeActionsProvider(documentManager, diagnosticsManager), onTypeFormattingProvider = new formatting_1.OnTypeFormattingProvider(documentManager, async function(textDocument, position) {
|
|
85303
85296
|
clientCapabilities.hasShowDocumentSupport && connection.sendRequest(vscode_languageserver_1.ShowDocumentRequest.type, {
|
|
85304
85297
|
uri: textDocument.uri,
|
|
85305
85298
|
takeFocus: !0,
|
|
@@ -85311,46 +85304,46 @@ var require_startServer = __commonJS({
|
|
|
85311
85304
|
}), linkedEditingRangesProvider = new LinkedEditingRangesProvider_1.LinkedEditingRangesProvider(documentManager), documentHighlightProvider = new DocumentHighlightsProvider_1.DocumentHighlightsProvider(documentManager), renameProvider = new RenameProvider_1.RenameProvider(connection, clientCapabilities, documentManager, findThemeRootURI), renameHandler = new RenameHandler_1.RenameHandler(connection, clientCapabilities, documentManager, findThemeRootURI);
|
|
85312
85305
|
async function findThemeRootURI(uri) {
|
|
85313
85306
|
let rootUri = await (0, theme_check_common_1.findRoot)(uri, fileExists3);
|
|
85314
|
-
return (await loadConfig2(rootUri,
|
|
85307
|
+
return (await loadConfig2(rootUri, fs8)).rootUri;
|
|
85315
85308
|
}
|
|
85316
|
-
let getMetafieldDefinitionsForRootUri = (0, theme_check_common_1.memoize)((0, theme_check_common_1.makeGetMetafieldDefinitions)(
|
|
85309
|
+
let getMetafieldDefinitionsForRootUri = (0, theme_check_common_1.memoize)((0, theme_check_common_1.makeGetMetafieldDefinitions)(fs8), (rootUri) => rootUri), getMetafieldDefinitions = async (uri) => {
|
|
85317
85310
|
let rootUri = await findThemeRootURI(uri);
|
|
85318
85311
|
return getMetafieldDefinitionsForRootUri(rootUri);
|
|
85319
85312
|
}, themeDocset = new theme_check_common_1.AugmentedThemeDocset(remoteThemeDocset), cssLanguageService = new CSSLanguageService_1.CSSLanguageService(documentManager), runChecks = (0, utils_1.debounce)((0, diagnostics_1.makeRunChecks)(documentManager, diagnosticsManager, {
|
|
85320
|
-
fs:
|
|
85313
|
+
fs: fs8,
|
|
85321
85314
|
loadConfig: loadConfig2,
|
|
85322
85315
|
themeDocset,
|
|
85323
85316
|
jsonValidationSet,
|
|
85324
85317
|
getMetafieldDefinitions,
|
|
85325
85318
|
cssLanguageService
|
|
85326
85319
|
}), 100), getTranslationsForURI = async (uri) => {
|
|
85327
|
-
let rootURI = await findThemeRootURI(uri), theme = documentManager.theme(rootURI), getDefaultTranslations = (0, theme_check_common_1.makeGetDefaultTranslations)(
|
|
85320
|
+
let rootURI = await findThemeRootURI(uri), theme = documentManager.theme(rootURI), getDefaultTranslations = (0, theme_check_common_1.makeGetDefaultTranslations)(fs8, theme, rootURI), [defaultTranslations, shopifyTranslations] = await Promise.all([
|
|
85328
85321
|
getDefaultTranslations(),
|
|
85329
85322
|
themeDocset.systemTranslations()
|
|
85330
85323
|
]);
|
|
85331
85324
|
return { ...shopifyTranslations, ...defaultTranslations };
|
|
85332
85325
|
}, getSchemaTranslationsForURI = async (uri) => {
|
|
85333
85326
|
let rootURI = await findThemeRootURI(uri), theme = documentManager.theme(rootURI);
|
|
85334
|
-
return (0, theme_check_common_1.makeGetDefaultSchemaTranslations)(
|
|
85327
|
+
return (0, theme_check_common_1.makeGetDefaultSchemaTranslations)(fs8, theme, rootURI)();
|
|
85335
85328
|
}, getDocDefinitionForURI = async (uri, category, name) => {
|
|
85336
85329
|
let rootUri = await findThemeRootURI(uri), fileUri = theme_check_common_1.path.join(rootUri, category, `${name}.liquid`), file = documentManager.get(fileUri);
|
|
85337
85330
|
if (!(!file || file.type !== theme_check_common_1.SourceCodeType.LiquidHtml || (0, theme_check_common_1.isError)(file.ast)))
|
|
85338
85331
|
return file.getLiquidDoc();
|
|
85339
85332
|
}, snippetFilter = ([uri]) => /\.liquid$/.test(uri) && /snippets/.test(uri), getSnippetNamesForURI = (0, safe_1.safe)(async (uri) => {
|
|
85340
85333
|
let rootUri = await findThemeRootURI(uri);
|
|
85341
|
-
return (await (0, theme_check_common_1.recursiveReadDirectory)(
|
|
85334
|
+
return (await (0, theme_check_common_1.recursiveReadDirectory)(fs8, rootUri, snippetFilter)).map(uri_1.snippetName);
|
|
85342
85335
|
}, []), getThemeSettingsSchemaForURI = (0, safe_1.safe)(async (uri) => {
|
|
85343
|
-
let rootUri = await findThemeRootURI(uri), settingsSchemaUri = theme_check_common_1.path.join(rootUri, "config", "settings_schema.json"), contents = await
|
|
85336
|
+
let rootUri = await findThemeRootURI(uri), settingsSchemaUri = theme_check_common_1.path.join(rootUri, "config", "settings_schema.json"), contents = await fs8.readFile(settingsSchemaUri), json = (0, theme_check_common_1.parseJSON)(contents);
|
|
85344
85337
|
if ((0, theme_check_common_1.isError)(json) || !Array.isArray(json))
|
|
85345
85338
|
throw new Error("Settings JSON file not in correct format");
|
|
85346
85339
|
return json;
|
|
85347
85340
|
}, []);
|
|
85348
85341
|
async function getModeForURI(uri) {
|
|
85349
85342
|
let rootUri = await (0, theme_check_common_1.findRoot)(uri, fileExists3);
|
|
85350
|
-
return (await loadConfig2(rootUri,
|
|
85343
|
+
return (await loadConfig2(rootUri, fs8)).context;
|
|
85351
85344
|
}
|
|
85352
85345
|
let getThemeBlockNames = (0, safe_1.safe)(async (uri, includePrivate) => {
|
|
85353
|
-
let rootUri = await findThemeRootURI(uri), blockNames = (await
|
|
85346
|
+
let rootUri = await findThemeRootURI(uri), blockNames = (await fs8.readDirectory(theme_check_common_1.path.join(rootUri, "blocks"))).map(([uri2]) => theme_check_common_1.path.basename(uri2, ".liquid"));
|
|
85354
85347
|
return includePrivate ? blockNames : blockNames.filter((blockName) => !blockName.startsWith("_"));
|
|
85355
85348
|
}, []);
|
|
85356
85349
|
async function getThemeBlockSchema(uri, name) {
|
|
@@ -85496,7 +85489,7 @@ var require_startServer = __commonJS({
|
|
|
85496
85489
|
}), connection.onDocumentOnTypeFormatting(async (params) => hasUnsupportedDocument(params) ? null : onTypeFormattingProvider.onTypeFormatting(params)), connection.onDocumentHighlight(async (params) => hasUnsupportedDocument(params) ? [] : documentHighlightProvider.documentHighlights(params)), connection.onPrepareRename(async (params) => hasUnsupportedDocument(params) ? null : renameProvider.prepare(params)), connection.onRenameRequest(async (params) => hasUnsupportedDocument(params) ? null : renameProvider.rename(params)), connection.languages.onLinkedEditingRange(async (params) => hasUnsupportedDocument(params) ? null : linkedEditingRangesProvider.linkedEditingRanges(params)), connection.workspace.onDidRenameFiles(async (params) => {
|
|
85497
85490
|
let triggerUris = params.files.map((fileRename) => fileRename.newUri);
|
|
85498
85491
|
for (let { oldUri, newUri } of params.files)
|
|
85499
|
-
documentManager.rename(oldUri, newUri),
|
|
85492
|
+
documentManager.rename(oldUri, newUri), fs8.readDirectory.invalidate(theme_check_common_1.path.dirname(oldUri)), fs8.readDirectory.invalidate(theme_check_common_1.path.dirname(newUri)), fs8.readFile.invalidate(oldUri), fs8.readFile.invalidate(newUri), fs8.stat.invalidate(oldUri), fs8.stat.invalidate(newUri);
|
|
85500
85493
|
await renameHandler.onDidRenameFiles(params), runChecks.force(triggerUris);
|
|
85501
85494
|
}), connection.onDidChangeWatchedFiles(async (params) => {
|
|
85502
85495
|
var _a42;
|
|
@@ -85510,13 +85503,13 @@ var require_startServer = __commonJS({
|
|
|
85510
85503
|
}
|
|
85511
85504
|
switch (change.type) {
|
|
85512
85505
|
case vscode_languageserver_1.FileChangeType.Created:
|
|
85513
|
-
|
|
85506
|
+
fs8.readDirectory.invalidate(theme_check_common_1.path.dirname(change.uri)), fs8.readFile.invalidate(change.uri), fs8.stat.invalidate(change.uri), updates.push(documentManager.changeFromDisk(change.uri));
|
|
85514
85507
|
break;
|
|
85515
85508
|
case vscode_languageserver_1.FileChangeType.Changed:
|
|
85516
|
-
|
|
85509
|
+
fs8.readFile.invalidate(change.uri), fs8.stat.invalidate(change.uri), ((_a42 = documentManager.get(change.uri)) === null || _a42 === void 0 ? void 0 : _a42.version) === void 0 && updates.push(documentManager.changeFromDisk(change.uri));
|
|
85517
85510
|
break;
|
|
85518
85511
|
case vscode_languageserver_1.FileChangeType.Deleted:
|
|
85519
|
-
|
|
85512
|
+
fs8.readDirectory.invalidate(theme_check_common_1.path.dirname(change.uri)), fs8.readFile.invalidate(change.uri), fs8.stat.invalidate(change.uri), documentManager.delete(change.uri);
|
|
85520
85513
|
break;
|
|
85521
85514
|
}
|
|
85522
85515
|
change.uri.endsWith("metafields.json") && updates.push(findThemeRootURI(change.uri).then((rootUri) => getMetafieldDefinitionsForRootUri.invalidate(rootUri)));
|
|
@@ -85612,10 +85605,10 @@ var require_dependencies = __commonJS({
|
|
|
85612
85605
|
function asFsPath(uriOrPath) {
|
|
85613
85606
|
return vscode_uri_1.URI.isUri(uriOrPath) ? uriOrPath.fsPath : /^file:/i.test(uriOrPath) ? vscode_uri_1.URI.parse(uriOrPath).fsPath : vscode_uri_1.URI.file(uriOrPath).fsPath;
|
|
85614
85607
|
}
|
|
85615
|
-
var hasThemeAppExtensionConfig = async (rootUri,
|
|
85616
|
-
let fileUri = theme_check_node_1.path.normalize(uriString), fileExists3 = (0, theme_check_node_1.makeFileExists)(
|
|
85608
|
+
var hasThemeAppExtensionConfig = async (rootUri, fs8) => (await (0, theme_check_node_1.recursiveReadDirectory)(fs8, rootUri, ([uri]) => uri.endsWith(".extension.toml"))).length > 0, loadConfig2 = async function(uriString, fs8) {
|
|
85609
|
+
let fileUri = theme_check_node_1.path.normalize(uriString), fileExists3 = (0, theme_check_node_1.makeFileExists)(fs8), rootUri = vscode_uri_1.URI.parse(await (0, theme_check_node_1.findRoot)(fileUri, fileExists3)), scheme = rootUri.scheme, configUri = vscode_uri_1.Utils.joinPath(rootUri, ".theme-check.yml"), [configExists, isDefinitelyThemeAppExtension] = await Promise.all([
|
|
85617
85610
|
fileExists3(theme_check_node_1.path.normalize(configUri)),
|
|
85618
|
-
hasThemeAppExtensionConfig(theme_check_node_1.path.normalize(rootUri),
|
|
85611
|
+
hasThemeAppExtensionConfig(theme_check_node_1.path.normalize(rootUri), fs8)
|
|
85619
85612
|
]);
|
|
85620
85613
|
if (scheme === "file") {
|
|
85621
85614
|
let configPath = asFsPath(configUri), rootPath = asFsPath(rootUri);
|
|
@@ -85722,10 +85715,10 @@ var require_dist8 = __commonJS({
|
|
|
85722
85715
|
__exportStar2(require_dist7(), exports);
|
|
85723
85716
|
var getConnection = () => (0, node_1.createConnection)(node_process_1.stdin, node_process_1.stdout);
|
|
85724
85717
|
exports.getConnection = getConnection;
|
|
85725
|
-
function startServer2(connection = (0, exports.getConnection)(),
|
|
85718
|
+
function startServer2(connection = (0, exports.getConnection)(), fs8 = theme_check_node_1.NodeFileSystem) {
|
|
85726
85719
|
let log = (message) => console.error(message), themeLiquidDocsManager = new theme_check_docs_updater_1.ThemeLiquidDocsManager(log);
|
|
85727
85720
|
(0, theme_language_server_common_1.startServer)(connection, {
|
|
85728
|
-
fs:
|
|
85721
|
+
fs: fs8,
|
|
85729
85722
|
log,
|
|
85730
85723
|
loadConfig: dependencies_1.loadConfig,
|
|
85731
85724
|
themeDocset: themeLiquidDocsManager,
|
|
@@ -85742,10 +85735,10 @@ var require_readdir_glob = __commonJS({
|
|
|
85742
85735
|
"../../node_modules/.pnpm/readdir-glob@1.1.3/node_modules/readdir-glob/index.js"(exports, module) {
|
|
85743
85736
|
init_cjs_shims();
|
|
85744
85737
|
module.exports = readdirGlob;
|
|
85745
|
-
var
|
|
85738
|
+
var fs8 = __require("fs"), { EventEmitter: EventEmitter10 } = __require("events"), { Minimatch } = require_minimatch(), { resolve: resolve2 } = __require("path");
|
|
85746
85739
|
function readdir3(dir, strict) {
|
|
85747
85740
|
return new Promise((resolve3, reject) => {
|
|
85748
|
-
|
|
85741
|
+
fs8.readdir(dir, { withFileTypes: !0 }, (err2, files) => {
|
|
85749
85742
|
if (err2)
|
|
85750
85743
|
switch (err2.code) {
|
|
85751
85744
|
case "ENOTDIR":
|
|
@@ -85773,7 +85766,7 @@ var require_readdir_glob = __commonJS({
|
|
|
85773
85766
|
}
|
|
85774
85767
|
function stat(file, followSymlinks) {
|
|
85775
85768
|
return new Promise((resolve3, reject) => {
|
|
85776
|
-
(followSymlinks ?
|
|
85769
|
+
(followSymlinks ? fs8.stat : fs8.lstat)(file, (err2, stats) => {
|
|
85777
85770
|
if (err2)
|
|
85778
85771
|
switch (err2.code) {
|
|
85779
85772
|
case "ENOENT":
|
|
@@ -86976,7 +86969,7 @@ Source:
|
|
|
86976
86969
|
}
|
|
86977
86970
|
}
|
|
86978
86971
|
var sortBy$1 = awaitify(sortBy2, 3);
|
|
86979
|
-
function
|
|
86972
|
+
function timeout2(asyncFn, milliseconds, info2) {
|
|
86980
86973
|
var fn = wrapAsync(asyncFn);
|
|
86981
86974
|
return initialParams((args, callback) => {
|
|
86982
86975
|
var timedOut = !1, timer;
|
|
@@ -87129,7 +87122,7 @@ Source:
|
|
|
87129
87122
|
someLimit: someLimit$1,
|
|
87130
87123
|
someSeries: someSeries$1,
|
|
87131
87124
|
sortBy: sortBy$1,
|
|
87132
|
-
timeout,
|
|
87125
|
+
timeout: timeout2,
|
|
87133
87126
|
times,
|
|
87134
87127
|
timesLimit,
|
|
87135
87128
|
timesSeries,
|
|
@@ -87168,7 +87161,7 @@ Source:
|
|
|
87168
87161
|
during: whilst$1,
|
|
87169
87162
|
doDuring: doWhilst$1
|
|
87170
87163
|
};
|
|
87171
|
-
exports2.all = every$1, exports2.allLimit = everyLimit$1, exports2.allSeries = everySeries$1, exports2.any = some$1, exports2.anyLimit = someLimit$1, exports2.anySeries = someSeries$1, exports2.apply = apply, exports2.applyEach = applyEach, exports2.applyEachSeries = applyEachSeries, exports2.asyncify = asyncify, exports2.auto = auto, exports2.autoInject = autoInject, exports2.cargo = cargo$1, exports2.cargoQueue = cargo, exports2.compose = compose, exports2.concat = concat$1, exports2.concatLimit = concatLimit$1, exports2.concatSeries = concatSeries$1, exports2.constant = constant$1, exports2.default = index, exports2.detect = detect$1, exports2.detectLimit = detectLimit$1, exports2.detectSeries = detectSeries$1, exports2.dir = dir, exports2.doDuring = doWhilst$1, exports2.doUntil = doUntil, exports2.doWhilst = doWhilst$1, exports2.during = whilst$1, exports2.each = each, exports2.eachLimit = eachLimit$1, exports2.eachOf = eachOf$1, exports2.eachOfLimit = eachOfLimit$1, exports2.eachOfSeries = eachOfSeries$1, exports2.eachSeries = eachSeries$1, exports2.ensureAsync = ensureAsync, exports2.every = every$1, exports2.everyLimit = everyLimit$1, exports2.everySeries = everySeries$1, exports2.filter = filter$1, exports2.filterLimit = filterLimit$1, exports2.filterSeries = filterSeries$1, exports2.find = detect$1, exports2.findLimit = detectLimit$1, exports2.findSeries = detectSeries$1, exports2.flatMap = concat$1, exports2.flatMapLimit = concatLimit$1, exports2.flatMapSeries = concatSeries$1, exports2.foldl = reduce$1, exports2.foldr = reduceRight, exports2.forEach = each, exports2.forEachLimit = eachLimit$1, exports2.forEachOf = eachOf$1, exports2.forEachOfLimit = eachOfLimit$1, exports2.forEachOfSeries = eachOfSeries$1, exports2.forEachSeries = eachSeries$1, exports2.forever = forever$1, exports2.groupBy = groupBy2, exports2.groupByLimit = groupByLimit$1, exports2.groupBySeries = groupBySeries, exports2.inject = reduce$1, exports2.log = log, exports2.map = map$1, exports2.mapLimit = mapLimit$1, exports2.mapSeries = mapSeries$1, exports2.mapValues = mapValues, exports2.mapValuesLimit = mapValuesLimit$1, exports2.mapValuesSeries = mapValuesSeries, exports2.memoize = memoize, exports2.nextTick = nextTick, exports2.parallel = parallel, exports2.parallelLimit = parallelLimit, exports2.priorityQueue = priorityQueue, exports2.queue = queue, exports2.race = race$1, exports2.reduce = reduce$1, exports2.reduceRight = reduceRight, exports2.reflect = reflect, exports2.reflectAll = reflectAll, exports2.reject = reject$1, exports2.rejectLimit = rejectLimit$1, exports2.rejectSeries = rejectSeries$1, exports2.retry = retry, exports2.retryable = retryable, exports2.select = filter$1, exports2.selectLimit = filterLimit$1, exports2.selectSeries = filterSeries$1, exports2.seq = seq, exports2.series = series, exports2.setImmediate = setImmediate$1, exports2.some = some$1, exports2.someLimit = someLimit$1, exports2.someSeries = someSeries$1, exports2.sortBy = sortBy$1, exports2.timeout =
|
|
87164
|
+
exports2.all = every$1, exports2.allLimit = everyLimit$1, exports2.allSeries = everySeries$1, exports2.any = some$1, exports2.anyLimit = someLimit$1, exports2.anySeries = someSeries$1, exports2.apply = apply, exports2.applyEach = applyEach, exports2.applyEachSeries = applyEachSeries, exports2.asyncify = asyncify, exports2.auto = auto, exports2.autoInject = autoInject, exports2.cargo = cargo$1, exports2.cargoQueue = cargo, exports2.compose = compose, exports2.concat = concat$1, exports2.concatLimit = concatLimit$1, exports2.concatSeries = concatSeries$1, exports2.constant = constant$1, exports2.default = index, exports2.detect = detect$1, exports2.detectLimit = detectLimit$1, exports2.detectSeries = detectSeries$1, exports2.dir = dir, exports2.doDuring = doWhilst$1, exports2.doUntil = doUntil, exports2.doWhilst = doWhilst$1, exports2.during = whilst$1, exports2.each = each, exports2.eachLimit = eachLimit$1, exports2.eachOf = eachOf$1, exports2.eachOfLimit = eachOfLimit$1, exports2.eachOfSeries = eachOfSeries$1, exports2.eachSeries = eachSeries$1, exports2.ensureAsync = ensureAsync, exports2.every = every$1, exports2.everyLimit = everyLimit$1, exports2.everySeries = everySeries$1, exports2.filter = filter$1, exports2.filterLimit = filterLimit$1, exports2.filterSeries = filterSeries$1, exports2.find = detect$1, exports2.findLimit = detectLimit$1, exports2.findSeries = detectSeries$1, exports2.flatMap = concat$1, exports2.flatMapLimit = concatLimit$1, exports2.flatMapSeries = concatSeries$1, exports2.foldl = reduce$1, exports2.foldr = reduceRight, exports2.forEach = each, exports2.forEachLimit = eachLimit$1, exports2.forEachOf = eachOf$1, exports2.forEachOfLimit = eachOfLimit$1, exports2.forEachOfSeries = eachOfSeries$1, exports2.forEachSeries = eachSeries$1, exports2.forever = forever$1, exports2.groupBy = groupBy2, exports2.groupByLimit = groupByLimit$1, exports2.groupBySeries = groupBySeries, exports2.inject = reduce$1, exports2.log = log, exports2.map = map$1, exports2.mapLimit = mapLimit$1, exports2.mapSeries = mapSeries$1, exports2.mapValues = mapValues, exports2.mapValuesLimit = mapValuesLimit$1, exports2.mapValuesSeries = mapValuesSeries, exports2.memoize = memoize, exports2.nextTick = nextTick, exports2.parallel = parallel, exports2.parallelLimit = parallelLimit, exports2.priorityQueue = priorityQueue, exports2.queue = queue, exports2.race = race$1, exports2.reduce = reduce$1, exports2.reduceRight = reduceRight, exports2.reflect = reflect, exports2.reflectAll = reflectAll, exports2.reject = reject$1, exports2.rejectLimit = rejectLimit$1, exports2.rejectSeries = rejectSeries$1, exports2.retry = retry, exports2.retryable = retryable, exports2.select = filter$1, exports2.selectLimit = filterLimit$1, exports2.selectSeries = filterSeries$1, exports2.seq = seq, exports2.series = series, exports2.setImmediate = setImmediate$1, exports2.some = some$1, exports2.someLimit = someLimit$1, exports2.someSeries = someSeries$1, exports2.sortBy = sortBy$1, exports2.timeout = timeout2, exports2.times = times, exports2.timesLimit = timesLimit, exports2.timesSeries = timesSeries, exports2.transform = transform2, exports2.tryEach = tryEach$1, exports2.unmemoize = unmemoize, exports2.until = until, exports2.waterfall = waterfall$1, exports2.whilst = whilst$1, exports2.wrapSync = asyncify, Object.defineProperty(exports2, "__esModule", { value: !0 });
|
|
87172
87165
|
});
|
|
87173
87166
|
}
|
|
87174
87167
|
});
|
|
@@ -89147,7 +89140,7 @@ var require_lodash5 = __commonJS({
|
|
|
89147
89140
|
var require_file = __commonJS({
|
|
89148
89141
|
"../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/file.js"(exports, module) {
|
|
89149
89142
|
init_cjs_shims();
|
|
89150
|
-
var
|
|
89143
|
+
var fs8 = require_graceful_fs(), path4 = __require("path"), flatten = require_lodash2(), difference3 = require_lodash3(), union2 = require_lodash4(), isPlainObject2 = require_lodash5(), glob2 = require_glob(), file = module.exports = {}, pathSeparatorRe = /[\/\\]/g, processPatterns = function(patterns, fn) {
|
|
89151
89144
|
var result = [];
|
|
89152
89145
|
return flatten(patterns).forEach(function(pattern) {
|
|
89153
89146
|
var exclusion = pattern.indexOf("!") === 0;
|
|
@@ -89158,7 +89151,7 @@ var require_file = __commonJS({
|
|
|
89158
89151
|
};
|
|
89159
89152
|
file.exists = function() {
|
|
89160
89153
|
var filepath = path4.join.apply(path4, arguments);
|
|
89161
|
-
return
|
|
89154
|
+
return fs8.existsSync(filepath);
|
|
89162
89155
|
};
|
|
89163
89156
|
file.expand = function(...args) {
|
|
89164
89157
|
var options = isPlainObject2(args[0]) ? args.shift() : {}, patterns = Array.isArray(args[0]) ? args[0] : args;
|
|
@@ -89170,7 +89163,7 @@ var require_file = __commonJS({
|
|
|
89170
89163
|
return options.filter && (matches2 = matches2.filter(function(filepath) {
|
|
89171
89164
|
filepath = path4.join(options.cwd || "", filepath);
|
|
89172
89165
|
try {
|
|
89173
|
-
return typeof options.filter == "function" ? options.filter(filepath) :
|
|
89166
|
+
return typeof options.filter == "function" ? options.filter(filepath) : fs8.statSync(filepath)[options.filter]();
|
|
89174
89167
|
} catch {
|
|
89175
89168
|
return !1;
|
|
89176
89169
|
}
|
|
@@ -89226,7 +89219,7 @@ var require_file = __commonJS({
|
|
|
89226
89219
|
var require_archiver_utils = __commonJS({
|
|
89227
89220
|
"../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/index.js"(exports, module) {
|
|
89228
89221
|
init_cjs_shims();
|
|
89229
|
-
var
|
|
89222
|
+
var fs8 = require_graceful_fs(), path4 = __require("path"), nutil = __require("util"), lazystream = require_lazystream(), normalizePath2 = require_normalize_path(), defaults = require_lodash(), Stream2 = __require("stream").Stream, PassThrough2 = require_readable().PassThrough, utils = module.exports = {};
|
|
89230
89223
|
utils.file = require_file();
|
|
89231
89224
|
utils.collectStream = function(source, callback) {
|
|
89232
89225
|
var collection = [], size = 0;
|
|
@@ -89251,7 +89244,7 @@ var require_archiver_utils = __commonJS({
|
|
|
89251
89244
|
};
|
|
89252
89245
|
utils.lazyReadStream = function(filepath) {
|
|
89253
89246
|
return new lazystream.Readable(function() {
|
|
89254
|
-
return
|
|
89247
|
+
return fs8.createReadStream(filepath);
|
|
89255
89248
|
});
|
|
89256
89249
|
};
|
|
89257
89250
|
utils.normalizeInputSource = function(source) {
|
|
@@ -89276,14 +89269,14 @@ var require_archiver_utils = __commonJS({
|
|
|
89276
89269
|
};
|
|
89277
89270
|
utils.walkdir = function(dirpath, base, callback) {
|
|
89278
89271
|
var results = [];
|
|
89279
|
-
typeof base == "function" && (callback = base, base = dirpath),
|
|
89272
|
+
typeof base == "function" && (callback = base, base = dirpath), fs8.readdir(dirpath, function(err2, list2) {
|
|
89280
89273
|
var i = 0, file, filepath;
|
|
89281
89274
|
if (err2)
|
|
89282
89275
|
return callback(err2);
|
|
89283
89276
|
(function next() {
|
|
89284
89277
|
if (file = list2[i++], !file)
|
|
89285
89278
|
return callback(null, results);
|
|
89286
|
-
filepath = path4.join(dirpath, file),
|
|
89279
|
+
filepath = path4.join(dirpath, file), fs8.stat(filepath, function(err3, stats) {
|
|
89287
89280
|
results.push({
|
|
89288
89281
|
path: filepath,
|
|
89289
89282
|
relative: path4.relative(base, filepath).replace(/\\/g, "/"),
|
|
@@ -90949,7 +90942,7 @@ var require_readable2 = __commonJS({
|
|
|
90949
90942
|
var require_core = __commonJS({
|
|
90950
90943
|
"../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/core.js"(exports, module) {
|
|
90951
90944
|
init_cjs_shims();
|
|
90952
|
-
var
|
|
90945
|
+
var fs8 = __require("fs"), glob2 = require_readdir_glob(), async = require_async(), path4 = __require("path"), util2 = require_archiver_utils(), inherits = __require("util").inherits, ArchiverError = require_error2(), Transform2 = require_readable2().Transform, win32 = process.platform === "win32", Archiver = function(format5, options) {
|
|
90953
90946
|
if (!(this instanceof Archiver))
|
|
90954
90947
|
return new Archiver(format5, options);
|
|
90955
90948
|
typeof format5 != "string" && (options = format5, format5 = "zip"), options = this.options = util2.defaults(options, {
|
|
@@ -90973,7 +90966,7 @@ var require_core = __commonJS({
|
|
|
90973
90966
|
source: null,
|
|
90974
90967
|
filepath
|
|
90975
90968
|
};
|
|
90976
|
-
data.name || (data.name = filepath), data.sourcePath = filepath, task.data = data, this._entriesCount++, data.stats && data.stats instanceof
|
|
90969
|
+
data.name || (data.name = filepath), data.sourcePath = filepath, task.data = data, this._entriesCount++, data.stats && data.stats instanceof fs8.Stats ? (task = this._updateQueueTaskWithStats(task, data.stats), task && (data.stats.size && (this._fsEntriesTotalBytes += data.stats.size), this._queue.push(task))) : this._statQueue.push(task);
|
|
90977
90970
|
};
|
|
90978
90971
|
Archiver.prototype._finalize = function() {
|
|
90979
90972
|
this._state.finalizing || this._state.finalized || this._state.aborted || (this._state.finalizing = !0, this._moduleFinalize(), this._state.finalizing = !1, this._state.finalized = !0);
|
|
@@ -91053,7 +91046,7 @@ var require_core = __commonJS({
|
|
|
91053
91046
|
callback();
|
|
91054
91047
|
return;
|
|
91055
91048
|
}
|
|
91056
|
-
|
|
91049
|
+
fs8.lstat(task.filepath, function(err2, stats) {
|
|
91057
91050
|
if (this._state.aborted) {
|
|
91058
91051
|
setImmediate(callback);
|
|
91059
91052
|
return;
|
|
@@ -91077,7 +91070,7 @@ var require_core = __commonJS({
|
|
|
91077
91070
|
else if (stats.isDirectory() && this._moduleSupports("directory"))
|
|
91078
91071
|
task.data.name = util2.trailingSlashIt(task.data.name), task.data.type = "directory", task.data.sourcePath = util2.trailingSlashIt(task.filepath), task.data.sourceType = "buffer", task.source = Buffer.concat([]);
|
|
91079
91072
|
else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
|
|
91080
|
-
var linkPath =
|
|
91073
|
+
var linkPath = fs8.readlinkSync(task.filepath), dirName = path4.dirname(task.filepath);
|
|
91081
91074
|
task.data.type = "symlink", task.data.linkname = path4.relative(dirName, path4.resolve(dirName, linkPath)), task.data.sourceType = "buffer", task.source = Buffer.concat([]);
|
|
91082
91075
|
} else
|
|
91083
91076
|
return stats.isDirectory() ? this.emit("warning", new ArchiverError("DIRECTORYNOTSUPPORTED", task.data)) : stats.isSymbolicLink() ? this.emit("warning", new ArchiverError("SYMLINKNOTSUPPORTED", task.data)) : this.emit("warning", new ArchiverError("ENTRYNOTSUPPORTED", task.data)), null;
|
|
@@ -92237,7 +92230,7 @@ var require_compress_commons = __commonJS({
|
|
|
92237
92230
|
var require_file2 = __commonJS({
|
|
92238
92231
|
"../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/file.js"(exports, module) {
|
|
92239
92232
|
init_cjs_shims();
|
|
92240
|
-
var
|
|
92233
|
+
var fs8 = require_graceful_fs(), path4 = __require("path"), flatten = require_lodash2(), difference3 = require_lodash3(), union2 = require_lodash4(), isPlainObject2 = require_lodash5(), glob2 = require_glob(), file = module.exports = {}, pathSeparatorRe = /[\/\\]/g, processPatterns = function(patterns, fn) {
|
|
92241
92234
|
var result = [];
|
|
92242
92235
|
return flatten(patterns).forEach(function(pattern) {
|
|
92243
92236
|
var exclusion = pattern.indexOf("!") === 0;
|
|
@@ -92248,7 +92241,7 @@ var require_file2 = __commonJS({
|
|
|
92248
92241
|
};
|
|
92249
92242
|
file.exists = function() {
|
|
92250
92243
|
var filepath = path4.join.apply(path4, arguments);
|
|
92251
|
-
return
|
|
92244
|
+
return fs8.existsSync(filepath);
|
|
92252
92245
|
};
|
|
92253
92246
|
file.expand = function(...args) {
|
|
92254
92247
|
var options = isPlainObject2(args[0]) ? args.shift() : {}, patterns = Array.isArray(args[0]) ? args[0] : args;
|
|
@@ -92260,7 +92253,7 @@ var require_file2 = __commonJS({
|
|
|
92260
92253
|
return options.filter && (matches2 = matches2.filter(function(filepath) {
|
|
92261
92254
|
filepath = path4.join(options.cwd || "", filepath);
|
|
92262
92255
|
try {
|
|
92263
|
-
return typeof options.filter == "function" ? options.filter(filepath) :
|
|
92256
|
+
return typeof options.filter == "function" ? options.filter(filepath) : fs8.statSync(filepath)[options.filter]();
|
|
92264
92257
|
} catch {
|
|
92265
92258
|
return !1;
|
|
92266
92259
|
}
|
|
@@ -92316,7 +92309,7 @@ var require_file2 = __commonJS({
|
|
|
92316
92309
|
var require_archiver_utils2 = __commonJS({
|
|
92317
92310
|
"../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/index.js"(exports, module) {
|
|
92318
92311
|
init_cjs_shims();
|
|
92319
|
-
var
|
|
92312
|
+
var fs8 = require_graceful_fs(), path4 = __require("path"), lazystream = require_lazystream(), normalizePath2 = require_normalize_path(), defaults = require_lodash(), Stream2 = __require("stream").Stream, PassThrough2 = require_readable2().PassThrough, utils = module.exports = {};
|
|
92320
92313
|
utils.file = require_file2();
|
|
92321
92314
|
utils.collectStream = function(source, callback) {
|
|
92322
92315
|
var collection = [], size = 0;
|
|
@@ -92341,7 +92334,7 @@ var require_archiver_utils2 = __commonJS({
|
|
|
92341
92334
|
};
|
|
92342
92335
|
utils.lazyReadStream = function(filepath) {
|
|
92343
92336
|
return new lazystream.Readable(function() {
|
|
92344
|
-
return
|
|
92337
|
+
return fs8.createReadStream(filepath);
|
|
92345
92338
|
});
|
|
92346
92339
|
};
|
|
92347
92340
|
utils.normalizeInputSource = function(source) {
|
|
@@ -92358,14 +92351,14 @@ var require_archiver_utils2 = __commonJS({
|
|
|
92358
92351
|
};
|
|
92359
92352
|
utils.walkdir = function(dirpath, base, callback) {
|
|
92360
92353
|
var results = [];
|
|
92361
|
-
typeof base == "function" && (callback = base, base = dirpath),
|
|
92354
|
+
typeof base == "function" && (callback = base, base = dirpath), fs8.readdir(dirpath, function(err2, list2) {
|
|
92362
92355
|
var i = 0, file, filepath;
|
|
92363
92356
|
if (err2)
|
|
92364
92357
|
return callback(err2);
|
|
92365
92358
|
(function next() {
|
|
92366
92359
|
if (file = list2[i++], !file)
|
|
92367
92360
|
return callback(null, results);
|
|
92368
|
-
filepath = path4.join(dirpath, file),
|
|
92361
|
+
filepath = path4.join(dirpath, file), fs8.stat(filepath, function(err3, stats) {
|
|
92369
92362
|
results.push({
|
|
92370
92363
|
path: filepath,
|
|
92371
92364
|
relative: path4.relative(base, filepath).replace(/\\/g, "/"),
|
|
@@ -93256,9 +93249,9 @@ var require_temp_dir = __commonJS({
|
|
|
93256
93249
|
"../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports, module) {
|
|
93257
93250
|
"use strict";
|
|
93258
93251
|
init_cjs_shims();
|
|
93259
|
-
var
|
|
93252
|
+
var fs8 = __require("fs"), os2 = __require("os"), tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__");
|
|
93260
93253
|
global[tempDirectorySymbol] || Object.defineProperty(global, tempDirectorySymbol, {
|
|
93261
|
-
value:
|
|
93254
|
+
value: fs8.realpathSync(os2.tmpdir())
|
|
93262
93255
|
});
|
|
93263
93256
|
module.exports = global[tempDirectorySymbol];
|
|
93264
93257
|
}
|
|
@@ -93972,10 +93965,10 @@ var require_bugsnag = __commonJS({
|
|
|
93972
93965
|
}, _$pad_4 = function(num, size) {
|
|
93973
93966
|
var s = "000000000" + num;
|
|
93974
93967
|
return s.substr(s.length - size);
|
|
93975
|
-
},
|
|
93968
|
+
}, os2 = __require("os");
|
|
93976
93969
|
function getHostname() {
|
|
93977
93970
|
try {
|
|
93978
|
-
return
|
|
93971
|
+
return os2.hostname();
|
|
93979
93972
|
} catch {
|
|
93980
93973
|
return process.env._CLUSTER_NETWORK_NAME_ || process.env.COMPUTERNAME || "hostname";
|
|
93981
93974
|
}
|
|
@@ -94213,10 +94206,10 @@ metadata was removed`
|
|
|
94213
94206
|
var payload = _$safeJsonStringify_5(session, null, null);
|
|
94214
94207
|
return payload;
|
|
94215
94208
|
};
|
|
94216
|
-
var
|
|
94209
|
+
var http2 = __require("http"), https2 = __require("https"), ___require_36 = __require("url"), parse5 = ___require_36.parse, _$request_36 = function(_ref, cb) {
|
|
94217
94210
|
var url2 = _ref.url, headers = _ref.headers, body = _ref.body, agent = _ref.agent, didError = !1, onError = function(err2) {
|
|
94218
94211
|
didError || (didError = !0, cb(err2));
|
|
94219
|
-
}, parsedUrl = parse5(url2), secure = parsedUrl.protocol === "https:", transport = secure ? https2 :
|
|
94212
|
+
}, parsedUrl = parse5(url2), secure = parsedUrl.protocol === "https:", transport = secure ? https2 : http2, req = transport.request({
|
|
94220
94213
|
method: "POST",
|
|
94221
94214
|
hostname: parsedUrl.hostname,
|
|
94222
94215
|
port: parsedUrl.port,
|
|
@@ -95985,7 +95978,7 @@ Source:
|
|
|
95985
95978
|
}
|
|
95986
95979
|
}
|
|
95987
95980
|
var sortBy$1 = awaitify(sortBy2, 3);
|
|
95988
|
-
function
|
|
95981
|
+
function timeout2(asyncFn, milliseconds, info2) {
|
|
95989
95982
|
var fn = wrapAsync(asyncFn);
|
|
95990
95983
|
return initialParams((args, callback) => {
|
|
95991
95984
|
var timedOut = !1, timer;
|
|
@@ -96138,7 +96131,7 @@ Source:
|
|
|
96138
96131
|
someLimit: someLimit$1,
|
|
96139
96132
|
someSeries: someSeries$1,
|
|
96140
96133
|
sortBy: sortBy$1,
|
|
96141
|
-
timeout,
|
|
96134
|
+
timeout: timeout2,
|
|
96142
96135
|
times,
|
|
96143
96136
|
timesLimit,
|
|
96144
96137
|
timesSeries,
|
|
@@ -96177,7 +96170,7 @@ Source:
|
|
|
96177
96170
|
during: whilst$1,
|
|
96178
96171
|
doDuring: doWhilst$1
|
|
96179
96172
|
};
|
|
96180
|
-
exports2.all = every$1, exports2.allLimit = everyLimit$1, exports2.allSeries = everySeries$1, exports2.any = some$1, exports2.anyLimit = someLimit$1, exports2.anySeries = someSeries$1, exports2.apply = apply, exports2.applyEach = applyEach, exports2.applyEachSeries = applyEachSeries, exports2.asyncify = asyncify, exports2.auto = auto, exports2.autoInject = autoInject, exports2.cargo = cargo$1, exports2.cargoQueue = cargo, exports2.compose = compose, exports2.concat = concat$1, exports2.concatLimit = concatLimit$1, exports2.concatSeries = concatSeries$1, exports2.constant = constant$1, exports2.default = index, exports2.detect = detect$1, exports2.detectLimit = detectLimit$1, exports2.detectSeries = detectSeries$1, exports2.dir = dir, exports2.doDuring = doWhilst$1, exports2.doUntil = doUntil, exports2.doWhilst = doWhilst$1, exports2.during = whilst$1, exports2.each = each, exports2.eachLimit = eachLimit$1, exports2.eachOf = eachOf$1, exports2.eachOfLimit = eachOfLimit$1, exports2.eachOfSeries = eachOfSeries$1, exports2.eachSeries = eachSeries$1, exports2.ensureAsync = ensureAsync, exports2.every = every$1, exports2.everyLimit = everyLimit$1, exports2.everySeries = everySeries$1, exports2.filter = filter$1, exports2.filterLimit = filterLimit$1, exports2.filterSeries = filterSeries$1, exports2.find = detect$1, exports2.findLimit = detectLimit$1, exports2.findSeries = detectSeries$1, exports2.flatMap = concat$1, exports2.flatMapLimit = concatLimit$1, exports2.flatMapSeries = concatSeries$1, exports2.foldl = reduce$1, exports2.foldr = reduceRight, exports2.forEach = each, exports2.forEachLimit = eachLimit$1, exports2.forEachOf = eachOf$1, exports2.forEachOfLimit = eachOfLimit$1, exports2.forEachOfSeries = eachOfSeries$1, exports2.forEachSeries = eachSeries$1, exports2.forever = forever$1, exports2.groupBy = groupBy2, exports2.groupByLimit = groupByLimit$1, exports2.groupBySeries = groupBySeries, exports2.inject = reduce$1, exports2.log = log, exports2.map = map$1, exports2.mapLimit = mapLimit$1, exports2.mapSeries = mapSeries$1, exports2.mapValues = mapValues, exports2.mapValuesLimit = mapValuesLimit$1, exports2.mapValuesSeries = mapValuesSeries, exports2.memoize = memoize, exports2.nextTick = nextTick, exports2.parallel = parallel, exports2.parallelLimit = parallelLimit, exports2.priorityQueue = priorityQueue, exports2.queue = queue, exports2.race = race$1, exports2.reduce = reduce$1, exports2.reduceRight = reduceRight, exports2.reflect = reflect, exports2.reflectAll = reflectAll, exports2.reject = reject$1, exports2.rejectLimit = rejectLimit$1, exports2.rejectSeries = rejectSeries$1, exports2.retry = retry, exports2.retryable = retryable, exports2.select = filter$1, exports2.selectLimit = filterLimit$1, exports2.selectSeries = filterSeries$1, exports2.seq = seq, exports2.series = series, exports2.setImmediate = setImmediate$1, exports2.some = some$1, exports2.someLimit = someLimit$1, exports2.someSeries = someSeries$1, exports2.sortBy = sortBy$1, exports2.timeout =
|
|
96173
|
+
exports2.all = every$1, exports2.allLimit = everyLimit$1, exports2.allSeries = everySeries$1, exports2.any = some$1, exports2.anyLimit = someLimit$1, exports2.anySeries = someSeries$1, exports2.apply = apply, exports2.applyEach = applyEach, exports2.applyEachSeries = applyEachSeries, exports2.asyncify = asyncify, exports2.auto = auto, exports2.autoInject = autoInject, exports2.cargo = cargo$1, exports2.cargoQueue = cargo, exports2.compose = compose, exports2.concat = concat$1, exports2.concatLimit = concatLimit$1, exports2.concatSeries = concatSeries$1, exports2.constant = constant$1, exports2.default = index, exports2.detect = detect$1, exports2.detectLimit = detectLimit$1, exports2.detectSeries = detectSeries$1, exports2.dir = dir, exports2.doDuring = doWhilst$1, exports2.doUntil = doUntil, exports2.doWhilst = doWhilst$1, exports2.during = whilst$1, exports2.each = each, exports2.eachLimit = eachLimit$1, exports2.eachOf = eachOf$1, exports2.eachOfLimit = eachOfLimit$1, exports2.eachOfSeries = eachOfSeries$1, exports2.eachSeries = eachSeries$1, exports2.ensureAsync = ensureAsync, exports2.every = every$1, exports2.everyLimit = everyLimit$1, exports2.everySeries = everySeries$1, exports2.filter = filter$1, exports2.filterLimit = filterLimit$1, exports2.filterSeries = filterSeries$1, exports2.find = detect$1, exports2.findLimit = detectLimit$1, exports2.findSeries = detectSeries$1, exports2.flatMap = concat$1, exports2.flatMapLimit = concatLimit$1, exports2.flatMapSeries = concatSeries$1, exports2.foldl = reduce$1, exports2.foldr = reduceRight, exports2.forEach = each, exports2.forEachLimit = eachLimit$1, exports2.forEachOf = eachOf$1, exports2.forEachOfLimit = eachOfLimit$1, exports2.forEachOfSeries = eachOfSeries$1, exports2.forEachSeries = eachSeries$1, exports2.forever = forever$1, exports2.groupBy = groupBy2, exports2.groupByLimit = groupByLimit$1, exports2.groupBySeries = groupBySeries, exports2.inject = reduce$1, exports2.log = log, exports2.map = map$1, exports2.mapLimit = mapLimit$1, exports2.mapSeries = mapSeries$1, exports2.mapValues = mapValues, exports2.mapValuesLimit = mapValuesLimit$1, exports2.mapValuesSeries = mapValuesSeries, exports2.memoize = memoize, exports2.nextTick = nextTick, exports2.parallel = parallel, exports2.parallelLimit = parallelLimit, exports2.priorityQueue = priorityQueue, exports2.queue = queue, exports2.race = race$1, exports2.reduce = reduce$1, exports2.reduceRight = reduceRight, exports2.reflect = reflect, exports2.reflectAll = reflectAll, exports2.reject = reject$1, exports2.rejectLimit = rejectLimit$1, exports2.rejectSeries = rejectSeries$1, exports2.retry = retry, exports2.retryable = retryable, exports2.select = filter$1, exports2.selectLimit = filterLimit$1, exports2.selectSeries = filterSeries$1, exports2.seq = seq, exports2.series = series, exports2.setImmediate = setImmediate$1, exports2.some = some$1, exports2.someLimit = someLimit$1, exports2.someSeries = someSeries$1, exports2.sortBy = sortBy$1, exports2.timeout = timeout2, exports2.times = times, exports2.timesLimit = timesLimit, exports2.timesSeries = timesSeries, exports2.transform = transform2, exports2.tryEach = tryEach$1, exports2.unmemoize = unmemoize, exports2.until = until, exports2.waterfall = waterfall$1, exports2.whilst = whilst$1, exports2.wrapSync = asyncify, Object.defineProperty(exports2, "__esModule", { value: !0 });
|
|
96181
96174
|
});
|
|
96182
96175
|
}
|
|
96183
96176
|
});
|
|
@@ -97571,11 +97564,11 @@ var require_peek_stream = __commonJS({
|
|
|
97571
97564
|
var require_pump2 = __commonJS({
|
|
97572
97565
|
"../../node_modules/.pnpm/pump@2.0.1/node_modules/pump/index.js"(exports, module) {
|
|
97573
97566
|
init_cjs_shims();
|
|
97574
|
-
var once = require_once(), eos = require_end_of_stream(),
|
|
97567
|
+
var once = require_once(), eos = require_end_of_stream(), fs8 = __require("fs"), noop2 = function() {
|
|
97575
97568
|
}, ancient = /^v?\.0/.test(process.version), isFn = function(fn) {
|
|
97576
97569
|
return typeof fn == "function";
|
|
97577
97570
|
}, isFS = function(stream3) {
|
|
97578
|
-
return !ancient || !
|
|
97571
|
+
return !ancient || !fs8 ? !1 : (stream3 instanceof (fs8.ReadStream || noop2) || stream3 instanceof (fs8.WriteStream || noop2)) && isFn(stream3.close);
|
|
97579
97572
|
}, isRequest = function(stream3) {
|
|
97580
97573
|
return stream3.setHeader && isFn(stream3.abort);
|
|
97581
97574
|
}, destroyer = function(stream3, reading, writing, callback) {
|
|
@@ -97700,22 +97693,22 @@ var require_chownr = __commonJS({
|
|
|
97700
97693
|
"../../node_modules/.pnpm/chownr@1.1.4/node_modules/chownr/chownr.js"(exports, module) {
|
|
97701
97694
|
"use strict";
|
|
97702
97695
|
init_cjs_shims();
|
|
97703
|
-
var
|
|
97696
|
+
var fs8 = __require("fs"), path4 = __require("path"), LCHOWN = fs8.lchown ? "lchown" : "chown", LCHOWNSYNC = fs8.lchownSync ? "lchownSync" : "chownSync", needEISDIRHandled = fs8.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), lchownSync = (path5, uid, gid) => {
|
|
97704
97697
|
try {
|
|
97705
|
-
return
|
|
97698
|
+
return fs8[LCHOWNSYNC](path5, uid, gid);
|
|
97706
97699
|
} catch (er) {
|
|
97707
97700
|
if (er.code !== "ENOENT")
|
|
97708
97701
|
throw er;
|
|
97709
97702
|
}
|
|
97710
97703
|
}, chownSync = (path5, uid, gid) => {
|
|
97711
97704
|
try {
|
|
97712
|
-
return
|
|
97705
|
+
return fs8.chownSync(path5, uid, gid);
|
|
97713
97706
|
} catch (er) {
|
|
97714
97707
|
if (er.code !== "ENOENT")
|
|
97715
97708
|
throw er;
|
|
97716
97709
|
}
|
|
97717
97710
|
}, handleEISDIR = needEISDIRHandled ? (path5, uid, gid, cb) => (er) => {
|
|
97718
|
-
!er || er.code !== "EISDIR" ? cb(er) :
|
|
97711
|
+
!er || er.code !== "EISDIR" ? cb(er) : fs8.chown(path5, uid, gid, cb);
|
|
97719
97712
|
} : (_3, __, ___, cb) => cb, handleEISDirSync = needEISDIRHandled ? (path5, uid, gid) => {
|
|
97720
97713
|
try {
|
|
97721
97714
|
return lchownSync(path5, uid, gid);
|
|
@@ -97724,15 +97717,15 @@ var require_chownr = __commonJS({
|
|
|
97724
97717
|
throw er;
|
|
97725
97718
|
chownSync(path5, uid, gid);
|
|
97726
97719
|
}
|
|
97727
|
-
} : (path5, uid, gid) => lchownSync(path5, uid, gid), nodeVersion = process.version, readdir3 = (path5, options, cb) =>
|
|
97728
|
-
/^v4\./.test(nodeVersion) && (readdir3 = (path5, options, cb) =>
|
|
97720
|
+
} : (path5, uid, gid) => lchownSync(path5, uid, gid), nodeVersion = process.version, readdir3 = (path5, options, cb) => fs8.readdir(path5, options, cb), readdirSync3 = (path5, options) => fs8.readdirSync(path5, options);
|
|
97721
|
+
/^v4\./.test(nodeVersion) && (readdir3 = (path5, options, cb) => fs8.readdir(path5, cb));
|
|
97729
97722
|
var chown = (cpath, uid, gid, cb) => {
|
|
97730
|
-
|
|
97723
|
+
fs8[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, (er) => {
|
|
97731
97724
|
cb(er && er.code !== "ENOENT" ? er : null);
|
|
97732
97725
|
}));
|
|
97733
97726
|
}, chownrKid = (p, child, uid, gid, cb) => {
|
|
97734
97727
|
if (typeof child == "string")
|
|
97735
|
-
return
|
|
97728
|
+
return fs8.lstat(path4.resolve(p, child), (er, stats) => {
|
|
97736
97729
|
if (er)
|
|
97737
97730
|
return cb(er.code !== "ENOENT" ? er : null);
|
|
97738
97731
|
stats.name = child, chownrKid(p, stats, uid, gid, cb);
|
|
@@ -97771,7 +97764,7 @@ var require_chownr = __commonJS({
|
|
|
97771
97764
|
}, chownrKidSync = (p, child, uid, gid) => {
|
|
97772
97765
|
if (typeof child == "string")
|
|
97773
97766
|
try {
|
|
97774
|
-
let stats =
|
|
97767
|
+
let stats = fs8.lstatSync(path4.resolve(p, child));
|
|
97775
97768
|
stats.name = child, child = stats;
|
|
97776
97769
|
} catch (er) {
|
|
97777
97770
|
if (er.code === "ENOENT")
|
|
@@ -97801,11 +97794,11 @@ var require_chownr = __commonJS({
|
|
|
97801
97794
|
var require_mkdirp_classic = __commonJS({
|
|
97802
97795
|
"../../node_modules/.pnpm/mkdirp-classic@0.5.3/node_modules/mkdirp-classic/index.js"(exports, module) {
|
|
97803
97796
|
init_cjs_shims();
|
|
97804
|
-
var path4 = __require("path"),
|
|
97797
|
+
var path4 = __require("path"), fs8 = __require("fs"), _0777 = parseInt("0777", 8);
|
|
97805
97798
|
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
|
|
97806
97799
|
function mkdirP(p, opts, f2, made) {
|
|
97807
97800
|
typeof opts == "function" ? (f2 = opts, opts = {}) : (!opts || typeof opts != "object") && (opts = { mode: opts });
|
|
97808
|
-
var mode = opts.mode, xfs = opts.fs ||
|
|
97801
|
+
var mode = opts.mode, xfs = opts.fs || fs8;
|
|
97809
97802
|
mode === void 0 && (mode = _0777 & ~process.umask()), made || (made = null);
|
|
97810
97803
|
var cb = f2 || function() {
|
|
97811
97804
|
};
|
|
@@ -97831,7 +97824,7 @@ var require_mkdirp_classic = __commonJS({
|
|
|
97831
97824
|
}
|
|
97832
97825
|
mkdirP.sync = function sync(p, opts, made) {
|
|
97833
97826
|
(!opts || typeof opts != "object") && (opts = { mode: opts });
|
|
97834
|
-
var mode = opts.mode, xfs = opts.fs ||
|
|
97827
|
+
var mode = opts.mode, xfs = opts.fs || fs8;
|
|
97835
97828
|
mode === void 0 && (mode = _0777 & ~process.umask()), made || (made = null), p = path4.resolve(p);
|
|
97836
97829
|
try {
|
|
97837
97830
|
xfs.mkdirSync(p, mode), made = made || p;
|
|
@@ -97863,20 +97856,20 @@ var require_mkdirp_classic = __commonJS({
|
|
|
97863
97856
|
var require_tar_fs = __commonJS({
|
|
97864
97857
|
"../../node_modules/.pnpm/tar-fs@2.1.1/node_modules/tar-fs/index.js"(exports) {
|
|
97865
97858
|
init_cjs_shims();
|
|
97866
|
-
var chownr = require_chownr(), tar = require_tar_stream(), pump = require_pump(), mkdirp = require_mkdirp_classic(),
|
|
97859
|
+
var chownr = require_chownr(), tar = require_tar_stream(), pump = require_pump(), mkdirp = require_mkdirp_classic(), fs8 = __require("fs"), path4 = __require("path"), os2 = __require("os"), win32 = os2.platform() === "win32", noop2 = function() {
|
|
97867
97860
|
}, echo = function(name) {
|
|
97868
97861
|
return name;
|
|
97869
97862
|
}, normalize = win32 ? function(name) {
|
|
97870
97863
|
return name.replace(/\\/g, "/").replace(/[:?<>|]/g, "_");
|
|
97871
|
-
} : echo, statAll = function(
|
|
97864
|
+
} : echo, statAll = function(fs9, stat, cwd3, ignore3, entries, sort2) {
|
|
97872
97865
|
var queue = entries || ["."];
|
|
97873
97866
|
return function(callback) {
|
|
97874
97867
|
if (!queue.length) return callback();
|
|
97875
97868
|
var next = queue.shift(), nextAbs = path4.join(cwd3, next);
|
|
97876
|
-
stat.call(
|
|
97869
|
+
stat.call(fs9, nextAbs, function(err2, stat2) {
|
|
97877
97870
|
if (err2) return callback(err2);
|
|
97878
97871
|
if (!stat2.isDirectory()) return callback(null, next, stat2);
|
|
97879
|
-
|
|
97872
|
+
fs9.readdir(nextAbs, function(err3, files) {
|
|
97880
97873
|
if (err3) return callback(err3);
|
|
97881
97874
|
sort2 && files.sort();
|
|
97882
97875
|
for (var i = 0; i < files.length; i++)
|
|
@@ -97894,7 +97887,7 @@ var require_tar_fs = __commonJS({
|
|
|
97894
97887
|
};
|
|
97895
97888
|
exports.pack = function(cwd3, opts) {
|
|
97896
97889
|
cwd3 || (cwd3 = "."), opts || (opts = {});
|
|
97897
|
-
var xfs = opts.fs ||
|
|
97890
|
+
var xfs = opts.fs || fs8, ignore3 = opts.ignore || opts.filter || noop2, map = opts.map || noop2, mapStream = opts.mapStream || echo, statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd3, ignore3, opts.entries, opts.sort), strict = opts.strict !== !1, umask = typeof opts.umask == "number" ? ~opts.umask : ~processUmask(), dmode = typeof opts.dmode == "number" ? opts.dmode : 0, fmode = typeof opts.fmode == "number" ? opts.fmode : 0, pack = opts.pack || tar.pack(), finish = opts.finish || noop2;
|
|
97898
97891
|
opts.strip && (map = strip(map, opts.strip)), opts.readable && (dmode |= parseInt(555, 8), fmode |= parseInt(444, 8)), opts.writable && (dmode |= parseInt(333, 8), fmode |= parseInt(222, 8));
|
|
97899
97892
|
var onsymlink = function(filename, header) {
|
|
97900
97893
|
xfs.readlink(path4.join(cwd3, filename), function(err2, linkname) {
|
|
@@ -97943,7 +97936,7 @@ var require_tar_fs = __commonJS({
|
|
|
97943
97936
|
};
|
|
97944
97937
|
exports.extract = function(cwd3, opts) {
|
|
97945
97938
|
cwd3 || (cwd3 = "."), opts || (opts = {});
|
|
97946
|
-
var xfs = opts.fs ||
|
|
97939
|
+
var xfs = opts.fs || fs8, ignore3 = opts.ignore || opts.filter || noop2, map = opts.map || noop2, mapStream = opts.mapStream || echo, own = opts.chown !== !1 && !win32 && processGetuid() === 0, extract2 = opts.extract || tar.extract(), stack = [], now = /* @__PURE__ */ new Date(), umask = typeof opts.umask == "number" ? ~opts.umask : ~processUmask(), dmode = typeof opts.dmode == "number" ? opts.dmode : 0, fmode = typeof opts.fmode == "number" ? opts.fmode : 0, strict = opts.strict !== !1;
|
|
97947
97940
|
opts.strip && (map = strip(map, opts.strip)), opts.readable && (dmode |= parseInt(555, 8), fmode |= parseInt(444, 8)), opts.writable && (dmode |= parseInt(333, 8), fmode |= parseInt(222, 8));
|
|
97948
97941
|
var utimesParent = function(name, cb) {
|
|
97949
97942
|
for (var top; (top = head(stack)) && name.slice(0, top[0].length) !== top[0]; ) stack.pop();
|
|
@@ -98036,11 +98029,11 @@ var require_tar_fs = __commonJS({
|
|
|
98036
98029
|
});
|
|
98037
98030
|
}), opts.finish && extract2.on("finish", opts.finish), extract2;
|
|
98038
98031
|
};
|
|
98039
|
-
function validate5(
|
|
98032
|
+
function validate5(fs9, name, root, cb) {
|
|
98040
98033
|
if (name === root) return cb(null, !0);
|
|
98041
|
-
|
|
98034
|
+
fs9.lstat(name, function(err2, st) {
|
|
98042
98035
|
if (err2 && err2.code !== "ENOENT") return cb(err2);
|
|
98043
|
-
if (err2 || st.isDirectory()) return validate5(
|
|
98036
|
+
if (err2 || st.isDirectory()) return validate5(fs9, path4.join(name, ".."), root, cb);
|
|
98044
98037
|
cb(null, !1);
|
|
98045
98038
|
});
|
|
98046
98039
|
}
|
|
@@ -98955,7 +98948,7 @@ var require_lib9 = __commonJS({
|
|
|
98955
98948
|
generateContentsFromGraphqlString: () => generateContentsFromGraphqlString,
|
|
98956
98949
|
generateGraphQLString: () => generateGraphQLString
|
|
98957
98950
|
});
|
|
98958
|
-
var
|
|
98951
|
+
var fs8 = __toModule(__require("fs")), graphql_tag = __toModule(require_main6()), readline2 = __toModule(__require("readline")), path4 = __toModule(__require("path")), generateDocumentNodeString = (graphqlDocument, mapDocumentNode) => {
|
|
98959
98952
|
let documentNodeToUse = mapDocumentNode ? mapDocumentNode(graphqlDocument) : graphqlDocument;
|
|
98960
98953
|
return JSON.stringify(documentNodeToUse, (key, value) => value === void 0 ? "__undefined" : value).replace(/"__undefined"/g, "undefined");
|
|
98961
98954
|
}, topologicallySortParsedFiles = (parsedFiles, cache4) => {
|
|
@@ -98968,7 +98961,7 @@ var require_lib9 = __commonJS({
|
|
|
98968
98961
|
return parsedFiles.forEach(visitFile), sorted;
|
|
98969
98962
|
}, parseGraphQLFile = (filePath) => new Promise((resolve2) => {
|
|
98970
98963
|
let readInterface = readline2.default.createInterface({
|
|
98971
|
-
input:
|
|
98964
|
+
input: fs8.default.createReadStream(filePath)
|
|
98972
98965
|
}), body = "", imports = [], hasExhaustedImports = !1, parseImportAndCapture = (importCommentPrefix, line) => {
|
|
98973
98966
|
let relativePath2 = line.replace(importCommentPrefix, ""), relativePathWithoutQuotations = relativePath2.replace(/"|'/g, ""), absolutePath = path4.default.join(path4.default.dirname(filePath), relativePathWithoutQuotations);
|
|
98974
98967
|
imports.push({
|
|
@@ -99062,17 +99055,17 @@ var require_retry_operation = __commonJS({
|
|
|
99062
99055
|
if (err2 && currentTime - this._operationStart >= this._maxRetryTime)
|
|
99063
99056
|
return this._errors.unshift(new Error("RetryOperation timeout occurred")), !1;
|
|
99064
99057
|
this._errors.push(err2);
|
|
99065
|
-
var
|
|
99066
|
-
if (
|
|
99058
|
+
var timeout2 = this._timeouts.shift();
|
|
99059
|
+
if (timeout2 === void 0)
|
|
99067
99060
|
if (this._cachedTimeouts)
|
|
99068
|
-
this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0),
|
|
99061
|
+
this._errors.splice(this._errors.length - 1, this._errors.length), this._timeouts = this._cachedTimeouts.slice(0), timeout2 = this._timeouts.shift();
|
|
99069
99062
|
else
|
|
99070
99063
|
return !1;
|
|
99071
99064
|
var self2 = this, timer = setTimeout(function() {
|
|
99072
99065
|
self2._attempts++, self2._operationTimeoutCb && (self2._timeout = setTimeout(function() {
|
|
99073
99066
|
self2._operationTimeoutCb(self2._attempts);
|
|
99074
99067
|
}, self2._operationTimeout), self2._options.unref && self2._timeout.unref()), self2._fn(self2._attempts);
|
|
99075
|
-
},
|
|
99068
|
+
}, timeout2);
|
|
99076
99069
|
return this._options.unref && timer.unref(), !0;
|
|
99077
99070
|
};
|
|
99078
99071
|
RetryOperation.prototype.attempt = function(fn, timeoutOps) {
|
|
@@ -99141,8 +99134,8 @@ var require_retry = __commonJS({
|
|
|
99141
99134
|
}), timeouts;
|
|
99142
99135
|
};
|
|
99143
99136
|
exports.createTimeout = function(attempt, opts) {
|
|
99144
|
-
var random = opts.randomize ? Math.random() + 1 : 1,
|
|
99145
|
-
return
|
|
99137
|
+
var random = opts.randomize ? Math.random() + 1 : 1, timeout2 = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));
|
|
99138
|
+
return timeout2 = Math.min(timeout2, opts.maxTimeout), timeout2;
|
|
99146
99139
|
};
|
|
99147
99140
|
exports.wrap = function(obj, options, methods) {
|
|
99148
99141
|
if (options instanceof Array && (methods = options, options = null), !methods) {
|
|
@@ -99179,23 +99172,23 @@ var require_mtime_precision = __commonJS({
|
|
|
99179
99172
|
"use strict";
|
|
99180
99173
|
init_cjs_shims();
|
|
99181
99174
|
var cacheSymbol = Symbol();
|
|
99182
|
-
function probe(file,
|
|
99183
|
-
let cachedPrecision =
|
|
99175
|
+
function probe(file, fs8, callback) {
|
|
99176
|
+
let cachedPrecision = fs8[cacheSymbol];
|
|
99184
99177
|
if (cachedPrecision)
|
|
99185
|
-
return
|
|
99178
|
+
return fs8.stat(file, (err2, stat) => {
|
|
99186
99179
|
if (err2)
|
|
99187
99180
|
return callback(err2);
|
|
99188
99181
|
callback(null, stat.mtime, cachedPrecision);
|
|
99189
99182
|
});
|
|
99190
99183
|
let mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
|
|
99191
|
-
|
|
99184
|
+
fs8.utimes(file, mtime, mtime, (err2) => {
|
|
99192
99185
|
if (err2)
|
|
99193
99186
|
return callback(err2);
|
|
99194
|
-
|
|
99187
|
+
fs8.stat(file, (err3, stat) => {
|
|
99195
99188
|
if (err3)
|
|
99196
99189
|
return callback(err3);
|
|
99197
99190
|
let precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
|
|
99198
|
-
Object.defineProperty(
|
|
99191
|
+
Object.defineProperty(fs8, cacheSymbol, { value: precision }), callback(null, stat.mtime, precision);
|
|
99199
99192
|
});
|
|
99200
99193
|
});
|
|
99201
99194
|
}
|
|
@@ -99213,7 +99206,7 @@ var require_lockfile = __commonJS({
|
|
|
99213
99206
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js"(exports, module) {
|
|
99214
99207
|
"use strict";
|
|
99215
99208
|
init_cjs_shims();
|
|
99216
|
-
var path4 = __require("path"),
|
|
99209
|
+
var path4 = __require("path"), fs8 = require_graceful_fs(), retry = require_retry2(), onExit = require_signal_exit(), mtimePrecision = require_mtime_precision(), locks = {};
|
|
99217
99210
|
function getLockFile(file, options) {
|
|
99218
99211
|
return options.lockfilePath || `${file}.lock`;
|
|
99219
99212
|
}
|
|
@@ -99296,7 +99289,7 @@ var require_lockfile = __commonJS({
|
|
|
99296
99289
|
update: null,
|
|
99297
99290
|
realpath: !0,
|
|
99298
99291
|
retries: 0,
|
|
99299
|
-
fs:
|
|
99292
|
+
fs: fs8,
|
|
99300
99293
|
onCompromised: (err2) => {
|
|
99301
99294
|
throw err2;
|
|
99302
99295
|
},
|
|
@@ -99329,7 +99322,7 @@ var require_lockfile = __commonJS({
|
|
|
99329
99322
|
}
|
|
99330
99323
|
function unlock(file, options, callback) {
|
|
99331
99324
|
options = {
|
|
99332
|
-
fs:
|
|
99325
|
+
fs: fs8,
|
|
99333
99326
|
realpath: !0,
|
|
99334
99327
|
...options
|
|
99335
99328
|
}, resolveCanonicalPath(file, options, (err2, file2) => {
|
|
@@ -99345,7 +99338,7 @@ var require_lockfile = __commonJS({
|
|
|
99345
99338
|
options = {
|
|
99346
99339
|
stale: 1e4,
|
|
99347
99340
|
realpath: !0,
|
|
99348
|
-
fs:
|
|
99341
|
+
fs: fs8,
|
|
99349
99342
|
...options
|
|
99350
99343
|
}, options.stale = Math.max(options.stale || 0, 2e3), resolveCanonicalPath(file, options, (err2, file2) => {
|
|
99351
99344
|
if (err2)
|
|
@@ -99377,14 +99370,14 @@ var require_adapter = __commonJS({
|
|
|
99377
99370
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js"(exports, module) {
|
|
99378
99371
|
"use strict";
|
|
99379
99372
|
init_cjs_shims();
|
|
99380
|
-
var
|
|
99381
|
-
function createSyncFs(
|
|
99382
|
-
let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...
|
|
99373
|
+
var fs8 = require_graceful_fs();
|
|
99374
|
+
function createSyncFs(fs9) {
|
|
99375
|
+
let methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"], newFs = { ...fs9 };
|
|
99383
99376
|
return methods.forEach((method) => {
|
|
99384
99377
|
newFs[method] = (...args) => {
|
|
99385
99378
|
let callback = args.pop(), ret;
|
|
99386
99379
|
try {
|
|
99387
|
-
ret =
|
|
99380
|
+
ret = fs9[`${method}Sync`](...args);
|
|
99388
99381
|
} catch (err2) {
|
|
99389
99382
|
return callback(err2);
|
|
99390
99383
|
}
|
|
@@ -99410,7 +99403,7 @@ var require_adapter = __commonJS({
|
|
|
99410
99403
|
};
|
|
99411
99404
|
}
|
|
99412
99405
|
function toSyncOptions(options) {
|
|
99413
|
-
if (options = { ...options }, options.fs = createSyncFs(options.fs ||
|
|
99406
|
+
if (options = { ...options }, options.fs = createSyncFs(options.fs || fs8), typeof options.retries == "number" && options.retries > 0 || options.retries && typeof options.retries.retries == "number" && options.retries.retries > 0)
|
|
99414
99407
|
throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
|
|
99415
99408
|
return options;
|
|
99416
99409
|
}
|
|
@@ -100020,8 +100013,8 @@ var require_errors6 = __commonJS({
|
|
|
100020
100013
|
};
|
|
100021
100014
|
exports.MissingPointerError = MissingPointerError;
|
|
100022
100015
|
var TimeoutError = class extends JSONParserError {
|
|
100023
|
-
constructor(
|
|
100024
|
-
super(`Dereferencing timeout reached: ${
|
|
100016
|
+
constructor(timeout2) {
|
|
100017
|
+
super(`Dereferencing timeout reached: ${timeout2}ms`), this.code = "ETIMEOUT", this.name = "TimeoutError";
|
|
100025
100018
|
}
|
|
100026
100019
|
};
|
|
100027
100020
|
exports.TimeoutError = TimeoutError;
|
|
@@ -104617,7 +104610,7 @@ From ` + this.originalError.stack);
|
|
|
104617
104610
|
function contains3(root, file) {
|
|
104618
104611
|
return root = path4.resolve(root), root = root.endsWith(path4.sep) ? root : root + path4.sep, file.startsWith(root);
|
|
104619
104612
|
}
|
|
104620
|
-
var
|
|
104613
|
+
var fs8 = /* @__PURE__ */ Object.freeze({
|
|
104621
104614
|
__proto__: null,
|
|
104622
104615
|
exists,
|
|
104623
104616
|
readFile: readFile5,
|
|
@@ -104739,7 +104732,7 @@ From ` + this.originalError.stack);
|
|
|
104739
104732
|
keyValueSeparator: ":",
|
|
104740
104733
|
cache: void 0,
|
|
104741
104734
|
extname: "",
|
|
104742
|
-
fs:
|
|
104735
|
+
fs: fs8,
|
|
104743
104736
|
dynamicPartials: !0,
|
|
104744
104737
|
jsTruthy: !1,
|
|
104745
104738
|
dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
|
|
@@ -105458,16 +105451,16 @@ From ` + this.originalError.stack);
|
|
|
105458
105451
|
this.contains = this.options.fs.contains || (() => !0);
|
|
105459
105452
|
}
|
|
105460
105453
|
*lookup(file, type, sync, currentFile) {
|
|
105461
|
-
let { fs:
|
|
105454
|
+
let { fs: fs9 } = this.options, dirs = this.options[type];
|
|
105462
105455
|
for (let filepath of this.candidates(file, dirs, currentFile, type !== LookupType.Root))
|
|
105463
|
-
if (sync ?
|
|
105456
|
+
if (sync ? fs9.existsSync(filepath) : yield fs9.exists(filepath))
|
|
105464
105457
|
return filepath;
|
|
105465
105458
|
throw this.lookupError(file, dirs);
|
|
105466
105459
|
}
|
|
105467
105460
|
*candidates(file, dirs, currentFile, enforceRoot) {
|
|
105468
|
-
let { fs:
|
|
105461
|
+
let { fs: fs9, extname: extname2 } = this.options;
|
|
105469
105462
|
if (this.shouldLoadRelative(file) && currentFile) {
|
|
105470
|
-
let referenced =
|
|
105463
|
+
let referenced = fs9.resolve(this.dirname(currentFile), file, extname2);
|
|
105471
105464
|
for (let dir of dirs)
|
|
105472
105465
|
if (!enforceRoot || this.contains(dir, referenced)) {
|
|
105473
105466
|
yield referenced;
|
|
@@ -105475,17 +105468,17 @@ From ` + this.originalError.stack);
|
|
|
105475
105468
|
}
|
|
105476
105469
|
}
|
|
105477
105470
|
for (let dir of dirs) {
|
|
105478
|
-
let referenced =
|
|
105471
|
+
let referenced = fs9.resolve(dir, file, extname2);
|
|
105479
105472
|
(!enforceRoot || this.contains(dir, referenced)) && (yield referenced);
|
|
105480
105473
|
}
|
|
105481
|
-
if (
|
|
105482
|
-
let filepath =
|
|
105474
|
+
if (fs9.fallback !== void 0) {
|
|
105475
|
+
let filepath = fs9.fallback(file);
|
|
105483
105476
|
filepath !== void 0 && (yield filepath);
|
|
105484
105477
|
}
|
|
105485
105478
|
}
|
|
105486
105479
|
dirname(path5) {
|
|
105487
|
-
let
|
|
105488
|
-
return assert(
|
|
105480
|
+
let fs9 = this.options.fs;
|
|
105481
|
+
return assert(fs9.dirname, "`fs.dirname` is required for relative reference"), fs9.dirname(path5);
|
|
105489
105482
|
}
|
|
105490
105483
|
lookupError(file, roots) {
|
|
105491
105484
|
let err2 = new Error("ENOENT");
|
|
@@ -121674,7 +121667,7 @@ var require_use_copy_to_clipboard = __commonJS({
|
|
|
121674
121667
|
function useCopyToClipboard(options = {}) {
|
|
121675
121668
|
let {
|
|
121676
121669
|
defaultValue = "",
|
|
121677
|
-
timeout = 1500
|
|
121670
|
+
timeout: timeout2 = 1500
|
|
121678
121671
|
} = options, [status, setStatus] = React24.useState("inactive"), copy = React24.useCallback((value) => {
|
|
121679
121672
|
navigator.clipboard.writeText(typeof value == "string" ? value : defaultValue).then(() => setStatus("copied"), () => setStatus("failed")).catch((error) => {
|
|
121680
121673
|
throw error;
|
|
@@ -121682,9 +121675,9 @@ var require_use_copy_to_clipboard = __commonJS({
|
|
|
121682
121675
|
}, [defaultValue]);
|
|
121683
121676
|
return React24.useEffect(() => {
|
|
121684
121677
|
if (status === "inactive") return;
|
|
121685
|
-
let timeoutId = setTimeout(() => setStatus("inactive"),
|
|
121678
|
+
let timeoutId = setTimeout(() => setStatus("inactive"), timeout2);
|
|
121686
121679
|
return () => clearTimeout(timeoutId);
|
|
121687
|
-
}, [status,
|
|
121680
|
+
}, [status, timeout2]), [copy, status];
|
|
121688
121681
|
}
|
|
121689
121682
|
exports.useCopyToClipboard = useCopyToClipboard;
|
|
121690
121683
|
}
|
|
@@ -164379,8 +164372,8 @@ var require_Transition = __commonJS({
|
|
|
164379
164372
|
}, _proto.componentWillUnmount = function() {
|
|
164380
164373
|
this.cancelNextCallback();
|
|
164381
164374
|
}, _proto.getTimeouts = function() {
|
|
164382
|
-
var
|
|
164383
|
-
return exit = enter = appear =
|
|
164375
|
+
var timeout2 = this.props.timeout, exit, enter, appear;
|
|
164376
|
+
return exit = enter = appear = timeout2, timeout2 != null && typeof timeout2 != "number" && (exit = timeout2.exit, enter = timeout2.enter, appear = timeout2.appear !== void 0 ? timeout2.appear : enter), {
|
|
164384
164377
|
exit,
|
|
164385
164378
|
enter,
|
|
164386
164379
|
appear
|
|
@@ -164451,9 +164444,9 @@ var require_Transition = __commonJS({
|
|
|
164451
164444
|
}, this.nextCallback.cancel = function() {
|
|
164452
164445
|
active = !1;
|
|
164453
164446
|
}, this.nextCallback;
|
|
164454
|
-
}, _proto.onTransitionEnd = function(
|
|
164447
|
+
}, _proto.onTransitionEnd = function(timeout2, handler) {
|
|
164455
164448
|
this.setNextCallback(handler);
|
|
164456
|
-
var node = this.props.nodeRef ? this.props.nodeRef.current : _reactDom.default.findDOMNode(this), doesNotHaveTimeoutOrListener =
|
|
164449
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : _reactDom.default.findDOMNode(this), doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener;
|
|
164457
164450
|
if (!node || doesNotHaveTimeoutOrListener) {
|
|
164458
164451
|
setTimeout(this.nextCallback, 0);
|
|
164459
164452
|
return;
|
|
@@ -164462,7 +164455,7 @@ var require_Transition = __commonJS({
|
|
|
164462
164455
|
var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1];
|
|
164463
164456
|
this.props.addEndListener(maybeNode, maybeNextCallback);
|
|
164464
164457
|
}
|
|
164465
|
-
|
|
164458
|
+
timeout2 != null && setTimeout(this.nextCallback, timeout2);
|
|
164466
164459
|
}, _proto.render = function() {
|
|
164467
164460
|
var status = this.state.status;
|
|
164468
164461
|
if (status === UNMOUNTED)
|
|
@@ -167832,10 +167825,10 @@ var require_CreateViewModal = __commonJS({
|
|
|
167832
167825
|
React24.useEffect(() => {
|
|
167833
167826
|
if (!(!container.current || isTouchDevice) && open2) {
|
|
167834
167827
|
focus.focusFirstFocusableNode(container.current);
|
|
167835
|
-
let
|
|
167828
|
+
let timeout2 = setTimeout(() => {
|
|
167836
167829
|
container.current && focus.focusFirstFocusableNode(container.current);
|
|
167837
167830
|
}, 50);
|
|
167838
|
-
return () => clearTimeout(
|
|
167831
|
+
return () => clearTimeout(timeout2);
|
|
167839
167832
|
}
|
|
167840
167833
|
}, [open2, isTouchDevice]);
|
|
167841
167834
|
let handleChange = React24.useCallback((newValue) => {
|
|
@@ -176376,13 +176369,13 @@ var require_node6 = __commonJS({
|
|
|
176376
176369
|
stream4 = new tty.WriteStream(fd2), stream4._type = "tty", stream4._handle && stream4._handle.unref && stream4._handle.unref();
|
|
176377
176370
|
break;
|
|
176378
176371
|
case "FILE":
|
|
176379
|
-
var
|
|
176380
|
-
stream4 = new
|
|
176372
|
+
var fs8 = __require("fs");
|
|
176373
|
+
stream4 = new fs8.SyncWriteStream(fd2, { autoClose: !1 }), stream4._type = "fs";
|
|
176381
176374
|
break;
|
|
176382
176375
|
case "PIPE":
|
|
176383
176376
|
case "TCP":
|
|
176384
|
-
var
|
|
176385
|
-
stream4 = new
|
|
176377
|
+
var net2 = __require("net");
|
|
176378
|
+
stream4 = new net2.Socket({
|
|
176386
176379
|
fd: fd2,
|
|
176387
176380
|
readable: !1,
|
|
176388
176381
|
writable: !0
|
|
@@ -181650,10 +181643,10 @@ var require_methods = __commonJS({
|
|
|
181650
181643
|
"../../node_modules/.pnpm/methods@1.1.2/node_modules/methods/index.js"(exports, module) {
|
|
181651
181644
|
"use strict";
|
|
181652
181645
|
init_cjs_shims();
|
|
181653
|
-
var
|
|
181646
|
+
var http2 = __require("http");
|
|
181654
181647
|
module.exports = getCurrentNodeMethods() || getBasicNodeMethods();
|
|
181655
181648
|
function getCurrentNodeMethods() {
|
|
181656
|
-
return
|
|
181649
|
+
return http2.METHODS && http2.METHODS.map(function(method) {
|
|
181657
181650
|
return method.toLowerCase();
|
|
181658
181651
|
});
|
|
181659
181652
|
}
|
|
@@ -182037,7 +182030,7 @@ var require_view = __commonJS({
|
|
|
182037
182030
|
"../../node_modules/.pnpm/express@4.21.2/node_modules/express/lib/view.js"(exports, module) {
|
|
182038
182031
|
"use strict";
|
|
182039
182032
|
init_cjs_shims();
|
|
182040
|
-
var debug4 = require_src2()("express:view"), path4 = __require("path"),
|
|
182033
|
+
var debug4 = require_src2()("express:view"), path4 = __require("path"), fs8 = __require("fs"), dirname6 = path4.dirname, basename3 = path4.basename, extname2 = path4.extname, join6 = path4.join, resolve2 = path4.resolve;
|
|
182041
182034
|
module.exports = View;
|
|
182042
182035
|
function View(name, options) {
|
|
182043
182036
|
var opts = options || {};
|
|
@@ -182074,7 +182067,7 @@ var require_view = __commonJS({
|
|
|
182074
182067
|
function tryStat(path5) {
|
|
182075
182068
|
debug4('stat "%s"', path5);
|
|
182076
182069
|
try {
|
|
182077
|
-
return
|
|
182070
|
+
return fs8.statSync(path5);
|
|
182078
182071
|
} catch {
|
|
182079
182072
|
return;
|
|
182080
182073
|
}
|
|
@@ -182295,7 +182288,7 @@ var require_types15 = __commonJS({
|
|
|
182295
182288
|
var require_mime = __commonJS({
|
|
182296
182289
|
"../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js"(exports, module) {
|
|
182297
182290
|
init_cjs_shims();
|
|
182298
|
-
var path4 = __require("path"),
|
|
182291
|
+
var path4 = __require("path"), fs8 = __require("fs");
|
|
182299
182292
|
function Mime() {
|
|
182300
182293
|
this.types = /* @__PURE__ */ Object.create(null), this.extensions = /* @__PURE__ */ Object.create(null);
|
|
182301
182294
|
}
|
|
@@ -182308,7 +182301,7 @@ var require_mime = __commonJS({
|
|
|
182308
182301
|
};
|
|
182309
182302
|
Mime.prototype.load = function(file) {
|
|
182310
182303
|
this._loading = file;
|
|
182311
|
-
var map = {}, content =
|
|
182304
|
+
var map = {}, content = fs8.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/);
|
|
182312
182305
|
lines.forEach(function(line) {
|
|
182313
182306
|
var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/);
|
|
182314
182307
|
map[fields.shift()] = fields;
|
|
@@ -182394,7 +182387,7 @@ var require_send = __commonJS({
|
|
|
182394
182387
|
"../../node_modules/.pnpm/send@0.19.0/node_modules/send/index.js"(exports, module) {
|
|
182395
182388
|
"use strict";
|
|
182396
182389
|
init_cjs_shims();
|
|
182397
|
-
var createError3 = require_http_errors(), debug4 = require_src2()("send"), deprecate = require_depd()("send"), destroy = require_destroy3(), encodeUrl = require_encodeurl2(), escapeHtml2 = require_escape_html(), etag = require_etag(), fresh = require_fresh(),
|
|
182390
|
+
var createError3 = require_http_errors(), debug4 = require_src2()("send"), deprecate = require_depd()("send"), destroy = require_destroy3(), encodeUrl = require_encodeurl2(), escapeHtml2 = require_escape_html(), etag = require_etag(), fresh = require_fresh(), fs8 = __require("fs"), mime = require_mime(), ms = require_ms(), onFinished = require_on_finished(), parseRange = require_range_parser(), path4 = __require("path"), statuses = require_statuses(), Stream2 = __require("stream"), util2 = __require("util"), extname2 = path4.extname, join6 = path4.join, normalize = path4.normalize, resolve2 = path4.resolve, sep3 = path4.sep, BYTES_RANGE_REGEXP = /^ *bytes=/, MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3, UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/;
|
|
182398
182391
|
module.exports = send3;
|
|
182399
182392
|
module.exports.mime = mime;
|
|
182400
182393
|
function send3(req, path5, options) {
|
|
@@ -182588,7 +182581,7 @@ var require_send = __commonJS({
|
|
|
182588
182581
|
};
|
|
182589
182582
|
SendStream.prototype.sendFile = function(path5) {
|
|
182590
182583
|
var i = 0, self2 = this;
|
|
182591
|
-
debug4('stat "%s"', path5),
|
|
182584
|
+
debug4('stat "%s"', path5), fs8.stat(path5, function(err2, stat) {
|
|
182592
182585
|
if (err2 && err2.code === "ENOENT" && !extname2(path5) && path5[path5.length - 1] !== sep3)
|
|
182593
182586
|
return next(err2);
|
|
182594
182587
|
if (err2) return self2.onStatError(err2);
|
|
@@ -182599,7 +182592,7 @@ var require_send = __commonJS({
|
|
|
182599
182592
|
if (self2._extensions.length <= i)
|
|
182600
182593
|
return err2 ? self2.onStatError(err2) : self2.error(404);
|
|
182601
182594
|
var p = path5 + "." + self2._extensions[i++];
|
|
182602
|
-
debug4('stat "%s"', p),
|
|
182595
|
+
debug4('stat "%s"', p), fs8.stat(p, function(err3, stat) {
|
|
182603
182596
|
if (err3) return next(err3);
|
|
182604
182597
|
if (stat.isDirectory()) return next();
|
|
182605
182598
|
self2.emit("file", p, stat), self2.send(p, stat);
|
|
@@ -182612,7 +182605,7 @@ var require_send = __commonJS({
|
|
|
182612
182605
|
if (++i >= self2._index.length)
|
|
182613
182606
|
return err2 ? self2.onStatError(err2) : self2.error(404);
|
|
182614
182607
|
var p = join6(path5, self2._index[i]);
|
|
182615
|
-
debug4('stat "%s"', p),
|
|
182608
|
+
debug4('stat "%s"', p), fs8.stat(p, function(err3, stat) {
|
|
182616
182609
|
if (err3) return next(err3);
|
|
182617
182610
|
if (stat.isDirectory()) return next();
|
|
182618
182611
|
self2.emit("file", p, stat), self2.send(p, stat);
|
|
@@ -182621,7 +182614,7 @@ var require_send = __commonJS({
|
|
|
182621
182614
|
next();
|
|
182622
182615
|
};
|
|
182623
182616
|
SendStream.prototype.stream = function(path5, options) {
|
|
182624
|
-
var self2 = this, res = this.res, stream4 =
|
|
182617
|
+
var self2 = this, res = this.res, stream4 = fs8.createReadStream(path5, options);
|
|
182625
182618
|
this.emit("stream", stream4), stream4.pipe(res);
|
|
182626
182619
|
function cleanup2() {
|
|
182627
182620
|
destroy(stream4, !0);
|
|
@@ -183343,7 +183336,7 @@ var require_application = __commonJS({
|
|
|
183343
183336
|
"../../node_modules/.pnpm/express@4.21.2/node_modules/express/lib/application.js"(exports, module) {
|
|
183344
183337
|
"use strict";
|
|
183345
183338
|
init_cjs_shims();
|
|
183346
|
-
var finalhandler = require_finalhandler(), Router = require_router(), methods = require_methods(), middleware = require_init(), query = require_query(), debug4 = require_src2()("express:application"), View = require_view(),
|
|
183339
|
+
var finalhandler = require_finalhandler(), Router = require_router(), methods = require_methods(), middleware = require_init(), query = require_query(), debug4 = require_src2()("express:application"), View = require_view(), http2 = __require("http"), compileETag = require_utils18().compileETag, compileQueryParser = require_utils18().compileQueryParser, compileTrust = require_utils18().compileTrust, deprecate = require_depd()("express"), flatten = require_array_flatten(), merge = require_utils_merge(), resolve2 = __require("path").resolve, setPrototypeOf = require_setprototypeof(), hasOwnProperty = Object.prototype.hasOwnProperty, slice = Array.prototype.slice, app = exports = module.exports = {}, trustProxyDefaultSymbol = "@@symbol:trust_proxy_default";
|
|
183347
183340
|
app.init = function() {
|
|
183348
183341
|
this.cache = {}, this.engines = {}, this.settings = {}, this.defaultConfiguration();
|
|
183349
183342
|
};
|
|
@@ -183491,7 +183484,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
183491
183484
|
tryRender(view, renderOptions, done);
|
|
183492
183485
|
};
|
|
183493
183486
|
app.listen = function() {
|
|
183494
|
-
var server =
|
|
183487
|
+
var server = http2.createServer(this);
|
|
183495
183488
|
return server.listen.apply(server, arguments);
|
|
183496
183489
|
};
|
|
183497
183490
|
function logerror(err2) {
|
|
@@ -183980,7 +183973,7 @@ var require_request = __commonJS({
|
|
|
183980
183973
|
"../../node_modules/.pnpm/express@4.21.2/node_modules/express/lib/request.js"(exports, module) {
|
|
183981
183974
|
"use strict";
|
|
183982
183975
|
init_cjs_shims();
|
|
183983
|
-
var accepts = require_accepts(), deprecate = require_depd()("express"), isIP = __require("net").isIP, typeis = require_type_is(),
|
|
183976
|
+
var accepts = require_accepts(), deprecate = require_depd()("express"), isIP = __require("net").isIP, typeis = require_type_is(), http2 = __require("http"), fresh = require_fresh(), parseRange = require_range_parser(), parse5 = require_parseurl(), proxyaddr = require_proxy_addr(), req = Object.create(http2.IncomingMessage.prototype);
|
|
183984
183977
|
module.exports = req;
|
|
183985
183978
|
req.get = req.header = function(name) {
|
|
183986
183979
|
if (!name)
|
|
@@ -184314,7 +184307,7 @@ var require_response = __commonJS({
|
|
|
184314
184307
|
"../../node_modules/.pnpm/express@4.21.2/node_modules/express/lib/response.js"(exports, module) {
|
|
184315
184308
|
"use strict";
|
|
184316
184309
|
init_cjs_shims();
|
|
184317
|
-
var Buffer2 = require_safe_buffer2().Buffer, contentDisposition = require_content_disposition(), createError3 = require_http_errors(), deprecate = require_depd()("express"), encodeUrl = require_encodeurl(), escapeHtml2 = require_escape_html(),
|
|
184310
|
+
var Buffer2 = require_safe_buffer2().Buffer, contentDisposition = require_content_disposition(), createError3 = require_http_errors(), deprecate = require_depd()("express"), encodeUrl = require_encodeurl(), escapeHtml2 = require_escape_html(), http2 = __require("http"), isAbsolute = require_utils18().isAbsolute, onFinished = require_on_finished(), path4 = __require("path"), statuses = require_statuses(), merge = require_utils_merge(), sign = require_cookie_signature().sign, normalizeType = require_utils18().normalizeType, normalizeTypes = require_utils18().normalizeTypes, setCharset = require_utils18().setCharset, cookie = require_cookie(), send3 = require_send(), extname2 = path4.extname, mime = send3.mime, resolve2 = path4.resolve, vary = require_vary(), res = Object.create(http2.ServerResponse.prototype);
|
|
184318
184311
|
module.exports = res;
|
|
184319
184312
|
var charsetRegExp = /;\s*charset\s*=/;
|
|
184320
184313
|
res.status = function(code) {
|
|
@@ -209264,14 +209257,14 @@ function uploadTheme(theme, session, checksums, themeFileSystem, options = {}) {
|
|
|
209264
209257
|
}
|
|
209265
209258
|
};
|
|
209266
209259
|
}
|
|
209267
|
-
function createIntervalTask({ promise, titleGetter, timeout }) {
|
|
209260
|
+
function createIntervalTask({ promise, titleGetter, timeout: timeout2 }) {
|
|
209268
209261
|
let tasks = [], addNextCheck = () => {
|
|
209269
209262
|
tasks.push({
|
|
209270
209263
|
title: titleGetter(),
|
|
209271
209264
|
task: async () => {
|
|
209272
209265
|
await Promise.race([
|
|
209273
209266
|
promise,
|
|
209274
|
-
new Promise((resolve2) => setTimeout(() => resolve2("timeout"),
|
|
209267
|
+
new Promise((resolve2) => setTimeout(() => resolve2("timeout"), timeout2))
|
|
209275
209268
|
]) === "timeout" && addNextCheck();
|
|
209276
209269
|
}
|
|
209277
209270
|
});
|
|
@@ -211431,14 +211424,14 @@ var COMMANDS = {
|
|
|
211431
211424
|
"theme:share": share_default
|
|
211432
211425
|
}, dist_default3 = COMMANDS;
|
|
211433
211426
|
|
|
211434
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211427
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/index.js
|
|
211435
211428
|
init_cjs_shims();
|
|
211436
211429
|
|
|
211437
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211430
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/build.js
|
|
211438
211431
|
init_cjs_shims();
|
|
211439
211432
|
var import_core17 = __toESM(require_lib(), 1);
|
|
211440
211433
|
|
|
211441
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211434
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-diff.js
|
|
211442
211435
|
init_cjs_shims();
|
|
211443
211436
|
import { symlink, cp } from "node:fs/promises";
|
|
211444
211437
|
|
|
@@ -211455,7 +211448,7 @@ function temporaryDirectory({ prefix = "" } = {}) {
|
|
|
211455
211448
|
return fs2.mkdirSync(directory), directory;
|
|
211456
211449
|
}
|
|
211457
211450
|
|
|
211458
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211451
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-diff.js
|
|
211459
211452
|
async function prepareDiffDirectory(diffDirectory, watch) {
|
|
211460
211453
|
let targetDirectory = temporaryDirectory({ prefix: "tmp-hydrogen-diff-" });
|
|
211461
211454
|
outputInfo(
|
|
@@ -211627,10 +211620,10 @@ async function applyTemplateDiff(targetDirectory, diffDirectory, templateDir) {
|
|
|
211627
211620
|
}), await mergeTsConfig(diffDirectory, targetDirectory);
|
|
211628
211621
|
}
|
|
211629
211622
|
|
|
211630
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211623
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/check-lockfile.js
|
|
211631
211624
|
init_cjs_shims();
|
|
211632
211625
|
|
|
211633
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211626
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/package-managers.js
|
|
211634
211627
|
init_cjs_shims();
|
|
211635
211628
|
var packageManagers = [
|
|
211636
211629
|
{
|
|
@@ -211655,7 +211648,7 @@ var packageManagers = [
|
|
|
211655
211648
|
}
|
|
211656
211649
|
];
|
|
211657
211650
|
|
|
211658
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211651
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/check-lockfile.js
|
|
211659
211652
|
function missingLockfileWarning(shouldExit) {
|
|
211660
211653
|
let headline = "No lockfile found", body = "If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.", nextSteps = [
|
|
211661
211654
|
[
|
|
@@ -211705,9 +211698,9 @@ async function checkLockfileStatus(directory, shouldExit = !1) {
|
|
|
211705
211698
|
]).catch(() => [])).length > 0 && lockfileIgnoredWarning(lockfile2);
|
|
211706
211699
|
}
|
|
211707
211700
|
|
|
211708
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211701
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/route-validator.js
|
|
211709
211702
|
init_cjs_shims();
|
|
211710
|
-
var RESERVED_ROUTES = ["^
|
|
211703
|
+
var RESERVED_ROUTES = ["^cdn/", "^_t/"];
|
|
211711
211704
|
function findReservedRoutes(config2) {
|
|
211712
211705
|
let routes = /* @__PURE__ */ new Set();
|
|
211713
211706
|
return Object.values(config2.routes).filter(
|
|
@@ -211804,274 +211797,12 @@ These routes are reserved by Shopify and may cause issues with your storefront:
|
|
|
211804
211797
|
});
|
|
211805
211798
|
}
|
|
211806
211799
|
|
|
211807
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211800
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/vite-plugin.js
|
|
211808
211801
|
init_cjs_shims();
|
|
211809
211802
|
|
|
211810
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211811
|
-
init_cjs_shims();
|
|
211812
|
-
import { spawn } from "node:child_process";
|
|
211813
|
-
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
211814
|
-
var nodePath = process.argv[1], modulePath = fileURLToPath3(import.meta.url), isStandaloneProcess = nodePath === modulePath;
|
|
211815
|
-
isStandaloneProcess && codegen({
|
|
211816
|
-
rootDirectory: process.argv[2],
|
|
211817
|
-
appDirectory: process.argv[3],
|
|
211818
|
-
configFilePath: process.argv[4],
|
|
211819
|
-
watch: !0
|
|
211820
|
-
});
|
|
211821
|
-
function normalizeCodegenError(errorMessage, rootDirectory) {
|
|
211822
|
-
if (errorMessage.includes("AbortError: ")) {
|
|
211823
|
-
let parsedError = errorMessage.split("AbortError: ")[1] ?? "", message2 = parsedError.split(`
|
|
211824
|
-
`)[0], details2 = parsedError.match(/tryMessage: '(.*)',$/m)?.[1];
|
|
211825
|
-
if (message2) return { message: message2, details: details2 };
|
|
211826
|
-
}
|
|
211827
|
-
let [first = "", ...rest] = errorMessage.replaceAll("[FAILED]", "").replace(/\s{2,}/g, `
|
|
211828
|
-
`).replace(/\n,\n/, `
|
|
211829
|
-
`).trim().split(`
|
|
211830
|
-
`), message = "[Codegen] " + first, details = rest.join(`
|
|
211831
|
-
`);
|
|
211832
|
-
if (rootDirectory) {
|
|
211833
|
-
let forwardSlashRootDir = rootDirectory.replaceAll("\\", "/") + "/";
|
|
211834
|
-
details = details.replaceAll(forwardSlashRootDir, "");
|
|
211835
|
-
}
|
|
211836
|
-
return { message, details };
|
|
211837
|
-
}
|
|
211838
|
-
function spawnCodegenProcess({
|
|
211839
|
-
rootDirectory,
|
|
211840
|
-
appDirectory,
|
|
211841
|
-
configFilePath
|
|
211842
|
-
}) {
|
|
211843
|
-
let command, args, hydrogenArgvIndex = process.argv.findIndex((a2) => a2 === "hydrogen");
|
|
211844
|
-
hydrogenArgvIndex >= 1 ? (command = process.argv[0], args = [
|
|
211845
|
-
...process.argv.slice(1, hydrogenArgvIndex + 1),
|
|
211846
|
-
"codegen",
|
|
211847
|
-
"--watch",
|
|
211848
|
-
"--path",
|
|
211849
|
-
rootDirectory
|
|
211850
|
-
], configFilePath && args.push("--codegen-config-path", configFilePath)) : (command = "node", args = [
|
|
211851
|
-
fileURLToPath3(import.meta.url),
|
|
211852
|
-
rootDirectory,
|
|
211853
|
-
appDirectory ?? resolvePath("app"),
|
|
211854
|
-
configFilePath ?? ""
|
|
211855
|
-
]);
|
|
211856
|
-
let child = spawn(command, args, { stdio: ["inherit", "ignore", "pipe"] });
|
|
211857
|
-
return child.stderr.on("data", (data) => {
|
|
211858
|
-
let dataString = typeof data == "string" ? data : data?.toString?.("utf8") ?? "";
|
|
211859
|
-
if (!dataString) return;
|
|
211860
|
-
let { message, details } = normalizeCodegenError(dataString, rootDirectory);
|
|
211861
|
-
/`punycode`/.test(message) || /\.body\[\d\]/.test(message) || /console\.time(End)?\(\)/.test(message) || /─ (warning|info|success) ───/.test(message) || (console.log(""), renderWarning({ headline: message, body: details }));
|
|
211862
|
-
}), child.on("close", (code) => {
|
|
211863
|
-
code && code > 0 && renderWarning({
|
|
211864
|
-
headline: "Codegen process exited with code " + code,
|
|
211865
|
-
body: "There should be more logs above."
|
|
211866
|
-
});
|
|
211867
|
-
}), child;
|
|
211868
|
-
}
|
|
211869
|
-
function codegen(options) {
|
|
211870
|
-
return generateTypes(options).catch((error) => {
|
|
211871
|
-
if (error instanceof AbortError) throw error;
|
|
211872
|
-
let { message, details } = normalizeCodegenError(
|
|
211873
|
-
error.message,
|
|
211874
|
-
options.rootDirectory
|
|
211875
|
-
);
|
|
211876
|
-
throw new AbortError(message, details);
|
|
211877
|
-
});
|
|
211878
|
-
}
|
|
211879
|
-
async function generateTypes({
|
|
211880
|
-
watch,
|
|
211881
|
-
configFilePath,
|
|
211882
|
-
forceSfapiVersion,
|
|
211883
|
-
...dirs
|
|
211884
|
-
}) {
|
|
211885
|
-
let { generate: generate2, loadCodegenConfig, CodegenContext } = await importLocal(
|
|
211886
|
-
"@graphql-codegen/cli",
|
|
211887
|
-
dirs.rootDirectory
|
|
211888
|
-
).catch(() => {
|
|
211889
|
-
throw new AbortError(
|
|
211890
|
-
"Could not load GraphQL Codegen CLI.",
|
|
211891
|
-
"Please make sure you have `@graphql-codegen/cli` installed as a dev dependency."
|
|
211892
|
-
);
|
|
211893
|
-
}), { config: codegenConfig } = (
|
|
211894
|
-
// Load <root>/codegen.ts if available
|
|
211895
|
-
await loadCodegenConfig({
|
|
211896
|
-
configFilePath: configFilePath ?? dirs.rootDirectory
|
|
211897
|
-
}) || // Fall back to default config
|
|
211898
|
-
await generateDefaultConfig(dirs, forceSfapiVersion)
|
|
211899
|
-
);
|
|
211900
|
-
await addHooksToHydrogenOptions(codegenConfig, dirs);
|
|
211901
|
-
let codegenContext = new CodegenContext({
|
|
211902
|
-
config: {
|
|
211903
|
-
...codegenConfig,
|
|
211904
|
-
watch,
|
|
211905
|
-
// Note: do not use `silent` without `watch`, it will swallow errors and
|
|
211906
|
-
// won't hide all logs. `errorsOnly` flag doesn't work either.
|
|
211907
|
-
silent: !watch,
|
|
211908
|
-
// @ts-expect-error this is to avoid process.cwd() in tests
|
|
211909
|
-
cwd: dirs.rootDirectory
|
|
211910
|
-
},
|
|
211911
|
-
// https://github.com/dotansimha/graphql-code-generator/issues/9490
|
|
211912
|
-
filepath: "not-used-but-must-be-set"
|
|
211913
|
-
});
|
|
211914
|
-
return codegenContext.cwd = dirs.rootDirectory, await generate2(codegenContext, !0), Object.entries(codegenConfig.generates).reduce(
|
|
211915
|
-
(acc, [key, value]) => ("documents" in value && (acc[key] = (Array.isArray(value.documents) ? value.documents : [value.documents]).filter((document2) => typeof document2 == "string")), acc),
|
|
211916
|
-
{}
|
|
211917
|
-
);
|
|
211918
|
-
}
|
|
211919
|
-
async function generateDefaultConfig({
|
|
211920
|
-
rootDirectory,
|
|
211921
|
-
appDirectory = resolvePath(rootDirectory, "app")
|
|
211922
|
-
}, forceSfapiVersion) {
|
|
211923
|
-
let { getSchema, preset, pluckConfig } = await importLocal(
|
|
211924
|
-
"@shopify/hydrogen-codegen",
|
|
211925
|
-
rootDirectory
|
|
211926
|
-
).catch(() => {
|
|
211927
|
-
throw new AbortError(
|
|
211928
|
-
"Could not load Hydrogen Codegen.",
|
|
211929
|
-
"Please make sure you have `@shopify/hydrogen-codegen` installed as a dev dependency."
|
|
211930
|
-
);
|
|
211931
|
-
}), { loadConfig: loadConfig2 } = await importLocal(
|
|
211932
|
-
"graphql-config",
|
|
211933
|
-
rootDirectory
|
|
211934
|
-
).catch(() => {
|
|
211935
|
-
throw new AbortError(
|
|
211936
|
-
"Could not load GraphQL Config.",
|
|
211937
|
-
"Please make sure you have `graphql-config` installed as a dev dependency."
|
|
211938
|
-
);
|
|
211939
|
-
}), gqlConfig = await loadConfig2({
|
|
211940
|
-
rootDir: rootDirectory,
|
|
211941
|
-
throwOnEmpty: !1,
|
|
211942
|
-
throwOnMissing: !1,
|
|
211943
|
-
legacy: !1
|
|
211944
|
-
}).catch(() => {
|
|
211945
|
-
}), sfapiSchema = getSchema("storefront"), sfapiProject = findGqlProject(sfapiSchema, gqlConfig), caapiSchema = getSchema("customer-account", { throwIfMissing: !1 }), caapiProject = caapiSchema ? findGqlProject(caapiSchema, gqlConfig) : void 0, defaultGlob = "*!(*.d).{ts,tsx,js,jsx}", appDirRelative = relativePath(rootDirectory, appDirectory), isKnownSchema = (schema) => {
|
|
211946
|
-
let baseSfapiSchema = basename(sfapiSchema), baseCaapiSchema = caapiSchema && basename(caapiSchema);
|
|
211947
|
-
return !!(schema.endsWith(baseSfapiSchema) || baseCaapiSchema && schema.endsWith(baseCaapiSchema));
|
|
211948
|
-
}, otherCodegenProjects = Object.values(gqlConfig?.projects ?? {}).filter(
|
|
211949
|
-
(project) => project.hasExtension("codegen") && (typeof project.schema != "string" || !isKnownSchema(project.schema))
|
|
211950
|
-
);
|
|
211951
|
-
return {
|
|
211952
|
-
filepath: "virtual:codegen",
|
|
211953
|
-
config: {
|
|
211954
|
-
overwrite: !0,
|
|
211955
|
-
pluckConfig,
|
|
211956
|
-
generates: {
|
|
211957
|
-
// If the SFAPI project in GraphQL config has a codegen extension, use it.
|
|
211958
|
-
// Otherwise, always fallback to our default config for SFAPI.
|
|
211959
|
-
...getCodegenFromGraphQLConfig(sfapiProject) ?? {
|
|
211960
|
-
"storefrontapi.generated.d.ts": {
|
|
211961
|
-
preset,
|
|
211962
|
-
schema: sfapiSchema,
|
|
211963
|
-
documents: sfapiProject?.documents ?? [
|
|
211964
|
-
defaultGlob,
|
|
211965
|
-
// E.g. ./server.(t|j)s
|
|
211966
|
-
joinPath(appDirRelative, "**", defaultGlob)
|
|
211967
|
-
// E.g. app/routes/_index.(t|j)sx
|
|
211968
|
-
],
|
|
211969
|
-
...!!forceSfapiVersion && {
|
|
211970
|
-
presetConfig: { importTypes: !1 },
|
|
211971
|
-
schema: {
|
|
211972
|
-
[`https://hydrogen-preview.myshopify.com/api/${forceSfapiVersion.split(":")[0]}/graphql.json`]: {
|
|
211973
|
-
headers: {
|
|
211974
|
-
"content-type": "application/json",
|
|
211975
|
-
"X-Shopify-Storefront-Access-Token": forceSfapiVersion.split(":")[1] ?? "3b580e70970c4528da70c98e097c2fa0"
|
|
211976
|
-
}
|
|
211977
|
-
}
|
|
211978
|
-
},
|
|
211979
|
-
config: {
|
|
211980
|
-
defaultScalarType: "string",
|
|
211981
|
-
scalars: { JSON: "unknown" }
|
|
211982
|
-
}
|
|
211983
|
-
}
|
|
211984
|
-
}
|
|
211985
|
-
},
|
|
211986
|
-
// If the CAAPI project in GraphQL config has a codegen extension, use it.
|
|
211987
|
-
// Otherwise, check if the user provided a list of documents to scan for queries
|
|
211988
|
-
// before falling back to our default config for CAAPI.
|
|
211989
|
-
...getCodegenFromGraphQLConfig(caapiProject) ?? (caapiProject?.documents ? {
|
|
211990
|
-
"customer-accountapi.generated.d.ts": {
|
|
211991
|
-
preset,
|
|
211992
|
-
schema: caapiSchema,
|
|
211993
|
-
documents: caapiProject.documents
|
|
211994
|
-
}
|
|
211995
|
-
} : {}),
|
|
211996
|
-
// Use other unknown codegen projects from the GraphQL config as they are.
|
|
211997
|
-
...otherCodegenProjects.reduce(
|
|
211998
|
-
(acc, project) => ({ ...acc, ...getCodegenFromGraphQLConfig(project) }),
|
|
211999
|
-
{}
|
|
212000
|
-
)
|
|
212001
|
-
}
|
|
212002
|
-
}
|
|
212003
|
-
};
|
|
212004
|
-
}
|
|
212005
|
-
function getCodegenFromGraphQLConfig(project) {
|
|
212006
|
-
if (project?.extensions?.codegen?.generates)
|
|
212007
|
-
return Object.entries(
|
|
212008
|
-
project.extensions.codegen.generates
|
|
212009
|
-
).reduce(
|
|
212010
|
-
(acc, [key, value]) => (acc[key] = { ...project, ...Array.isArray(value) ? value[0] : value }, acc),
|
|
212011
|
-
{}
|
|
212012
|
-
);
|
|
212013
|
-
}
|
|
212014
|
-
function findGqlProject(schemaFilepath, gqlConfig) {
|
|
212015
|
-
if (!gqlConfig) return;
|
|
212016
|
-
let schemaFilename = basename(schemaFilepath);
|
|
212017
|
-
return Object.values(gqlConfig.projects || {}).find(
|
|
212018
|
-
(project) => typeof project.schema == "string" && project.schema.endsWith(schemaFilename)
|
|
212019
|
-
);
|
|
212020
|
-
}
|
|
212021
|
-
async function addHooksToHydrogenOptions(codegenConfig, { rootDirectory }) {
|
|
212022
|
-
let name = Symbol.for("name"), hydrogenProjectsOptions = Object.values(codegenConfig.generates).filter(
|
|
212023
|
-
(value) => {
|
|
212024
|
-
let foundPreset = (Array.isArray(value) ? value[0] : value)?.preset;
|
|
212025
|
-
if (typeof foundPreset == "object" && name in foundPreset)
|
|
212026
|
-
return (
|
|
212027
|
-
// Preset from @shopify/hydrogen-codegen (e.g. SFAPI, CAAPI)
|
|
212028
|
-
foundPreset[name] === "hydrogen" || // Preset from @shopify/graphql-codegen (e.g. Admin API)
|
|
212029
|
-
foundPreset[name] === "@shopify/graphql-codegen"
|
|
212030
|
-
);
|
|
212031
|
-
}
|
|
212032
|
-
);
|
|
212033
|
-
for (let options of hydrogenProjectsOptions) {
|
|
212034
|
-
let hydrogenOptions = Array.isArray(options) ? options[0] : options;
|
|
212035
|
-
if (hydrogenOptions) {
|
|
212036
|
-
let formatConfig = await getCodeFormatOptions(rootDirectory);
|
|
212037
|
-
hydrogenOptions.hooks = {
|
|
212038
|
-
beforeOneFileWrite: (file, content) => formatCode(content, formatConfig, file),
|
|
212039
|
-
...hydrogenOptions.hooks
|
|
212040
|
-
};
|
|
212041
|
-
}
|
|
212042
|
-
}
|
|
212043
|
-
}
|
|
212044
|
-
|
|
212045
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.1_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/analyzer.js
|
|
211803
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/analyzer.js
|
|
212046
211804
|
init_cjs_shims();
|
|
212047
211805
|
var BUNDLE_ANALYZER_JSON_FILE = "metafile.server.json", BUNDLE_ANALYZER_HTML_FILE = "server-bundle-analyzer.html";
|
|
212048
|
-
async function classicBuildBundleAnalysis(buildPath) {
|
|
212049
|
-
let workerBuildPath = joinPath(buildPath, "worker"), serverMetafile = BUNDLE_ANALYZER_JSON_FILE, clientMetafile = "metafile.js.json";
|
|
212050
|
-
if (!(await Promise.all([
|
|
212051
|
-
fileExists(joinPath(workerBuildPath, serverMetafile)),
|
|
212052
|
-
fileExists(joinPath(workerBuildPath, clientMetafile))
|
|
212053
|
-
])).every(Boolean)) return null;
|
|
212054
|
-
try {
|
|
212055
|
-
return await Promise.all([
|
|
212056
|
-
classicWriteBundleAnalyzerFile(
|
|
212057
|
-
workerBuildPath,
|
|
212058
|
-
serverMetafile,
|
|
212059
|
-
"worker-bundle-analyzer.html"
|
|
212060
|
-
),
|
|
212061
|
-
classicWriteBundleAnalyzerFile(
|
|
212062
|
-
workerBuildPath,
|
|
212063
|
-
clientMetafile,
|
|
212064
|
-
"client-bundle-analyzer.html"
|
|
212065
|
-
)
|
|
212066
|
-
]), "file://" + joinPath(workerBuildPath, "worker-bundle-analyzer.html");
|
|
212067
|
-
} catch (thrown) {
|
|
212068
|
-
let error = thrown;
|
|
212069
|
-
return renderWarning({
|
|
212070
|
-
headline: "Could not generate bundle analysis",
|
|
212071
|
-
body: error?.stack ?? error?.message ?? error
|
|
212072
|
-
}), null;
|
|
212073
|
-
}
|
|
212074
|
-
}
|
|
212075
211806
|
async function getAnalyzerTemplate() {
|
|
212076
211807
|
return readFile(await getAssetsDir("bundle", "analyzer.html"));
|
|
212077
211808
|
}
|
|
@@ -212083,15 +211814,6 @@ function injectAnalyzerTemplateData(analysisTemplate, metafile) {
|
|
|
212083
211814
|
)}';`
|
|
212084
211815
|
);
|
|
212085
211816
|
}
|
|
212086
|
-
async function classicWriteBundleAnalyzerFile(workerBuildPath, metafileName, outputFile) {
|
|
212087
|
-
let metafile = await readFile(joinPath(workerBuildPath, metafileName), {
|
|
212088
|
-
encoding: "utf8"
|
|
212089
|
-
});
|
|
212090
|
-
await writeFile(
|
|
212091
|
-
joinPath(workerBuildPath, outputFile),
|
|
212092
|
-
injectAnalyzerTemplateData(await getAnalyzerTemplate(), metafile)
|
|
212093
|
-
);
|
|
212094
|
-
}
|
|
212095
211817
|
async function getBundleAnalysisSummary(distPath) {
|
|
212096
211818
|
try {
|
|
212097
211819
|
return ` \u2502
|
|
@@ -212112,116 +211834,8 @@ async function getBundleAnalysisSummary(distPath) {
|
|
|
212112
211834
|
);
|
|
212113
211835
|
}
|
|
212114
211836
|
}
|
|
212115
|
-
function classicGetBundleAnalysisSummary(bundlePath) {
|
|
212116
|
-
return getBundleAnalysisSummary(dirname(bundlePath));
|
|
212117
|
-
}
|
|
212118
|
-
|
|
212119
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.1_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/is-ci.js
|
|
212120
|
-
init_cjs_shims();
|
|
212121
|
-
function isCI() {
|
|
212122
|
-
let { env: env4 } = process;
|
|
212123
|
-
return env4.CI === "false" ? !1 : !!(env4.CI || env4.CI_NAME || env4.BUILD_NUMBER || env4.TF_BUILD);
|
|
212124
|
-
}
|
|
212125
211837
|
|
|
212126
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212127
|
-
var LOG_WORKER_BUILT = "\u{1F4E6} Worker built", WORKER_BUILD_SIZE_LIMIT = 5;
|
|
212128
|
-
async function runClassicCompilerBuild({
|
|
212129
|
-
directory,
|
|
212130
|
-
useCodegen = !1,
|
|
212131
|
-
codegenConfigPath,
|
|
212132
|
-
sourcemap = !1,
|
|
212133
|
-
disableRouteWarning = !1,
|
|
212134
|
-
bundleStats = !0,
|
|
212135
|
-
lockfileCheck = !0,
|
|
212136
|
-
assetPath
|
|
212137
|
-
}) {
|
|
212138
|
-
process.env.NODE_ENV || (process.env.NODE_ENV = "production"), assetPath && (process.env.HYDROGEN_ASSET_BASE_URL = assetPath);
|
|
212139
|
-
let { root, buildPath, buildPathClient, buildPathWorkerFile, publicPath } = getProjectPaths(directory);
|
|
212140
|
-
lockfileCheck && await checkLockfileStatus(root, isCI()), await muteRemixLogs(root), console.time(LOG_WORKER_BUILT), outputInfo(`
|
|
212141
|
-
\u{1F3D7}\uFE0F Building in ${process.env.NODE_ENV} mode...`);
|
|
212142
|
-
let [remixConfig, [{ build: build2 }, { logThrown }, { createFileWatchCache }]] = await Promise.all([
|
|
212143
|
-
getRemixConfig(root),
|
|
212144
|
-
Promise.all([
|
|
212145
|
-
importLocal("@remix-run/dev/dist/compiler/build.js", root),
|
|
212146
|
-
importLocal(
|
|
212147
|
-
"@remix-run/dev/dist/compiler/utils/log.js",
|
|
212148
|
-
root
|
|
212149
|
-
),
|
|
212150
|
-
importLocal(
|
|
212151
|
-
"@remix-run/dev/dist/compiler/fileWatchCache.js",
|
|
212152
|
-
root
|
|
212153
|
-
)
|
|
212154
|
-
]).catch(handleRemixImportFail),
|
|
212155
|
-
rmdir(buildPath, { force: !0 })
|
|
212156
|
-
]);
|
|
212157
|
-
if (assertOxygenChecks(remixConfig), await Promise.all([
|
|
212158
|
-
copyPublicFiles(publicPath, buildPathClient),
|
|
212159
|
-
build2({
|
|
212160
|
-
config: remixConfig,
|
|
212161
|
-
options: {
|
|
212162
|
-
mode: process.env.NODE_ENV,
|
|
212163
|
-
sourcemap
|
|
212164
|
-
},
|
|
212165
|
-
logger: createRemixLogger(),
|
|
212166
|
-
fileWatchCache: createFileWatchCache()
|
|
212167
|
-
}).catch((thrown) => {
|
|
212168
|
-
if (logThrown(thrown), process.env.SHOPIFY_UNIT_TEST)
|
|
212169
|
-
throw thrown;
|
|
212170
|
-
process.exit(1);
|
|
212171
|
-
}),
|
|
212172
|
-
useCodegen && codegen({ ...remixConfig, configFilePath: codegenConfigPath })
|
|
212173
|
-
]), process.env.NODE_ENV !== "development") {
|
|
212174
|
-
console.timeEnd(LOG_WORKER_BUILT);
|
|
212175
|
-
let bundleAnalysisPath = await classicBuildBundleAnalysis(buildPath), sizeMB = await fileSize(buildPathWorkerFile) / (1024 * 1024), formattedSize = source_default.yellow(sizeMB.toFixed(2) + " MB");
|
|
212176
|
-
outputInfo(
|
|
212177
|
-
outputContent` ${source_default.dim(
|
|
212178
|
-
relativePath(root, buildPathWorkerFile)
|
|
212179
|
-
)} ${bundleAnalysisPath ? outputToken.link(formattedSize, bundleAnalysisPath) : formattedSize}\n`
|
|
212180
|
-
), bundleStats && bundleAnalysisPath && outputInfo(
|
|
212181
|
-
outputContent`${await classicGetBundleAnalysisSummary(buildPathWorkerFile) || `
|
|
212182
|
-
`}\n │\n └─── ${outputToken.link(
|
|
212183
|
-
"Complete analysis: " + bundleAnalysisPath,
|
|
212184
|
-
bundleAnalysisPath
|
|
212185
|
-
)}\n\n`
|
|
212186
|
-
), sizeMB >= WORKER_BUILD_SIZE_LIMIT && outputWarn(
|
|
212187
|
-
`\u{1F6A8} Smaller worker bundles are faster to deploy and run.${remixConfig.serverMinify ? "" : "\n Minify your bundle by adding `serverMinify: true` to remix.config.js."}
|
|
212188
|
-
Learn more about optimizing your worker bundle file: https://h2o.fyi/debugging/bundle-size
|
|
212189
|
-
`
|
|
212190
|
-
);
|
|
212191
|
-
}
|
|
212192
|
-
if (!disableRouteWarning) {
|
|
212193
|
-
let missingRoutes = findMissingRoutes(remixConfig);
|
|
212194
|
-
if (missingRoutes.length) {
|
|
212195
|
-
let packageManager = await getPackageManager(root), exec3 = packageManager === "npm" ? "npx" : packageManager;
|
|
212196
|
-
outputWarn(
|
|
212197
|
-
`Heads up: Shopify stores have a number of standard routes that aren\u2019t set up yet.
|
|
212198
|
-
Some functionality and backlinks might not work as expected until these are created or redirects are set up.
|
|
212199
|
-
This build is missing ${missingRoutes.length} route${missingRoutes.length > 1 ? "s" : ""}. For more details, run \`${exec3} shopify hydrogen check routes\`.
|
|
212200
|
-
`
|
|
212201
|
-
);
|
|
212202
|
-
}
|
|
212203
|
-
}
|
|
212204
|
-
process.env.NODE_ENV !== "development" && await cleanClientSourcemaps(buildPathClient);
|
|
212205
|
-
}
|
|
212206
|
-
async function cleanClientSourcemaps(buildPathClient) {
|
|
212207
|
-
let bundleFiles = await glob(joinPath(buildPathClient, "**/*.js"));
|
|
212208
|
-
await Promise.all(
|
|
212209
|
-
bundleFiles.map(async (filePath) => {
|
|
212210
|
-
let file = await readFile(filePath);
|
|
212211
|
-
return await writeFile(
|
|
212212
|
-
filePath,
|
|
212213
|
-
file.replace(/\/\/# sourceMappingURL=.+\.js\.map$/gm, "")
|
|
212214
|
-
);
|
|
212215
|
-
})
|
|
212216
|
-
);
|
|
212217
|
-
}
|
|
212218
|
-
async function copyPublicFiles(publicPath, buildPathClient) {
|
|
212219
|
-
if (await fileExists(publicPath))
|
|
212220
|
-
return copyFile(publicPath, buildPathClient);
|
|
212221
|
-
}
|
|
212222
|
-
|
|
212223
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.1_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/vite-plugin.js
|
|
212224
|
-
init_cjs_shims();
|
|
211838
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/bundle/vite-plugin.js
|
|
212225
211839
|
function hydrogenBundleAnalyzer(pluginOptions) {
|
|
212226
211840
|
let config2;
|
|
212227
211841
|
return {
|
|
@@ -212362,7 +211976,258 @@ function createImportsMeta(ids, kind, root, resolveImportString, code) {
|
|
|
212362
211976
|
}));
|
|
212363
211977
|
}
|
|
212364
211978
|
|
|
212365
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
211979
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/codegen.js
|
|
211980
|
+
init_cjs_shims();
|
|
211981
|
+
import { spawn } from "node:child_process";
|
|
211982
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
211983
|
+
var nodePath = process.argv[1], modulePath = fileURLToPath3(import.meta.url), isStandaloneProcess = nodePath === modulePath;
|
|
211984
|
+
isStandaloneProcess && codegen({
|
|
211985
|
+
rootDirectory: process.argv[2],
|
|
211986
|
+
appDirectory: process.argv[3],
|
|
211987
|
+
configFilePath: process.argv[4],
|
|
211988
|
+
watch: !0
|
|
211989
|
+
});
|
|
211990
|
+
function normalizeCodegenError(errorMessage, rootDirectory) {
|
|
211991
|
+
if (errorMessage.includes("AbortError: ")) {
|
|
211992
|
+
let parsedError = errorMessage.split("AbortError: ")[1] ?? "", message2 = parsedError.split(`
|
|
211993
|
+
`)[0], details2 = parsedError.match(/tryMessage: '(.*)',$/m)?.[1];
|
|
211994
|
+
if (message2) return { message: message2, details: details2 };
|
|
211995
|
+
}
|
|
211996
|
+
let [first = "", ...rest] = errorMessage.replaceAll("[FAILED]", "").replace(/\s{2,}/g, `
|
|
211997
|
+
`).replace(/\n,\n/, `
|
|
211998
|
+
`).trim().split(`
|
|
211999
|
+
`), message = "[Codegen] " + first, details = rest.join(`
|
|
212000
|
+
`);
|
|
212001
|
+
if (rootDirectory) {
|
|
212002
|
+
let forwardSlashRootDir = rootDirectory.replaceAll("\\", "/") + "/";
|
|
212003
|
+
details = details.replaceAll(forwardSlashRootDir, "");
|
|
212004
|
+
}
|
|
212005
|
+
return { message, details };
|
|
212006
|
+
}
|
|
212007
|
+
function spawnCodegenProcess({
|
|
212008
|
+
rootDirectory,
|
|
212009
|
+
appDirectory,
|
|
212010
|
+
configFilePath
|
|
212011
|
+
}) {
|
|
212012
|
+
let command, args, hydrogenArgvIndex = process.argv.findIndex((a2) => a2 === "hydrogen");
|
|
212013
|
+
hydrogenArgvIndex >= 1 ? (command = process.argv[0], args = [
|
|
212014
|
+
...process.argv.slice(1, hydrogenArgvIndex + 1),
|
|
212015
|
+
"codegen",
|
|
212016
|
+
"--watch",
|
|
212017
|
+
"--path",
|
|
212018
|
+
rootDirectory
|
|
212019
|
+
], configFilePath && args.push("--codegen-config-path", configFilePath)) : (command = "node", args = [
|
|
212020
|
+
fileURLToPath3(import.meta.url),
|
|
212021
|
+
rootDirectory,
|
|
212022
|
+
appDirectory ?? resolvePath("app"),
|
|
212023
|
+
configFilePath ?? ""
|
|
212024
|
+
]);
|
|
212025
|
+
let child = spawn(command, args, { stdio: ["inherit", "ignore", "pipe"] });
|
|
212026
|
+
return child.stderr.on("data", (data) => {
|
|
212027
|
+
let dataString = typeof data == "string" ? data : data?.toString?.("utf8") ?? "";
|
|
212028
|
+
if (!dataString) return;
|
|
212029
|
+
let { message, details } = normalizeCodegenError(dataString, rootDirectory);
|
|
212030
|
+
/`punycode`/.test(message) || /\.body\[\d\]/.test(message) || /console\.time(End)?\(\)/.test(message) || /─ (warning|info|success) ───/.test(message) || (console.log(""), renderWarning({ headline: message, body: details }));
|
|
212031
|
+
}), child.on("close", (code) => {
|
|
212032
|
+
code && code > 0 && renderWarning({
|
|
212033
|
+
headline: "Codegen process exited with code " + code,
|
|
212034
|
+
body: "There should be more logs above."
|
|
212035
|
+
});
|
|
212036
|
+
}), child;
|
|
212037
|
+
}
|
|
212038
|
+
async function codegen(options) {
|
|
212039
|
+
return await executeReactRouterCodegen(options), runGraphQLCodegen(options).catch((error) => {
|
|
212040
|
+
if (error instanceof AbortError) throw error;
|
|
212041
|
+
let { message, details } = normalizeCodegenError(
|
|
212042
|
+
error.message,
|
|
212043
|
+
options.rootDirectory
|
|
212044
|
+
);
|
|
212045
|
+
throw new AbortError(message, details);
|
|
212046
|
+
});
|
|
212047
|
+
}
|
|
212048
|
+
async function executeReactRouterCodegen(options) {
|
|
212049
|
+
let { execSync: execSync2, exec: exec3 } = await import("child_process");
|
|
212050
|
+
options.watch ? exec3("npx react-router typegen --watch", {
|
|
212051
|
+
cwd: options.rootDirectory
|
|
212052
|
+
}) : execSync2("npx react-router typegen", {
|
|
212053
|
+
cwd: options.rootDirectory,
|
|
212054
|
+
stdio: "inherit"
|
|
212055
|
+
});
|
|
212056
|
+
}
|
|
212057
|
+
async function runGraphQLCodegen({
|
|
212058
|
+
watch,
|
|
212059
|
+
configFilePath,
|
|
212060
|
+
forceSfapiVersion,
|
|
212061
|
+
...dirs
|
|
212062
|
+
}) {
|
|
212063
|
+
let { generate: generate2, loadCodegenConfig, CodegenContext } = await importLocal(
|
|
212064
|
+
"@graphql-codegen/cli",
|
|
212065
|
+
dirs.rootDirectory
|
|
212066
|
+
).catch(() => {
|
|
212067
|
+
throw new AbortError(
|
|
212068
|
+
"Could not load GraphQL Codegen CLI.",
|
|
212069
|
+
"Please make sure you have `@graphql-codegen/cli` installed as a dev dependency."
|
|
212070
|
+
);
|
|
212071
|
+
}), { config: codegenConfig } = (
|
|
212072
|
+
// Load <root>/codegen.ts if available
|
|
212073
|
+
await loadCodegenConfig({
|
|
212074
|
+
configFilePath: configFilePath ?? dirs.rootDirectory
|
|
212075
|
+
}) || // Fall back to default config
|
|
212076
|
+
await generateDefaultConfig(dirs, forceSfapiVersion)
|
|
212077
|
+
);
|
|
212078
|
+
await addHooksToHydrogenOptions(codegenConfig, dirs);
|
|
212079
|
+
let codegenContext = new CodegenContext({
|
|
212080
|
+
config: {
|
|
212081
|
+
...codegenConfig,
|
|
212082
|
+
watch,
|
|
212083
|
+
// Note: do not use `silent` without `watch`, it will swallow errors and
|
|
212084
|
+
// won't hide all logs. `errorsOnly` flag doesn't work either.
|
|
212085
|
+
silent: !watch,
|
|
212086
|
+
// @ts-expect-error this is to avoid process.cwd() in tests
|
|
212087
|
+
cwd: dirs.rootDirectory
|
|
212088
|
+
},
|
|
212089
|
+
// https://github.com/dotansimha/graphql-code-generator/issues/9490
|
|
212090
|
+
filepath: "not-used-but-must-be-set"
|
|
212091
|
+
});
|
|
212092
|
+
return codegenContext.cwd = dirs.rootDirectory, await generate2(codegenContext, !0), Object.entries(codegenConfig.generates).reduce(
|
|
212093
|
+
(acc, [key, value]) => ("documents" in value && (acc[key] = (Array.isArray(value.documents) ? value.documents : [value.documents]).filter((document2) => typeof document2 == "string")), acc),
|
|
212094
|
+
{}
|
|
212095
|
+
);
|
|
212096
|
+
}
|
|
212097
|
+
async function generateDefaultConfig({
|
|
212098
|
+
rootDirectory,
|
|
212099
|
+
appDirectory = resolvePath(rootDirectory, "app")
|
|
212100
|
+
}, forceSfapiVersion) {
|
|
212101
|
+
let { getSchema, preset, pluckConfig } = await importLocal(
|
|
212102
|
+
"@shopify/hydrogen-codegen",
|
|
212103
|
+
rootDirectory
|
|
212104
|
+
).catch(() => {
|
|
212105
|
+
throw new AbortError(
|
|
212106
|
+
"Could not load Hydrogen Codegen.",
|
|
212107
|
+
"Please make sure you have `@shopify/hydrogen-codegen` installed as a dev dependency."
|
|
212108
|
+
);
|
|
212109
|
+
}), { loadConfig: loadConfig2 } = await importLocal(
|
|
212110
|
+
"graphql-config",
|
|
212111
|
+
rootDirectory
|
|
212112
|
+
).catch(() => {
|
|
212113
|
+
throw new AbortError(
|
|
212114
|
+
"Could not load GraphQL Config.",
|
|
212115
|
+
"Please make sure you have `graphql-config` installed as a dev dependency."
|
|
212116
|
+
);
|
|
212117
|
+
}), gqlConfig = await loadConfig2({
|
|
212118
|
+
rootDir: rootDirectory,
|
|
212119
|
+
throwOnEmpty: !1,
|
|
212120
|
+
throwOnMissing: !1,
|
|
212121
|
+
legacy: !1
|
|
212122
|
+
}).catch(() => {
|
|
212123
|
+
}), sfapiSchema = getSchema("storefront"), sfapiProject = findGqlProject(sfapiSchema, gqlConfig), caapiSchema = getSchema("customer-account", { throwIfMissing: !1 }), caapiProject = caapiSchema ? findGqlProject(caapiSchema, gqlConfig) : void 0, defaultGlob = "*!(*.d).{ts,tsx,js,jsx}", appDirRelative = relativePath(rootDirectory, appDirectory), isKnownSchema = (schema) => {
|
|
212124
|
+
let baseSfapiSchema = basename(sfapiSchema), baseCaapiSchema = caapiSchema && basename(caapiSchema);
|
|
212125
|
+
return !!(schema.endsWith(baseSfapiSchema) || baseCaapiSchema && schema.endsWith(baseCaapiSchema));
|
|
212126
|
+
}, otherCodegenProjects = Object.values(gqlConfig?.projects ?? {}).filter(
|
|
212127
|
+
(project) => project.hasExtension("codegen") && (typeof project.schema != "string" || !isKnownSchema(project.schema))
|
|
212128
|
+
);
|
|
212129
|
+
return {
|
|
212130
|
+
filepath: "virtual:codegen",
|
|
212131
|
+
config: {
|
|
212132
|
+
overwrite: !0,
|
|
212133
|
+
pluckConfig,
|
|
212134
|
+
generates: {
|
|
212135
|
+
// If the SFAPI project in GraphQL config has a codegen extension, use it.
|
|
212136
|
+
// Otherwise, always fallback to our default config for SFAPI.
|
|
212137
|
+
...getCodegenFromGraphQLConfig(sfapiProject) ?? {
|
|
212138
|
+
"storefrontapi.generated.d.ts": {
|
|
212139
|
+
preset,
|
|
212140
|
+
schema: sfapiSchema,
|
|
212141
|
+
documents: sfapiProject?.documents ?? [
|
|
212142
|
+
defaultGlob,
|
|
212143
|
+
// E.g. ./server.(t|j)s
|
|
212144
|
+
joinPath(appDirRelative, "**", defaultGlob)
|
|
212145
|
+
// E.g. app/routes/_index.(t|j)sx
|
|
212146
|
+
],
|
|
212147
|
+
...!!forceSfapiVersion && {
|
|
212148
|
+
presetConfig: { importTypes: !1 },
|
|
212149
|
+
schema: {
|
|
212150
|
+
[`https://hydrogen-preview.myshopify.com/api/${forceSfapiVersion.split(":")[0]}/graphql.json`]: {
|
|
212151
|
+
headers: {
|
|
212152
|
+
"content-type": "application/json",
|
|
212153
|
+
"X-Shopify-Storefront-Access-Token": forceSfapiVersion.split(":")[1] ?? "3b580e70970c4528da70c98e097c2fa0"
|
|
212154
|
+
}
|
|
212155
|
+
}
|
|
212156
|
+
},
|
|
212157
|
+
config: {
|
|
212158
|
+
defaultScalarType: "string",
|
|
212159
|
+
scalars: { JSON: "unknown" }
|
|
212160
|
+
}
|
|
212161
|
+
}
|
|
212162
|
+
}
|
|
212163
|
+
},
|
|
212164
|
+
// If the CAAPI project in GraphQL config has a codegen extension, use it.
|
|
212165
|
+
// Otherwise, check if the user provided a list of documents to scan for queries
|
|
212166
|
+
// before falling back to our default config for CAAPI.
|
|
212167
|
+
...getCodegenFromGraphQLConfig(caapiProject) ?? (caapiProject?.documents ? {
|
|
212168
|
+
"customer-accountapi.generated.d.ts": {
|
|
212169
|
+
preset,
|
|
212170
|
+
schema: caapiSchema,
|
|
212171
|
+
documents: caapiProject.documents
|
|
212172
|
+
}
|
|
212173
|
+
} : {}),
|
|
212174
|
+
// Use other unknown codegen projects from the GraphQL config as they are.
|
|
212175
|
+
...otherCodegenProjects.reduce(
|
|
212176
|
+
(acc, project) => ({ ...acc, ...getCodegenFromGraphQLConfig(project) }),
|
|
212177
|
+
{}
|
|
212178
|
+
)
|
|
212179
|
+
}
|
|
212180
|
+
}
|
|
212181
|
+
};
|
|
212182
|
+
}
|
|
212183
|
+
function getCodegenFromGraphQLConfig(project) {
|
|
212184
|
+
if (project?.extensions?.codegen?.generates)
|
|
212185
|
+
return Object.entries(
|
|
212186
|
+
project.extensions.codegen.generates
|
|
212187
|
+
).reduce(
|
|
212188
|
+
(acc, [key, value]) => (acc[key] = { ...project, ...Array.isArray(value) ? value[0] : value }, acc),
|
|
212189
|
+
{}
|
|
212190
|
+
);
|
|
212191
|
+
}
|
|
212192
|
+
function findGqlProject(schemaFilepath, gqlConfig) {
|
|
212193
|
+
if (!gqlConfig) return;
|
|
212194
|
+
let schemaFilename = basename(schemaFilepath);
|
|
212195
|
+
return Object.values(gqlConfig.projects || {}).find(
|
|
212196
|
+
(project) => typeof project.schema == "string" && project.schema.endsWith(schemaFilename)
|
|
212197
|
+
);
|
|
212198
|
+
}
|
|
212199
|
+
async function addHooksToHydrogenOptions(codegenConfig, { rootDirectory }) {
|
|
212200
|
+
let name = Symbol.for("name"), hydrogenProjectsOptions = Object.values(codegenConfig.generates).filter(
|
|
212201
|
+
(value) => {
|
|
212202
|
+
let foundPreset = (Array.isArray(value) ? value[0] : value)?.preset;
|
|
212203
|
+
if (typeof foundPreset == "object" && name in foundPreset)
|
|
212204
|
+
return (
|
|
212205
|
+
// Preset from @shopify/hydrogen-codegen (e.g. SFAPI, CAAPI)
|
|
212206
|
+
foundPreset[name] === "hydrogen" || // Preset from @shopify/graphql-codegen (e.g. Admin API)
|
|
212207
|
+
foundPreset[name] === "@shopify/graphql-codegen"
|
|
212208
|
+
);
|
|
212209
|
+
}
|
|
212210
|
+
);
|
|
212211
|
+
for (let options of hydrogenProjectsOptions) {
|
|
212212
|
+
let hydrogenOptions = Array.isArray(options) ? options[0] : options;
|
|
212213
|
+
if (hydrogenOptions) {
|
|
212214
|
+
let formatConfig = await getCodeFormatOptions(rootDirectory);
|
|
212215
|
+
hydrogenOptions.hooks = {
|
|
212216
|
+
beforeOneFileWrite: (file, content) => formatCode(content, formatConfig, file),
|
|
212217
|
+
...hydrogenOptions.hooks
|
|
212218
|
+
};
|
|
212219
|
+
}
|
|
212220
|
+
}
|
|
212221
|
+
}
|
|
212222
|
+
|
|
212223
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/is-ci.js
|
|
212224
|
+
init_cjs_shims();
|
|
212225
|
+
function isCI() {
|
|
212226
|
+
let { env: env4 } = process;
|
|
212227
|
+
return env4.CI === "false" ? !1 : !!(env4.CI || env4.CI_NAME || env4.BUILD_NUMBER || env4.TF_BUILD);
|
|
212228
|
+
}
|
|
212229
|
+
|
|
212230
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/defer.js
|
|
212366
212231
|
init_cjs_shims();
|
|
212367
212232
|
function deferPromise() {
|
|
212368
212233
|
let deferred = { state: "pending" };
|
|
@@ -212371,18 +212236,18 @@ function deferPromise() {
|
|
|
212371
212236
|
}), deferred;
|
|
212372
212237
|
}
|
|
212373
212238
|
|
|
212374
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212239
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/resource-cleanup.js
|
|
212375
212240
|
init_cjs_shims();
|
|
212376
212241
|
function setupResourceCleanup(cleanup2) {
|
|
212377
212242
|
let closingPromise, processExit = process.exit;
|
|
212378
212243
|
process.exit = async (code) => {
|
|
212379
212244
|
closingPromise ??= cleanup2();
|
|
212380
|
-
let
|
|
212381
|
-
return await closingPromise, clearTimeout(
|
|
212245
|
+
let timeout2 = setTimeout(() => processExit(code), 5e3);
|
|
212246
|
+
return await closingPromise, clearTimeout(timeout2), processExit(code);
|
|
212382
212247
|
};
|
|
212383
212248
|
}
|
|
212384
212249
|
|
|
212385
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212250
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/build.js
|
|
212386
212251
|
var Build = class _Build extends base_command_default {
|
|
212387
212252
|
static descriptionWithMarkdown = "Builds a Hydrogen storefront for production. The client and app worker files are compiled to a `/dist` folder in your Hydrogen project directory.";
|
|
212388
212253
|
static description = "Builds a Hydrogen storefront for production.";
|
|
@@ -212412,12 +212277,15 @@ var Build = class _Build extends base_command_default {
|
|
|
212412
212277
|
...flagsToCamelObject(flags),
|
|
212413
212278
|
useCodegen: flags.codegen,
|
|
212414
212279
|
directory
|
|
212415
|
-
}
|
|
212280
|
+
};
|
|
212281
|
+
if (!await isViteProject(directory))
|
|
212282
|
+
throw new AbortError(REMIX_COMPILER_ERROR_MESSAGE);
|
|
212283
|
+
let result = await runBuild(buildParams);
|
|
212416
212284
|
buildParams.watch ? (diff3 || result?.close) && setupResourceCleanup(async () => {
|
|
212417
212285
|
await result?.close(), diff3 && (await diff3.copyDiffBuild(), flags.codegen && await diff3.copyDiffCodegen(), await diff3.cleanup());
|
|
212418
212286
|
}) : (diff3 && (await diff3.copyDiffBuild(), flags.codegen && await diff3.copyDiffCodegen(), await diff3.cleanup()), process.exit(0));
|
|
212419
212287
|
}
|
|
212420
|
-
},
|
|
212288
|
+
}, WORKER_BUILD_SIZE_LIMIT = 5;
|
|
212421
212289
|
async function runBuild({
|
|
212422
212290
|
entry: ssrEntry,
|
|
212423
212291
|
directory,
|
|
@@ -212548,7 +212416,7 @@ async function runBuild({
|
|
|
212548
212416
|
)}\n\n`
|
|
212549
212417
|
);
|
|
212550
212418
|
}
|
|
212551
|
-
await fileSize(serverOutFile) / (1024 * 1024) >=
|
|
212419
|
+
await fileSize(serverOutFile) / (1024 * 1024) >= WORKER_BUILD_SIZE_LIMIT && outputWarn(
|
|
212552
212420
|
`\u{1F6A8} Smaller worker bundles are faster to deploy and run.${serverMinify ? "" : "\n Minify your bundle by adding `build.minify: true` to vite.config.js."}
|
|
212553
212421
|
Learn more about optimizing your worker bundle file: https://h2o.fyi/debugging/bundle-size
|
|
212554
212422
|
`
|
|
@@ -212577,7 +212445,7 @@ This build is missing ${missingRoutes.length} route${missingRoutes.length > 1 ?
|
|
|
212577
212445
|
};
|
|
212578
212446
|
}
|
|
212579
212447
|
|
|
212580
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212448
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/check.js
|
|
212581
212449
|
init_cjs_shims();
|
|
212582
212450
|
var import_core18 = __toESM(require_lib(), 1), GenerateRoute = class _GenerateRoute extends base_command_default {
|
|
212583
212451
|
static descriptionWithMarkdown = "Checks whether your Hydrogen app includes a set of standard Shopify routes.";
|
|
@@ -212606,7 +212474,7 @@ async function runCheckRoutes({ directory }) {
|
|
|
212606
212474
|
logMissingRoutes(findMissingRoutes(remixConfig)), warnReservedRoutes(findReservedRoutes(remixConfig));
|
|
212607
212475
|
}
|
|
212608
212476
|
|
|
212609
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212477
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/codegen.js
|
|
212610
212478
|
init_cjs_shims();
|
|
212611
212479
|
var import_core19 = __toESM(require_lib(), 1);
|
|
212612
212480
|
var Codegen = class _Codegen extends base_command_default {
|
|
@@ -212665,54 +212533,11 @@ async function runCodegen({
|
|
|
212665
212533
|
});
|
|
212666
212534
|
}
|
|
212667
212535
|
|
|
212668
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212536
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/debug/cpu.js
|
|
212669
212537
|
init_cjs_shims();
|
|
212670
212538
|
var import_core20 = __toESM(require_lib(), 1);
|
|
212671
212539
|
|
|
212672
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212673
|
-
init_cjs_shims();
|
|
212674
|
-
async function runClassicCompilerDebugCpu({
|
|
212675
|
-
directory,
|
|
212676
|
-
hooks: hooks2
|
|
212677
|
-
}) {
|
|
212678
|
-
let [{ watch }, { createFileWatchCache }] = await Promise.all([
|
|
212679
|
-
importLocal("@remix-run/dev/dist/compiler/watch.js", directory),
|
|
212680
|
-
importLocal(
|
|
212681
|
-
"@remix-run/dev/dist/compiler/fileWatchCache.js",
|
|
212682
|
-
directory
|
|
212683
|
-
)
|
|
212684
|
-
]).catch(handleRemixImportFail), fileWatchCache = createFileWatchCache(), closeWatcher = await watch(
|
|
212685
|
-
{
|
|
212686
|
-
config: await getRemixConfig(directory),
|
|
212687
|
-
options: {
|
|
212688
|
-
mode: process.env.NODE_ENV,
|
|
212689
|
-
sourcemap: !0
|
|
212690
|
-
},
|
|
212691
|
-
fileWatchCache,
|
|
212692
|
-
logger: createRemixLogger()
|
|
212693
|
-
},
|
|
212694
|
-
{
|
|
212695
|
-
onBuildStart: hooks2.onServerBuildStart,
|
|
212696
|
-
async onBuildFinish(context, duration, succeeded) {
|
|
212697
|
-
succeeded ? await hooks2.onServerBuildFinish() : outputWarn(`
|
|
212698
|
-
Build failed, waiting for changes to restart...`);
|
|
212699
|
-
},
|
|
212700
|
-
async onFileChanged(file) {
|
|
212701
|
-
fileWatchCache.invalidateFile(file);
|
|
212702
|
-
},
|
|
212703
|
-
async onFileDeleted(file) {
|
|
212704
|
-
fileWatchCache.invalidateFile(file);
|
|
212705
|
-
}
|
|
212706
|
-
}
|
|
212707
|
-
);
|
|
212708
|
-
return {
|
|
212709
|
-
async close() {
|
|
212710
|
-
await closeWatcher();
|
|
212711
|
-
}
|
|
212712
|
-
};
|
|
212713
|
-
}
|
|
212714
|
-
|
|
212715
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.1_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/cpu-profiler.js
|
|
212540
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/cpu-profiler.js
|
|
212716
212541
|
init_cjs_shims();
|
|
212717
212542
|
import { Session } from "node:inspector";
|
|
212718
212543
|
async function createCpuStartupProfiler(root) {
|
|
@@ -212790,7 +212615,7 @@ function silenceNode(node) {
|
|
|
212790
212615
|
});
|
|
212791
212616
|
}
|
|
212792
212617
|
|
|
212793
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212618
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/debug/cpu.js
|
|
212794
212619
|
var DEFAULT_OUTPUT_PATH = "startup.cpuprofile", DebugCpu = class _DebugCpu extends base_command_default {
|
|
212795
212620
|
static descriptionWithMarkdown = "Builds the app and runs the resulting code to profile the server startup time, watching for changes. This command can be used to [debug slow app startup times](https://shopify.dev/docs/custom-storefronts/hydrogen/debugging/cpu-startup) that cause failed deployments in Oxygen.\n\n The profiling results are written to a `.cpuprofile` file that can be viewed with certain tools such as [Flame Chart Visualizer for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-flame).";
|
|
212796
212621
|
static description = "Builds and profiles the server startup time the app.";
|
|
@@ -212840,12 +212665,7 @@ Waiting for changes...`);
|
|
|
212840
212665
|
}
|
|
212841
212666
|
};
|
|
212842
212667
|
if (await isClassicProject(directory))
|
|
212843
|
-
|
|
212844
|
-
directory,
|
|
212845
|
-
output,
|
|
212846
|
-
buildPathWorkerFile,
|
|
212847
|
-
hooks: hooks2
|
|
212848
|
-
});
|
|
212668
|
+
throw new AbortError(REMIX_COMPILER_ERROR_MESSAGE);
|
|
212849
212669
|
let maybeViteConfig = await getViteConfig(directory).catch(() => null);
|
|
212850
212670
|
buildPathWorkerFile = maybeViteConfig?.serverOutFile ?? joinPath(buildPath, "server", "index.js"), sourceEntrypoint = maybeViteConfig?.remixConfig.serverEntryPoint ?? "";
|
|
212851
212671
|
let buildProcess = await runBuild({
|
|
@@ -212868,7 +212688,7 @@ Waiting for changes...`);
|
|
|
212868
212688
|
};
|
|
212869
212689
|
}
|
|
212870
212690
|
|
|
212871
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
212691
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/deploy.js
|
|
212872
212692
|
init_cjs_shims();
|
|
212873
212693
|
var import_core21 = __toESM(require_lib(), 1);
|
|
212874
212694
|
|
|
@@ -213462,7 +213282,7 @@ async function uploadFile(config2, target, agent) {
|
|
|
213462
213282
|
}
|
|
213463
213283
|
async function formUpload(form, target, agent, attemptNumber = 0) {
|
|
213464
213284
|
try {
|
|
213465
|
-
let controller = new AbortController(),
|
|
213285
|
+
let controller = new AbortController(), timeout2 = setTimeout(() => {
|
|
213466
213286
|
controller.abort();
|
|
213467
213287
|
}, 12e4), response = await fetch2(target.uploadUrl, {
|
|
213468
213288
|
method: "POST",
|
|
@@ -213473,7 +213293,7 @@ async function formUpload(form, target, agent, attemptNumber = 0) {
|
|
|
213473
213293
|
},
|
|
213474
213294
|
agent
|
|
213475
213295
|
});
|
|
213476
|
-
if (clearTimeout(
|
|
213296
|
+
if (clearTimeout(timeout2), !response.ok)
|
|
213477
213297
|
throw new Error(`${response.status}`);
|
|
213478
213298
|
} catch (err2) {
|
|
213479
213299
|
if (isErrorCode(err2, "ENOENT"))
|
|
@@ -213873,16 +213693,16 @@ The deployment can be reached at the ${completedDeployment.url} preview URL`;
|
|
|
213873
213693
|
}
|
|
213874
213694
|
}
|
|
213875
213695
|
|
|
213876
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213696
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/deploy.js
|
|
213877
213697
|
import { createRequire } from "node:module";
|
|
213878
213698
|
|
|
213879
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213699
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/get-oxygen-deployment-data.js
|
|
213880
213700
|
init_cjs_shims();
|
|
213881
213701
|
|
|
213882
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213702
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/render-errors.js
|
|
213883
213703
|
init_cjs_shims();
|
|
213884
213704
|
|
|
213885
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213705
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/admin-urls.js
|
|
213886
213706
|
init_cjs_shims();
|
|
213887
213707
|
function newHydrogenStorefrontUrl(session) {
|
|
213888
213708
|
let { storeFqdn } = session;
|
|
@@ -213893,7 +213713,7 @@ function hydrogenStorefrontsUrl(session) {
|
|
|
213893
213713
|
return `https://${storeFqdn}/admin/custom_storefronts`;
|
|
213894
213714
|
}
|
|
213895
213715
|
|
|
213896
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213716
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/render-errors.js
|
|
213897
213717
|
function renderMissingStorefront({
|
|
213898
213718
|
session,
|
|
213899
213719
|
storefront,
|
|
@@ -213935,7 +213755,7 @@ function renderMissingLink({ noStorefronts = !1 }) {
|
|
|
213935
213755
|
});
|
|
213936
213756
|
}
|
|
213937
213757
|
|
|
213938
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213758
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/graphql/admin/get-oxygen-data.js
|
|
213939
213759
|
init_cjs_shims();
|
|
213940
213760
|
var GetDeploymentDataQuery = `#graphql
|
|
213941
213761
|
query GetDeploymentToken($id: ID!) {
|
|
@@ -213961,7 +213781,7 @@ async function getOxygenData(adminSession, storefrontId) {
|
|
|
213961
213781
|
return { storefront: hydrogenStorefront };
|
|
213962
213782
|
}
|
|
213963
213783
|
|
|
213964
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213784
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/verify-linked-storefront.js
|
|
213965
213785
|
init_cjs_shims();
|
|
213966
213786
|
async function verifyLinkedStorefront({
|
|
213967
213787
|
root,
|
|
@@ -213977,7 +213797,7 @@ async function verifyLinkedStorefront({
|
|
|
213977
213797
|
}));
|
|
213978
213798
|
}
|
|
213979
213799
|
|
|
213980
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213800
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/get-oxygen-deployment-data.js
|
|
213981
213801
|
async function getOxygenDeploymentData({
|
|
213982
213802
|
root
|
|
213983
213803
|
}) {
|
|
@@ -214008,7 +213828,7 @@ async function getOxygenDeploymentData({
|
|
|
214008
213828
|
return storefront;
|
|
214009
213829
|
}
|
|
214010
213830
|
|
|
214011
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
213831
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/deploy.js
|
|
214012
213832
|
var DEPLOY_OUTPUT_FILE_HANDLE = "h2_deploy_log.json", deploymentLogger = (message, level = "info") => {
|
|
214013
213833
|
(level === "error" || level === "warn") && outputWarn(message);
|
|
214014
213834
|
}, Deploy = class _Deploy extends base_command_default {
|
|
@@ -214342,9 +214162,11 @@ Continue?`.value
|
|
|
214342
214162
|
}
|
|
214343
214163
|
};
|
|
214344
214164
|
buildCommand ? config2.buildCommand = buildCommand : hooks2.buildFunction = async (assetPath) => {
|
|
214345
|
-
outputInfo(
|
|
214165
|
+
if (outputInfo(
|
|
214346
214166
|
outputContent`${source_default.whiteBright("Building project...")}`.value
|
|
214347
|
-
),
|
|
214167
|
+
), isClassicCompiler)
|
|
214168
|
+
throw new AbortError(REMIX_COMPILER_ERROR_MESSAGE);
|
|
214169
|
+
await runBuild({
|
|
214348
214170
|
directory: root,
|
|
214349
214171
|
assetPath,
|
|
214350
214172
|
lockfileCheck,
|
|
@@ -214410,11 +214232,11 @@ async function getHydrogenVersion({ appPath }) {
|
|
|
214410
214232
|
return version;
|
|
214411
214233
|
}
|
|
214412
214234
|
|
|
214413
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
214235
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/dev.js
|
|
214414
214236
|
init_cjs_shims();
|
|
214415
214237
|
var import_core23 = __toESM(require_lib(), 1);
|
|
214416
214238
|
|
|
214417
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
214239
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/upgrade.js
|
|
214418
214240
|
init_cjs_shims();
|
|
214419
214241
|
var import_semver = __toESM(require_semver3(), 1);
|
|
214420
214242
|
import { createRequire as createRequire2 } from "node:module";
|
|
@@ -214529,7 +214351,7 @@ function cliTruncate(text, columns2, options = {}) {
|
|
|
214529
214351
|
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
214530
214352
|
}
|
|
214531
214353
|
|
|
214532
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
214354
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/upgrade.js
|
|
214533
214355
|
var import_core22 = __toESM(require_lib(), 1);
|
|
214534
214356
|
var INSTRUCTIONS_FOLDER = ".hydrogen", Upgrade2 = class _Upgrade extends base_command_default {
|
|
214535
214357
|
static descriptionWithMarkdown = "Upgrade Hydrogen project dependencies, preview features, fixes and breaking changes. The command also generates an instruction file for each upgrade.";
|
|
@@ -214769,13 +214591,16 @@ function displayConfirmation({
|
|
|
214769
214591
|
function isRemixDependency([name]) {
|
|
214770
214592
|
return !!name.includes("@remix-run");
|
|
214771
214593
|
}
|
|
214594
|
+
function isReactRouterDependency([name]) {
|
|
214595
|
+
return !!name.includes("react-router");
|
|
214596
|
+
}
|
|
214772
214597
|
function maybeIncludeDependency({
|
|
214773
214598
|
currentDependencies,
|
|
214774
214599
|
dependency: [name, version],
|
|
214775
214600
|
selectedRelease
|
|
214776
214601
|
}) {
|
|
214777
214602
|
let existingDependencyVersion = currentDependencies[name];
|
|
214778
|
-
return isRemixDependency([name, version]) || existingDependencyVersion === "next" ? !1 : selectedRelease.dependenciesMeta?.[name] ? !selectedRelease.dependenciesMeta?.[name]?.required ? !1 : !!(!existingDependencyVersion || import_semver.default.lt(
|
|
214603
|
+
return isRemixDependency([name, version]) || isReactRouterDependency([name, version]) || existingDependencyVersion === "next" ? !1 : selectedRelease.dependenciesMeta?.[name] ? !selectedRelease.dependenciesMeta?.[name]?.required ? !1 : !!(!existingDependencyVersion || import_semver.default.lt(
|
|
214779
214604
|
getAbsoluteVersion(existingDependencyVersion),
|
|
214780
214605
|
getAbsoluteVersion(version)
|
|
214781
214606
|
)) : !0;
|
|
@@ -214800,11 +214625,25 @@ function buildUpgradeCommandArgs({
|
|
|
214800
214625
|
let currentRemix = Object.entries(currentDependencies).find(isRemixDependency), selectedRemix = Object.entries(selectedRelease.dependencies).find(
|
|
214801
214626
|
isRemixDependency
|
|
214802
214627
|
);
|
|
214803
|
-
|
|
214628
|
+
currentRemix && selectedRemix && import_semver.default.lt(
|
|
214804
214629
|
getAbsoluteVersion(currentRemix[1]),
|
|
214805
214630
|
getAbsoluteVersion(selectedRemix[1])
|
|
214806
214631
|
) && args.push(
|
|
214807
214632
|
...appendRemixDependencies({ currentDependencies, selectedRemix })
|
|
214633
|
+
);
|
|
214634
|
+
let currentReactRouter = Object.entries(currentDependencies).find(
|
|
214635
|
+
isReactRouterDependency
|
|
214636
|
+
), selectedReactRouter = Object.entries(selectedRelease.dependencies).find(
|
|
214637
|
+
isReactRouterDependency
|
|
214638
|
+
);
|
|
214639
|
+
return currentReactRouter && selectedReactRouter && import_semver.default.lt(
|
|
214640
|
+
getAbsoluteVersion(currentReactRouter[1]),
|
|
214641
|
+
getAbsoluteVersion(selectedReactRouter[1])
|
|
214642
|
+
) && args.push(
|
|
214643
|
+
...appendReactRouterDependencies({
|
|
214644
|
+
currentDependencies,
|
|
214645
|
+
selectedReactRouter
|
|
214646
|
+
})
|
|
214808
214647
|
), args;
|
|
214809
214648
|
}
|
|
214810
214649
|
async function upgradeNodeModules({
|
|
@@ -214840,6 +214679,15 @@ function appendRemixDependencies({
|
|
|
214840
214679
|
isRemixDependency([name, version]) && command.push(`${name}@${getAbsoluteVersion(selectedRemix[1])}`);
|
|
214841
214680
|
return command;
|
|
214842
214681
|
}
|
|
214682
|
+
function appendReactRouterDependencies({
|
|
214683
|
+
currentDependencies,
|
|
214684
|
+
selectedReactRouter
|
|
214685
|
+
}) {
|
|
214686
|
+
let command = [];
|
|
214687
|
+
for (let [name, version] of Object.entries(currentDependencies))
|
|
214688
|
+
isReactRouterDependency([name, version]) && command.push(`${name}@${getAbsoluteVersion(selectedReactRouter[1])}`);
|
|
214689
|
+
return command;
|
|
214690
|
+
}
|
|
214843
214691
|
function getAbsoluteVersion(version) {
|
|
214844
214692
|
let result = import_semver.default.minVersion(version);
|
|
214845
214693
|
if (!result)
|
|
@@ -215094,308 +214942,106 @@ async function displayDevUpgradeNotice({
|
|
|
215094
214942
|
}
|
|
215095
214943
|
}
|
|
215096
214944
|
|
|
215097
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
214945
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
|
|
215098
214946
|
init_cjs_shims();
|
|
215099
|
-
import fs4 from "node:fs/promises";
|
|
215100
|
-
|
|
215101
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.1_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
|
|
215102
|
-
init_cjs_shims();
|
|
215103
|
-
async function buildAssetsUrl(port, root) {
|
|
215104
|
-
let { buildAssetsUrl: _buildAssetsUrl } = await importLocal(
|
|
215105
|
-
"@shopify/mini-oxygen",
|
|
215106
|
-
root
|
|
215107
|
-
).catch(handleMiniOxygenImportFail);
|
|
215108
|
-
return _buildAssetsUrl(port);
|
|
215109
|
-
}
|
|
215110
|
-
async function startMiniOxygen(options, useNodeRuntime = !1) {
|
|
215111
|
-
if (useNodeRuntime) {
|
|
215112
|
-
process.env.MINIFLARE_SUBREQUEST_LIMIT = 100;
|
|
215113
|
-
let { startNodeServer } = await import("./node-MTCU4HTA.js");
|
|
215114
|
-
return startNodeServer(options);
|
|
215115
|
-
}
|
|
215116
|
-
let { startWorkerdServer } = await import("./workerd-VQLKP2OR.js");
|
|
215117
|
-
return startWorkerdServer(options);
|
|
215118
|
-
}
|
|
215119
214947
|
|
|
215120
|
-
// ../../node_modules/.pnpm
|
|
214948
|
+
// ../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js
|
|
215121
214949
|
init_cjs_shims();
|
|
215122
|
-
|
|
215123
|
-
|
|
215124
|
-
|
|
215125
|
-
|
|
215126
|
-
|
|
215127
|
-
|
|
215128
|
-
|
|
215129
|
-
|
|
215130
|
-
|
|
215131
|
-
|
|
215132
|
-
|
|
215133
|
-
|
|
215134
|
-
)
|
|
215135
|
-
|
|
215136
|
-
|
|
215137
|
-
|
|
215138
|
-
|
|
215139
|
-
|
|
215140
|
-
|
|
215141
|
-
|
|
215142
|
-
|
|
215143
|
-
|
|
215144
|
-
|
|
215145
|
-
|
|
215146
|
-
|
|
215147
|
-
|
|
215148
|
-
|
|
215149
|
-
|
|
215150
|
-
});
|
|
214950
|
+
import net from "node:net";
|
|
214951
|
+
import os from "node:os";
|
|
214952
|
+
var Locked = class extends Error {
|
|
214953
|
+
constructor(port) {
|
|
214954
|
+
super(`${port} is locked`);
|
|
214955
|
+
}
|
|
214956
|
+
}, lockedPorts = {
|
|
214957
|
+
old: /* @__PURE__ */ new Set(),
|
|
214958
|
+
young: /* @__PURE__ */ new Set()
|
|
214959
|
+
}, releaseOldLockedPortsIntervalMs = 1e3 * 15, minPort = 1024, maxPort = 65535, timeout, getLocalHosts = () => {
|
|
214960
|
+
let interfaces = os.networkInterfaces(), results = /* @__PURE__ */ new Set([void 0, "0.0.0.0"]);
|
|
214961
|
+
for (let _interface of Object.values(interfaces))
|
|
214962
|
+
for (let config2 of _interface)
|
|
214963
|
+
results.add(config2.address);
|
|
214964
|
+
return results;
|
|
214965
|
+
}, checkAvailablePort = (options) => new Promise((resolve2, reject) => {
|
|
214966
|
+
let server = net.createServer();
|
|
214967
|
+
server.unref(), server.on("error", reject), server.listen(options, () => {
|
|
214968
|
+
let { port } = server.address();
|
|
214969
|
+
server.close(() => {
|
|
214970
|
+
resolve2(port);
|
|
214971
|
+
});
|
|
214972
|
+
});
|
|
214973
|
+
}), getAvailablePort = async (options, hosts) => {
|
|
214974
|
+
if (options.host || options.port === 0)
|
|
214975
|
+
return checkAvailablePort(options);
|
|
214976
|
+
for (let host2 of hosts)
|
|
214977
|
+
try {
|
|
214978
|
+
await checkAvailablePort({ port: options.port, host: host2 });
|
|
214979
|
+
} catch (error) {
|
|
214980
|
+
if (!["EADDRNOTAVAIL", "EINVAL"].includes(error.code))
|
|
214981
|
+
throw error;
|
|
215151
214982
|
}
|
|
215152
|
-
|
|
215153
|
-
|
|
215154
|
-
|
|
215155
|
-
|
|
215156
|
-
|
|
215157
|
-
|
|
215158
|
-
|
|
215159
|
-
|
|
215160
|
-
|
|
215161
|
-
|
|
215162
|
-
|
|
215163
|
-
|
|
215164
|
-
|
|
215165
|
-
)
|
|
215166
|
-
|
|
215167
|
-
|
|
215168
|
-
|
|
215169
|
-
|
|
215170
|
-
|
|
215171
|
-
|
|
215172
|
-
|
|
215173
|
-
|
|
215174
|
-
|
|
215175
|
-
|
|
215176
|
-
|
|
215177
|
-
|
|
215178
|
-
|
|
215179
|
-
|
|
215180
|
-
|
|
215181
|
-
|
|
215182
|
-
|
|
215183
|
-
state.manifest = manifest;
|
|
215184
|
-
},
|
|
215185
|
-
onAppReady: async (ctx) => {
|
|
215186
|
-
let nextState = { prevManifest: state.manifest };
|
|
215187
|
-
try {
|
|
215188
|
-
let loaderChanges = await state.loaderChanges;
|
|
215189
|
-
loaderChanges.ok && (nextState.prevLoaderHashes = loaderChanges.value), loaderChanges.ok && state.manifest && state.prevManifest ? socket.hmr(
|
|
215190
|
-
state.manifest,
|
|
215191
|
-
hmrUpdates(
|
|
215192
|
-
ctx.config,
|
|
215193
|
-
state.manifest,
|
|
215194
|
-
state.prevManifest,
|
|
215195
|
-
loaderChanges.value,
|
|
215196
|
-
state.prevLoaderHashes
|
|
215197
|
-
)
|
|
215198
|
-
) : state.prevManifest && socket.reload();
|
|
215199
|
-
} finally {
|
|
215200
|
-
Object.assign(state, nextState);
|
|
215201
|
-
}
|
|
215202
|
-
},
|
|
215203
|
-
close: () => {
|
|
215204
|
-
socket.close(), server.close();
|
|
215205
|
-
}
|
|
215206
|
-
};
|
|
215207
|
-
} catch (error) {
|
|
215208
|
-
console.warn(
|
|
215209
|
-
"Could not start HMR server. Please make sure your Remix packages are in sync with Hydrogen. Defaulting to regular live reload.",
|
|
215210
|
-
error.stack
|
|
215211
|
-
);
|
|
215212
|
-
}
|
|
215213
|
-
}
|
|
215214
|
-
|
|
215215
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.1_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/classic-compiler/dev.js
|
|
215216
|
-
var LOG_REBUILDING = "\u{1F9F1} Rebuilding...", LOG_REBUILT = "\u{1F680} Rebuilt";
|
|
215217
|
-
function filterOutVirtualRoutes(config2) {
|
|
215218
|
-
let routes = {};
|
|
215219
|
-
return Object.entries(config2.routes).forEach(([key, value]) => {
|
|
215220
|
-
key.includes("virtual-routes") || (routes[key] = value);
|
|
215221
|
-
}), {
|
|
215222
|
-
...config2,
|
|
215223
|
-
routes
|
|
215224
|
-
};
|
|
215225
|
-
}
|
|
215226
|
-
async function runClassicCompilerDev({
|
|
215227
|
-
port: appPort2,
|
|
215228
|
-
path: appPath,
|
|
215229
|
-
codegen: useCodegen = !1,
|
|
215230
|
-
legacyRuntime = !1,
|
|
215231
|
-
codegenConfigPath,
|
|
215232
|
-
disableVirtualRoutes,
|
|
215233
|
-
env: envHandle,
|
|
215234
|
-
envBranch,
|
|
215235
|
-
debug: debug4 = !1,
|
|
215236
|
-
sourcemap = !0,
|
|
215237
|
-
disableVersionCheck = !1,
|
|
215238
|
-
inspectorPort,
|
|
215239
|
-
customerAccountPush: customerAccountPushFlag = !1,
|
|
215240
|
-
shouldLiveReload = !0,
|
|
215241
|
-
envFile,
|
|
215242
|
-
cliConfig,
|
|
215243
|
-
verbose
|
|
215244
|
-
}) {
|
|
215245
|
-
process.env.NODE_ENV || (process.env.NODE_ENV = "development"), verbose && setH2OVerbose(), isH2Verbose() || muteDevLogs();
|
|
215246
|
-
let { root, publicPath, buildPathClient, buildPathWorkerFile } = getProjectPaths(appPath), copyFilesPromise = copyPublicFiles(publicPath, buildPathClient), cliCommandPromise = getCliCommand(root), reloadConfig = async () => {
|
|
215247
|
-
let config2 = await getRemixConfig(root);
|
|
215248
|
-
return disableVirtualRoutes ? filterOutVirtualRoutes(config2) : addVirtualRoutes(config2).catch((error) => (outputDebug(
|
|
215249
|
-
"Could not add virtual routes: " + (error?.stack ?? error?.message ?? error)
|
|
215250
|
-
), config2));
|
|
215251
|
-
}, getFilePaths = (file) => {
|
|
215252
|
-
let fileRelative = relativePath(root, file);
|
|
215253
|
-
return [fileRelative, resolvePath(root, fileRelative)];
|
|
215254
|
-
}, serverBundleExists = () => fileExists(buildPathWorkerFile);
|
|
215255
|
-
appPort2 || (appPort2 = await findPort(DEFAULT_APP_PORT));
|
|
215256
|
-
let assetsPort = legacyRuntime ? 0 : await findPort(appPort2 + 100);
|
|
215257
|
-
assetsPort && (process.env.HYDROGEN_ASSET_BASE_URL = await buildAssetsUrl(
|
|
215258
|
-
assetsPort,
|
|
215259
|
-
root
|
|
215260
|
-
));
|
|
215261
|
-
let backgroundPromise = getDevConfigInBackground(
|
|
215262
|
-
root,
|
|
215263
|
-
customerAccountPushFlag,
|
|
215264
|
-
envFile
|
|
215265
|
-
), tunnelPromise = cliConfig && backgroundPromise.then(({ customerAccountPush, storefrontId }) => {
|
|
215266
|
-
if (customerAccountPush)
|
|
215267
|
-
return startTunnelAndPushConfig(
|
|
215268
|
-
root,
|
|
215269
|
-
cliConfig,
|
|
215270
|
-
appPort2,
|
|
215271
|
-
storefrontId
|
|
215272
|
-
);
|
|
215273
|
-
}), remixConfig = await reloadConfig();
|
|
215274
|
-
assertOxygenChecks(remixConfig);
|
|
215275
|
-
let envPromise = backgroundPromise.then(
|
|
215276
|
-
({ fetchRemote, localVariables }) => getAllEnvironmentVariables({
|
|
215277
|
-
root,
|
|
215278
|
-
fetchRemote,
|
|
215279
|
-
envBranch,
|
|
215280
|
-
envHandle,
|
|
215281
|
-
localVariables,
|
|
215282
|
-
envFile
|
|
215283
|
-
})
|
|
215284
|
-
), [{ watch }, { createFileWatchCache }] = await Promise.all([
|
|
215285
|
-
importLocal("@remix-run/dev/dist/compiler/watch.js", root),
|
|
215286
|
-
importLocal(
|
|
215287
|
-
"@remix-run/dev/dist/compiler/fileWatchCache.js",
|
|
215288
|
-
root
|
|
215289
|
-
)
|
|
215290
|
-
]).catch(handleRemixImportFail), isInitialBuild = !0, initialBuildDurationMs = 0, initialBuildStartTimeMs = Date.now(), liveReload = shouldLiveReload ? await setupLiveReload(remixConfig.dev?.port ?? 8002, root) : void 0, miniOxygen, codegenProcess;
|
|
215291
|
-
async function safeStartMiniOxygen() {
|
|
215292
|
-
if (miniOxygen) return;
|
|
215293
|
-
let { allVariables, logInjectedVariables } = await envPromise;
|
|
215294
|
-
miniOxygen = await startMiniOxygen(
|
|
215295
|
-
{
|
|
215296
|
-
root,
|
|
215297
|
-
debug: debug4,
|
|
215298
|
-
appPort: appPort2,
|
|
215299
|
-
assetsPort,
|
|
215300
|
-
inspectorPort,
|
|
215301
|
-
watch: !liveReload,
|
|
215302
|
-
buildPathWorkerFile,
|
|
215303
|
-
buildPathClient,
|
|
215304
|
-
env: allVariables
|
|
215305
|
-
},
|
|
215306
|
-
legacyRuntime
|
|
215307
|
-
), logInjectedVariables();
|
|
215308
|
-
let host2 = (await tunnelPromise)?.host ?? miniOxygen.listeningAt, cliCommand = await cliCommandPromise;
|
|
215309
|
-
enhanceH2Logs({ host: host2, cliCommand, ...remixConfig });
|
|
215310
|
-
let { storefrontTitle } = await backgroundPromise;
|
|
215311
|
-
miniOxygen.showBanner({
|
|
215312
|
-
appName: storefrontTitle,
|
|
215313
|
-
headlinePrefix: initialBuildDurationMs > 0 ? `Initial build: ${initialBuildDurationMs}ms
|
|
215314
|
-
` : "",
|
|
215315
|
-
host: host2
|
|
215316
|
-
}), useCodegen && (codegenProcess = spawnCodegenProcess({
|
|
215317
|
-
...remixConfig,
|
|
215318
|
-
configFilePath: codegenConfigPath
|
|
215319
|
-
})), checkRemixVersions(root), disableVersionCheck || displayDevUpgradeNotice({ targetPath: appPath }), customerAccountPushFlag && isMockShop(allVariables) && notifyIssueWithTunnelAndMockShop(cliCommand);
|
|
215320
|
-
}
|
|
215321
|
-
let fileWatchCache = createFileWatchCache(), skipRebuildLogs = !1, closeWatcher = await watch(
|
|
215322
|
-
{
|
|
215323
|
-
config: remixConfig,
|
|
215324
|
-
options: {
|
|
215325
|
-
mode: process.env.NODE_ENV,
|
|
215326
|
-
sourcemap
|
|
215327
|
-
},
|
|
215328
|
-
fileWatchCache,
|
|
215329
|
-
logger: createRemixLogger()
|
|
215330
|
-
},
|
|
215331
|
-
{
|
|
215332
|
-
reloadConfig,
|
|
215333
|
-
onBuildStart(ctx) {
|
|
215334
|
-
!isInitialBuild && !skipRebuildLogs && (outputInfo(LOG_REBUILDING), console.time(LOG_REBUILT)), liveReload?.onBuildStart(ctx);
|
|
215335
|
-
},
|
|
215336
|
-
onBuildManifest: liveReload?.onBuildManifest,
|
|
215337
|
-
async onBuildFinish(context, duration, succeeded) {
|
|
215338
|
-
if (isInitialBuild ? (await copyFilesPromise, initialBuildDurationMs = Date.now() - initialBuildStartTimeMs, isInitialBuild = !1) : skipRebuildLogs || (skipRebuildLogs = !1, console.timeEnd(LOG_REBUILT), miniOxygen || console.log("")), !miniOxygen && !await serverBundleExists())
|
|
215339
|
-
return renderFatalError({
|
|
215340
|
-
name: "BuildError",
|
|
215341
|
-
type: 0,
|
|
215342
|
-
message: "MiniOxygen cannot start because the server bundle has not been generated.",
|
|
215343
|
-
skipOclifErrorHandling: !0,
|
|
215344
|
-
tryMessage: "This is likely due to an error in your app and Remix is unable to compile. Try fixing the app and MiniOxygen will start."
|
|
215345
|
-
});
|
|
215346
|
-
succeeded && (miniOxygen ? liveReload && await miniOxygen.reload() : await safeStartMiniOxygen(), liveReload?.onAppReady(context));
|
|
215347
|
-
},
|
|
215348
|
-
async onFileCreated(file) {
|
|
215349
|
-
let [relative, absolute] = getFilePaths(file);
|
|
215350
|
-
outputInfo(`
|
|
215351
|
-
\u{1F4C4} File created: ${relative}`), absolute.startsWith(publicPath) && await copyPublicFiles(
|
|
215352
|
-
absolute,
|
|
215353
|
-
absolute.replace(publicPath, buildPathClient)
|
|
215354
|
-
);
|
|
215355
|
-
},
|
|
215356
|
-
async onFileChanged(file) {
|
|
215357
|
-
fileWatchCache.invalidateFile(file);
|
|
215358
|
-
let [relative, absolute] = getFilePaths(file);
|
|
215359
|
-
if (outputInfo(`
|
|
215360
|
-
\u{1F4C4} File changed: ${relative}`), relative.endsWith(envFile)) {
|
|
215361
|
-
skipRebuildLogs = !0;
|
|
215362
|
-
let { fetchRemote } = await backgroundPromise, { allVariables, logInjectedVariables } = await getAllEnvironmentVariables({
|
|
215363
|
-
root,
|
|
215364
|
-
fetchRemote,
|
|
215365
|
-
envBranch,
|
|
215366
|
-
envHandle,
|
|
215367
|
-
envFile
|
|
215368
|
-
});
|
|
215369
|
-
logInjectedVariables(), await miniOxygen.reload({
|
|
215370
|
-
env: allVariables
|
|
215371
|
-
});
|
|
215372
|
-
}
|
|
215373
|
-
absolute.startsWith(publicPath) && await copyPublicFiles(
|
|
215374
|
-
absolute,
|
|
215375
|
-
absolute.replace(publicPath, buildPathClient)
|
|
215376
|
-
);
|
|
215377
|
-
},
|
|
215378
|
-
async onFileDeleted(file) {
|
|
215379
|
-
fileWatchCache.invalidateFile(file);
|
|
215380
|
-
let [relative, absolute] = getFilePaths(file);
|
|
215381
|
-
outputInfo(`
|
|
215382
|
-
\u{1F4C4} File deleted: ${relative}`), absolute.startsWith(publicPath) && await fs4.unlink(absolute.replace(publicPath, buildPathClient));
|
|
214983
|
+
return options.port;
|
|
214984
|
+
}, portCheckSequence = function* (ports2) {
|
|
214985
|
+
ports2 && (yield* ports2), yield 0;
|
|
214986
|
+
};
|
|
214987
|
+
async function getPorts(options) {
|
|
214988
|
+
let ports2, exclude = /* @__PURE__ */ new Set();
|
|
214989
|
+
if (options && (options.port && (ports2 = typeof options.port == "number" ? [options.port] : options.port), options.exclude)) {
|
|
214990
|
+
let excludeIterable = options.exclude;
|
|
214991
|
+
if (typeof excludeIterable[Symbol.iterator] != "function")
|
|
214992
|
+
throw new TypeError("The `exclude` option must be an iterable.");
|
|
214993
|
+
for (let element of excludeIterable) {
|
|
214994
|
+
if (typeof element != "number")
|
|
214995
|
+
throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");
|
|
214996
|
+
if (!Number.isSafeInteger(element))
|
|
214997
|
+
throw new TypeError(`Number ${element} in the exclude option is not a safe integer and can't be used`);
|
|
214998
|
+
}
|
|
214999
|
+
exclude = new Set(excludeIterable);
|
|
215000
|
+
}
|
|
215001
|
+
timeout === void 0 && (timeout = setTimeout(() => {
|
|
215002
|
+
timeout = void 0, lockedPorts.old = lockedPorts.young, lockedPorts.young = /* @__PURE__ */ new Set();
|
|
215003
|
+
}, releaseOldLockedPortsIntervalMs), timeout.unref && timeout.unref());
|
|
215004
|
+
let hosts = getLocalHosts();
|
|
215005
|
+
for (let port of portCheckSequence(ports2))
|
|
215006
|
+
try {
|
|
215007
|
+
if (exclude.has(port))
|
|
215008
|
+
continue;
|
|
215009
|
+
let availablePort = await getAvailablePort({ ...options, port }, hosts);
|
|
215010
|
+
for (; lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort); ) {
|
|
215011
|
+
if (port !== 0)
|
|
215012
|
+
throw new Locked(port);
|
|
215013
|
+
availablePort = await getAvailablePort({ ...options, port }, hosts);
|
|
215383
215014
|
}
|
|
215015
|
+
return lockedPorts.young.add(availablePort), availablePort;
|
|
215016
|
+
} catch (error) {
|
|
215017
|
+
if (!["EADDRINUSE", "EACCES"].includes(error.code) && !(error instanceof Locked))
|
|
215018
|
+
throw error;
|
|
215384
215019
|
}
|
|
215385
|
-
);
|
|
215386
|
-
|
|
215387
|
-
|
|
215388
|
-
|
|
215389
|
-
|
|
215390
|
-
|
|
215391
|
-
|
|
215392
|
-
|
|
215393
|
-
|
|
215394
|
-
|
|
215395
|
-
|
|
215020
|
+
throw new Error("No available ports found");
|
|
215021
|
+
}
|
|
215022
|
+
function portNumbers(from, to) {
|
|
215023
|
+
if (!Number.isInteger(from) || !Number.isInteger(to))
|
|
215024
|
+
throw new TypeError("`from` and `to` must be integer numbers");
|
|
215025
|
+
if (from < minPort || from > maxPort)
|
|
215026
|
+
throw new RangeError(`'from' must be between ${minPort} and ${maxPort}`);
|
|
215027
|
+
if (to < minPort || to > maxPort)
|
|
215028
|
+
throw new RangeError(`'to' must be between ${minPort} and ${maxPort}`);
|
|
215029
|
+
if (from > to)
|
|
215030
|
+
throw new RangeError("`to` must be greater than or equal to `from`");
|
|
215031
|
+
return function* (from2, to2) {
|
|
215032
|
+
for (let port = from2; port <= to2; port++)
|
|
215033
|
+
yield port;
|
|
215034
|
+
}(from, to);
|
|
215035
|
+
}
|
|
215036
|
+
|
|
215037
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
|
|
215038
|
+
function findPort(portPreference, range = 100) {
|
|
215039
|
+
return getPorts({
|
|
215040
|
+
port: portNumbers(portPreference, portPreference + range)
|
|
215041
|
+
});
|
|
215396
215042
|
}
|
|
215397
215043
|
|
|
215398
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215044
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/deps-optimizer.js
|
|
215399
215045
|
init_cjs_shims();
|
|
215400
215046
|
var throttledOptimizableDeps = /* @__PURE__ */ new Set(), debouncedBannerTimeout;
|
|
215401
215047
|
function createEntryPointErrorHandler({
|
|
@@ -215523,7 +215169,7 @@ ${source_default.dim(
|
|
|
215523
215169
|
});
|
|
215524
215170
|
}
|
|
215525
215171
|
|
|
215526
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215172
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/dev.js
|
|
215527
215173
|
var Dev2 = class _Dev extends base_command_default {
|
|
215528
215174
|
static descriptionWithMarkdown = `Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development.
|
|
215529
215175
|
|
|
@@ -215563,17 +215209,6 @@ var Dev2 = class _Dev extends base_command_default {
|
|
|
215563
215209
|
description: "Disable adding dependencies to Vite's `ssr.optimizeDeps.include` automatically",
|
|
215564
215210
|
env: "SHOPIFY_HYDROGEN_FLAG_DISABLE_DEPS_OPTIMIZER",
|
|
215565
215211
|
default: !1
|
|
215566
|
-
}),
|
|
215567
|
-
// For the classic compiler:
|
|
215568
|
-
...overrideFlag(commonFlags.legacyRuntime, {
|
|
215569
|
-
"legacy-runtime": {
|
|
215570
|
-
description: "[Classic Remix Compiler] " + commonFlags.legacyRuntime["legacy-runtime"].description
|
|
215571
|
-
}
|
|
215572
|
-
}),
|
|
215573
|
-
...overrideFlag(commonFlags.sourcemap, {
|
|
215574
|
-
sourcemap: {
|
|
215575
|
-
description: "[Classic Remix Compiler] " + commonFlags.sourcemap.sourcemap.description
|
|
215576
|
-
}
|
|
215577
215212
|
})
|
|
215578
215213
|
};
|
|
215579
215214
|
async run() {
|
|
@@ -215582,7 +215217,10 @@ var Dev2 = class _Dev extends base_command_default {
|
|
|
215582
215217
|
customerAccountPush: flags["customer-account-push__unstable"],
|
|
215583
215218
|
path: directory,
|
|
215584
215219
|
cliConfig: this.config
|
|
215585
|
-
}
|
|
215220
|
+
};
|
|
215221
|
+
if (!await isViteProject(directory))
|
|
215222
|
+
throw new AbortError(REMIX_COMPILER_ERROR_MESSAGE);
|
|
215223
|
+
let { close } = await runDev(devParams);
|
|
215586
215224
|
setupResourceCleanup(async () => {
|
|
215587
215225
|
await close(), diff3 && (await diff3.copyShopifyConfig(), await diff3.cleanup());
|
|
215588
215226
|
});
|
|
@@ -215684,11 +215322,12 @@ async function runDev({
|
|
|
215684
215322
|
"Hydrogen plugin not found.",
|
|
215685
215323
|
"Add `hydrogen()` plugin to your Vite config."
|
|
215686
215324
|
);
|
|
215687
|
-
|
|
215325
|
+
h2Plugin.api?.getPluginOptions?.();
|
|
215326
|
+
let remixConfig = (await getViteConfig(root)).remixConfig, codegenProcess, setupCodegen = useCodegen ? () => {
|
|
215688
215327
|
codegenProcess?.kill(0), codegenProcess = spawnCodegenProcess({
|
|
215689
215328
|
rootDirectory: root,
|
|
215690
215329
|
configFilePath: codegenConfigPath,
|
|
215691
|
-
appDirectory:
|
|
215330
|
+
appDirectory: remixConfig?.appDirectory
|
|
215692
215331
|
});
|
|
215693
215332
|
} : void 0;
|
|
215694
215333
|
setupCodegen?.(), hydrogenPackagesPath && setupMonorepoReload(viteServer, hydrogenPackagesPath, setupCodegen);
|
|
@@ -215767,7 +215406,7 @@ function setupMonorepoReload(viteServer, monorepoPackagesPath, setupCodegen) {
|
|
|
215767
215406
|
});
|
|
215768
215407
|
}
|
|
215769
215408
|
|
|
215770
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215409
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/list.js
|
|
215771
215410
|
init_cjs_shims();
|
|
215772
215411
|
var EnvList = class _EnvList extends base_command_default {
|
|
215773
215412
|
static descriptionWithMarkdown = "Lists all environments available on the linked Hydrogen storefront.";
|
|
@@ -215833,7 +215472,7 @@ var pluralizedEnvironments = ({
|
|
|
215833
215472
|
() => `There are no environments for the Hydrogen storefront ${storefrontTitle}`
|
|
215834
215473
|
);
|
|
215835
215474
|
|
|
215836
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215475
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/pull.js
|
|
215837
215476
|
init_cjs_shims();
|
|
215838
215477
|
|
|
215839
215478
|
// ../../node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.mjs
|
|
@@ -216055,7 +215694,7 @@ arrayDiff.join = arrayDiff.removeEmpty = function(value) {
|
|
|
216055
215694
|
return value;
|
|
216056
215695
|
};
|
|
216057
215696
|
|
|
216058
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215697
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/pull.js
|
|
216059
215698
|
var EnvPull = class _EnvPull extends base_command_default {
|
|
216060
215699
|
static descriptionWithMarkdown = "Pulls environment variables from the linked Hydrogen storefront and writes them to an `.env` file.";
|
|
216061
215700
|
static description = "Populate your .env with variables from your Hydrogen storefront.";
|
|
@@ -216147,10 +215786,10 @@ Continue?`.value
|
|
|
216147
215786
|
});
|
|
216148
215787
|
}
|
|
216149
215788
|
|
|
216150
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215789
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/push.js
|
|
216151
215790
|
init_cjs_shims();
|
|
216152
215791
|
|
|
216153
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215792
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/graphql/admin/push-variables.js
|
|
216154
215793
|
init_cjs_shims();
|
|
216155
215794
|
var PushVariablesMutation = `#graphql
|
|
216156
215795
|
mutation PushVariables(
|
|
@@ -216183,7 +215822,7 @@ async function pushStorefrontEnvVariables(adminSession, storefrontId, environmen
|
|
|
216183
215822
|
return { userErrors };
|
|
216184
215823
|
}
|
|
216185
215824
|
|
|
216186
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215825
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/env/push.js
|
|
216187
215826
|
var EnvPush = class _EnvPush extends base_command_default {
|
|
216188
215827
|
static description = "Push environment variables from the local .env file to your linked Hydrogen storefront.";
|
|
216189
215828
|
static flags = {
|
|
@@ -216298,10 +215937,10 @@ Continue?`.value
|
|
|
216298
215937
|
});
|
|
216299
215938
|
}
|
|
216300
215939
|
|
|
216301
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215940
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/g.js
|
|
216302
215941
|
init_cjs_shims();
|
|
216303
215942
|
|
|
216304
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
215943
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/generate/route.js
|
|
216305
215944
|
init_cjs_shims();
|
|
216306
215945
|
var import_core24 = __toESM(require_lib(), 1);
|
|
216307
215946
|
var GenerateRoute2 = class _GenerateRoute extends base_command_default {
|
|
@@ -216368,7 +216007,7 @@ async function runGenerate(options) {
|
|
|
216368
216007
|
});
|
|
216369
216008
|
}
|
|
216370
216009
|
|
|
216371
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216010
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/g.js
|
|
216372
216011
|
var GenerateRouteShortcut = class extends base_command_default {
|
|
216373
216012
|
static description = "Shortcut for `hydrogen generate`. See `hydrogen generate --help` for more information.";
|
|
216374
216013
|
static strict = !1;
|
|
@@ -216381,7 +216020,7 @@ var GenerateRouteShortcut = class extends base_command_default {
|
|
|
216381
216020
|
}
|
|
216382
216021
|
};
|
|
216383
216022
|
|
|
216384
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216023
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/generate/routes.js
|
|
216385
216024
|
init_cjs_shims();
|
|
216386
216025
|
var GenerateRoutes = class _GenerateRoutes extends base_command_default {
|
|
216387
216026
|
static description = "Generates all supported standard shopify routes.";
|
|
@@ -216396,11 +216035,11 @@ var GenerateRoutes = class _GenerateRoutes extends base_command_default {
|
|
|
216396
216035
|
}
|
|
216397
216036
|
};
|
|
216398
216037
|
|
|
216399
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216038
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/init.js
|
|
216400
216039
|
init_cjs_shims();
|
|
216401
216040
|
var import_core25 = __toESM(require_lib(), 1);
|
|
216402
216041
|
|
|
216403
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216042
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/check-cli-version.js
|
|
216404
216043
|
init_cjs_shims();
|
|
216405
216044
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
216406
216045
|
var UPGRADABLE_CLI_NAMES = {
|
|
@@ -216444,10 +216083,10 @@ You are currently running v${currentVersion}.
|
|
|
216444
216083
|
};
|
|
216445
216084
|
}
|
|
216446
216085
|
|
|
216447
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216086
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/index.js
|
|
216448
216087
|
init_cjs_shims();
|
|
216449
216088
|
|
|
216450
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216089
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/local.js
|
|
216451
216090
|
init_cjs_shims();
|
|
216452
216091
|
import { cp as cp2 } from "node:fs/promises";
|
|
216453
216092
|
async function setupLocalStarterTemplate(options, controller) {
|
|
@@ -216664,11 +216303,11 @@ function maybeInjectCliHydrogen(pkgJsonContent) {
|
|
|
216664
216303
|
return pkgJsonContent;
|
|
216665
216304
|
}
|
|
216666
216305
|
|
|
216667
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216306
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/remote.js
|
|
216668
216307
|
init_cjs_shims();
|
|
216669
216308
|
import { readdir as readdir2 } from "node:fs/promises";
|
|
216670
216309
|
|
|
216671
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216310
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-downloader.js
|
|
216672
216311
|
init_cjs_shims();
|
|
216673
216312
|
var import_gunzip_maybe = __toESM(require_gunzip_maybe(), 1), import_tar_fs = __toESM(require_tar_fs(), 1);
|
|
216674
216313
|
import path3 from "node:path";
|
|
@@ -216688,8 +216327,8 @@ function parseGitHubRepositoryURL(url) {
|
|
|
216688
216327
|
];
|
|
216689
216328
|
return err(new Error(`Parsing the url ${url} failed. Supported formats are ${exampleFormats.join(", ")}.`));
|
|
216690
216329
|
}
|
|
216691
|
-
let site = match2[1] ?? match2[2] ?? match2[3] ?? "github.com", normalizedSite = site === "github" ? "github.com" : site, user = match2[4], name = match2[5].replace(/\.git$/, ""), subDirectory = match2[6]?.slice(1), ref = match2[7], branch = ref ? `#${ref}` : "", ssh = `git@${normalizedSite}:${user}/${name}`,
|
|
216692
|
-
return ok({ full, site: normalizedSite, user, name, ref, subDirectory, ssh, http:
|
|
216330
|
+
let site = match2[1] ?? match2[2] ?? match2[3] ?? "github.com", normalizedSite = site === "github" ? "github.com" : site, user = match2[4], name = match2[5].replace(/\.git$/, ""), subDirectory = match2[6]?.slice(1), ref = match2[7], branch = ref ? `#${ref}` : "", ssh = `git@${normalizedSite}:${user}/${name}`, http2 = `https://${normalizedSite}/${user}/${name}`, full = ["https:/", normalizedSite, user, name, subDirectory].join("/").concat(branch);
|
|
216331
|
+
return ok({ full, site: normalizedSite, user, name, ref, subDirectory, ssh, http: http2 });
|
|
216693
216332
|
}
|
|
216694
216333
|
function parseGitHubRepositoryReference(reference) {
|
|
216695
216334
|
let url = new URL(reference), branch = url.hash ? url.hash.slice(1) : void 0, [_3, user, repo, ...repoPath] = url.pathname.split("/"), filePath = repoPath.length > 0 ? repoPath.join("/") : void 0;
|
|
@@ -216716,7 +216355,7 @@ async function downloadGitHubRelease(repo, version, assetName, targetPath) {
|
|
|
216716
216355
|
});
|
|
216717
216356
|
}
|
|
216718
216357
|
|
|
216719
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216358
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/template-downloader.js
|
|
216720
216359
|
var REPO_RELEASES_URL = "https://api.github.com/repos/shopify/hydrogen/releases/latest", getTryMessage = (status) => status === 403 ? "If you are using a VPN, WARP, or similar service, consider disabling it momentarily." : void 0;
|
|
216721
216360
|
async function getLatestReleaseDownloadUrl(signal) {
|
|
216722
216361
|
let response = await fetch2(REPO_RELEASES_URL, { signal });
|
|
@@ -216799,7 +216438,7 @@ async function downloadExternalRepo(appTemplate, signal) {
|
|
|
216799
216438
|
}), await rmdir(joinPath(templateDir, ".git"), { force: !0 }), { templateDir };
|
|
216800
216439
|
}
|
|
216801
216440
|
|
|
216802
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216441
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/remote.js
|
|
216803
216442
|
var DEMO_STORE_REPO = "shopify/hydrogen-demo-store";
|
|
216804
216443
|
async function setupRemoteTemplate(options, controller) {
|
|
216805
216444
|
let appTemplate = options.template === "demo-store" ? DEMO_STORE_REPO : options.template, abort2 = createAbortHandler(controller), backgroundDownloadPromise = appTemplate.includes("/") ? getExternalTemplate(appTemplate, controller.signal).catch(abort2) : getMonorepoTemplate(appTemplate, controller.signal).catch(abort2), project = await handleProjectLocation({ ...options, controller });
|
|
@@ -216885,7 +216524,7 @@ Skip the flag or provide the name of a template or example in the Hydrogen repos
|
|
|
216885
216524
|
);
|
|
216886
216525
|
}
|
|
216887
216526
|
|
|
216888
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216527
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/onboarding/index.js
|
|
216889
216528
|
async function setupTemplate(options) {
|
|
216890
216529
|
let controller = new AbortController2();
|
|
216891
216530
|
try {
|
|
@@ -216896,7 +216535,7 @@ async function setupTemplate(options) {
|
|
|
216896
216535
|
}
|
|
216897
216536
|
}
|
|
216898
216537
|
|
|
216899
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216538
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/init.js
|
|
216900
216539
|
var FLAG_MAP = { f: "force" }, Init2 = class _Init extends base_command_default {
|
|
216901
216540
|
static descriptionWithMarkdown = "Creates a new Hydrogen storefront.";
|
|
216902
216541
|
static description = "Creates a new Hydrogen storefront.";
|
|
@@ -216970,10 +216609,10 @@ async function runInit({
|
|
|
216970
216609
|
return showUpgrade && showUpgrade(options.packageManager), setupTemplate(options);
|
|
216971
216610
|
}
|
|
216972
216611
|
|
|
216973
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216612
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/list.js
|
|
216974
216613
|
init_cjs_shims();
|
|
216975
216614
|
|
|
216976
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216615
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/graphql/admin/list-storefronts.js
|
|
216977
216616
|
init_cjs_shims();
|
|
216978
216617
|
var ListStorefrontsQuery = `#graphql
|
|
216979
216618
|
query ListStorefronts {
|
|
@@ -217000,7 +216639,7 @@ async function getStorefrontsWithDeployment(adminSession) {
|
|
|
217000
216639
|
}));
|
|
217001
216640
|
}
|
|
217002
216641
|
|
|
217003
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216642
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/list.js
|
|
217004
216643
|
var List3 = class _List extends base_command_default {
|
|
217005
216644
|
static descriptionWithMarkdown = "Lists all remote Hydrogen storefronts available to link to your local development environment.";
|
|
217006
216645
|
static description = "Returns a list of Hydrogen storefronts available on a given shop.";
|
|
@@ -217068,7 +216707,7 @@ var pluralizedStorefronts = ({
|
|
|
217068
216707
|
(_storefront) => `Showing 1 Hydrogen storefront for the store ${shop}`
|
|
217069
216708
|
);
|
|
217070
216709
|
|
|
217071
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216710
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/login.js
|
|
217072
216711
|
init_cjs_shims();
|
|
217073
216712
|
var Login = class _Login extends base_command_default {
|
|
217074
216713
|
static descriptionWithMarkdown = "Logs in to the specified shop and saves the shop domain to the project.";
|
|
@@ -217091,7 +216730,7 @@ async function runLogin({
|
|
|
217091
216730
|
renderLoginSuccess(config2);
|
|
217092
216731
|
}
|
|
217093
216732
|
|
|
217094
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216733
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/logout.js
|
|
217095
216734
|
init_cjs_shims();
|
|
217096
216735
|
var Logout2 = class _Logout extends base_command_default {
|
|
217097
216736
|
static descriptionWithMarkdown = "Log out from the current shop.";
|
|
@@ -217108,16 +216747,24 @@ async function runLogout({ path: root = process.cwd() }) {
|
|
|
217108
216747
|
outputNewline(), await logout(root), renderSuccess({ body: "You are logged out from Shopify." });
|
|
217109
216748
|
}
|
|
217110
216749
|
|
|
217111
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216750
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/preview.js
|
|
217112
216751
|
init_cjs_shims();
|
|
217113
216752
|
var import_core26 = __toESM(require_lib(), 1);
|
|
216753
|
+
|
|
216754
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/index.js
|
|
216755
|
+
init_cjs_shims();
|
|
216756
|
+
async function startMiniOxygen(options) {
|
|
216757
|
+
let { startWorkerdServer } = await import("./workerd-MVGKDJ7H.js");
|
|
216758
|
+
return startWorkerdServer(options);
|
|
216759
|
+
}
|
|
216760
|
+
|
|
216761
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/preview.js
|
|
217114
216762
|
var Preview = class _Preview extends base_command_default {
|
|
217115
216763
|
static descriptionWithMarkdown = "Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";
|
|
217116
216764
|
static description = "Runs a Hydrogen storefront in an Oxygen worker for production.";
|
|
217117
216765
|
static flags = {
|
|
217118
216766
|
...commonFlags.path,
|
|
217119
216767
|
...commonFlags.port,
|
|
217120
|
-
...commonFlags.legacyRuntime,
|
|
217121
216768
|
...commonFlags.env,
|
|
217122
216769
|
...commonFlags.envBranch,
|
|
217123
216770
|
...commonFlags.envFile,
|
|
@@ -217159,7 +216806,6 @@ var Preview = class _Preview extends base_command_default {
|
|
|
217159
216806
|
async function runPreview({
|
|
217160
216807
|
port: appPort2,
|
|
217161
216808
|
directory,
|
|
217162
|
-
legacyRuntime = !1,
|
|
217163
216809
|
env: envHandle,
|
|
217164
216810
|
envBranch,
|
|
217165
216811
|
inspectorPort,
|
|
@@ -217174,24 +216820,19 @@ async function runPreview({
|
|
|
217174
216820
|
}) {
|
|
217175
216821
|
process.env.NODE_ENV || (process.env.NODE_ENV = watch ? "development" : "production"), verbose && setH2OVerbose(), isH2Verbose() || muteDevLogs();
|
|
217176
216822
|
let { root, buildPath, buildPathWorkerFile, buildPathClient } = getProjectPaths(directory), useClassicCompiler = await isClassicProject(root);
|
|
217177
|
-
if (
|
|
217178
|
-
throw new AbortError(
|
|
217179
|
-
|
|
217180
|
-
|
|
217181
|
-
|
|
217182
|
-
|
|
217183
|
-
|
|
217184
|
-
|
|
217185
|
-
|
|
217186
|
-
|
|
217187
|
-
|
|
217188
|
-
|
|
217189
|
-
|
|
217190
|
-
codegenConfigPath
|
|
217191
|
-
}, buildProcess = shouldBuild ? useClassicCompiler ? await runClassicCompilerBuild({
|
|
217192
|
-
...buildOptions
|
|
217193
|
-
}).then(projectBuild.resolve) : await runBuild({
|
|
217194
|
-
...buildOptions,
|
|
216823
|
+
if (useClassicCompiler)
|
|
216824
|
+
throw new AbortError(REMIX_COMPILER_ERROR_MESSAGE);
|
|
216825
|
+
let miniOxygen, projectBuild = deferPromise(), buildProcess = shouldBuild ? await runBuild({
|
|
216826
|
+
...{
|
|
216827
|
+
directory: root,
|
|
216828
|
+
entry,
|
|
216829
|
+
disableRouteWarning: !1,
|
|
216830
|
+
lockfileCheck: !1,
|
|
216831
|
+
sourcemap: !0,
|
|
216832
|
+
bundleStats: !1,
|
|
216833
|
+
useCodegen,
|
|
216834
|
+
codegenConfigPath
|
|
216835
|
+
},
|
|
217195
216836
|
watch,
|
|
217196
216837
|
async onServerBuildFinish() {
|
|
217197
216838
|
projectBuild.state === "pending" ? projectBuild.resolve() : outputInfo("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."), await miniOxygen?.reload();
|
|
@@ -217208,21 +216849,18 @@ async function runPreview({
|
|
|
217208
216849
|
}
|
|
217209
216850
|
);
|
|
217210
216851
|
appPort2 || (appPort2 = await findPort(DEFAULT_APP_PORT));
|
|
217211
|
-
let assetsPort =
|
|
217212
|
-
return await projectBuild.promise, logInjectedVariables(), miniOxygen = await startMiniOxygen(
|
|
217213
|
-
|
|
217214
|
-
|
|
217215
|
-
|
|
217216
|
-
|
|
217217
|
-
|
|
217218
|
-
|
|
217219
|
-
|
|
217220
|
-
|
|
217221
|
-
|
|
217222
|
-
|
|
217223
|
-
},
|
|
217224
|
-
legacyRuntime
|
|
217225
|
-
), miniOxygen.showBanner({
|
|
216852
|
+
let assetsPort = await findPort(appPort2 + 100);
|
|
216853
|
+
return await projectBuild.promise, logInjectedVariables(), miniOxygen = await startMiniOxygen({
|
|
216854
|
+
root,
|
|
216855
|
+
appPort: appPort2,
|
|
216856
|
+
assetsPort,
|
|
216857
|
+
env: allVariables,
|
|
216858
|
+
buildPathClient,
|
|
216859
|
+
buildPathWorkerFile,
|
|
216860
|
+
inspectorPort,
|
|
216861
|
+
debug: debug4,
|
|
216862
|
+
watch
|
|
216863
|
+
}), miniOxygen.showBanner({
|
|
217226
216864
|
mode: "preview",
|
|
217227
216865
|
headlinePrefix: watch ? "Watching for changes. " : ""
|
|
217228
216866
|
}), {
|
|
@@ -217232,7 +216870,7 @@ async function runPreview({
|
|
|
217232
216870
|
};
|
|
217233
216871
|
}
|
|
217234
216872
|
|
|
217235
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216873
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup.js
|
|
217236
216874
|
init_cjs_shims();
|
|
217237
216875
|
var Setup = class _Setup extends base_command_default {
|
|
217238
216876
|
static description = "Scaffold routes and core functionality.";
|
|
@@ -217321,7 +216959,7 @@ async function runSetup(options) {
|
|
|
217321
216959
|
));
|
|
217322
216960
|
}
|
|
217323
216961
|
|
|
217324
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
216962
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup/css.js
|
|
217325
216963
|
init_cjs_shims();
|
|
217326
216964
|
var import_core27 = __toESM(require_lib(), 1);
|
|
217327
216965
|
var SetupCSS = class _SetupCSS extends base_command_default {
|
|
@@ -217410,7 +217048,7 @@ Run`,
|
|
|
217410
217048
|
});
|
|
217411
217049
|
}
|
|
217412
217050
|
|
|
217413
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
217051
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup/markets.js
|
|
217414
217052
|
init_cjs_shims();
|
|
217415
217053
|
var import_core28 = __toESM(require_lib(), 1);
|
|
217416
217054
|
var SetupMarkets = class _SetupMarkets extends base_command_default {
|
|
@@ -217454,7 +217092,7 @@ async function runSetupMarkets({
|
|
|
217454
217092
|
});
|
|
217455
217093
|
}
|
|
217456
217094
|
|
|
217457
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
217095
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/setup/vite.js
|
|
217458
217096
|
init_cjs_shims();
|
|
217459
217097
|
var SetupVite = class _SetupVite extends base_command_default {
|
|
217460
217098
|
static description = "EXPERIMENTAL: Upgrades the project to use Vite.";
|
|
@@ -217696,7 +217334,7 @@ Please use Git to review the changes.`,
|
|
|
217696
217334
|
});
|
|
217697
217335
|
}
|
|
217698
217336
|
|
|
217699
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
217337
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/shortcut.js
|
|
217700
217338
|
init_cjs_shims();
|
|
217701
217339
|
var Shortcut = class extends base_command_default {
|
|
217702
217340
|
static descriptionWithMarkdown = "Creates a global h2 shortcut for Shopify CLI using shell aliases.\n\n The following shells are supported:\n\n - Bash (using `~/.bashrc`)\n - ZSH (using `~/.zshrc`)\n - Fish (using `~/.config/fish/functions`)\n - PowerShell (added to `$PROFILE`)\n\n After the alias is created, you can call Shopify CLI from anywhere in your project using `h2 <command>`.";
|
|
@@ -217721,7 +217359,7 @@ Restart your terminal session and run \`${ALIAS_NAME}\` from your local project.
|
|
|
217721
217359
|
});
|
|
217722
217360
|
}
|
|
217723
217361
|
|
|
217724
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
217362
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/unlink.js
|
|
217725
217363
|
init_cjs_shims();
|
|
217726
217364
|
var Unlink = class _Unlink extends base_command_default {
|
|
217727
217365
|
static descriptionWithMarkdown = "Unlinks your local development environment from a remote Hydrogen storefront.";
|
|
@@ -217746,7 +217384,7 @@ async function unlinkStorefront({ path: path4 }) {
|
|
|
217746
217384
|
});
|
|
217747
217385
|
}
|
|
217748
217386
|
|
|
217749
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
217387
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/hooks/init.js
|
|
217750
217388
|
init_cjs_shims();
|
|
217751
217389
|
import { createRequire as createRequire3 } from "node:module";
|
|
217752
217390
|
import { spawnSync } from "node:child_process";
|
|
@@ -217785,7 +217423,7 @@ var hook = async function(options) {
|
|
|
217785
217423
|
}
|
|
217786
217424
|
}, EXPERIMENTAL_VM_MODULES_FLAG = "--experimental-vm-modules";
|
|
217787
217425
|
function commandNeedsVM(id = "", argv = []) {
|
|
217788
|
-
return id === "hydrogen:debug:cpu"
|
|
217426
|
+
return id === "hydrogen:debug:cpu";
|
|
217789
217427
|
}
|
|
217790
217428
|
function isHydrogenProject(projectPath) {
|
|
217791
217429
|
try {
|
|
@@ -217800,7 +217438,7 @@ function isHydrogenProject(projectPath) {
|
|
|
217800
217438
|
}
|
|
217801
217439
|
var init_default2 = hook;
|
|
217802
217440
|
|
|
217803
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
217441
|
+
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@11.1.0_@graphql-codegen+cli@5.0.4_graphql@16.10.0_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/index.js
|
|
217804
217442
|
var COMMANDS2 = {
|
|
217805
217443
|
"hydrogen:dev": Dev2,
|
|
217806
217444
|
"hydrogen:build": Build,
|
|
@@ -217924,7 +217562,7 @@ import { pipeline as pipeline3 } from "stream/promises";
|
|
|
217924
217562
|
import stream2 from "node:stream/promises";
|
|
217925
217563
|
import * as gzip from "node:zlib";
|
|
217926
217564
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
217927
|
-
var PREFERRED_FUNCTION_RUNNER_VERSION = "v9.0.0", PREFERRED_JAVY_VERSION = "v5.0.3", PREFERRED_JAVY_PLUGIN_VERSION = "v2", BINARYEN_VERSION = "123.0.0", TRAMPOLINE_VERSION = "v1.0.
|
|
217565
|
+
var PREFERRED_FUNCTION_RUNNER_VERSION = "v9.0.0", PREFERRED_JAVY_VERSION = "v5.0.3", PREFERRED_JAVY_PLUGIN_VERSION = "v2", BINARYEN_VERSION = "123.0.0", TRAMPOLINE_VERSION = "v1.0.2";
|
|
217928
217566
|
function deriveJavaScriptBinaryDependencies(version) {
|
|
217929
217567
|
return version === "0" || version === "1" ? {
|
|
217930
217568
|
functionRunner: "v7.0.1",
|
|
@@ -218423,6 +218061,13 @@ function searchForAppsByNameFactory(developerPlatformClient, orgId) {
|
|
|
218423
218061
|
// ../app/dist/cli/prompts/dev.js
|
|
218424
218062
|
init_cjs_shims();
|
|
218425
218063
|
|
|
218064
|
+
// ../app/dist/cli/models/organization.js
|
|
218065
|
+
init_cjs_shims();
|
|
218066
|
+
var OrganizationSource;
|
|
218067
|
+
(function(OrganizationSource2) {
|
|
218068
|
+
OrganizationSource2.Partners = "Partners", OrganizationSource2.BusinessPlatform = "BusinessPlatform";
|
|
218069
|
+
})(OrganizationSource || (OrganizationSource = {}));
|
|
218070
|
+
|
|
218426
218071
|
// ../app/dist/cli/utilities/app/config/getTomls.js
|
|
218427
218072
|
init_cjs_shims();
|
|
218428
218073
|
|
|
@@ -218535,7 +218180,7 @@ var MAX_EXTENSION_HANDLE_LENGTH = 50, MetafieldSchema = z.object({
|
|
|
218535
218180
|
|
|
218536
218181
|
// ../app/dist/cli/utilities/extensions/locales-configuration.js
|
|
218537
218182
|
init_cjs_shims();
|
|
218538
|
-
import
|
|
218183
|
+
import fs4 from "fs";
|
|
218539
218184
|
async function loadLocalesConfig(extensionPath, extensionIdentifier) {
|
|
218540
218185
|
let localesPaths = await glob(joinPath(extensionPath, "locales/*.json"));
|
|
218541
218186
|
if (!localesPaths || localesPaths.length === 0)
|
|
@@ -218546,7 +218191,7 @@ async function loadLocalesConfig(extensionPath, extensionIdentifier) {
|
|
|
218546
218191
|
if (defaultLanguageCode.length > 1)
|
|
218547
218192
|
throw new AbortError(`Error loading ${extensionIdentifier}`, 'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');
|
|
218548
218193
|
for (let locale of localesPaths)
|
|
218549
|
-
if (
|
|
218194
|
+
if (fs4.statSync(locale).size === 0)
|
|
218550
218195
|
throw new AbortError(`Error loading ${extensionIdentifier}`, `Locale file ${locale} can't be empty`);
|
|
218551
218196
|
return {
|
|
218552
218197
|
default_locale: defaultLanguageCode[0],
|
|
@@ -218559,7 +218204,7 @@ function findDefaultLocale(filePaths) {
|
|
|
218559
218204
|
function getAllLocales(localesPath) {
|
|
218560
218205
|
let all = {};
|
|
218561
218206
|
for (let localePath of localesPath) {
|
|
218562
|
-
let localeCode = failIfUnset(basename(localePath).split(".")[0], "Locale code is unset"), locale =
|
|
218207
|
+
let localeCode = failIfUnset(basename(localePath).split(".")[0], "Locale code is unset"), locale = fs4.readFileSync(localePath, "base64");
|
|
218563
218208
|
all[localeCode] = locale;
|
|
218564
218209
|
}
|
|
218565
218210
|
return all;
|
|
@@ -220369,7 +220014,7 @@ var FlowActionExtensionSchema = BaseSchemaWithHandle.extend({
|
|
|
220369
220014
|
|
|
220370
220015
|
// ../app/dist/cli/models/extensions/specifications/flow_template.js
|
|
220371
220016
|
init_cjs_shims();
|
|
220372
|
-
import
|
|
220017
|
+
import fs5 from "fs";
|
|
220373
220018
|
var VALID_CATEGORIES = [
|
|
220374
220019
|
"buyer_experience",
|
|
220375
220020
|
"customers",
|
|
@@ -220418,7 +220063,7 @@ async function loadWorkflow(path4, workflowPath) {
|
|
|
220418
220063
|
let flowFilePath = (await glob(joinPath(path4, workflowPath)))[0];
|
|
220419
220064
|
if (!flowFilePath)
|
|
220420
220065
|
throw new AbortError(`Missing flow file with the path ${joinPath(path4, workflowPath)}`);
|
|
220421
|
-
return
|
|
220066
|
+
return fs5.readFileSync(flowFilePath, "base64");
|
|
220422
220067
|
}
|
|
220423
220068
|
var flow_template_default = flowTemplateSpec;
|
|
220424
220069
|
|
|
@@ -222081,6 +221726,14 @@ async function getTomls(appDirectory) {
|
|
|
222081
221726
|
async function selectOrganizationPrompt(organizations) {
|
|
222082
221727
|
if (organizations.length === 1)
|
|
222083
221728
|
return organizations[0];
|
|
221729
|
+
organizations.some((org) => org.source === OrganizationSource.BusinessPlatform) && organizations.some((org) => org.source === OrganizationSource.Partners) && renderInfo({
|
|
221730
|
+
headline: "You have access to the Next-Gen Dev Platform.",
|
|
221731
|
+
body: "Select a Dev Dashboard organization from the list below to use it.",
|
|
221732
|
+
link: {
|
|
221733
|
+
label: "See documentation for more information.",
|
|
221734
|
+
url: "https://shopify.dev/beta/next-gen-dev-platform"
|
|
221735
|
+
}
|
|
221736
|
+
});
|
|
222084
221737
|
let orgList = organizations.map((org) => ({ label: org.businessName, value: org.id })), id = await renderAutocompletePrompt({
|
|
222085
221738
|
message: "Which organization is this work for?",
|
|
222086
221739
|
choices: orgList
|
|
@@ -222226,13 +221879,6 @@ async function selectOrCreateApp(apps, hasMorePages, org, developerPlatformClien
|
|
|
222226
221879
|
// ../app/dist/cli/services/dev/fetch.js
|
|
222227
221880
|
init_cjs_shims();
|
|
222228
221881
|
|
|
222229
|
-
// ../app/dist/cli/models/organization.js
|
|
222230
|
-
init_cjs_shims();
|
|
222231
|
-
var OrganizationSource;
|
|
222232
|
-
(function(OrganizationSource2) {
|
|
222233
|
-
OrganizationSource2.Partners = "Partners", OrganizationSource2.BusinessPlatform = "BusinessPlatform";
|
|
222234
|
-
})(OrganizationSource || (OrganizationSource = {}));
|
|
222235
|
-
|
|
222236
221882
|
// ../app/dist/cli/services/context/partner-account-info.js
|
|
222237
221883
|
init_cjs_shims();
|
|
222238
221884
|
|
|
@@ -232101,10 +231747,10 @@ var DevSessionStaticMessages = {
|
|
|
232101
231747
|
|
|
232102
231748
|
// ../app/dist/cli/utilities/app/http-reverse-proxy.js
|
|
232103
231749
|
init_cjs_shims();
|
|
232104
|
-
import * as
|
|
231750
|
+
import * as http from "http";
|
|
232105
231751
|
import * as https from "https";
|
|
232106
231752
|
async function getProxyingWebServer(rules, abortSignal, localhostCert) {
|
|
232107
|
-
let { default: httpProxy } = await import("./http-proxy-KGLXPNEY.js"), proxy = httpProxy.createProxy(), requestListener = getProxyServerRequestListener(rules, proxy), server = localhostCert ? https.createServer(localhostCert, requestListener) :
|
|
231753
|
+
let { default: httpProxy } = await import("./http-proxy-KGLXPNEY.js"), proxy = httpProxy.createProxy(), requestListener = getProxyServerRequestListener(rules, proxy), server = localhostCert ? https.createServer(localhostCert, requestListener) : http.createServer(requestListener);
|
|
232108
231754
|
return server.on("upgrade", getProxyServerWebsocketUpgradeListener(rules, proxy)), abortSignal.addEventListener("abort", () => {
|
|
232109
231755
|
outputDebug("Closing reverse HTTP proxy"), server.close();
|
|
232110
231756
|
}), { server };
|
|
@@ -237607,7 +237253,7 @@ var FocusContext_default = FocusContext;
|
|
|
237607
237253
|
// ../../node_modules/.pnpm/ink@5.0.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/components/ErrorOverview.js
|
|
237608
237254
|
init_cjs_shims();
|
|
237609
237255
|
var import_react25 = __toESM(require_react2(), 1), import_stack_utils = __toESM(require_stack_utils(), 1);
|
|
237610
|
-
import * as
|
|
237256
|
+
import * as fs6 from "node:fs";
|
|
237611
237257
|
import { cwd as cwd2 } from "node:process";
|
|
237612
237258
|
|
|
237613
237259
|
// ../../node_modules/.pnpm/ink@5.0.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/components/Box.js
|
|
@@ -237644,8 +237290,8 @@ var cleanupPath = (path4) => path4?.replace(`file://${cwd2()}/`, ""), stackUtils
|
|
|
237644
237290
|
function ErrorOverview({ error }) {
|
|
237645
237291
|
let stack = error.stack ? error.stack.split(`
|
|
237646
237292
|
`).slice(1) : void 0, origin = stack ? stackUtils.parseLine(stack[0]) : void 0, filePath = cleanupPath(origin?.file), excerpt, lineWidth = 0;
|
|
237647
|
-
if (filePath && origin?.line &&
|
|
237648
|
-
let sourceCode =
|
|
237293
|
+
if (filePath && origin?.line && fs6.existsSync(filePath)) {
|
|
237294
|
+
let sourceCode = fs6.readFileSync(filePath, "utf8");
|
|
237649
237295
|
if (excerpt = dist_default2(sourceCode, origin.line), excerpt)
|
|
237650
237296
|
for (let { line } of excerpt)
|
|
237651
237297
|
lineWidth = Math.max(lineWidth, String(line).length);
|
|
@@ -240284,7 +239930,7 @@ var DidYouMeanCommands = {
|
|
|
240284
239930
|
};
|
|
240285
239931
|
|
|
240286
239932
|
// src/index.ts
|
|
240287
|
-
import
|
|
239933
|
+
import fs7 from "fs";
|
|
240288
239934
|
|
|
240289
239935
|
// ../plugin-cloudflare/dist/tunnel.js
|
|
240290
239936
|
init_cjs_shims();
|
|
@@ -240513,7 +240159,7 @@ var HydrogenInitHook = HOOKS.init;
|
|
|
240513
240159
|
socketConnectionTimeout: 6e4
|
|
240514
240160
|
});
|
|
240515
240161
|
process.on("uncaughtException", (err2) => {
|
|
240516
|
-
err2 instanceof FatalError ? renderFatalError(err2) :
|
|
240162
|
+
err2 instanceof FatalError ? renderFatalError(err2) : fs7.writeSync(process.stderr.fd, `${err2.stack ?? err2.message ?? err2}
|
|
240517
240163
|
`), process.exit(1);
|
|
240518
240164
|
});
|
|
240519
240165
|
var signals = ["SIGINT", "SIGTERM", "SIGQUIT"];
|