@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
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
ensureAuthenticatedAdmin,
|
|
9
9
|
ensureAuthenticatedBusinessPlatform,
|
|
10
10
|
logout
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3Y3XPRQ6.js";
|
|
12
12
|
import {
|
|
13
13
|
base_command_default
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HK5IHRTT.js";
|
|
15
15
|
import {
|
|
16
16
|
fanoutHooks,
|
|
17
17
|
requestIdsCollection
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ONMISMO4.js";
|
|
19
19
|
import {
|
|
20
20
|
businessPlatformFqdn,
|
|
21
21
|
normalizeStoreFqdn,
|
|
22
22
|
partnersFqdn
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4QN5J4PQ.js";
|
|
24
24
|
import {
|
|
25
25
|
ClientError,
|
|
26
26
|
GraphQLClient,
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
retryAwareRequest,
|
|
35
35
|
sanitizeURL,
|
|
36
36
|
sanitizedHeadersOutput
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TX7PPGUZ.js";
|
|
38
38
|
import {
|
|
39
39
|
CLI_KIT_VERSION
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UEIMUAER.js";
|
|
41
41
|
import {
|
|
42
42
|
cacheRetrieveOrRepopulate,
|
|
43
43
|
findUpAndReadPackageJson,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
readAndParsePackageJson,
|
|
48
48
|
timeIntervalToMilliseconds,
|
|
49
49
|
writePackageJSON
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-52XNWDUG.js";
|
|
51
51
|
import {
|
|
52
52
|
AbortError,
|
|
53
53
|
BugError,
|
|
@@ -71,7 +71,6 @@ import {
|
|
|
71
71
|
outputDebug,
|
|
72
72
|
outputInfo,
|
|
73
73
|
outputToken,
|
|
74
|
-
outputWarn,
|
|
75
74
|
readFile,
|
|
76
75
|
removeFile,
|
|
77
76
|
renderConfirmationPrompt,
|
|
@@ -87,7 +86,7 @@ import {
|
|
|
87
86
|
source_default,
|
|
88
87
|
stringifyMessage,
|
|
89
88
|
writeFile
|
|
90
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-WI6TASTN.js";
|
|
91
90
|
import {
|
|
92
91
|
basename,
|
|
93
92
|
cwd,
|
|
@@ -119236,7 +119235,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
119236
119235
|
readdirWithFileTypes(directory, settings, callback);
|
|
119237
119236
|
return;
|
|
119238
119237
|
}
|
|
119239
|
-
|
|
119238
|
+
readdir4(directory, settings, callback);
|
|
119240
119239
|
}
|
|
119241
119240
|
exports22.read = read;
|
|
119242
119241
|
function readdirWithFileTypes(directory, settings, callback) {
|
|
@@ -119286,7 +119285,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
119286
119285
|
});
|
|
119287
119286
|
};
|
|
119288
119287
|
}
|
|
119289
|
-
function
|
|
119288
|
+
function readdir4(directory, settings, callback) {
|
|
119290
119289
|
settings.fs.readdir(directory, (readdirError, names) => {
|
|
119291
119290
|
if (readdirError !== null) {
|
|
119292
119291
|
callFailureCallback(callback, readdirError);
|
|
@@ -119318,7 +119317,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
119318
119317
|
});
|
|
119319
119318
|
});
|
|
119320
119319
|
}
|
|
119321
|
-
exports22.readdir =
|
|
119320
|
+
exports22.readdir = readdir4;
|
|
119322
119321
|
function callFailureCallback(callback, error) {
|
|
119323
119322
|
callback(error);
|
|
119324
119323
|
}
|
|
@@ -119334,7 +119333,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
119334
119333
|
}), exports22.readdir = exports22.readdirWithFileTypes = exports22.read = void 0;
|
|
119335
119334
|
var fsStat = require_out(), constants_1 = require_constants4(), utils = require_utils5(), common = require_common3();
|
|
119336
119335
|
function read(directory, settings) {
|
|
119337
|
-
return !settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? readdirWithFileTypes(directory, settings) :
|
|
119336
|
+
return !settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? readdirWithFileTypes(directory, settings) : readdir4(directory, settings);
|
|
119338
119337
|
}
|
|
119339
119338
|
exports22.read = read;
|
|
119340
119339
|
function readdirWithFileTypes(directory, settings) {
|
|
@@ -119358,7 +119357,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
119358
119357
|
});
|
|
119359
119358
|
}
|
|
119360
119359
|
exports22.readdirWithFileTypes = readdirWithFileTypes;
|
|
119361
|
-
function
|
|
119360
|
+
function readdir4(directory, settings) {
|
|
119362
119361
|
return settings.fs.readdirSync(directory).map((name) => {
|
|
119363
119362
|
let entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator), stats = fsStat.statSync(entryPath, settings.fsStatSettings), entry = {
|
|
119364
119363
|
name,
|
|
@@ -119368,7 +119367,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
119368
119367
|
return settings.stats && (entry.stats = stats), entry;
|
|
119369
119368
|
});
|
|
119370
119369
|
}
|
|
119371
|
-
exports22.readdir =
|
|
119370
|
+
exports22.readdir = readdir4;
|
|
119372
119371
|
}
|
|
119373
119372
|
}), require_fs4 = __commonJS22({
|
|
119374
119373
|
"node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports22) {
|
|
@@ -135351,21 +135350,212 @@ var require_main = __commonJS({
|
|
|
135351
135350
|
}
|
|
135352
135351
|
});
|
|
135353
135352
|
|
|
135354
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135353
|
+
// ../../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/import-utils.js
|
|
135354
|
+
init_cjs_shims();
|
|
135355
|
+
import { createRequire } from "node:module";
|
|
135356
|
+
import { pathToFileURL } from "node:url";
|
|
135357
|
+
var require2 = createRequire(import.meta.url);
|
|
135358
|
+
async function importVite(root) {
|
|
135359
|
+
let vitePath = require2.resolve(
|
|
135360
|
+
"vite",
|
|
135361
|
+
process.env.SHOPIFY_UNIT_TEST ? void 0 : { paths: [root] }
|
|
135362
|
+
), vitePackageJson = await findUpAndReadPackageJson(vitePath), viteNodeIndexFile = vitePackageJson.content.exports?.["."].import;
|
|
135363
|
+
typeof viteNodeIndexFile != "string" && (viteNodeIndexFile = viteNodeIndexFile.default);
|
|
135364
|
+
let viteNodePath = joinPath(
|
|
135365
|
+
dirname(vitePackageJson.path),
|
|
135366
|
+
viteNodeIndexFile
|
|
135367
|
+
);
|
|
135368
|
+
return import(pathToFileURL(viteNodePath).href);
|
|
135369
|
+
}
|
|
135370
|
+
function importLocal(packageName, path3) {
|
|
135371
|
+
let realPath = require2.resolve(
|
|
135372
|
+
packageName,
|
|
135373
|
+
process.env.SHOPIFY_UNIT_TEST ? void 0 : { paths: [path3] }
|
|
135374
|
+
);
|
|
135375
|
+
return import(pathToFileURL(realPath).href);
|
|
135376
|
+
}
|
|
135377
|
+
|
|
135378
|
+
// ../../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/request-events.js
|
|
135379
|
+
init_cjs_shims();
|
|
135380
|
+
import path from "node:path";
|
|
135381
|
+
import { EventEmitter } from "node:events";
|
|
135382
|
+
import { ReadableStream } from "node:stream/web";
|
|
135383
|
+
|
|
135384
|
+
// ../../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/graphiql-url.js
|
|
135385
|
+
init_cjs_shims();
|
|
135386
|
+
function getGraphiQLUrl({
|
|
135387
|
+
host = "",
|
|
135388
|
+
graphql
|
|
135389
|
+
}) {
|
|
135390
|
+
let url = `${host.endsWith("/") ? host.slice(0, -1) : host}/graphiql`;
|
|
135391
|
+
if (graphql) {
|
|
135392
|
+
let { query, variables } = graphql;
|
|
135393
|
+
typeof variables != "string" && (variables = JSON.stringify(variables)), url += `?query=${encodeURIComponent(query)}${variables ? `&variables=${encodeURIComponent(variables)}` : ""}`, graphql.schema && (url += `&schema=${graphql.schema}`);
|
|
135394
|
+
}
|
|
135395
|
+
return url;
|
|
135396
|
+
}
|
|
135397
|
+
|
|
135398
|
+
// ../../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/request-events.js
|
|
135399
|
+
var import_source_map_support = __toESM(require_source_map_support(), 1), H2O_BINDING_NAME = "H2O_LOG_EVENT", ResponseConstructor;
|
|
135400
|
+
function setConstructors(constructors) {
|
|
135401
|
+
ResponseConstructor = constructors.Response;
|
|
135402
|
+
}
|
|
135403
|
+
var DEV_ROUTES = /* @__PURE__ */ new Set([
|
|
135404
|
+
"/graphiql",
|
|
135405
|
+
"/graphiql/customer-account.schema.json",
|
|
135406
|
+
"/subrequest-profiler",
|
|
135407
|
+
"/debug-network-server"
|
|
135408
|
+
]), EVENT_MAP = {
|
|
135409
|
+
request: "Request",
|
|
135410
|
+
subrequest: "Sub request"
|
|
135411
|
+
};
|
|
135412
|
+
async function getRequestInfo(request) {
|
|
135413
|
+
let data = await request.json();
|
|
135414
|
+
return {
|
|
135415
|
+
...data,
|
|
135416
|
+
requestId: data.requestId ?? "",
|
|
135417
|
+
eventType: data.eventType || "unknown",
|
|
135418
|
+
endTime: data.endTime || Date.now(),
|
|
135419
|
+
purpose: data.purpose === "prefetch" ? "(prefetch)" : "",
|
|
135420
|
+
cacheStatus: data.cacheStatus ?? "",
|
|
135421
|
+
graphql: data.graphql ? JSON.parse(data.graphql) : null
|
|
135422
|
+
};
|
|
135423
|
+
}
|
|
135424
|
+
var eventEmitter = new EventEmitter(), eventHistory = [];
|
|
135425
|
+
function createResponse(main = "ok", init) {
|
|
135426
|
+
return new ResponseConstructor(main, init);
|
|
135427
|
+
}
|
|
135428
|
+
function clearHistory(request) {
|
|
135429
|
+
return eventHistory.length = 0, createResponse();
|
|
135430
|
+
}
|
|
135431
|
+
function createLogRequestEvent(options2) {
|
|
135432
|
+
return async function(request) {
|
|
135433
|
+
let url = new URL(request.url);
|
|
135434
|
+
if (DEV_ROUTES.has(url.pathname))
|
|
135435
|
+
return createResponse();
|
|
135436
|
+
let {
|
|
135437
|
+
url: displayUrl,
|
|
135438
|
+
displayName: displayNameData,
|
|
135439
|
+
eventType,
|
|
135440
|
+
purpose,
|
|
135441
|
+
graphql,
|
|
135442
|
+
stackInfo,
|
|
135443
|
+
...data
|
|
135444
|
+
} = await getRequestInfo(request), graphiqlLink = "", descriptionUrl = request.url, displayName = displayNameData;
|
|
135445
|
+
eventType === "subrequest" && (displayName = displayName || graphql?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/, " "), descriptionUrl = displayUrl || request.url, graphql && (graphiqlLink = getGraphiQLUrl({ graphql })));
|
|
135446
|
+
let stackLine = null, stackLink = null;
|
|
135447
|
+
if (stackInfo?.file) {
|
|
135448
|
+
options2?.transformLocation && (stackInfo.file = options2.transformLocation(stackInfo.file));
|
|
135449
|
+
let { source, line, column } = (0, import_source_map_support.mapSourcePosition)({
|
|
135450
|
+
source: stackInfo.file,
|
|
135451
|
+
line: stackInfo.line ?? 0,
|
|
135452
|
+
column: stackInfo.column ?? 0
|
|
135453
|
+
});
|
|
135454
|
+
stackLine = `${source}:${line}:${column + 1}`, stackLink = `vscode://${path.join("file", stackLine)}`, stackLine = stackLine.split(path.sep + "app" + path.sep)[1] ?? stackLine, stackInfo.func && (stackLine = `${stackInfo.func.replace(/\d+$/, "")} (${stackLine})`);
|
|
135455
|
+
}
|
|
135456
|
+
let event = {
|
|
135457
|
+
event: EVENT_MAP[eventType] || eventType,
|
|
135458
|
+
data: JSON.stringify({
|
|
135459
|
+
...data,
|
|
135460
|
+
displayName,
|
|
135461
|
+
url: `${purpose} ${descriptionUrl}`.trim(),
|
|
135462
|
+
graphiqlLink,
|
|
135463
|
+
stackLine,
|
|
135464
|
+
stackLink
|
|
135465
|
+
})
|
|
135466
|
+
};
|
|
135467
|
+
return eventHistory.push(event), eventHistory.length > 100 && eventHistory.shift(), eventEmitter.emit("request", event), createResponse();
|
|
135468
|
+
};
|
|
135469
|
+
}
|
|
135470
|
+
function streamRequestEvents(request) {
|
|
135471
|
+
let stream = new ReadableStream({
|
|
135472
|
+
start(controller) {
|
|
135473
|
+
let encoder = new TextEncoder(), enqueueEvent = ({ event = "message", data }) => {
|
|
135474
|
+
controller.enqueue(encoder.encode(`event: ${event}
|
|
135475
|
+
`)), controller.enqueue(encoder.encode(`data: ${data}
|
|
135476
|
+
|
|
135477
|
+
`));
|
|
135478
|
+
};
|
|
135479
|
+
eventHistory.forEach(enqueueEvent), eventEmitter.addListener("request", enqueueEvent);
|
|
135480
|
+
let closed = !1;
|
|
135481
|
+
function close() {
|
|
135482
|
+
closed || (closed = !0, request.signal.removeEventListener("abort", close), eventEmitter.removeListener("request", enqueueEvent), controller.close());
|
|
135483
|
+
}
|
|
135484
|
+
if (request.signal.addEventListener("abort", close), request.signal.aborted) return close();
|
|
135485
|
+
}
|
|
135486
|
+
});
|
|
135487
|
+
return createResponse(stream, {
|
|
135488
|
+
headers: {
|
|
135489
|
+
"Content-Type": "text/event-stream",
|
|
135490
|
+
"Cache-Control": "no-store",
|
|
135491
|
+
Connection: "keep-alive"
|
|
135492
|
+
}
|
|
135493
|
+
});
|
|
135494
|
+
}
|
|
135495
|
+
function handleDebugNetworkRequest(request) {
|
|
135496
|
+
return request.method === "DELETE" ? clearHistory() : streamRequestEvents(request);
|
|
135497
|
+
}
|
|
135498
|
+
|
|
135499
|
+
// ../../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/common.js
|
|
135500
|
+
init_cjs_shims();
|
|
135501
|
+
var SUBREQUEST_PROFILER_ENDPOINT = "/debug-network-server";
|
|
135502
|
+
function handleMiniOxygenImportFail() {
|
|
135503
|
+
throw new AbortError(
|
|
135504
|
+
"Could not load MiniOxygen.",
|
|
135505
|
+
"Please make sure you have `@shopify/mini-oxygen` installed."
|
|
135506
|
+
);
|
|
135507
|
+
}
|
|
135508
|
+
function logRequestLine({
|
|
135509
|
+
request,
|
|
135510
|
+
response,
|
|
135511
|
+
meta
|
|
135512
|
+
}) {
|
|
135513
|
+
try {
|
|
135514
|
+
let url = new URL(request.url);
|
|
135515
|
+
if (DEV_ROUTES.has(url.pathname) || url.pathname === "/favicon.ico") return;
|
|
135516
|
+
let isDataRequest = url.searchParams.has("_data"), route = request.url.replace(url.origin, ""), info = "", type = "render";
|
|
135517
|
+
if (isDataRequest) {
|
|
135518
|
+
type = request.method === "GET" ? "loader" : "action";
|
|
135519
|
+
let dataParam = url.searchParams.get("_data")?.replace("routes/", "");
|
|
135520
|
+
route = url.pathname, info = `[${dataParam}]`;
|
|
135521
|
+
}
|
|
135522
|
+
let colorizeStatus = response.status < 300 ? outputToken.green : response.status < 400 ? outputToken.cyan : outputToken.errorText;
|
|
135523
|
+
outputInfo(
|
|
135524
|
+
outputContent`${request.method.padStart(6)} ${colorizeStatus(
|
|
135525
|
+
String(response.status)
|
|
135526
|
+
)} ${outputToken.italic(type.padEnd(7, " "))} ${route} ${meta.durationMs > 0 ? source_default.dim(` ${meta.durationMs}ms`) : ""}${info ? " " + source_default.dim(info) : ""}${request.headers.purpose === "prefetch" ? outputToken.italic(source_default.dim(" prefetch")) : ""}`
|
|
135527
|
+
);
|
|
135528
|
+
} catch {
|
|
135529
|
+
request && response?.status && outputInfo(`${request.method} ${response.status} ${request.url}`);
|
|
135530
|
+
}
|
|
135531
|
+
}
|
|
135532
|
+
|
|
135533
|
+
// ../../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/dev-shared.js
|
|
135534
|
+
init_cjs_shims();
|
|
135535
|
+
|
|
135536
|
+
// ../../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/customer-account/push.js
|
|
135537
|
+
init_cjs_shims();
|
|
135538
|
+
var import_core3 = __toESM(require_lib(), 1);
|
|
135539
|
+
|
|
135540
|
+
// ../../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/link.js
|
|
135541
|
+
init_cjs_shims();
|
|
135542
|
+
var import_core2 = __toESM(require_lib(), 1);
|
|
135543
|
+
|
|
135544
|
+
// ../../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/flags.js
|
|
135355
135545
|
init_cjs_shims();
|
|
135356
135546
|
var import_core = __toESM(require_lib(), 1);
|
|
135357
135547
|
|
|
135358
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135548
|
+
// ../../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/setups/css/index.js
|
|
135359
135549
|
init_cjs_shims();
|
|
135360
135550
|
|
|
135361
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135551
|
+
// ../../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/setups/css/assets.js
|
|
135362
135552
|
init_cjs_shims();
|
|
135363
135553
|
|
|
135364
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135554
|
+
// ../../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/build.js
|
|
135365
135555
|
init_cjs_shims();
|
|
135366
135556
|
import { fileURLToPath } from "node:url";
|
|
135367
135557
|
|
|
135368
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135558
|
+
// ../../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/process.js
|
|
135369
135559
|
init_cjs_shims();
|
|
135370
135560
|
import { exec } from "node:child_process";
|
|
135371
135561
|
import { promisify } from "node:util";
|
|
@@ -135377,7 +135567,7 @@ function supressNodeExperimentalWarnings() {
|
|
|
135377
135567
|
}));
|
|
135378
135568
|
}
|
|
135379
135569
|
|
|
135380
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135570
|
+
// ../../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/build.js
|
|
135381
135571
|
var monorepoPackagesPath = new URL("../../..", import.meta.url).pathname, isHydrogenMonorepo = monorepoPackagesPath.endsWith(
|
|
135382
135572
|
"/hydrogen/packages/"
|
|
135383
135573
|
), hydrogenPackagesPath = isHydrogenMonorepo ? monorepoPackagesPath : void 0, ASSETS_DIR_PREFIX = "assets/hydrogen", ASSETS_STARTER_DIR = "starter", ASSETS_STARTER_DIR_ROUTES = "routes", pkgJsonPath;
|
|
@@ -135424,7 +135614,7 @@ async function getRepoNodeModules() {
|
|
|
135424
135614
|
return !nodeModulesPath && isHydrogenMonorepo && (nodeModulesPath = joinPath(dirname(monorepoPackagesPath), "node_modules")), nodeModulesPath;
|
|
135425
135615
|
}
|
|
135426
135616
|
|
|
135427
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135617
|
+
// ../../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/setups/css/assets.js
|
|
135428
135618
|
var SETUP_CSS_STRATEGIES = [
|
|
135429
135619
|
"tailwind",
|
|
135430
135620
|
"vanilla-extract",
|
|
@@ -135459,14 +135649,14 @@ async function canWriteFiles(assetMap, directory, force) {
|
|
|
135459
135649
|
}));
|
|
135460
135650
|
}
|
|
135461
135651
|
|
|
135462
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135652
|
+
// ../../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/setups/css/tailwind.js
|
|
135463
135653
|
init_cjs_shims();
|
|
135464
135654
|
|
|
135465
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135655
|
+
// ../../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/file.js
|
|
135466
135656
|
init_cjs_shims();
|
|
135467
135657
|
import { readdir } from "node:fs/promises";
|
|
135468
135658
|
|
|
135469
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135659
|
+
// ../../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/format-code.js
|
|
135470
135660
|
init_cjs_shims();
|
|
135471
135661
|
var prettier = __toESM(require_prettier(), 1);
|
|
135472
135662
|
import * as FS from "fs/promises";
|
|
@@ -135496,7 +135686,7 @@ async function formatCode(content, config = DEFAULT_PRETTIER_CONFIG, filePath =
|
|
|
135496
135686
|
});
|
|
135497
135687
|
}
|
|
135498
135688
|
|
|
135499
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135689
|
+
// ../../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/file.js
|
|
135500
135690
|
async function replaceFileContent(filepath, formatConfig, replacer) {
|
|
135501
135691
|
let content = await replacer(await readFile(filepath));
|
|
135502
135692
|
if (typeof content == "string")
|
|
@@ -135579,10 +135769,10 @@ async function mergeTsConfig(sourceDir, targetDir) {
|
|
|
135579
135769
|
);
|
|
135580
135770
|
}
|
|
135581
135771
|
|
|
135582
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135772
|
+
// ../../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/setups/css/replacers.js
|
|
135583
135773
|
init_cjs_shims();
|
|
135584
135774
|
|
|
135585
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135775
|
+
// ../../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/ast.js
|
|
135586
135776
|
init_cjs_shims();
|
|
135587
135777
|
async function importLangAstGrep(lang) {
|
|
135588
135778
|
let astGrep = await import("@ast-grep/napi");
|
|
@@ -135591,7 +135781,7 @@ async function importLangAstGrep(lang) {
|
|
|
135591
135781
|
return astGrep[lang];
|
|
135592
135782
|
}
|
|
135593
135783
|
|
|
135594
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135784
|
+
// ../../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/setups/css/replacers.js
|
|
135595
135785
|
async function replaceRootLinks(appDirectory, formatConfig, importer) {
|
|
135596
135786
|
let { filepath, astType } = await findFileWithExtension(appDirectory, "root");
|
|
135597
135787
|
if (!filepath || !astType)
|
|
@@ -135693,7 +135883,7 @@ var vitePluginListRule = {
|
|
|
135693
135883
|
}
|
|
135694
135884
|
};
|
|
135695
135885
|
|
|
135696
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135886
|
+
// ../../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/setups/css/tailwind.js
|
|
135697
135887
|
var tailwindCssPath = "styles/tailwind.css";
|
|
135698
135888
|
async function setupTailwind({ rootDirectory, appDirectory }, force = !1) {
|
|
135699
135889
|
let relativeAppDirectory = relativePath(rootDirectory, appDirectory), assetMap = {
|
|
@@ -135729,7 +135919,7 @@ async function setupTailwind({ rootDirectory, appDirectory }, force = !1) {
|
|
|
135729
135919
|
};
|
|
135730
135920
|
}
|
|
135731
135921
|
|
|
135732
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135922
|
+
// ../../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/setups/css/vanilla-extract.js
|
|
135733
135923
|
init_cjs_shims();
|
|
135734
135924
|
async function setupVanillaExtract({
|
|
135735
135925
|
rootDirectory
|
|
@@ -135750,7 +135940,7 @@ async function setupVanillaExtract({
|
|
|
135750
135940
|
};
|
|
135751
135941
|
}
|
|
135752
135942
|
|
|
135753
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135943
|
+
// ../../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/setups/css/index.js
|
|
135754
135944
|
var STYLING_CHOICES = [...SETUP_CSS_STRATEGIES, "none"], CSS_STRATEGY_NAME_MAP = {
|
|
135755
135945
|
tailwind: "Tailwind v4",
|
|
135756
135946
|
"vanilla-extract": "Vanilla Extract",
|
|
@@ -135795,23 +135985,23 @@ async function renderCssPrompt(options2) {
|
|
|
135795
135985
|
});
|
|
135796
135986
|
}
|
|
135797
135987
|
|
|
135798
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135988
|
+
// ../../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/setups/i18n/index.js
|
|
135799
135989
|
init_cjs_shims();
|
|
135800
135990
|
|
|
135801
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135991
|
+
// ../../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/setups/i18n/replacers.js
|
|
135802
135992
|
init_cjs_shims();
|
|
135803
135993
|
|
|
135804
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135994
|
+
// ../../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/transpile/index.js
|
|
135805
135995
|
init_cjs_shims();
|
|
135806
135996
|
|
|
135807
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
135997
|
+
// ../../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/transpile/file.js
|
|
135808
135998
|
init_cjs_shims();
|
|
135809
135999
|
async function transpileFile(code, filepath, keepTypes = !0) {
|
|
135810
|
-
let { transpileTs } = await import("./morph-
|
|
136000
|
+
let { transpileTs } = await import("./morph-3VOLMA55.js");
|
|
135811
136001
|
return transpileTs(code, filepath, keepTypes);
|
|
135812
136002
|
}
|
|
135813
136003
|
|
|
135814
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136004
|
+
// ../../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/transpile/project.js
|
|
135815
136005
|
init_cjs_shims();
|
|
135816
136006
|
var DEFAULT_JS_CONFIG = {
|
|
135817
136007
|
checkJs: !1,
|
|
@@ -135922,7 +136112,7 @@ async function transpileProject(projectDir, keepTypes = !0) {
|
|
|
135922
136112
|
}
|
|
135923
136113
|
}
|
|
135924
136114
|
|
|
135925
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136115
|
+
// ../../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/setups/i18n/replacers.js
|
|
135926
136116
|
async function replaceContextI18n({
|
|
135927
136117
|
rootDirectory,
|
|
135928
136118
|
contextCreate = joinPath("app", "lib", "context.ts")
|
|
@@ -136061,7 +136251,7 @@ async function findContextCreateFile({
|
|
|
136061
136251
|
return { filepath, astType };
|
|
136062
136252
|
}
|
|
136063
136253
|
|
|
136064
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136254
|
+
// ../../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/setups/i18n/index.js
|
|
136065
136255
|
var SETUP_I18N_STRATEGIES = [
|
|
136066
136256
|
"subfolders",
|
|
136067
136257
|
"domains",
|
|
@@ -136093,7 +136283,7 @@ async function renderI18nPrompt(options2) {
|
|
|
136093
136283
|
});
|
|
136094
136284
|
}
|
|
136095
136285
|
|
|
136096
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136286
|
+
// ../../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/flags.js
|
|
136097
136287
|
var DEFAULT_APP_PORT = 3e3, DEFAULT_INSPECTOR_PORT = 9229, commonFlags = {
|
|
136098
136288
|
path: {
|
|
136099
136289
|
path: import_core.Flags.string({
|
|
@@ -136107,12 +136297,6 @@ var DEFAULT_APP_PORT = 3e3, DEFAULT_INSPECTOR_PORT = 9229, commonFlags = {
|
|
|
136107
136297
|
env: "SHOPIFY_HYDROGEN_FLAG_PORT"
|
|
136108
136298
|
})
|
|
136109
136299
|
},
|
|
136110
|
-
legacyRuntime: {
|
|
136111
|
-
"legacy-runtime": import_core.Flags.boolean({
|
|
136112
|
-
description: "Runs the app in a Node.js sandbox instead of an Oxygen worker.",
|
|
136113
|
-
env: "SHOPIFY_HYDROGEN_FLAG_LEGACY_RUNTIME"
|
|
136114
|
-
})
|
|
136115
|
-
},
|
|
136116
136300
|
force: {
|
|
136117
136301
|
force: import_core.Flags.boolean({
|
|
136118
136302
|
description: "Overwrites the destination directory and files if they already exist.",
|
|
@@ -136281,201 +136465,10 @@ function overrideFlag(flags, extra) {
|
|
|
136281
136465
|
);
|
|
136282
136466
|
}
|
|
136283
136467
|
|
|
136284
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136285
|
-
init_cjs_shims();
|
|
136286
|
-
import { createRequire } from "node:module";
|
|
136287
|
-
import { pathToFileURL } from "node:url";
|
|
136288
|
-
var require2 = createRequire(import.meta.url);
|
|
136289
|
-
async function importVite(root) {
|
|
136290
|
-
let vitePath = require2.resolve(
|
|
136291
|
-
"vite",
|
|
136292
|
-
process.env.SHOPIFY_UNIT_TEST ? void 0 : { paths: [root] }
|
|
136293
|
-
), vitePackageJson = await findUpAndReadPackageJson(vitePath), viteNodeIndexFile = vitePackageJson.content.exports?.["."].import;
|
|
136294
|
-
typeof viteNodeIndexFile != "string" && (viteNodeIndexFile = viteNodeIndexFile.default);
|
|
136295
|
-
let viteNodePath = joinPath(
|
|
136296
|
-
dirname(vitePackageJson.path),
|
|
136297
|
-
viteNodeIndexFile
|
|
136298
|
-
);
|
|
136299
|
-
return import(pathToFileURL(viteNodePath).href);
|
|
136300
|
-
}
|
|
136301
|
-
function importLocal(packageName, path3) {
|
|
136302
|
-
let realPath = require2.resolve(
|
|
136303
|
-
packageName,
|
|
136304
|
-
process.env.SHOPIFY_UNIT_TEST ? void 0 : { paths: [path3] }
|
|
136305
|
-
);
|
|
136306
|
-
return import(pathToFileURL(realPath).href);
|
|
136307
|
-
}
|
|
136308
|
-
|
|
136309
|
-
// ../../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/request-events.js
|
|
136310
|
-
init_cjs_shims();
|
|
136311
|
-
import path from "node:path";
|
|
136312
|
-
import { EventEmitter } from "node:events";
|
|
136313
|
-
import { ReadableStream } from "node:stream/web";
|
|
136314
|
-
|
|
136315
|
-
// ../../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/graphiql-url.js
|
|
136316
|
-
init_cjs_shims();
|
|
136317
|
-
function getGraphiQLUrl({
|
|
136318
|
-
host = "",
|
|
136319
|
-
graphql
|
|
136320
|
-
}) {
|
|
136321
|
-
let url = `${host.endsWith("/") ? host.slice(0, -1) : host}/graphiql`;
|
|
136322
|
-
if (graphql) {
|
|
136323
|
-
let { query, variables } = graphql;
|
|
136324
|
-
typeof variables != "string" && (variables = JSON.stringify(variables)), url += `?query=${encodeURIComponent(query)}${variables ? `&variables=${encodeURIComponent(variables)}` : ""}`, graphql.schema && (url += `&schema=${graphql.schema}`);
|
|
136325
|
-
}
|
|
136326
|
-
return url;
|
|
136327
|
-
}
|
|
136328
|
-
|
|
136329
|
-
// ../../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/request-events.js
|
|
136330
|
-
var import_source_map_support = __toESM(require_source_map_support(), 1), H2O_BINDING_NAME = "H2O_LOG_EVENT", ResponseConstructor;
|
|
136331
|
-
function setConstructors(constructors) {
|
|
136332
|
-
ResponseConstructor = constructors.Response;
|
|
136333
|
-
}
|
|
136334
|
-
var DEV_ROUTES = /* @__PURE__ */ new Set([
|
|
136335
|
-
"/graphiql",
|
|
136336
|
-
"/graphiql/customer-account.schema.json",
|
|
136337
|
-
"/subrequest-profiler",
|
|
136338
|
-
"/debug-network-server"
|
|
136339
|
-
]), EVENT_MAP = {
|
|
136340
|
-
request: "Request",
|
|
136341
|
-
subrequest: "Sub request"
|
|
136342
|
-
};
|
|
136343
|
-
async function getRequestInfo(request) {
|
|
136344
|
-
let data = await request.json();
|
|
136345
|
-
return {
|
|
136346
|
-
...data,
|
|
136347
|
-
requestId: data.requestId ?? "",
|
|
136348
|
-
eventType: data.eventType || "unknown",
|
|
136349
|
-
endTime: data.endTime || Date.now(),
|
|
136350
|
-
purpose: data.purpose === "prefetch" ? "(prefetch)" : "",
|
|
136351
|
-
cacheStatus: data.cacheStatus ?? "",
|
|
136352
|
-
graphql: data.graphql ? JSON.parse(data.graphql) : null
|
|
136353
|
-
};
|
|
136354
|
-
}
|
|
136355
|
-
var eventEmitter = new EventEmitter(), eventHistory = [];
|
|
136356
|
-
function createResponse(main = "ok", init) {
|
|
136357
|
-
return new ResponseConstructor(main, init);
|
|
136358
|
-
}
|
|
136359
|
-
function clearHistory(request) {
|
|
136360
|
-
return eventHistory.length = 0, createResponse();
|
|
136361
|
-
}
|
|
136362
|
-
function createLogRequestEvent(options2) {
|
|
136363
|
-
return async function(request) {
|
|
136364
|
-
let url = new URL(request.url);
|
|
136365
|
-
if (DEV_ROUTES.has(url.pathname))
|
|
136366
|
-
return createResponse();
|
|
136367
|
-
let {
|
|
136368
|
-
url: displayUrl,
|
|
136369
|
-
displayName: displayNameData,
|
|
136370
|
-
eventType,
|
|
136371
|
-
purpose,
|
|
136372
|
-
graphql,
|
|
136373
|
-
stackInfo,
|
|
136374
|
-
...data
|
|
136375
|
-
} = await getRequestInfo(request), graphiqlLink = "", descriptionUrl = request.url, displayName = displayNameData;
|
|
136376
|
-
eventType === "subrequest" && (displayName = displayName || graphql?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/, " "), descriptionUrl = displayUrl || request.url, graphql && (graphiqlLink = getGraphiQLUrl({ graphql })));
|
|
136377
|
-
let stackLine = null, stackLink = null;
|
|
136378
|
-
if (stackInfo?.file) {
|
|
136379
|
-
options2?.transformLocation && (stackInfo.file = options2.transformLocation(stackInfo.file));
|
|
136380
|
-
let { source, line, column } = (0, import_source_map_support.mapSourcePosition)({
|
|
136381
|
-
source: stackInfo.file,
|
|
136382
|
-
line: stackInfo.line ?? 0,
|
|
136383
|
-
column: stackInfo.column ?? 0
|
|
136384
|
-
});
|
|
136385
|
-
stackLine = `${source}:${line}:${column + 1}`, stackLink = `vscode://${path.join("file", stackLine)}`, stackLine = stackLine.split(path.sep + "app" + path.sep)[1] ?? stackLine, stackInfo.func && (stackLine = `${stackInfo.func.replace(/\d+$/, "")} (${stackLine})`);
|
|
136386
|
-
}
|
|
136387
|
-
let event = {
|
|
136388
|
-
event: EVENT_MAP[eventType] || eventType,
|
|
136389
|
-
data: JSON.stringify({
|
|
136390
|
-
...data,
|
|
136391
|
-
displayName,
|
|
136392
|
-
url: `${purpose} ${descriptionUrl}`.trim(),
|
|
136393
|
-
graphiqlLink,
|
|
136394
|
-
stackLine,
|
|
136395
|
-
stackLink
|
|
136396
|
-
})
|
|
136397
|
-
};
|
|
136398
|
-
return eventHistory.push(event), eventHistory.length > 100 && eventHistory.shift(), eventEmitter.emit("request", event), createResponse();
|
|
136399
|
-
};
|
|
136400
|
-
}
|
|
136401
|
-
function streamRequestEvents(request) {
|
|
136402
|
-
let stream = new ReadableStream({
|
|
136403
|
-
start(controller) {
|
|
136404
|
-
let encoder = new TextEncoder(), enqueueEvent = ({ event = "message", data }) => {
|
|
136405
|
-
controller.enqueue(encoder.encode(`event: ${event}
|
|
136406
|
-
`)), controller.enqueue(encoder.encode(`data: ${data}
|
|
136407
|
-
|
|
136408
|
-
`));
|
|
136409
|
-
};
|
|
136410
|
-
eventHistory.forEach(enqueueEvent), eventEmitter.addListener("request", enqueueEvent);
|
|
136411
|
-
let closed = !1;
|
|
136412
|
-
function close() {
|
|
136413
|
-
closed || (closed = !0, request.signal.removeEventListener("abort", close), eventEmitter.removeListener("request", enqueueEvent), controller.close());
|
|
136414
|
-
}
|
|
136415
|
-
if (request.signal.addEventListener("abort", close), request.signal.aborted) return close();
|
|
136416
|
-
}
|
|
136417
|
-
});
|
|
136418
|
-
return createResponse(stream, {
|
|
136419
|
-
headers: {
|
|
136420
|
-
"Content-Type": "text/event-stream",
|
|
136421
|
-
"Cache-Control": "no-store",
|
|
136422
|
-
Connection: "keep-alive"
|
|
136423
|
-
}
|
|
136424
|
-
});
|
|
136425
|
-
}
|
|
136426
|
-
function handleDebugNetworkRequest(request) {
|
|
136427
|
-
return request.method === "DELETE" ? clearHistory() : streamRequestEvents(request);
|
|
136428
|
-
}
|
|
136429
|
-
|
|
136430
|
-
// ../../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/common.js
|
|
136431
|
-
init_cjs_shims();
|
|
136432
|
-
var SUBREQUEST_PROFILER_ENDPOINT = "/debug-network-server";
|
|
136433
|
-
function handleMiniOxygenImportFail() {
|
|
136434
|
-
throw new AbortError(
|
|
136435
|
-
"Could not load MiniOxygen.",
|
|
136436
|
-
"Please make sure you have `@shopify/mini-oxygen` installed."
|
|
136437
|
-
);
|
|
136438
|
-
}
|
|
136439
|
-
function logRequestLine({
|
|
136440
|
-
request,
|
|
136441
|
-
response,
|
|
136442
|
-
meta
|
|
136443
|
-
}) {
|
|
136444
|
-
try {
|
|
136445
|
-
let url = new URL(request.url);
|
|
136446
|
-
if (DEV_ROUTES.has(url.pathname) || url.pathname === "/favicon.ico") return;
|
|
136447
|
-
let isDataRequest = url.searchParams.has("_data"), route = request.url.replace(url.origin, ""), info = "", type = "render";
|
|
136448
|
-
if (isDataRequest) {
|
|
136449
|
-
type = request.method === "GET" ? "loader" : "action";
|
|
136450
|
-
let dataParam = url.searchParams.get("_data")?.replace("routes/", "");
|
|
136451
|
-
route = url.pathname, info = `[${dataParam}]`;
|
|
136452
|
-
}
|
|
136453
|
-
let colorizeStatus = response.status < 300 ? outputToken.green : response.status < 400 ? outputToken.cyan : outputToken.errorText;
|
|
136454
|
-
outputInfo(
|
|
136455
|
-
outputContent`${request.method.padStart(6)} ${colorizeStatus(
|
|
136456
|
-
String(response.status)
|
|
136457
|
-
)} ${outputToken.italic(type.padEnd(7, " "))} ${route} ${meta.durationMs > 0 ? source_default.dim(` ${meta.durationMs}ms`) : ""}${info ? " " + source_default.dim(info) : ""}${request.headers.purpose === "prefetch" ? outputToken.italic(source_default.dim(" prefetch")) : ""}`
|
|
136458
|
-
);
|
|
136459
|
-
} catch {
|
|
136460
|
-
request && response?.status && outputInfo(`${request.method} ${response.status} ${request.url}`);
|
|
136461
|
-
}
|
|
136462
|
-
}
|
|
136463
|
-
|
|
136464
|
-
// ../../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/dev-shared.js
|
|
136465
|
-
init_cjs_shims();
|
|
136466
|
-
|
|
136467
|
-
// ../../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/commands/hydrogen/customer-account/push.js
|
|
136468
|
-
init_cjs_shims();
|
|
136469
|
-
var import_core3 = __toESM(require_lib(), 1);
|
|
136470
|
-
|
|
136471
|
-
// ../../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/commands/hydrogen/link.js
|
|
136468
|
+
// ../../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/link-storefront.js
|
|
136472
136469
|
init_cjs_shims();
|
|
136473
|
-
var import_core2 = __toESM(require_lib(), 1);
|
|
136474
136470
|
|
|
136475
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136476
|
-
init_cjs_shims();
|
|
136477
|
-
|
|
136478
|
-
// ../../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/graphql/admin/client.js
|
|
136471
|
+
// ../../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/client.js
|
|
136479
136472
|
init_cjs_shims();
|
|
136480
136473
|
|
|
136481
136474
|
// ../cli-kit/dist/public/node/api/graphql.js
|
|
@@ -136589,7 +136582,7 @@ async function graphqlRequestDoc(options2) {
|
|
|
136589
136582
|
});
|
|
136590
136583
|
}
|
|
136591
136584
|
|
|
136592
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136585
|
+
// ../../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/client.js
|
|
136593
136586
|
async function adminRequest(query, session, variables) {
|
|
136594
136587
|
let api = "Admin", url = `https://${session.storeFqdn}/admin/api/unstable/graphql.json`;
|
|
136595
136588
|
try {
|
|
@@ -136624,7 +136617,7 @@ async function adminRequest(query, session, variables) {
|
|
|
136624
136617
|
}
|
|
136625
136618
|
}
|
|
136626
136619
|
|
|
136627
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136620
|
+
// ../../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/gid.js
|
|
136628
136621
|
init_cjs_shims();
|
|
136629
136622
|
var GID_REGEXP = /gid:\/\/shopify\/\w*\/(\d+)/;
|
|
136630
136623
|
function parseGid(gid) {
|
|
@@ -136634,7 +136627,7 @@ function parseGid(gid) {
|
|
|
136634
136627
|
throw new AbortError(`Invalid Global ID: ${gid}`);
|
|
136635
136628
|
}
|
|
136636
136629
|
|
|
136637
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136630
|
+
// ../../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/link-storefront.js
|
|
136638
136631
|
var LinkStorefrontQuery = `#graphql
|
|
136639
136632
|
query LinkStorefront {
|
|
136640
136633
|
hydrogenStorefronts {
|
|
@@ -136655,7 +136648,7 @@ async function getStorefronts(adminSession) {
|
|
|
136655
136648
|
}));
|
|
136656
136649
|
}
|
|
136657
136650
|
|
|
136658
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136651
|
+
// ../../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/shopify-config.js
|
|
136659
136652
|
init_cjs_shims();
|
|
136660
136653
|
var SHOPIFY_DIR = ".shopify", SHOPIFY_DIR_PROJECT = "project.json";
|
|
136661
136654
|
async function resetConfig(root) {
|
|
@@ -136726,7 +136719,7 @@ async function setCustomerAccountConfig(root, customerAccountConfig) {
|
|
|
136726
136719
|
}
|
|
136727
136720
|
}
|
|
136728
136721
|
|
|
136729
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136722
|
+
// ../../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/create-storefront.js
|
|
136730
136723
|
init_cjs_shims();
|
|
136731
136724
|
var CreateStorefrontMutation = `#graphql
|
|
136732
136725
|
mutation CreateStorefront($title: String!) {
|
|
@@ -136760,7 +136753,7 @@ async function createStorefront(adminSession, title) {
|
|
|
136760
136753
|
return { jobId, storefront: hydrogenStorefront };
|
|
136761
136754
|
}
|
|
136762
136755
|
|
|
136763
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136756
|
+
// ../../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/fetch-job.js
|
|
136764
136757
|
init_cjs_shims();
|
|
136765
136758
|
var FetchJobQuery = `#graphql
|
|
136766
136759
|
query FetchJob($id: ID!) {
|
|
@@ -136794,7 +136787,7 @@ function waitForJob(adminSession, jobId) {
|
|
|
136794
136787
|
});
|
|
136795
136788
|
}
|
|
136796
136789
|
|
|
136797
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136790
|
+
// ../../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/string.js
|
|
136798
136791
|
init_cjs_shims();
|
|
136799
136792
|
function titleize(name = "") {
|
|
136800
136793
|
return name.replace(/[\W_]+/g, " ").split(" ").filter((word) => word.length > 0).map(
|
|
@@ -136802,7 +136795,7 @@ function titleize(name = "") {
|
|
|
136802
136795
|
).join(" ");
|
|
136803
136796
|
}
|
|
136804
136797
|
|
|
136805
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136798
|
+
// ../../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/shell.js
|
|
136806
136799
|
init_cjs_shims();
|
|
136807
136800
|
import os from "node:os";
|
|
136808
136801
|
var ALIAS_NAME = "h2", isWindows = () => os.platform() === "win32", isGitBash = () => !!process.env.MINGW_PREFIX;
|
|
@@ -136917,10 +136910,10 @@ async function getCliCommand(directory = process.cwd(), forcePkgManager) {
|
|
|
136917
136910
|
return (pkgManager === "bun" || pkgManager === "pnpm" || pkgManager === "yarn") && (cli = pkgManager), `${cli} shopify hydrogen`;
|
|
136918
136911
|
}
|
|
136919
136912
|
|
|
136920
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136913
|
+
// ../../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/auth.js
|
|
136921
136914
|
init_cjs_shims();
|
|
136922
136915
|
|
|
136923
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
136916
|
+
// ../../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/business-platform/user-account.js
|
|
136924
136917
|
init_cjs_shims();
|
|
136925
136918
|
|
|
136926
136919
|
// ../cli-kit/dist/public/node/api/business-platform.js
|
|
@@ -137042,7 +137035,7 @@ async function businessPlatformOrganizationsRequestDoc(query, token, organizatio
|
|
|
137042
137035
|
});
|
|
137043
137036
|
}
|
|
137044
137037
|
|
|
137045
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
137038
|
+
// ../../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/business-platform/user-account.js
|
|
137046
137039
|
var CurrentUserAccountQuery = `#graphql
|
|
137047
137040
|
query currentUserAccount {
|
|
137048
137041
|
currentUserAccount {
|
|
@@ -137121,7 +137114,7 @@ async function getUserAccount(token) {
|
|
|
137121
137114
|
};
|
|
137122
137115
|
}
|
|
137123
137116
|
|
|
137124
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
137117
|
+
// ../../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/log.js
|
|
137125
137118
|
init_cjs_shims();
|
|
137126
137119
|
var originalConsole = { ...console }, methodsReplaced = /* @__PURE__ */ new Set(), addedReplacers = /* @__PURE__ */ new Set(), messageReplacers = [];
|
|
137127
137120
|
function addMessageReplacers(key, ...items) {
|
|
@@ -137350,43 +137343,6 @@ Request`)),
|
|
|
137350
137343
|
}
|
|
137351
137344
|
]);
|
|
137352
137345
|
}
|
|
137353
|
-
function createRemixLogger() {
|
|
137354
|
-
let noop = () => {
|
|
137355
|
-
}, buildMessageBody = (message, details) => `In Remix:
|
|
137356
|
-
|
|
137357
|
-
` + source_default.bold(message) + (details ? `
|
|
137358
|
-
|
|
137359
|
-
` + details.join(`
|
|
137360
|
-
`) : "");
|
|
137361
|
-
return {
|
|
137362
|
-
dev: noop,
|
|
137363
|
-
info: noop,
|
|
137364
|
-
debug: noop,
|
|
137365
|
-
warn: (message, options2) => {
|
|
137366
|
-
renderWarning({ body: buildMessageBody(message, options2?.details) });
|
|
137367
|
-
},
|
|
137368
|
-
error: (message, options2) => {
|
|
137369
|
-
renderFatalError({
|
|
137370
|
-
name: "error",
|
|
137371
|
-
type: 0,
|
|
137372
|
-
message: buildMessageBody(message, options2?.details),
|
|
137373
|
-
skipOclifErrorHandling: !0,
|
|
137374
|
-
tryMessage: ""
|
|
137375
|
-
});
|
|
137376
|
-
}
|
|
137377
|
-
};
|
|
137378
|
-
}
|
|
137379
|
-
async function muteRemixLogs(root) {
|
|
137380
|
-
try {
|
|
137381
|
-
let { logger } = await importLocal(
|
|
137382
|
-
"@remix-run/dev/dist/tux/logger.js",
|
|
137383
|
-
root
|
|
137384
|
-
);
|
|
137385
|
-
logger.warn = logger.debug = logger.info = () => {
|
|
137386
|
-
};
|
|
137387
|
-
} catch {
|
|
137388
|
-
}
|
|
137389
|
-
}
|
|
137390
137346
|
function setH2OVerbose() {
|
|
137391
137347
|
!process.env.DEBUG || process.env.DEBUG === "*" ? process.env.DEBUG = "h2:*,o2:*" : process.env.DEBUG += ",h2:*,o2:*";
|
|
137392
137348
|
}
|
|
@@ -137394,7 +137350,7 @@ function isH2Verbose() {
|
|
|
137394
137350
|
return !!(process.env.DEBUG === "*" || process.env.DEBUG?.includes("h2:*"));
|
|
137395
137351
|
}
|
|
137396
137352
|
|
|
137397
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
137353
|
+
// ../../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/auth.js
|
|
137398
137354
|
async function logout2(root) {
|
|
137399
137355
|
await logout(), await resetConfig(root);
|
|
137400
137356
|
}
|
|
@@ -137433,9 +137389,9 @@ function renderLoginSuccess(config) {
|
|
|
137433
137389
|
});
|
|
137434
137390
|
}
|
|
137435
137391
|
|
|
137436
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
137392
|
+
// ../../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/common.js
|
|
137437
137393
|
init_cjs_shims();
|
|
137438
|
-
import { symlink, readdir as
|
|
137394
|
+
import { symlink, readdir as readdir3 } from "node:fs/promises";
|
|
137439
137395
|
|
|
137440
137396
|
// ../cli-kit/dist/public/node/git.js
|
|
137441
137397
|
init_cjs_shims();
|
|
@@ -140877,11 +140833,11 @@ async function getLatestTag(directory) {
|
|
|
140877
140833
|
return (await esm_default({ baseDir: directory }).tags()).latest;
|
|
140878
140834
|
}
|
|
140879
140835
|
|
|
140880
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140836
|
+
// ../../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/setups/routes/generate.js
|
|
140881
140837
|
init_cjs_shims();
|
|
140882
|
-
import { readdir as
|
|
140838
|
+
import { readdir as readdir2 } from "node:fs/promises";
|
|
140883
140839
|
|
|
140884
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140840
|
+
// ../../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/remix-version-interop.js
|
|
140885
140841
|
init_cjs_shims();
|
|
140886
140842
|
import { createRequire as createRequire2 } from "module";
|
|
140887
140843
|
function convertRouteToV1(route) {
|
|
@@ -140895,53 +140851,17 @@ function isV1RouteConventionInstalled() {
|
|
|
140895
140851
|
}
|
|
140896
140852
|
}
|
|
140897
140853
|
|
|
140898
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140854
|
+
// ../../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/remix-config.js
|
|
140899
140855
|
init_cjs_shims();
|
|
140900
|
-
import { createRequire as
|
|
140856
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
140901
140857
|
import path2 from "node:path";
|
|
140902
|
-
import { readdir as readdir2 } from "node:fs/promises";
|
|
140903
140858
|
|
|
140904
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140859
|
+
// ../../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/remix-version-check.js
|
|
140905
140860
|
init_cjs_shims();
|
|
140906
|
-
import { createRequire as createRequire3 } from "node:module";
|
|
140907
|
-
var REQUIRED_REMIX_VERSION = "^2.16.1";
|
|
140908
|
-
function checkRemixVersions(projectPath, requiredVersionInHydrogen = REQUIRED_REMIX_VERSION) {
|
|
140909
|
-
let require22 = createRequire3(import.meta.url), satisfiesSemver = require22("semver/functions/satisfies.js"), outOfSyncPkgs = [
|
|
140910
|
-
"dev",
|
|
140911
|
-
"react",
|
|
140912
|
-
"server-runtime",
|
|
140913
|
-
"css-bundle",
|
|
140914
|
-
"node",
|
|
140915
|
-
"express",
|
|
140916
|
-
"eslint-config"
|
|
140917
|
-
].map((name) => getRemixPackageVersion(require22, name, projectPath)).filter(
|
|
140918
|
-
(pkg) => pkg.version && !satisfiesSemver(pkg.version, requiredVersionInHydrogen)
|
|
140919
|
-
);
|
|
140920
|
-
if (outOfSyncPkgs.length === 0) return;
|
|
140921
|
-
let items = outOfSyncPkgs.reduce((acc, item) => (item.version && acc.push(`${item.name}@${item.version}`), acc), []);
|
|
140922
|
-
renderWarning({
|
|
140923
|
-
headline: `The current version of Hydrogen requires Remix @${requiredVersionInHydrogen}. The following packages are out of sync:`,
|
|
140924
|
-
body: [
|
|
140925
|
-
{ list: { items } },
|
|
140926
|
-
`
|
|
140927
|
-
Please ensure your Remix packages have the same version and are in sync with Hydrogen.`
|
|
140928
|
-
]
|
|
140929
|
-
});
|
|
140930
|
-
}
|
|
140931
|
-
function getRemixPackageVersion(require22, name, root) {
|
|
140932
|
-
let pkgName = "@remix-run/" + name, result = { name: pkgName, version: "" };
|
|
140933
|
-
try {
|
|
140934
|
-
let pkgJsonPath2 = require22.resolve(`${pkgName}/package.json`, {
|
|
140935
|
-
paths: [root]
|
|
140936
|
-
}), pkgJson = require22(pkgJsonPath2);
|
|
140937
|
-
result.version = pkgJson.version;
|
|
140938
|
-
} catch {
|
|
140939
|
-
}
|
|
140940
|
-
return result;
|
|
140941
|
-
}
|
|
140942
140861
|
|
|
140943
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140862
|
+
// ../../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/vite-config.js
|
|
140944
140863
|
init_cjs_shims();
|
|
140864
|
+
var REMIX_COMPILER_ERROR_MESSAGE = "Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";
|
|
140945
140865
|
async function hasViteConfig(root) {
|
|
140946
140866
|
return !!(await findFileWithExtension(root, "vite.config")).filepath;
|
|
140947
140867
|
}
|
|
@@ -140965,7 +140885,7 @@ async function getViteConfig(root, ssrEntryFlag) {
|
|
|
140965
140885
|
command,
|
|
140966
140886
|
mode,
|
|
140967
140887
|
mode
|
|
140968
|
-
), { appDirectory, serverBuildFile, routes } =
|
|
140888
|
+
), { appDirectory, serverBuildFile, routes } = getReactRouterOrRemixConfigFromVite(resolvedViteConfig), serverOutDir = resolvedViteConfig.build.outDir, clientOutDir = serverOutDir.replace(/server$/, "client"), rollupOutput = resolvedViteConfig.build.rollupOptions.output, { entryFileNames } = (Array.isArray(rollupOutput) ? rollupOutput[0] : rollupOutput) ?? {}, serverOutFile = joinPath(
|
|
140969
140889
|
serverOutDir,
|
|
140970
140890
|
typeof entryFileNames == "string" ? entryFileNames : serverBuildFile ?? "index.js"
|
|
140971
140891
|
), ssrEntry = ssrEntryFlag ?? resolvedViteConfig.build.ssr, resolvedSsrEntry = resolvePath(
|
|
@@ -140989,6 +140909,23 @@ async function getViteConfig(root, ssrEntryFlag) {
|
|
|
140989
140909
|
}
|
|
140990
140910
|
};
|
|
140991
140911
|
}
|
|
140912
|
+
function getReactRouterOrRemixConfigFromVite(viteConfig) {
|
|
140913
|
+
try {
|
|
140914
|
+
return getReactRouterConfigFromVite(viteConfig);
|
|
140915
|
+
} catch {
|
|
140916
|
+
return getRemixConfigFromVite(viteConfig);
|
|
140917
|
+
}
|
|
140918
|
+
}
|
|
140919
|
+
function getReactRouterConfigFromVite(viteConfig) {
|
|
140920
|
+
if (!viteConfig.__reactRouterPluginContext)
|
|
140921
|
+
throw new Error("Could not resolve React Router config");
|
|
140922
|
+
let { appDirectory, serverBuildFile, routes } = viteConfig.__reactRouterPluginContext.reactRouterConfig;
|
|
140923
|
+
return {
|
|
140924
|
+
appDirectory,
|
|
140925
|
+
serverBuildFile,
|
|
140926
|
+
routes
|
|
140927
|
+
};
|
|
140928
|
+
}
|
|
140992
140929
|
function getRemixConfigFromVite(viteConfig) {
|
|
140993
140930
|
let { remixConfig } = findHydrogenPlugin(viteConfig)?.api?.getPluginOptions() ?? {};
|
|
140994
140931
|
return remixConfig ? {
|
|
@@ -141007,14 +140944,14 @@ function findOxygenPlugin(config) {
|
|
|
141007
140944
|
return findPlugin(config, "oxygen:main");
|
|
141008
140945
|
}
|
|
141009
140946
|
|
|
141010
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140947
|
+
// ../../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/remix-config.js
|
|
141011
140948
|
async function hasRemixConfigFile(root) {
|
|
141012
140949
|
return !!(await findFileWithExtension(root, "remix.config")).filepath;
|
|
141013
140950
|
}
|
|
141014
140951
|
async function isClassicProject(root) {
|
|
141015
140952
|
return await isViteProject(root) ? !1 : hasRemixConfigFile(root);
|
|
141016
140953
|
}
|
|
141017
|
-
var BUILD_DIR = "dist", CLIENT_SUBDIR = "client", WORKER_SUBDIR = "worker"
|
|
140954
|
+
var BUILD_DIR = "dist", CLIENT_SUBDIR = "client", WORKER_SUBDIR = "worker";
|
|
141018
140955
|
function getProjectPaths(appPath) {
|
|
141019
140956
|
let root = appPath ?? process.cwd(), publicPath = path2.join(root, "public"), buildPath = path2.join(root, BUILD_DIR), buildPathClient = path2.join(buildPath, CLIENT_SUBDIR), buildPathWorkerFile = path2.join(buildPath, WORKER_SUBDIR, "index.js");
|
|
141020
140957
|
return {
|
|
@@ -141025,122 +140962,19 @@ function getProjectPaths(appPath) {
|
|
|
141025
140962
|
publicPath
|
|
141026
140963
|
};
|
|
141027
140964
|
}
|
|
141028
|
-
function handleRemixImportFail() {
|
|
141029
|
-
let remixVersion = REQUIRED_REMIX_VERSION;
|
|
141030
|
-
throw new AbortError(
|
|
141031
|
-
"Could not load Remix packages.",
|
|
141032
|
-
`Please make sure you have \`@remix-run/dev@${remixVersion}\` installed and all the other Remix packages have the same version.`
|
|
141033
|
-
);
|
|
141034
|
-
}
|
|
141035
140965
|
function getRawRemixConfig(root) {
|
|
141036
140966
|
return findFileWithExtension(root, "remix.config").then(({ filepath }) => {
|
|
141037
140967
|
if (!filepath) throw new AbortError("No remix.config.js file found.");
|
|
141038
|
-
return
|
|
140968
|
+
return createRequire3(import.meta.url)(filepath);
|
|
141039
140969
|
});
|
|
141040
140970
|
}
|
|
141041
140971
|
async function getRemixConfig(root, mode = process.env.NODE_ENV) {
|
|
141042
|
-
if (await isViteProject(root))
|
|
141043
|
-
|
|
141044
|
-
await
|
|
141045
|
-
let { resolveConfig: resolveConfig2 } = await importLocal(
|
|
141046
|
-
"@remix-run/dev/dist/config.js",
|
|
141047
|
-
root
|
|
141048
|
-
).catch(handleRemixImportFail), { createContext } = await importLocal(
|
|
141049
|
-
"@remix-run/dev/dist/vite/vite-node.js",
|
|
141050
|
-
root
|
|
141051
|
-
).catch(handleRemixImportFail), appConfig = await getRawRemixConfig(root), routesViteNodeContext = await createContext({ root, mode }), vite = await importVite(root), config = await resolveConfig2(appConfig, {
|
|
141052
|
-
rootDirectory: root,
|
|
141053
|
-
serverMode: mode,
|
|
141054
|
-
vite,
|
|
141055
|
-
routesViteNodeContext
|
|
141056
|
-
});
|
|
141057
|
-
if (isHydrogenMonorepo && hydrogenPackagesPath) {
|
|
141058
|
-
let packagesPath = hydrogenPackagesPath;
|
|
141059
|
-
config.watchPaths ??= [], config.watchPaths.push(
|
|
141060
|
-
...(await readdir2(packagesPath)).map(
|
|
141061
|
-
(pkg) => pkg === "hydrogen-react" ? path2.resolve(packagesPath, pkg, "dist", "browser-dev", "index.mjs") : path2.resolve(packagesPath, pkg, "dist", "development", "index.js")
|
|
141062
|
-
)
|
|
141063
|
-
), config.watchPaths.push(
|
|
141064
|
-
path2.join(packagesPath, "cli", "dist", "virtual-routes", "**", "*")
|
|
141065
|
-
);
|
|
141066
|
-
}
|
|
141067
|
-
return routesViteNodeContext.server.server.close(), config;
|
|
141068
|
-
}
|
|
141069
|
-
function assertOxygenChecks(config) {
|
|
141070
|
-
try {
|
|
141071
|
-
createRequire4(import.meta.url).resolve("@shopify/remix-oxygen");
|
|
141072
|
-
} catch {
|
|
141073
|
-
return;
|
|
141074
|
-
}
|
|
141075
|
-
if (config.serverEntryPoint)
|
|
141076
|
-
assertEntryFileExists(config.rootDirectory, config.serverEntryPoint);
|
|
141077
|
-
else
|
|
141078
|
-
throw new AbortError(
|
|
141079
|
-
"Could not find a server entry point.",
|
|
141080
|
-
"Please add a server option to your remix.config.js pointing to an Oxygen worker entry file."
|
|
141081
|
-
);
|
|
141082
|
-
if (config.serverPlatform !== "neutral")
|
|
141083
|
-
throw new AbortError(
|
|
141084
|
-
'The serverPlatform in remix.config.js must be "neutral".'
|
|
141085
|
-
);
|
|
141086
|
-
if (config.serverModuleFormat !== "esm")
|
|
141087
|
-
throw new AbortError(
|
|
141088
|
-
'The serverModuleFormat in remix.config.js must be "esm".'
|
|
141089
|
-
);
|
|
141090
|
-
if (config.serverDependenciesToBundle !== "all")
|
|
141091
|
-
throw new AbortError(
|
|
141092
|
-
'The serverDependenciesToBundle in remix.config.js must be "all".'
|
|
141093
|
-
);
|
|
141094
|
-
if (!config.serverConditions?.includes("worker"))
|
|
141095
|
-
throw new AbortError(
|
|
141096
|
-
'The serverConditions in remix.config.js must include "worker".'
|
|
141097
|
-
);
|
|
141098
|
-
if (process.env.NODE_ENV === "development" && !config.serverConditions?.includes("development") && outputWarn(
|
|
141099
|
-
"Add `process.env.NODE_ENV` value to serverConditions in remix.config.js to enable debugging features in development."
|
|
141100
|
-
), !config.serverMainFields || !oxygenServerMainFields.every((v, i) => config.serverMainFields?.[i] === v))
|
|
141101
|
-
throw new AbortError(
|
|
141102
|
-
`The serverMainFields in remix.config.js must be ${JSON.stringify(
|
|
141103
|
-
oxygenServerMainFields
|
|
141104
|
-
)}.`
|
|
141105
|
-
);
|
|
141106
|
-
let cdnUrl = process.env.HYDROGEN_ASSET_BASE_URL;
|
|
141107
|
-
if (cdnUrl && !config.publicPath.startsWith(cdnUrl))
|
|
141108
|
-
throw new AbortError(
|
|
141109
|
-
"The publicPath in remix.config.js must be prepended with the value of `process.env.HYDROGEN_ASSET_BASE_URL`."
|
|
141110
|
-
);
|
|
141111
|
-
let expectedServerBuildPath = path2.join(
|
|
141112
|
-
BUILD_DIR,
|
|
141113
|
-
WORKER_SUBDIR,
|
|
141114
|
-
"index.js"
|
|
141115
|
-
);
|
|
141116
|
-
if (config.serverBuildPath !== path2.resolve(config.rootDirectory, expectedServerBuildPath))
|
|
141117
|
-
throw new AbortError(
|
|
141118
|
-
`The serverBuildPath in remix.config.js must be "${expectedServerBuildPath}".`
|
|
141119
|
-
);
|
|
141120
|
-
let expectedAssetsBuildDirectory = path2.join(BUILD_DIR, CLIENT_SUBDIR);
|
|
141121
|
-
if (!config.assetsBuildDirectory.startsWith(
|
|
141122
|
-
path2.resolve(config.rootDirectory, expectedAssetsBuildDirectory)
|
|
141123
|
-
))
|
|
141124
|
-
throw new AbortError(
|
|
141125
|
-
`The assetsBuildDirectory in remix.config.js must be in "${expectedAssetsBuildDirectory}".`
|
|
141126
|
-
);
|
|
141127
|
-
}
|
|
141128
|
-
async function assertEntryFileExists(root, fileRelative) {
|
|
141129
|
-
let fileAbsolute = path2.resolve(root, fileRelative);
|
|
141130
|
-
if (!await fileExists(fileAbsolute)) {
|
|
141131
|
-
if (!path2.extname(fileAbsolute) && (await readdir2(path2.dirname(fileAbsolute))).some((file) => {
|
|
141132
|
-
let { name, ext } = path2.parse(file);
|
|
141133
|
-
return name === path2.basename(fileAbsolute) && /^\.[jt]s$/.test(ext);
|
|
141134
|
-
}))
|
|
141135
|
-
return;
|
|
141136
|
-
throw new AbortError(
|
|
141137
|
-
`Entry file "${fileRelative}" not found.`,
|
|
141138
|
-
"Please ensure the file exists and that the path is correctly added to the `server` property in remix.config.js."
|
|
141139
|
-
);
|
|
141140
|
-
}
|
|
140972
|
+
if (!await isViteProject(root))
|
|
140973
|
+
throw new AbortError(REMIX_COMPILER_ERROR_MESSAGE);
|
|
140974
|
+
return (await getViteConfig(root)).remixConfig;
|
|
141141
140975
|
}
|
|
141142
140976
|
|
|
141143
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
140977
|
+
// ../../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/setups/routes/generate.js
|
|
141144
140978
|
var NO_LOCALE_PATTERNS = [/robots\.txt/], ROUTE_MAP = {
|
|
141145
140979
|
home: ["_index", "$"],
|
|
141146
140980
|
page: "pages*",
|
|
@@ -141152,10 +140986,11 @@ var NO_LOCALE_PATTERNS = [/robots\.txt/], ROUTE_MAP = {
|
|
|
141152
140986
|
account: "account*",
|
|
141153
140987
|
search: ["search", "api.predictive-search"],
|
|
141154
140988
|
robots: "[robots.txt]",
|
|
141155
|
-
sitemap: ["[sitemap.xml]", "sitemap.$type.$page[.xml]"]
|
|
140989
|
+
sitemap: ["[sitemap.xml]", "sitemap.$type.$page[.xml]"],
|
|
140990
|
+
tokenlessApi: "api.$version.[graphql.json]"
|
|
141156
140991
|
}, allRouteTemplateFiles = [];
|
|
141157
140992
|
async function getResolvedRoutes(routeKeys = Object.keys(ROUTE_MAP)) {
|
|
141158
|
-
allRouteTemplateFiles.length === 0 && (allRouteTemplateFiles = (await
|
|
140993
|
+
allRouteTemplateFiles.length === 0 && (allRouteTemplateFiles = (await readdir2(await getTemplateAppFile(ASSETS_STARTER_DIR_ROUTES))).map((item) => item.replace(/\.tsx?$/, "")));
|
|
141159
140994
|
let routeGroups = {}, resolvedRouteFiles = [];
|
|
141160
140995
|
for (let key of routeKeys) {
|
|
141161
140996
|
routeGroups[key] = [];
|
|
@@ -141207,7 +141042,7 @@ async function generateRoutes(options2, remixConfig) {
|
|
|
141207
141042
|
async function getLocalePrefix(routesDirectory, { localePrefix, routeName, v1RouteConvention }) {
|
|
141208
141043
|
if (localePrefix) return localePrefix;
|
|
141209
141044
|
if (localePrefix !== void 0 || routeName === "all") return;
|
|
141210
|
-
let existingFiles = await
|
|
141045
|
+
let existingFiles = await readdir2(routesDirectory).catch(() => []), coreRouteWithLocaleRE = v1RouteConvention ? /^\(\$(\w+)\)$/ : /^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/, coreRouteWithLocale = existingFiles.find(
|
|
141211
141046
|
(file) => coreRouteWithLocaleRE.test(file)
|
|
141212
141047
|
);
|
|
141213
141048
|
if (coreRouteWithLocale)
|
|
@@ -141348,7 +141183,7 @@ async function copyRouteTemplate({
|
|
|
141348
141183
|
adapter && (templateContent = replaceAdapters(templateContent, adapter)), typescript || (templateContent = await transpileFile(templateContent, templatePath)), templateContent = await formatCode(templateContent, formatOptions, routePath), await writeFile(routePath, templateContent);
|
|
141349
141184
|
}
|
|
141350
141185
|
|
|
141351
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
141186
|
+
// ../../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/common.js
|
|
141352
141187
|
var LANGUAGES = {
|
|
141353
141188
|
js: "JavaScript",
|
|
141354
141189
|
ts: "TypeScript"
|
|
@@ -141598,6 +141433,7 @@ node_modules
|
|
|
141598
141433
|
/.mf
|
|
141599
141434
|
.env
|
|
141600
141435
|
.shopify
|
|
141436
|
+
.react-router
|
|
141601
141437
|
`.slice(1);
|
|
141602
141438
|
async function createInitialCommit(directory) {
|
|
141603
141439
|
try {
|
|
@@ -141720,7 +141556,7 @@ function createAbortHandler(controller, project) {
|
|
|
141720
141556
|
};
|
|
141721
141557
|
}
|
|
141722
141558
|
async function projectExists(projectDir) {
|
|
141723
|
-
return await fileExists(projectDir) && await isDirectory(projectDir) && (await
|
|
141559
|
+
return await fileExists(projectDir) && await isDirectory(projectDir) && (await readdir3(projectDir)).length > 0;
|
|
141724
141560
|
}
|
|
141725
141561
|
function normalizeRoutePath(routePath) {
|
|
141726
141562
|
return routePath.replace(/(^|\.)_index$/, "").replace(/((^|\.)[^\.]+)_\./g, "$1.").replace(/\.(?!\w+\])/g, "/").replace(/\$$/g, ":catchAll").replace(/\$/g, ":").replace(/[\[\]]/g, "").replace(/:\w*Handle/i, ":handle");
|
|
@@ -141795,7 +141631,7 @@ function generateRandomName() {
|
|
|
141795
141631
|
])} ${geographicalFeature}`;
|
|
141796
141632
|
}
|
|
141797
141633
|
|
|
141798
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
141634
|
+
// ../../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/link.js
|
|
141799
141635
|
var Link = class _Link extends base_command_default {
|
|
141800
141636
|
static descriptionWithMarkdown = `Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
|
|
141801
141637
|
|
|
@@ -141916,7 +141752,7 @@ async function createNewStorefront(root, session, storefronts) {
|
|
|
141916
141752
|
return storefront;
|
|
141917
141753
|
}
|
|
141918
141754
|
|
|
141919
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
141755
|
+
// ../../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/customer-application-update.js
|
|
141920
141756
|
init_cjs_shims();
|
|
141921
141757
|
var CUSTOMER_APPLICATION_URLS_REPLACE = `#graphql
|
|
141922
141758
|
mutation CustomerApplicationUrlsReplace($storefrontId: ID!, $urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput!) {
|
|
@@ -141944,7 +141780,7 @@ async function replaceCustomerApplicationUrls(adminSession, storefrontId, urlsRe
|
|
|
141944
141780
|
return { success, userErrors };
|
|
141945
141781
|
}
|
|
141946
141782
|
|
|
141947
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
141783
|
+
// ../../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/customer-account/push.js
|
|
141948
141784
|
var CustomerAccountPush = class _CustomerAccountPush extends base_command_default {
|
|
141949
141785
|
static description = "Push project configuration to admin";
|
|
141950
141786
|
static flags = {
|
|
@@ -142077,7 +141913,7 @@ async function getStorefrontId(root, storefrontIdFromFlag) {
|
|
|
142077
141913
|
}) ? (await getConfig(root)).storefront?.id : void 0;
|
|
142078
141914
|
}
|
|
142079
141915
|
|
|
142080
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
141916
|
+
// ../../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/environment-variables.js
|
|
142081
141917
|
init_cjs_shims();
|
|
142082
141918
|
|
|
142083
141919
|
// ../cli-kit/dist/public/node/dot-env.js
|
|
@@ -142142,7 +141978,7 @@ function createDotEnvFileLine(key, value, quote2) {
|
|
|
142142
141978
|
return `${key}=${value}`;
|
|
142143
141979
|
}
|
|
142144
141980
|
|
|
142145
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
141981
|
+
// ../../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/pull-variables.js
|
|
142146
141982
|
init_cjs_shims();
|
|
142147
141983
|
var PullVariablesQuery = `#graphql
|
|
142148
141984
|
query PullVariables($id: ID!, $handle: String) {
|
|
@@ -142170,7 +142006,7 @@ async function getStorefrontEnvVariables(adminSession, storefrontId, envHandle)
|
|
|
142170
142006
|
return hydrogenStorefront;
|
|
142171
142007
|
}
|
|
142172
142008
|
|
|
142173
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
142009
|
+
// ../../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-environments.js
|
|
142174
142010
|
init_cjs_shims();
|
|
142175
142011
|
var ListEnvironmentsQuery = `#graphql
|
|
142176
142012
|
query ListStorefronts($id: ID!) {
|
|
@@ -142198,7 +142034,7 @@ async function getStorefrontEnvironments(adminSession, storefrontId) {
|
|
|
142198
142034
|
return hydrogenStorefront;
|
|
142199
142035
|
}
|
|
142200
142036
|
|
|
142201
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
142037
|
+
// ../../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/common.js
|
|
142202
142038
|
init_cjs_shims();
|
|
142203
142039
|
function orderEnvironmentsBySafety(environments) {
|
|
142204
142040
|
return [
|
|
@@ -142239,7 +142075,7 @@ function environmentNotFound(criterion, value) {
|
|
|
142239
142075
|
);
|
|
142240
142076
|
}
|
|
142241
142077
|
|
|
142242
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
142078
|
+
// ../../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/environment-variables.js
|
|
142243
142079
|
var createEmptyRemoteVars = () => ({
|
|
142244
142080
|
remoteVariables: {},
|
|
142245
142081
|
remoteSecrets: {}
|
|
@@ -142310,7 +142146,7 @@ async function getLocalVariables(root, envFile) {
|
|
|
142310
142146
|
);
|
|
142311
142147
|
}
|
|
142312
142148
|
|
|
142313
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
142149
|
+
// ../../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/tunneling.js
|
|
142314
142150
|
init_cjs_shims();
|
|
142315
142151
|
async function startTunnelPlugin(config, port, provider) {
|
|
142316
142152
|
let hooks = await fanoutHooks(config, "tunnel_start", { port, provider }), first2 = Object.values(hooks).filter(
|
|
@@ -142341,7 +142177,7 @@ async function pollTunnelURL(tunnelClient) {
|
|
|
142341
142177
|
});
|
|
142342
142178
|
}
|
|
142343
142179
|
|
|
142344
|
-
// ../../node_modules/.pnpm/@shopify+cli-hydrogen@
|
|
142180
|
+
// ../../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/dev-shared.js
|
|
142345
142181
|
function isMockShop(envVariables) {
|
|
142346
142182
|
return envVariables.PUBLIC_STORE_DOMAIN === "mock.shop" || // We fallback to mock.shop if the env var is falsy.
|
|
142347
142183
|
// When it's undefined, it might be overwritten by remote variables.
|
|
@@ -142475,20 +142311,11 @@ export {
|
|
|
142475
142311
|
overrideFlag,
|
|
142476
142312
|
importVite,
|
|
142477
142313
|
importLocal,
|
|
142478
|
-
muteDevLogs,
|
|
142479
|
-
enhanceAuthLogs,
|
|
142480
|
-
enhanceH2Logs,
|
|
142481
|
-
createRemixLogger,
|
|
142482
|
-
muteRemixLogs,
|
|
142483
|
-
setH2OVerbose,
|
|
142484
|
-
isH2Verbose,
|
|
142485
|
-
checkRemixVersions,
|
|
142486
142314
|
isClassicProject,
|
|
142487
142315
|
getProjectPaths,
|
|
142488
|
-
handleRemixImportFail,
|
|
142489
142316
|
getRawRemixConfig,
|
|
142490
142317
|
getRemixConfig,
|
|
142491
|
-
|
|
142318
|
+
REMIX_COMPILER_ERROR_MESSAGE,
|
|
142492
142319
|
hasViteConfig,
|
|
142493
142320
|
isViteProject,
|
|
142494
142321
|
getViteConfig,
|
|
@@ -142514,6 +142341,11 @@ export {
|
|
|
142514
142341
|
businessPlatformRequestDoc,
|
|
142515
142342
|
businessPlatformOrganizationsRequest,
|
|
142516
142343
|
businessPlatformOrganizationsRequestDoc,
|
|
142344
|
+
muteDevLogs,
|
|
142345
|
+
enhanceAuthLogs,
|
|
142346
|
+
enhanceH2Logs,
|
|
142347
|
+
setH2OVerbose,
|
|
142348
|
+
isH2Verbose,
|
|
142517
142349
|
logout2 as logout,
|
|
142518
142350
|
login,
|
|
142519
142351
|
renderLoginSuccess,
|
|
@@ -142562,4 +142394,4 @@ export {
|
|
|
142562
142394
|
getDebugBannerLine,
|
|
142563
142395
|
getUtilityBannerlines
|
|
142564
142396
|
};
|
|
142565
|
-
//# sourceMappingURL=chunk-
|
|
142397
|
+
//# sourceMappingURL=chunk-HHXHFCPT.js.map
|