@shopify/hydrogen 2025.10.0 → 2026.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ var t="vite/virtual-routes/routes",r=["vite","virtual-routes","routes"],c=["vite","virtual-routes"];function R(o,i,s){let n=new URL("../",o),a=i.reduce((l,p)=>new URL(`${p}/`,l),n),u=new URL(s,a).pathname.replace(/^\/[a-zA-Z]:\//,"/");return decodeURIComponent(u)}function e(o,i){return R(import.meta.url,o,i)}async function f(){return {routes:[{id:`${t}/graphiql`,path:"graphiql",file:e(r,"graphiql.jsx"),index:false},{id:`${t}/subrequest-profiler`,path:"subrequest-profiler",file:e(r,"subrequest-profiler.jsx"),index:false},{id:`${t}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,path:".well-known/appspecific/com.chrome.devtools.json",file:e(r,"[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx"),index:false},{id:`${t}/index`,path:"",file:e(r,"index.jsx"),index:true}],layout:{file:e(c,"layout.jsx")}}}
2
+ export{t as VIRTUAL_ROUTES_DIR,c as VIRTUAL_ROUTES_DIR_PARTS,r as VIRTUAL_ROUTES_ROUTES_DIR_PARTS,R as createVirtualRoutesPath,f as getVirtualRoutesV3};//# sourceMappingURL=get-virtual-routes-ZZEGQQDV.js.map
3
+ //# sourceMappingURL=get-virtual-routes-ZZEGQQDV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/vite/get-virtual-routes.ts"],"names":["VIRTUAL_ROUTES_DIR","VIRTUAL_ROUTES_ROUTES_DIR_PARTS","VIRTUAL_ROUTES_DIR_PARTS","createVirtualRoutesPath","baseUrl","pathParts","forFile","basePath","virtualRoutesPath","working","dirPart","pathname","getVirtualRoutesPath","getVirtualRoutesV3"],"mappings":"AACO,IAAMA,CAAAA,CAAqB,4BAAA,CACrBC,CAAAA,CAAkC,CAC7C,OACA,gBAAA,CACA,QACF,CAAA,CACa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AAAA,CACJX,CAAAA,CACA,WACF,CAAA,CACA,KAAA,CAAO,IACT,CACF,CAAA,CACA,MAAA,CAAQ,CACN,KAAMW,CAAAA,CAAqBV,CAAAA,CAA0B,YAAY,CACnE,CACF,CACF","file":"get-virtual-routes-ZZEGQQDV.js","sourcesContent":["// v3_routeConfig virtual routes constants\nexport const VIRTUAL_ROUTES_DIR = 'vite/virtual-routes/routes';\nexport const VIRTUAL_ROUTES_ROUTES_DIR_PARTS = [\n 'vite',\n 'virtual-routes',\n 'routes',\n];\nexport const VIRTUAL_ROUTES_DIR_PARTS = ['vite', 'virtual-routes'];\n\n/**\n * @internal\n * Exported for testing only.\n */\nexport function createVirtualRoutesPath(\n baseUrl: string,\n pathParts: Array<string>,\n forFile: string,\n): string {\n const basePath = new URL('../', baseUrl);\n const virtualRoutesPath = pathParts.reduce((working, dirPart) => {\n return new URL(`${dirPart}/`, working);\n }, basePath);\n\n // Getting rid of the drive path (ie. '/C:/') in windows\n const pathname = new URL(forFile, virtualRoutesPath).pathname.replace(\n /^\\/[a-zA-Z]:\\//,\n '/',\n );\n\n // Decode URI components to handle spaces and special characters in file paths\n return decodeURIComponent(pathname);\n}\n\nfunction getVirtualRoutesPath(\n pathParts: Array<string>,\n forFile: string,\n): string {\n return createVirtualRoutesPath(import.meta.url, pathParts, forFile);\n}\n\nexport async function getVirtualRoutesV3() {\n return {\n routes: [\n {\n id: `${VIRTUAL_ROUTES_DIR}/graphiql`,\n path: 'graphiql',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n 'graphiql.jsx',\n ),\n index: false,\n },\n {\n id: `${VIRTUAL_ROUTES_DIR}/subrequest-profiler`,\n path: 'subrequest-profiler',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n 'subrequest-profiler.jsx',\n ),\n index: false,\n },\n {\n id: `${VIRTUAL_ROUTES_DIR}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,\n path: '.well-known/appspecific/com.chrome.devtools.json',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n '[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx',\n ),\n index: false,\n },\n {\n id: `${VIRTUAL_ROUTES_DIR}/index`,\n path: '',\n file: getVirtualRoutesPath(\n VIRTUAL_ROUTES_ROUTES_DIR_PARTS,\n 'index.jsx',\n ),\n index: true,\n },\n ],\n layout: {\n file: getVirtualRoutesPath(VIRTUAL_ROUTES_DIR_PARTS, 'layout.jsx'),\n },\n };\n}\n"]}