@ohos-ports/shopify 4.8.0-beta.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.
- package/README.md +75 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +11 -0
- package/dist/acorn-7M27BPGP.js +16 -0
- package/dist/analytics-3IIUBZ3B.js +1 -0
- package/dist/analytics-OOT5AB52.js +1 -0
- package/dist/angular-DW5TQVCM.js +4 -0
- package/dist/assets/graphiql/favicon.ico +0 -0
- package/dist/assets/graphiql/style.css +58 -0
- package/dist/assets/hydrogen/bundle/analyzer.html +2056 -0
- package/dist/assets/hydrogen/i18n/domains.ts +21 -0
- package/dist/assets/hydrogen/i18n/mock-i18n-types.ts +5 -0
- package/dist/assets/hydrogen/i18n/subdomains.ts +20 -0
- package/dist/assets/hydrogen/i18n/subfolders.ts +22 -0
- package/dist/assets/hydrogen/routes/locale-check.ts +16 -0
- package/dist/assets/hydrogen/starter/.cursor/rules/hydrogen-react-router.mdc +52 -0
- package/dist/assets/hydrogen/starter/.graphqlrc.ts +29 -0
- package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +2839 -0
- package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
- package/dist/assets/hydrogen/starter/README.md +45 -0
- package/dist/assets/hydrogen/starter/app/assets/favicon.svg +28 -0
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +37 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +101 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +197 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +109 -0
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +300 -0
- package/dist/assets/hydrogen/starter/app/components/Footer.tsx +129 -0
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +231 -0
- package/dist/assets/hydrogen/starter/app/components/MockShopNotice.tsx +20 -0
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +174 -0
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +61 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +150 -0
- package/dist/assets/hydrogen/starter/app/components/ProductImage.tsx +23 -0
- package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +44 -0
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +27 -0
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +68 -0
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +76 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +161 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +304 -0
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +21 -0
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +53 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerAddressMutations.ts +64 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +40 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrderQuery.ts +90 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +63 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +25 -0
- package/dist/assets/hydrogen/starter/app/lib/context.ts +65 -0
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +242 -0
- package/dist/assets/hydrogen/starter/app/lib/orderFilters.ts +90 -0
- package/dist/assets/hydrogen/starter/app/lib/redirect.ts +23 -0
- package/dist/assets/hydrogen/starter/app/lib/search.ts +79 -0
- package/dist/assets/hydrogen/starter/app/lib/session.ts +72 -0
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +46 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +209 -0
- package/dist/assets/hydrogen/starter/app/routes/$.tsx +11 -0
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +78 -0
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +16 -0
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +177 -0
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +9 -0
- package/dist/assets/hydrogen/starter/app/routes/account._index.tsx +5 -0
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +516 -0
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +222 -0
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +222 -0
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +133 -0
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +97 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.authorize.tsx +5 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +17 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +11 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +129 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +175 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +109 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.$lines.tsx +70 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +113 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +161 -0
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +133 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +122 -0
- package/dist/assets/hydrogen/starter/app/routes/discount.$code.tsx +48 -0
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +88 -0
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +93 -0
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +69 -0
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +232 -0
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +426 -0
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +23 -0
- package/dist/assets/hydrogen/starter/app/routes.ts +9 -0
- package/dist/assets/hydrogen/starter/app/styles/app.css +645 -0
- package/dist/assets/hydrogen/starter/app/styles/reset.css +139 -0
- package/dist/assets/hydrogen/starter/customer-accountapi.generated.d.ts +543 -0
- package/dist/assets/hydrogen/starter/env.d.ts +7 -0
- package/dist/assets/hydrogen/starter/eslint.config.js +247 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +394 -0
- package/dist/assets/hydrogen/starter/guides/search/search.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/search/search.md +335 -0
- package/dist/assets/hydrogen/starter/package.json +62 -0
- package/dist/assets/hydrogen/starter/public/.gitkeep +0 -0
- package/dist/assets/hydrogen/starter/react-router.config.ts +13 -0
- package/dist/assets/hydrogen/starter/server.ts +59 -0
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +1342 -0
- package/dist/assets/hydrogen/starter/tsconfig.json +43 -0
- package/dist/assets/hydrogen/starter/vite.config.ts +44 -0
- package/dist/assets/hydrogen/tailwind/package.json +11 -0
- package/dist/assets/hydrogen/tailwind/tailwind.css +6 -0
- package/dist/assets/hydrogen/vanilla-extract/package.json +8 -0
- package/dist/assets/hydrogen/virtual-routes/assets/debug-network.css +609 -0
- package/dist/assets/hydrogen/virtual-routes/assets/favicon-dark.svg +20 -0
- package/dist/assets/hydrogen/virtual-routes/assets/favicon.svg +28 -0
- package/dist/assets/hydrogen/virtual-routes/assets/inter-variable-font.woff2 +0 -0
- package/dist/assets/hydrogen/virtual-routes/assets/jetbrainsmono-variable-font.woff2 +0 -0
- package/dist/assets/hydrogen/virtual-routes/assets/styles.css +249 -0
- package/dist/assets/hydrogen/virtual-routes/components/FlameChartWrapper.jsx +123 -0
- package/dist/assets/hydrogen/virtual-routes/components/HydrogenLogoBaseBW.jsx +32 -0
- package/dist/assets/hydrogen/virtual-routes/components/HydrogenLogoBaseColor.jsx +47 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconBanner.jsx +292 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconClose.jsx +38 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconDiscard.jsx +44 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconError.jsx +61 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconGithub.jsx +23 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconTwitter.jsx +21 -0
- package/dist/assets/hydrogen/virtual-routes/components/Layout.jsx +7 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +171 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestTable.jsx +91 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestWaterfall.jsx +151 -0
- package/dist/assets/hydrogen/virtual-routes/layout.jsx +33 -0
- package/dist/assets/hydrogen/virtual-routes/lib/useDebugNetworkServer.jsx +178 -0
- package/dist/assets/hydrogen/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +37 -0
- package/dist/assets/hydrogen/virtual-routes/routes/graphiql.jsx +5 -0
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +265 -0
- package/dist/assets/hydrogen/virtual-routes/routes/subrequest-profiler.jsx +243 -0
- package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +63 -0
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +67 -0
- package/dist/assets/hydrogen/vite/package.json +13 -0
- package/dist/assets/hydrogen/vite/vite.config.js +43 -0
- package/dist/assets/speedscope/SourceCodePro-Regular.ttf.f546cbe0.woff2 +0 -0
- package/dist/assets/speedscope/demangle-cpp.1768f4cc.js +4 -0
- package/dist/assets/speedscope/favicon-16x16.f74b3187.png +0 -0
- package/dist/assets/speedscope/favicon-32x32.bc503437.png +0 -0
- package/dist/assets/speedscope/file-format-schema.json +324 -0
- package/dist/assets/speedscope/import.bcbb2033.js +123 -0
- package/dist/assets/speedscope/index.html +2 -0
- package/dist/assets/speedscope/perf-vertx-stacks-01-collapsed-all.2681da68.txt +199 -0
- package/dist/assets/speedscope/release.txt +3 -0
- package/dist/assets/speedscope/reset.8c46b7a1.css +2 -0
- package/dist/assets/speedscope/source-code-pro.52b1676f.css +2 -0
- package/dist/assets/speedscope/source-code-pro.LICENSE.md +93 -0
- package/dist/assets/speedscope/source-map.438fa06b.js +24 -0
- package/dist/assets/speedscope/speedscope.6f107512.js +193 -0
- package/dist/babel-I2RLWM7N.js +15 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chokidar-5RWEYTNQ.js +1 -0
- package/dist/chunk-2AK44UYM.js +1 -0
- package/dist/chunk-2CIZE537.js +3 -0
- package/dist/chunk-2EAFYCCS.js +16 -0
- package/dist/chunk-2KD4LHRT.js +5 -0
- package/dist/chunk-2KGPH7YG.js +2 -0
- package/dist/chunk-2O224ZPO.js +3 -0
- package/dist/chunk-2XDUJQQN.js +12 -0
- package/dist/chunk-36ROOKQB.js +1 -0
- package/dist/chunk-3DCN3N23.js +4 -0
- package/dist/chunk-3JXPOOFV.js +836 -0
- package/dist/chunk-4QBJ5JBX.js +18 -0
- package/dist/chunk-4ZNV5YSL.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/chunk-5L63PRJL.js +2 -0
- package/dist/chunk-5N6HNQQ5.js +8 -0
- package/dist/chunk-5SEEDOQ5.js +1 -0
- package/dist/chunk-636CTEW7.js +1 -0
- package/dist/chunk-67Z34HN5.js +5 -0
- package/dist/chunk-6BDAJ6UD.js +5 -0
- package/dist/chunk-6CXG3XLP.js +1 -0
- package/dist/chunk-6MWWJZFN.js +19 -0
- package/dist/chunk-6QDOCBD4.js +6 -0
- package/dist/chunk-6RQOEPEC.js +1 -0
- package/dist/chunk-72ZY3KTF.js +1 -0
- package/dist/chunk-742XXXGL.js +6 -0
- package/dist/chunk-773TIA5M.js +2 -0
- package/dist/chunk-7HFHL5SO.js +2 -0
- package/dist/chunk-7ISJRIPT.js +1 -0
- package/dist/chunk-7LWUHQIF.js +1 -0
- package/dist/chunk-7T6M7FAC.js +103 -0
- package/dist/chunk-7UNQOKZW.js +1 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-A6BMJISP.js +8 -0
- package/dist/chunk-AAK376RT.js +2 -0
- package/dist/chunk-AEUCDGTB.js +294 -0
- package/dist/chunk-AWUX36VG.js +1 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BOAGJ6P5.js +1 -0
- package/dist/chunk-BWJIZYAG.js +1 -0
- package/dist/chunk-BZ73NV3L.js +2 -0
- package/dist/chunk-C3RUVXG2.js +6 -0
- package/dist/chunk-C4YLE3NS.js +64 -0
- package/dist/chunk-CEYIZC3M.js +2 -0
- package/dist/chunk-CIWKN4HF.js +7 -0
- package/dist/chunk-CRALWNNO.js +1 -0
- package/dist/chunk-CTNBSUVU.js +83 -0
- package/dist/chunk-CULTZLC4.js +1 -0
- package/dist/chunk-CX5CC6P5.js +1 -0
- package/dist/chunk-CX75OKZK.js +1 -0
- package/dist/chunk-DASVZTAX.js +359 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/chunk-DX3JLOUA.js +4 -0
- package/dist/chunk-E55KS3GZ.js +1 -0
- package/dist/chunk-E5FXOLQO.js +17 -0
- package/dist/chunk-E6N4PZZR.js +7 -0
- package/dist/chunk-EB574SY6.js +6 -0
- package/dist/chunk-ET2CGROE.js +451 -0
- package/dist/chunk-EX5GVHGE.js +1 -0
- package/dist/chunk-F3NYCSXT.js +273 -0
- package/dist/chunk-F3TMLDLC.js +1 -0
- package/dist/chunk-F6X6OXXB.js +3 -0
- package/dist/chunk-FDBHQLFK.js +1 -0
- package/dist/chunk-FDYW3UQC.js +1 -0
- package/dist/chunk-FEDVVYK2.js +1 -0
- package/dist/chunk-FFSDGRAN.js +1 -0
- package/dist/chunk-FJ6F4XRV.js +28 -0
- package/dist/chunk-FKIVKNOV.js +2 -0
- package/dist/chunk-FOREMLFZ.js +1 -0
- package/dist/chunk-FUYDGK33.js +2 -0
- package/dist/chunk-FX3L344E.js +1 -0
- package/dist/chunk-G5XIGN5D.js +593 -0
- package/dist/chunk-GAYKYEIM.js +1 -0
- package/dist/chunk-GB3YC4TI.js +1 -0
- package/dist/chunk-GCN4O7HM.js +1 -0
- package/dist/chunk-GCY7LPEF.js +6 -0
- package/dist/chunk-GNBRCK7L.js +3 -0
- package/dist/chunk-GRPKF5ZB.js +1 -0
- package/dist/chunk-GRSF7456.js +1 -0
- package/dist/chunk-H2TQ4ODI.js +1 -0
- package/dist/chunk-H6XEESUN.js +4 -0
- package/dist/chunk-HB347DXT.js +2 -0
- package/dist/chunk-HFSCXTJQ.js +97 -0
- package/dist/chunk-HHN6KZXX.js +1 -0
- package/dist/chunk-HP64ZTEJ.js +6 -0
- package/dist/chunk-I5A6BPCP.js +1 -0
- package/dist/chunk-IARCMH7G.js +5 -0
- package/dist/chunk-IBI5UCJO.js +1 -0
- package/dist/chunk-IKUSLRGD.js +1 -0
- package/dist/chunk-IT4HYLTY.js +1 -0
- package/dist/chunk-IWOTLFOY.js +32 -0
- package/dist/chunk-J3JPJCWP.js +1 -0
- package/dist/chunk-J4T73EAS.js +8 -0
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JG4HH54Q.js +1 -0
- package/dist/chunk-JIYSCWCG.js +1 -0
- package/dist/chunk-JJZNUFPD.js +44 -0
- package/dist/chunk-JLGA3B7P.js +1 -0
- package/dist/chunk-JWRK5KLD.js +560 -0
- package/dist/chunk-JX7FYWPO.js +1 -0
- package/dist/chunk-K42WBNJQ.js +18 -0
- package/dist/chunk-KDU7VW3L.js +11 -0
- package/dist/chunk-KWVOJWO7.js +1 -0
- package/dist/chunk-LANUJ7LX.js +16 -0
- package/dist/chunk-LD6ZCTZ3.js +9 -0
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/chunk-LQ7ENG4V.js +1 -0
- package/dist/chunk-LUKQ5HLC.js +1 -0
- package/dist/chunk-M2XHIN57.js +4 -0
- package/dist/chunk-MNOQAXJW.js +3 -0
- package/dist/chunk-MPW2YJWU.js +31 -0
- package/dist/chunk-MYQUYU4U.js +2 -0
- package/dist/chunk-N65F7ET2.js +1 -0
- package/dist/chunk-N6RBRPGW.js +7 -0
- package/dist/chunk-N75VOJHO.js +15 -0
- package/dist/chunk-NBFMP5XQ.js +1 -0
- package/dist/chunk-NE3ZFSMS.js +1 -0
- package/dist/chunk-NGLMZYS7.js +278 -0
- package/dist/chunk-NHAUJWEG.js +1 -0
- package/dist/chunk-NILETICC.js +11 -0
- package/dist/chunk-NNZXKFOS.js +7 -0
- package/dist/chunk-NQK2VCDA.js +1 -0
- package/dist/chunk-NROVZETL.js +1 -0
- package/dist/chunk-NW6NUGN7.js +1 -0
- package/dist/chunk-O7DZXO3O.js +15 -0
- package/dist/chunk-OBYQSIYU.js +25 -0
- package/dist/chunk-OEG3N5PG.js +15 -0
- package/dist/chunk-OGBZTY2G.js +5 -0
- package/dist/chunk-OMHR423H.js +1 -0
- package/dist/chunk-OV6SRRXR.js +5 -0
- package/dist/chunk-OVV5YGKN.js +1 -0
- package/dist/chunk-OZL5FTT7.js +1 -0
- package/dist/chunk-OZMQ2EJB.js +1 -0
- package/dist/chunk-P2OI2P2M.js +1 -0
- package/dist/chunk-P57P7UAN.js +3 -0
- package/dist/chunk-PATTG7YZ.js +1 -0
- package/dist/chunk-PG5YNPJB.js +26 -0
- package/dist/chunk-PP4L2JJ6.js +3 -0
- package/dist/chunk-Q5JX23QU.js +1 -0
- package/dist/chunk-Q5KVMLBK.js +4 -0
- package/dist/chunk-Q5LIJGT7.js +12 -0
- package/dist/chunk-Q6ADIMJM.js +6 -0
- package/dist/chunk-Q7BOSHWX.js +7 -0
- package/dist/chunk-QERQARMC.js +1 -0
- package/dist/chunk-QOV43E26.js +1 -0
- package/dist/chunk-QTFUYKMF.js +1 -0
- package/dist/chunk-QTJCCOAG.js +20 -0
- package/dist/chunk-R6ICQT2D.js +1 -0
- package/dist/chunk-R7T3LYJL.js +3 -0
- package/dist/chunk-RJ5VF3QY.js +2 -0
- package/dist/chunk-RXQJCJDV.js +1 -0
- package/dist/chunk-S2TLBBSS.js +5 -0
- package/dist/chunk-S5FOQY35.js +1 -0
- package/dist/chunk-SYLHT42O.js +1 -0
- package/dist/chunk-T4AA6TSF.js +15 -0
- package/dist/chunk-T4QWK5GG.js +10 -0
- package/dist/chunk-T7KHS6RF.js +1 -0
- package/dist/chunk-T7PJDT5O.js +6 -0
- package/dist/chunk-TEY4LRY7.js +1 -0
- package/dist/chunk-TFBRVLDN.js +1 -0
- package/dist/chunk-TOLPNBZK.js +4 -0
- package/dist/chunk-TR4OWSEX.js +77 -0
- package/dist/chunk-TU47HMTL.js +1 -0
- package/dist/chunk-TUVDJ3PG.js +2 -0
- package/dist/chunk-TYMYIUIQ.js +1 -0
- package/dist/chunk-U2DWBZK2.js +1 -0
- package/dist/chunk-U53OLUOE.js +3 -0
- package/dist/chunk-UAETNFN4.js +1 -0
- package/dist/chunk-UAFEFKAQ.js +5 -0
- package/dist/chunk-ULRJDKWQ.js +1 -0
- package/dist/chunk-UOHNRH6E.js +7 -0
- package/dist/chunk-UZARYOLN.js +1 -0
- package/dist/chunk-VASGXHYA.js +1 -0
- package/dist/chunk-VD4XJ6BX.js +1 -0
- package/dist/chunk-VE35YELD.js +1 -0
- package/dist/chunk-VFM2KQRM.js +19 -0
- package/dist/chunk-VJEKDBGZ.js +1 -0
- package/dist/chunk-VKWPEFWQ.js +1 -0
- package/dist/chunk-VSDRNYA5.js +1 -0
- package/dist/chunk-VUMUCNI7.js +1 -0
- package/dist/chunk-VVZSYHDG.js +4 -0
- package/dist/chunk-VXEYO3ZP.js +1 -0
- package/dist/chunk-VYDSOAV4.js +9 -0
- package/dist/chunk-W6ST525S.js +99 -0
- package/dist/chunk-WBYAGS6B.js +6 -0
- package/dist/chunk-WGAFCKGD.js +1 -0
- package/dist/chunk-WYBTC356.js +1 -0
- package/dist/chunk-XF2KTEID.js +1 -0
- package/dist/chunk-XH5YGJQR.js +1 -0
- package/dist/chunk-XHKWITLA.js +1705 -0
- package/dist/chunk-XOCB4KNX.js +2 -0
- package/dist/chunk-XUUAKGEX.js +1 -0
- package/dist/chunk-XUYVJEZG.js +3 -0
- package/dist/chunk-Y47C3LSX.js +3 -0
- package/dist/chunk-Y5PRPHLQ.js +6 -0
- package/dist/chunk-YD2VQEN5.js +1 -0
- package/dist/chunk-YESGYUEL.js +1 -0
- package/dist/chunk-YEVGLC5X.js +1 -0
- package/dist/chunk-YFINLODF.js +375 -0
- package/dist/chunk-YKL3BLWC.js +46 -0
- package/dist/chunk-YLQ3LNNY.js +99 -0
- package/dist/chunk-YLXPYXQP.js +1 -0
- package/dist/chunk-YNDIZCD2.js +7 -0
- package/dist/chunk-YPWHD3NL.js +1 -0
- package/dist/chunk-YSAFHVV6.js +8 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-YZMY2CTU.js +10 -0
- package/dist/chunk-Z4AFEO36.js +1 -0
- package/dist/chunk-Z5WPP6ME.js +1 -0
- package/dist/chunk-Z65E4UAP.js +1 -0
- package/dist/chunk-ZDF5N422.js +1 -0
- package/dist/chunk-ZDRIQC7O.js +1 -0
- package/dist/chunk-ZH44BDUR.js +5 -0
- package/dist/chunk-ZI7LK3LW.js +11 -0
- package/dist/chunk-ZL5LU4U2.js +32 -0
- package/dist/chunk-ZYX7UHCQ.js +1 -0
- package/dist/chunk-ZZRFG6ME.js +317 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +1 -0
- package/dist/cli/commands/app/bulk/status.js +1 -0
- package/dist/cli/commands/app/config/link.js +1 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +1 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +1 -0
- package/dist/cli/commands/app/dev/clean.js +1 -0
- package/dist/cli/commands/app/dev.js +1 -0
- package/dist/cli/commands/app/doctor/instructions.js +1 -0
- package/dist/cli/commands/app/doctor.js +1 -0
- package/dist/cli/commands/app/env/pull.js +1 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +1 -0
- package/dist/cli/commands/app/function/replay.js +1 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +1 -0
- package/dist/cli/commands/app/graphiql.js +1 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +1 -0
- package/dist/cli/commands/app/init.js +1 -0
- package/dist/cli/commands/app/logs.js +1 -0
- package/dist/cli/commands/app/release.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +1 -0
- package/dist/cli/commands/auth/login.d.ts +8 -0
- package/dist/cli/commands/auth/login.js +1 -0
- package/dist/cli/commands/auth/logout.d.ts +5 -0
- package/dist/cli/commands/auth/logout.js +1 -0
- package/dist/cli/commands/cache/clear.d.ts +6 -0
- package/dist/cli/commands/cache/clear.js +1 -0
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +4 -0
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -0
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/off.js +1 -0
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/on.js +1 -0
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/status.js +1 -0
- package/dist/cli/commands/debug/command-flags.d.ts +9 -0
- package/dist/cli/commands/debug/command-flags.js +1 -0
- package/dist/cli/commands/doc/fetch.d.ts +12 -0
- package/dist/cli/commands/doc/fetch.js +1 -0
- package/dist/cli/commands/doc/search.d.ts +13 -0
- package/dist/cli/commands/doc/search.js +1 -0
- package/dist/cli/commands/docs/generate.d.ts +21 -0
- package/dist/cli/commands/docs/generate.js +1 -0
- package/dist/cli/commands/doctor-release/doctor-release.d.ts +6 -0
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -0
- package/dist/cli/commands/doctor-release/theme/index.d.ts +14 -0
- package/dist/cli/commands/doctor-release/theme/index.js +1 -0
- package/dist/cli/commands/help.d.ts +13 -0
- package/dist/cli/commands/help.js +1 -0
- package/dist/cli/commands/kitchen-sink/async.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/async.js +1 -0
- package/dist/cli/commands/kitchen-sink/index.d.ts +12 -0
- package/dist/cli/commands/kitchen-sink/index.js +1 -0
- package/dist/cli/commands/kitchen-sink/prompts.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -0
- package/dist/cli/commands/kitchen-sink/static.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/static.js +1 -0
- package/dist/cli/commands/notifications/generate.d.ts +6 -0
- package/dist/cli/commands/notifications/generate.js +1 -0
- package/dist/cli/commands/notifications/list.d.ts +9 -0
- package/dist/cli/commands/notifications/list.js +1 -0
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.d.ts +14 -0
- package/dist/cli/commands/search.js +1 -0
- package/dist/cli/commands/send-analytics.d.ts +5 -0
- package/dist/cli/commands/send-analytics.js +1 -0
- package/dist/cli/commands/theme/check.js +1 -0
- package/dist/cli/commands/theme/console.js +1 -0
- package/dist/cli/commands/theme/delete.js +1 -0
- package/dist/cli/commands/theme/dev.js +1 -0
- package/dist/cli/commands/theme/duplicate.js +1 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +1 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +1 -0
- package/dist/cli/commands/theme/open.js +1 -0
- package/dist/cli/commands/theme/package.js +1 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +1 -0
- package/dist/cli/commands/theme/publish.js +1 -0
- package/dist/cli/commands/theme/pull.js +1 -0
- package/dist/cli/commands/theme/push.js +1 -0
- package/dist/cli/commands/theme/rename.js +1 -0
- package/dist/cli/commands/theme/share.js +1 -0
- package/dist/cli/commands/upgrade.d.ts +7 -0
- package/dist/cli/commands/upgrade.js +1 -0
- package/dist/cli/commands/version.d.ts +5 -0
- package/dist/cli/commands/version.js +1 -0
- package/dist/cli/help.d.ts +38 -0
- package/dist/cli/help.js +2 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
- package/dist/cli/services/commands/doc/fetch.js +45 -0
- package/dist/cli/services/commands/doc/search.d.ts +1 -0
- package/dist/cli/services/commands/doc/search.js +47 -0
- package/dist/cli/services/commands/notifications.d.ts +2 -0
- package/dist/cli/services/commands/notifications.js +106 -0
- package/dist/cli/services/commands/search.d.ts +1 -0
- package/dist/cli/services/commands/search.js +7 -0
- package/dist/cli/services/commands/version.d.ts +1 -0
- package/dist/cli/services/commands/version.js +6 -0
- package/dist/cli/services/doctor-release/context.d.ts +16 -0
- package/dist/cli/services/doctor-release/context.js +11 -0
- package/dist/cli/services/doctor-release/theme/runner.d.ts +7 -0
- package/dist/cli/services/doctor-release/theme/runner.js +37 -0
- package/dist/cli/services/doctor-release/theme/tests/init.d.ts +11 -0
- package/dist/cli/services/doctor-release/theme/tests/init.js +34 -0
- package/dist/cli/services/doctor-release/theme/tests/push.d.ts +10 -0
- package/dist/cli/services/doctor-release/theme/tests/push.js +44 -0
- package/dist/cli/services/kitchen-sink/async.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/async.js +65 -0
- package/dist/cli/services/kitchen-sink/prompts.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/prompts.js +168 -0
- package/dist/cli/services/kitchen-sink/static.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/static.js +201 -0
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-ASDCTDQ4.js +1 -0
- package/dist/configs/all.yml +280 -0
- package/dist/configs/nothing.yml +3 -0
- package/dist/configs/recommended.yml +258 -0
- package/dist/configs/theme-app-extension.yml +24 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/data/app_block_entry.json +13 -0
- package/dist/data/default_setting_values.json +24 -0
- package/dist/data/filters.json +6177 -0
- package/dist/data/latest.json +2 -0
- package/dist/data/local_block_entry.json +25 -0
- package/dist/data/manifest_theme.json +19 -0
- package/dist/data/manifest_theme_app_extension.json +10 -0
- package/dist/data/objects.json +20621 -0
- package/dist/data/preset.json +72 -0
- package/dist/data/preset_blocks.json +91 -0
- package/dist/data/section.json +208 -0
- package/dist/data/setting.json +1538 -0
- package/dist/data/settings.json +10 -0
- package/dist/data/shopify_system_translations.json +2766 -0
- package/dist/data/tags.json +1276 -0
- package/dist/data/targetted_block_entry.json +15 -0
- package/dist/data/theme_block.json +91 -0
- package/dist/data/theme_block_entry.json +14 -0
- package/dist/data/theme_settings.json +83 -0
- package/dist/data/translations.json +63 -0
- package/dist/deprecations-VBQV7Q4O.js +1 -0
- package/dist/devtools-37DE4MUR.js +1 -0
- package/dist/devtools-WAWU5KQL.js +1 -0
- package/dist/dist-FZLOAKU7.js +1 -0
- package/dist/dist-HTY6UHG5.js +1 -0
- package/dist/environments-HSTNEQRG.js +1 -0
- package/dist/error-2LZYKRMA.js +1 -0
- package/dist/error-handler-PIGEJ7BT.js +1 -0
- package/dist/estree-JV5M77BA.js +44 -0
- package/dist/flow-N4JYPYMQ.js +20 -0
- package/dist/fs-BJHNJDDK.js +1 -0
- package/dist/glimmer-JEV3BXHR.js +37 -0
- package/dist/graphql-DTF6MHYF.js +28 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.d.ts +1 -0
- package/dist/hooks/postrun.js +1 -0
- package/dist/hooks/prerun.d.ts +1 -0
- package/dist/hooks/prerun.js +2 -0
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/html-LVOJ3RQS.js +25 -0
- package/dist/http-proxy-node16-A6AKKRQH.js +38 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +120 -0
- package/dist/is-global-6SCOAJVG.js +1 -0
- package/dist/latest-version-LDWU5F7A.js +49 -0
- package/dist/lib-2BR2WN7L.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/lib-O5EZ4NVT.js +1 -0
- package/dist/lib-P3APEIHY.js +1 -0
- package/dist/local-PZWPRFU7.js +1 -0
- package/dist/markdown-J6CE6POI.js +62 -0
- package/dist/meriyah-PNQQZQYI.js +5 -0
- package/dist/metadata-VVBHB3HL.js +1 -0
- package/dist/morph-BMYYMQNX.js +30489 -0
- package/dist/multipart-parser-5NSSTW27.js +2 -0
- package/dist/node-package-manager-ETYQN7OM.js +1 -0
- package/dist/notifications-system-652OG5KL.js +1 -0
- package/dist/npa-A4YSCQ5Q.js +1 -0
- package/dist/open-KLSGXBIW.js +1 -0
- package/dist/os-7D6NT4O3.js +1 -0
- package/dist/out-53ABAVL7.js +1 -0
- package/dist/output-74VDGYJD.js +1 -0
- package/dist/path-MBXP7ZIC.js +1 -0
- package/dist/postcss-Q36SHOML.js +61 -0
- package/dist/prettier-EGVCP5CY.js +1 -0
- package/dist/source-map-E7FCCJL7.js +1 -0
- package/dist/system-P5QIJALL.js +1 -0
- package/dist/templates/ui-extensions/html/error.html.liquid +41 -0
- package/dist/templates/ui-extensions/html/post_purchase/index.html.liquid +44 -0
- package/dist/templates/ui-extensions/html/post_purchase/tunnel-error.html.liquid +41 -0
- package/dist/templates/ui-extensions/html/tunnel-error.html.liquid +55 -0
- package/dist/toml_patch_bg.wasm +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/typescript-5R4Y7PXE.js +1 -0
- package/dist/typescript-WYPDGPSV.js +21 -0
- package/dist/ui-H5I5YVKV.js +1 -0
- package/dist/upgrade-34HSYBXI.js +1 -0
- package/dist/vendor/esbuild-ohos/lib/main.js +2538 -0
- package/dist/vendor/esbuild-ohos/package.json +7 -0
- package/dist/version-EKXEAF6Q.js +1 -0
- package/dist/version-J2PYO6M5.js +1 -0
- package/dist/workerd-X4TGHEG3.js +18 -0
- package/dist/yaml-6KWCJ64X.js +159 -0
- package/dist/yoga.wasm +0 -0
- package/oclif.manifest.json +10100 -0
- package/package.json +153 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CommandHelp, Help } from '@oclif/core';
|
|
2
|
+
import type { Command } from '@oclif/core';
|
|
3
|
+
type HelpSectionBody = Parameters<CommandHelp['section']>[1];
|
|
4
|
+
/**
|
|
5
|
+
* Custom command-help renderer that relocates the `[env: ...]` metadata to the
|
|
6
|
+
* end of a flag's description instead of the front.
|
|
7
|
+
*
|
|
8
|
+
* Since oclif 4.8, flag help renders the backing environment variable inline
|
|
9
|
+
* *before* the description, e.g.:
|
|
10
|
+
*
|
|
11
|
+
* -j, --json [env: SHOPIFY_FLAG_JSON] Output the result as JSON.
|
|
12
|
+
*
|
|
13
|
+
* Because Shopify CLI's `SHOPIFY_FLAG_*` names are long, that pushes the actual
|
|
14
|
+
* description far to the right and hurts readability. We keep the information
|
|
15
|
+
* (it's useful for scripting and agents) but move it to the end:
|
|
16
|
+
*
|
|
17
|
+
* -j, --json
|
|
18
|
+
* Output the result as JSON.
|
|
19
|
+
* [env: SHOPIFY_FLAG_JSON]
|
|
20
|
+
*
|
|
21
|
+
* We do this by cloning each flag, clearing its `env`, and appending the env
|
|
22
|
+
* label as a trailing summary line before delegating to oclif's own `flags()`
|
|
23
|
+
* renderer. Flag sections then use oclif's multiline list layout so long env
|
|
24
|
+
* labels get the full terminal width instead of being split inside the name.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ShopifyCommandHelp extends CommandHelp {
|
|
27
|
+
section(header: string, body: HelpSectionBody): string;
|
|
28
|
+
protected flags(flags: Command.Flag.Any[]): [string, string | undefined][] | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Custom help class, wired up via `oclif.helpClass` in this package's
|
|
32
|
+
* `package.json`. It only swaps in {@link ShopifyCommandHelp}; everything else
|
|
33
|
+
* uses oclif's default help behaviour.
|
|
34
|
+
*/
|
|
35
|
+
export default class ShopifyHelp extends Help {
|
|
36
|
+
protected CommandHelpClass: typeof ShopifyCommandHelp;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
package/dist/cli/help.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u}from"../chunk-CTNBSUVU.js";import"../chunk-TR4OWSEX.js";import"../chunk-2KD4LHRT.js";import"../chunk-I5A6BPCP.js";import"../chunk-CX5CC6P5.js";import"../chunk-ET2CGROE.js";import"../chunk-TOLPNBZK.js";import"../chunk-CRALWNNO.js";import{e as c,g as m}from"../chunk-VKWPEFWQ.js";m();var s=c(u(),1);function a(r){return Array.isArray(r)&&r.every(e=>Array.isArray(e))}var i=class extends s.CommandHelp{section(e,t){return e.endsWith("FLAGS")&&a(t)?super.section(e,this.renderList(t,{indentation:2,multiline:!0,stripAnsi:this.opts.stripAnsi})):super.section(e,t)}flags(e){let t=e.map(n=>{if(!n.env)return n;let d=n.summary??n.description??"",p=`[env: ${n.env}]`;return{...n,env:void 0,summary:d===""?p:`${d}
|
|
2
|
+
${p}`}});return super.flags(t)}},o=class extends s.Help{CommandHelpClass=i};export{i as ShopifyCommandHelp,o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function docFetchService(url: string, outputPath?: string): Promise<void>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { fetch } from '@shopify/cli-kit/node/http';
|
|
2
|
+
import { outputInfo, outputResult } from '@shopify/cli-kit/node/output';
|
|
3
|
+
import { AbortError } from '@shopify/cli-kit/node/error';
|
|
4
|
+
import { mkdir, writeFile } from '@shopify/cli-kit/node/fs';
|
|
5
|
+
import { dirname, resolvePath } from '@shopify/cli-kit/node/path';
|
|
6
|
+
// Every page on shopify.dev has a Markdown representation, which is the clean,
|
|
7
|
+
// parseable content agents want — so we always request it.
|
|
8
|
+
const MARKDOWN_CONTENT_TYPE = 'text/markdown';
|
|
9
|
+
// Identifies the CLI as the calling surface to shopify.dev, so traffic
|
|
10
|
+
// originating from the CLI can be attributed as such.
|
|
11
|
+
const SURFACE_HEADER = 'X-Shopify-Surface';
|
|
12
|
+
const SURFACE = 'cli';
|
|
13
|
+
// Hosts whose documents are allowed to be fetched. A URL matches when its
|
|
14
|
+
// hostname is one of these or a subdomain of one of these.
|
|
15
|
+
const ALLOWED_HOSTS = ['shopify.dev'];
|
|
16
|
+
export async function docFetchService(url, outputPath) {
|
|
17
|
+
let parsedURL;
|
|
18
|
+
try {
|
|
19
|
+
parsedURL = new URL(url);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
throw new AbortError(`Invalid URL: ${url}`);
|
|
23
|
+
}
|
|
24
|
+
const { hostname } = parsedURL;
|
|
25
|
+
const isAllowed = ALLOWED_HOSTS.some((host) => hostname === host || hostname.endsWith(`.${host}`));
|
|
26
|
+
if (!isAllowed) {
|
|
27
|
+
throw new AbortError(`Only documents from the following hosts can be fetched: ${ALLOWED_HOSTS.join(', ')}.`);
|
|
28
|
+
}
|
|
29
|
+
const response = await fetch(url, { headers: { Accept: MARKDOWN_CONTENT_TYPE, [SURFACE_HEADER]: SURFACE } });
|
|
30
|
+
if (!response.ok) {
|
|
31
|
+
throw new AbortError(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);
|
|
32
|
+
}
|
|
33
|
+
const body = await response.text();
|
|
34
|
+
// When an output path is provided, write the document to disk (creating any
|
|
35
|
+
// missing parent directories) instead of printing it to stdout.
|
|
36
|
+
if (outputPath) {
|
|
37
|
+
const absolutePath = resolvePath(outputPath);
|
|
38
|
+
await mkdir(dirname(absolutePath));
|
|
39
|
+
await writeFile(absolutePath, body);
|
|
40
|
+
outputInfo(`Saved ${url} to ${absolutePath}`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
outputResult(body);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function docSearchService(query: string, apiName?: string, apiVersion?: string): Promise<void>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { shopifyFetch } from '@shopify/cli-kit/node/http';
|
|
2
|
+
import { outputResult } from '@shopify/cli-kit/node/output';
|
|
3
|
+
import { AbortError } from '@shopify/cli-kit/node/error';
|
|
4
|
+
// The dev-assistant search endpoint queries the shopify.dev vector store and
|
|
5
|
+
// returns an array of matching documentation chunks as JSON.
|
|
6
|
+
const SEARCH_URL = 'https://shopify.dev/assistant/search';
|
|
7
|
+
// Identifies the CLI as the calling surface to shopify.dev, so traffic
|
|
8
|
+
// originating from the CLI can be attributed as such.
|
|
9
|
+
const SURFACE_HEADER = 'X-Shopify-Surface';
|
|
10
|
+
const SURFACE = 'cli';
|
|
11
|
+
export async function docSearchService(query, apiName, apiVersion) {
|
|
12
|
+
const params = new URLSearchParams({ query });
|
|
13
|
+
if (apiName)
|
|
14
|
+
params.append('api_name', apiName);
|
|
15
|
+
if (apiVersion)
|
|
16
|
+
params.append('api_version', apiVersion);
|
|
17
|
+
let response;
|
|
18
|
+
try {
|
|
19
|
+
response = await shopifyFetch(`${SEARCH_URL}?${params.toString()}`, {
|
|
20
|
+
headers: { Accept: 'application/json', [SURFACE_HEADER]: SURFACE },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// shopifyFetch retries transient failures; reaching here means the request
|
|
25
|
+
// could not complete (offline, DNS failure, TLS error, timeout, etc.).
|
|
26
|
+
throw new AbortError('Could not reach shopify.dev to run the search.', 'Check your network connection and try again.');
|
|
27
|
+
}
|
|
28
|
+
const body = await response.text();
|
|
29
|
+
if (!response.ok) {
|
|
30
|
+
// The endpoint returns a JSON `{error}` body for 400s (e.g. an invalid api_version
|
|
31
|
+
// lists the valid versions) — surface it directly instead of a bare status code.
|
|
32
|
+
let message = `${response.status} ${response.statusText}`;
|
|
33
|
+
try {
|
|
34
|
+
const parsed = JSON.parse(body);
|
|
35
|
+
if (parsed?.error)
|
|
36
|
+
message = parsed.error;
|
|
37
|
+
}
|
|
38
|
+
catch (parseError) {
|
|
39
|
+
// Body wasn't JSON; fall back to the status line. Rethrow anything unexpected.
|
|
40
|
+
if (!(parseError instanceof SyntaxError))
|
|
41
|
+
throw parseError;
|
|
42
|
+
}
|
|
43
|
+
throw new AbortError(`Search failed: ${message}`);
|
|
44
|
+
}
|
|
45
|
+
outputResult(body);
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { CLI_KIT_VERSION } from '@shopify/cli-kit/common/version';
|
|
2
|
+
import { randomUUID } from '@shopify/cli-kit/node/crypto';
|
|
3
|
+
import { writeFile } from '@shopify/cli-kit/node/fs';
|
|
4
|
+
import { stringifyFilters, getNotifications, fetchNotifications, } from '@shopify/cli-kit/node/notifications-system';
|
|
5
|
+
import { outputInfo } from '@shopify/cli-kit/node/output';
|
|
6
|
+
import { renderSelectPrompt, renderTextPrompt, renderSuccess, renderTable } from '@shopify/cli-kit/node/ui';
|
|
7
|
+
export async function generate() {
|
|
8
|
+
const today = new Date();
|
|
9
|
+
const formattedToday = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, '0')}-${today
|
|
10
|
+
.getDate()
|
|
11
|
+
.toString()
|
|
12
|
+
.padStart(2, '0')}`;
|
|
13
|
+
const id = randomUUID();
|
|
14
|
+
const type = await renderSelectPrompt({
|
|
15
|
+
message: 'Type of message?',
|
|
16
|
+
choices: [
|
|
17
|
+
{ label: 'Info', value: 'info' },
|
|
18
|
+
{ label: 'Warning', value: 'warning' },
|
|
19
|
+
{ label: 'Error', value: 'error' },
|
|
20
|
+
],
|
|
21
|
+
});
|
|
22
|
+
const title = await renderTextPrompt({
|
|
23
|
+
message: 'Title',
|
|
24
|
+
});
|
|
25
|
+
const message = await renderTextPrompt({
|
|
26
|
+
message: 'Message',
|
|
27
|
+
});
|
|
28
|
+
const frequency = await renderSelectPrompt({
|
|
29
|
+
message: 'Frequency',
|
|
30
|
+
choices: [
|
|
31
|
+
{ label: 'Only once', value: 'once' },
|
|
32
|
+
{ label: 'Once a week', value: 'once_a_week' },
|
|
33
|
+
{ label: 'Once a day', value: 'once_a_day' },
|
|
34
|
+
{ label: 'Always', value: 'always' },
|
|
35
|
+
],
|
|
36
|
+
});
|
|
37
|
+
const minVersion = await renderTextPrompt({
|
|
38
|
+
message: 'Minimum CLI version (optional)',
|
|
39
|
+
initialAnswer: CLI_KIT_VERSION,
|
|
40
|
+
allowEmpty: true,
|
|
41
|
+
});
|
|
42
|
+
const maxVersion = await renderTextPrompt({
|
|
43
|
+
message: 'Maximum CLI version (optional)',
|
|
44
|
+
initialAnswer: CLI_KIT_VERSION,
|
|
45
|
+
allowEmpty: true,
|
|
46
|
+
});
|
|
47
|
+
const minDate = await renderTextPrompt({
|
|
48
|
+
message: 'Minimum date in YYYY-MM-DD format (optional)',
|
|
49
|
+
initialAnswer: formattedToday,
|
|
50
|
+
allowEmpty: true,
|
|
51
|
+
});
|
|
52
|
+
const maxDate = await renderTextPrompt({
|
|
53
|
+
message: 'Maximum date in YYYY-MM-DD format (optional)',
|
|
54
|
+
initialAnswer: formattedToday,
|
|
55
|
+
allowEmpty: true,
|
|
56
|
+
});
|
|
57
|
+
const surface = await renderTextPrompt({
|
|
58
|
+
message: 'Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)',
|
|
59
|
+
allowEmpty: true,
|
|
60
|
+
});
|
|
61
|
+
const commands = await renderTextPrompt({
|
|
62
|
+
message: 'Comma separated list of commands. E.g.: app:generate:extension (optional)',
|
|
63
|
+
allowEmpty: true,
|
|
64
|
+
});
|
|
65
|
+
const ownerChannel = await renderTextPrompt({
|
|
66
|
+
message: 'Slack channel of the team who will own this notification',
|
|
67
|
+
});
|
|
68
|
+
const notifications = await getNotifications();
|
|
69
|
+
const notification = {
|
|
70
|
+
id,
|
|
71
|
+
type,
|
|
72
|
+
title,
|
|
73
|
+
frequency,
|
|
74
|
+
message,
|
|
75
|
+
minVersion: minVersion.length === 0 ? undefined : minVersion,
|
|
76
|
+
maxVersion: maxVersion.length === 0 ? undefined : maxVersion,
|
|
77
|
+
minDate: minDate.length === 0 ? undefined : minDate,
|
|
78
|
+
maxDate: maxDate.length === 0 ? undefined : maxDate,
|
|
79
|
+
surface: surface.length === 0 ? undefined : surface,
|
|
80
|
+
commands: commands.length === 0 ? undefined : commands.split(',').map((command) => command.trim()),
|
|
81
|
+
ownerChannel,
|
|
82
|
+
};
|
|
83
|
+
notifications.notifications.push(notification);
|
|
84
|
+
await writeFile('./notifications.json', JSON.stringify(notifications));
|
|
85
|
+
renderSuccess({ headline: 'notifications.json file updated successfully.' });
|
|
86
|
+
}
|
|
87
|
+
export async function list() {
|
|
88
|
+
const notifications = await fetchNotifications();
|
|
89
|
+
const columns = {
|
|
90
|
+
type: { header: 'Type', color: 'dim' },
|
|
91
|
+
title: { header: 'Title', color: 'dim' },
|
|
92
|
+
message: { header: 'Message', color: 'dim' },
|
|
93
|
+
filters: { header: 'Filters', color: 'dim' },
|
|
94
|
+
};
|
|
95
|
+
const rows = notifications.notifications.map((notification) => {
|
|
96
|
+
return {
|
|
97
|
+
type: notification.type,
|
|
98
|
+
title: notification.title ?? '',
|
|
99
|
+
message: notification.message,
|
|
100
|
+
filters: stringifyFilters(notification),
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
renderTable({ rows, columns });
|
|
104
|
+
outputInfo('\n');
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function searchService(query?: string): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { openURL } from '@shopify/cli-kit/node/system';
|
|
2
|
+
export async function searchService(query) {
|
|
3
|
+
const searchParams = new URLSearchParams();
|
|
4
|
+
searchParams.append('search', query ?? '');
|
|
5
|
+
await openURL(`https://shopify.dev?${searchParams.toString()}`);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function versionService(): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DoctorContext } from '@shopify/cli-kit/node/doctor/types';
|
|
2
|
+
export interface ThemeDoctorContext extends DoctorContext {
|
|
3
|
+
environment: string;
|
|
4
|
+
store?: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
themeName?: string;
|
|
7
|
+
themePath?: string;
|
|
8
|
+
themeId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ThemeDoctorOptions {
|
|
11
|
+
path?: string;
|
|
12
|
+
environment: string;
|
|
13
|
+
store?: string;
|
|
14
|
+
password?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function createDoctorContext(options: ThemeDoctorOptions): ThemeDoctorContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cwd } from '@shopify/cli-kit/node/path';
|
|
2
|
+
export function createDoctorContext(options) {
|
|
3
|
+
return {
|
|
4
|
+
workingDirectory: options.path ?? cwd(),
|
|
5
|
+
environment: options.environment,
|
|
6
|
+
store: options.store,
|
|
7
|
+
password: options.password,
|
|
8
|
+
data: {},
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemeDoctorOptions } from '../context.js';
|
|
2
|
+
import type { TestResult } from '@shopify/cli-kit/node/doctor/types';
|
|
3
|
+
/**
|
|
4
|
+
* Run all theme doctor tests.
|
|
5
|
+
* Stops on first failure.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runThemeDoctor(options: ThemeDoctorOptions): Promise<TestResult[]>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import ThemeInitTests from './tests/init.js';
|
|
2
|
+
import ThemePushTests from './tests/push.js';
|
|
3
|
+
import { createDoctorContext } from '../context.js';
|
|
4
|
+
import { reportTestStart, reportTestResult, reportSuiteStart, reportSummary, initReporter, } from '@shopify/cli-kit/node/doctor/reporter';
|
|
5
|
+
// Test suites run in order. If a test relies on another, ensure that test runs after it's dependency.
|
|
6
|
+
const themeSuites = [ThemeInitTests, ThemePushTests];
|
|
7
|
+
/**
|
|
8
|
+
* Run all theme doctor tests.
|
|
9
|
+
* Stops on first failure.
|
|
10
|
+
*/
|
|
11
|
+
export async function runThemeDoctor(options) {
|
|
12
|
+
const results = [];
|
|
13
|
+
const context = createDoctorContext(options);
|
|
14
|
+
// Initialize reporter with working directory
|
|
15
|
+
initReporter(context.workingDirectory);
|
|
16
|
+
// Run all test suites in order
|
|
17
|
+
for (const SuiteClass of themeSuites) {
|
|
18
|
+
const suite = new SuiteClass();
|
|
19
|
+
const description = SuiteClass.description ?? 'Test suite';
|
|
20
|
+
reportSuiteStart(SuiteClass.name, description);
|
|
21
|
+
// eslint-disable-next-line no-await-in-loop
|
|
22
|
+
const suiteResults = await suite.runSuite(context);
|
|
23
|
+
for (const result of suiteResults) {
|
|
24
|
+
reportTestStart(result.name);
|
|
25
|
+
reportTestResult(result);
|
|
26
|
+
results.push(result);
|
|
27
|
+
// Stop on first failure
|
|
28
|
+
if (result.status === 'failed') {
|
|
29
|
+
reportSummary(results);
|
|
30
|
+
return results;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
reportSummary(results);
|
|
35
|
+
return results;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DoctorSuite } from '@shopify/cli-kit/node/doctor/framework';
|
|
2
|
+
import type { ThemeDoctorContext } from '../../context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Tests for `shopify theme init` command
|
|
5
|
+
*/
|
|
6
|
+
export default class ThemeInitTests extends DoctorSuite<ThemeDoctorContext> {
|
|
7
|
+
static description: string;
|
|
8
|
+
private themeName;
|
|
9
|
+
private themePath;
|
|
10
|
+
tests(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DoctorSuite } from '@shopify/cli-kit/node/doctor/framework';
|
|
2
|
+
import { joinPath } from '@shopify/cli-kit/node/path';
|
|
3
|
+
import { getRandomName } from '@shopify/cli-kit/common/string';
|
|
4
|
+
/**
|
|
5
|
+
* Tests for `shopify theme init` command
|
|
6
|
+
*/
|
|
7
|
+
export default class ThemeInitTests extends DoctorSuite {
|
|
8
|
+
static description = 'Tests the theme init command creates a valid theme structure';
|
|
9
|
+
themeName = '';
|
|
10
|
+
themePath = '';
|
|
11
|
+
tests() {
|
|
12
|
+
this.test('init creates theme directory', async () => {
|
|
13
|
+
this.themeName = `doctor-theme-${getRandomName('creative')}`;
|
|
14
|
+
this.themePath = joinPath(this.context.workingDirectory, this.themeName);
|
|
15
|
+
const result = await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);
|
|
16
|
+
this.assertSuccess(result);
|
|
17
|
+
// Store for tests later in the suite
|
|
18
|
+
this.context.themeName = this.themeName;
|
|
19
|
+
this.context.themePath = this.themePath;
|
|
20
|
+
});
|
|
21
|
+
this.test('essential theme files exist', async () => {
|
|
22
|
+
const essentialFiles = ['layout/theme.liquid', 'config/settings_schema.json', 'templates/index.json'];
|
|
23
|
+
await Promise.all(essentialFiles.map((file) => this.assertFile(joinPath(this.themePath, file))));
|
|
24
|
+
});
|
|
25
|
+
this.test('theme directories exist', async () => {
|
|
26
|
+
const directories = ['sections', 'snippets', 'assets', 'locales'];
|
|
27
|
+
await Promise.all(directories.map((dir) => this.assertDirectory(joinPath(this.themePath, dir))));
|
|
28
|
+
});
|
|
29
|
+
this.test('layout/theme.liquid has valid content', async () => {
|
|
30
|
+
await this.assertFile(joinPath(this.themePath, 'layout/theme.liquid'), /<!doctype html>|<html|{{ content_for_header }}/i, 'layout/theme.liquid contains expected Liquid markup');
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DoctorSuite } from '@shopify/cli-kit/node/doctor/framework';
|
|
2
|
+
import type { ThemeDoctorContext } from '../../context.js';
|
|
3
|
+
/**
|
|
4
|
+
* Tests for `shopify theme push` command
|
|
5
|
+
*/
|
|
6
|
+
export default class ThemePushTests extends DoctorSuite<ThemeDoctorContext> {
|
|
7
|
+
static description: string;
|
|
8
|
+
static requiresStore: boolean;
|
|
9
|
+
tests(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DoctorSuite } from '@shopify/cli-kit/node/doctor/framework';
|
|
2
|
+
/**
|
|
3
|
+
* Tests for `shopify theme push` command
|
|
4
|
+
*/
|
|
5
|
+
export default class ThemePushTests extends DoctorSuite {
|
|
6
|
+
static description = 'Tests pushing a theme to the store creates an unpublished theme';
|
|
7
|
+
static requiresStore = true;
|
|
8
|
+
tests() {
|
|
9
|
+
this.test('push creates unpublished theme', async () => {
|
|
10
|
+
// Check prerequisite: theme must be initialized
|
|
11
|
+
if (!this.context.themePath) {
|
|
12
|
+
this.assert(false, 'Theme init did not complete successfully; themePath is missing in context');
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
// Build command
|
|
16
|
+
const themeName = this.context.themeName ?? 'doctor-theme';
|
|
17
|
+
let cmd = `shopify theme push --unpublished --json --path ${this.context.themePath} -t ${themeName}`;
|
|
18
|
+
if (this.context.environment) {
|
|
19
|
+
cmd += ` -e ${this.context.environment}`;
|
|
20
|
+
}
|
|
21
|
+
if (this.context.store) {
|
|
22
|
+
cmd += ` -s ${this.context.store}`;
|
|
23
|
+
}
|
|
24
|
+
if (this.context.password) {
|
|
25
|
+
cmd += ` --password ${this.context.password}`;
|
|
26
|
+
}
|
|
27
|
+
const result = await this.run(cmd);
|
|
28
|
+
this.assertSuccess(result);
|
|
29
|
+
// Parse and validate JSON output
|
|
30
|
+
const json = this.assertJson(result, (data) => typeof data.theme?.id === 'number');
|
|
31
|
+
if (json?.theme) {
|
|
32
|
+
this.assert(typeof json.theme.id === 'number', 'Theme was created with a valid ID');
|
|
33
|
+
this.assertEqual(json.theme.role, 'unpublished', 'Theme role is unpublished');
|
|
34
|
+
this.assert(json.theme.editor_url.includes('/admin/themes/'), 'Editor URL is provided');
|
|
35
|
+
this.assert(json.theme.preview_url.includes('preview_theme_id='), 'Preview URL is provided');
|
|
36
|
+
// Update context for subsequent tests
|
|
37
|
+
this.context.themeId = String(json.theme.id);
|
|
38
|
+
this.context.data.editorUrl = json.theme.editor_url;
|
|
39
|
+
this.context.data.previewUrl = json.theme.preview_url;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function asyncTasks(): Promise<void>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { renderConcurrent, renderSingleTask, renderTasks } from '@shopify/cli-kit/node/ui';
|
|
2
|
+
import { outputContent, outputToken, TokenizedString } from '@shopify/cli-kit/node/output';
|
|
3
|
+
export async function asyncTasks() {
|
|
4
|
+
// renderConcurrent
|
|
5
|
+
let backendPromiseResolve;
|
|
6
|
+
const backendPromise = new Promise(function (resolve, _reject) {
|
|
7
|
+
backendPromiseResolve = resolve;
|
|
8
|
+
});
|
|
9
|
+
const backendProcess = {
|
|
10
|
+
prefix: 'backend',
|
|
11
|
+
action: async (stdout, _stderr, _signal) => {
|
|
12
|
+
stdout.write('first backend message');
|
|
13
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
14
|
+
stdout.write('second backend message');
|
|
15
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
16
|
+
stdout.write('third backend message');
|
|
17
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
18
|
+
backendPromiseResolve();
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const frontendProcess = {
|
|
22
|
+
prefix: 'frontend',
|
|
23
|
+
action: async (stdout, _stderr, _signal) => {
|
|
24
|
+
await backendPromise;
|
|
25
|
+
stdout.write('first frontend message');
|
|
26
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
27
|
+
stdout.write('second frontend message');
|
|
28
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
29
|
+
stdout.write('third frontend message');
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
await renderConcurrent({
|
|
33
|
+
processes: [backendProcess, frontendProcess],
|
|
34
|
+
});
|
|
35
|
+
// renderTasks
|
|
36
|
+
const tasks = [
|
|
37
|
+
{
|
|
38
|
+
title: 'Installing dependencies',
|
|
39
|
+
task: async () => {
|
|
40
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: 'Downloading assets',
|
|
45
|
+
task: async () => {
|
|
46
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
await renderTasks(tasks);
|
|
51
|
+
// renderSingleTask
|
|
52
|
+
await renderSingleTask({
|
|
53
|
+
title: new TokenizedString('Importing data'),
|
|
54
|
+
task: async (updateStatus) => {
|
|
55
|
+
for (let i = 1; i <= 10; i++) {
|
|
56
|
+
// eslint-disable-next-line no-await-in-loop
|
|
57
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
58
|
+
const status = outputContent `Importing data ${outputToken.italic(outputContent `(${outputToken.green(i.toString())} complete)`)}`;
|
|
59
|
+
updateStatus(status);
|
|
60
|
+
}
|
|
61
|
+
return 'completed';
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=async.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function prompts(): Promise<void>;
|