@shopify/cli 4.9.4 → 5.0.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/dist/analytics-Q6QDIDYT.js +1 -0
- package/dist/analytics-VKKJNJ62.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/assets/hydrogen/vite/package.json +3 -4
- package/dist/assets/hydrogen/vite/vite.config.js +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-LKXFHYLI.js → chunk-24NUJTIH.js} +1 -1
- package/dist/chunk-2CMEKSI7.js +1 -0
- package/dist/chunk-2DID73ML.js +1 -0
- package/dist/chunk-2ORRV7GH.js +1 -0
- package/dist/chunk-2VSNFOKD.js +1 -0
- package/dist/chunk-335BUVBP.js +1 -0
- package/dist/{chunk-UEBUGSBT.js → chunk-3A3DZVEJ.js} +1 -1
- package/dist/chunk-3C6VLJ5D.js +319 -0
- package/dist/{chunk-PB5ZZET5.js → chunk-3G4HJO72.js} +30 -30
- package/dist/chunk-3LVCG4JB.js +1 -0
- package/dist/chunk-43KLFFP7.js +1 -0
- package/dist/chunk-43R5VGKT.js +1 -0
- package/dist/chunk-46MSIQ6Z.js +1 -0
- package/dist/chunk-4ARCB6DT.js +1 -0
- package/dist/chunk-4C2DAX5T.js +1 -0
- package/dist/chunk-4CRBTSVP.js +2 -0
- package/dist/chunk-4GCI2YCZ.js +8 -0
- package/dist/chunk-4GOJQKY5.js +1 -0
- package/dist/chunk-4RDFMBRG.js +9 -0
- package/dist/chunk-4SS6DXC7.js +5 -0
- package/dist/{chunk-J4J2YXH3.js → chunk-4TI7U2PN.js} +1 -1
- package/dist/{chunk-67EBF76X.js → chunk-52FDK2LC.js} +1 -1
- package/dist/chunk-53BG3NLH.js +3 -0
- package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
- package/dist/{chunk-A2VCTDKH.js → chunk-5NEGOQT6.js} +1 -1
- package/dist/{chunk-MW3JKGJH.js → chunk-5OMJFPQW.js} +1 -1
- package/dist/chunk-5TB52UUV.js +2 -0
- package/dist/chunk-5UWMXOHM.js +7 -0
- package/dist/chunk-6BNKBCCU.js +1 -0
- package/dist/chunk-6DXP7PQ7.js +1 -0
- package/dist/chunk-6PUU6ZNQ.js +1 -0
- package/dist/chunk-7GHSE7SG.js +1 -0
- package/dist/{chunk-7556AIVG.js → chunk-7IFE4UQY.js} +1 -1
- package/dist/chunk-7LAKWAKX.js +25 -0
- package/dist/chunk-7MVWDCI3.js +1 -0
- package/dist/chunk-7NSK77WG.js +3 -0
- package/dist/chunk-7QUZWCJZ.js +3 -0
- package/dist/chunk-7RPFJZLP.js +1 -0
- package/dist/{chunk-LJIJEGND.js → chunk-7UOA4DI7.js} +2 -2
- package/dist/chunk-7WPUV7GY.js +6 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/{chunk-NGSEF3UX.js → chunk-ACA2BGAD.js} +1 -1
- package/dist/chunk-AJMDF3QC.js +1 -0
- package/dist/{chunk-R7YJNDXW.js → chunk-AXC2MHHO.js} +1 -1
- package/dist/{chunk-DEF2G7S4.js → chunk-AYL6KBPE.js} +1 -1
- package/dist/chunk-BAHIL37I.js +1 -0
- package/dist/{chunk-RSC5NQAT.js → chunk-BCYTZ7LM.js} +1 -1
- package/dist/{chunk-AVMNIZAJ.js → chunk-BJPDJIS4.js} +1 -1
- package/dist/{chunk-7VAKNVFD.js → chunk-BN7ZXAZJ.js} +1 -1
- package/dist/chunk-BVSKBX7T.js +16 -0
- package/dist/chunk-BWRNXCVN.js +4 -0
- package/dist/{chunk-XNPUZRWP.js → chunk-C3KEDG33.js} +1 -1
- package/dist/{chunk-WEXOA4C4.js → chunk-C7V755IT.js} +1 -1
- package/dist/chunk-CCMDZX35.js +7 -0
- package/dist/chunk-CCQNP5YR.js +1 -0
- package/dist/chunk-CEIJKJOF.js +11 -0
- package/dist/chunk-CIK5BF7V.js +1 -0
- package/dist/{chunk-6YDLNP4G.js → chunk-CVVQQLCF.js} +1 -1
- package/dist/chunk-CW2T7EOQ.js +1 -0
- package/dist/chunk-CZ22VZDA.js +376 -0
- package/dist/{chunk-3G2ZQ2EF.js → chunk-D7NB7YR6.js} +1 -1
- package/dist/{chunk-DYPZX7MW.js → chunk-DFQ4WTET.js} +2 -2
- package/dist/chunk-DJAZBPYA.js +3 -0
- package/dist/chunk-DNMXVMJM.js +47 -0
- package/dist/{chunk-CLD3NZYD.js → chunk-EGCWR5AS.js} +1 -1
- package/dist/{chunk-BOE2ST6J.js → chunk-EITIW5OX.js} +1 -1
- package/dist/chunk-EMSF57ZB.js +1 -0
- package/dist/{chunk-ZEBMW5KS.js → chunk-EXFBZPZS.js} +1 -1
- package/dist/chunk-FDXHQZTO.js +26 -0
- package/dist/{chunk-Q2XLIWG4.js → chunk-FFHH5LOR.js} +1 -1
- package/dist/{chunk-MMQZO2W2.js → chunk-FNLECT7B.js} +1 -1
- package/dist/{chunk-PO5T44H3.js → chunk-FWB3GLMW.js} +1 -1
- package/dist/chunk-FZCGRIOM.js +1 -0
- package/dist/{chunk-G7JW4UIM.js → chunk-G6ZMSWEU.js} +1 -1
- package/dist/chunk-GAMC2BNY.js +7 -0
- package/dist/chunk-GB6E3ATN.js +4 -0
- package/dist/chunk-GCNA3HXH.js +8 -0
- package/dist/{chunk-IGDVKRB4.js → chunk-GFVKTWFT.js} +1 -1
- package/dist/chunk-GQNOVEKP.js +2 -0
- package/dist/{chunk-5BTLE67Z.js → chunk-GRGFA26K.js} +1 -1
- package/dist/chunk-GXORLBVN.js +2 -0
- package/dist/{chunk-3V4VL3SD.js → chunk-H4V55Y3Z.js} +118 -118
- package/dist/chunk-HCZG7YJ6.js +16 -0
- package/dist/chunk-HF4NDEX3.js +1 -0
- package/dist/chunk-HIRTL45Q.js +1 -0
- package/dist/chunk-I4OVLRQR.js +1 -0
- package/dist/{chunk-ENQXB532.js → chunk-I6FRVYGE.js} +1 -1
- package/dist/chunk-IEQ4UOH3.js +4 -0
- package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
- package/dist/{chunk-45SZ5PSE.js → chunk-IQVRP7CT.js} +1 -1
- package/dist/chunk-IUP7POIE.js +6 -0
- package/dist/chunk-IUTZIN2T.js +10 -0
- package/dist/chunk-IWEKM5Y3.js +1 -0
- package/dist/chunk-IWTNUJGY.js +2 -0
- package/dist/chunk-J6TW43TG.js +1 -0
- package/dist/chunk-JDR6UVZA.js +8 -0
- package/dist/{chunk-CVFPY2SH.js → chunk-JEA3C7ON.js} +1 -1
- package/dist/chunk-JOJV5E2K.js +1 -0
- package/dist/chunk-JYMDWR25.js +1 -0
- package/dist/{chunk-TPHHQAUD.js → chunk-KDPQXURV.js} +1 -1
- package/dist/{chunk-MW3IMZJ5.js → chunk-KGRIYAMA.js} +1 -1
- package/dist/chunk-KJQDS5HI.js +1 -0
- package/dist/chunk-KKPOOIE4.js +2 -0
- package/dist/{chunk-VS7QVU3Z.js → chunk-KSDU4YOB.js} +1 -1
- package/dist/chunk-L7MSPGDS.js +5 -0
- package/dist/{chunk-43URS56H.js → chunk-LDU5T3DN.js} +1 -1
- package/dist/chunk-LHKVXJPX.js +1 -0
- package/dist/{chunk-EO4YJFMY.js → chunk-LMQGNECW.js} +86 -200
- package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LVLAOBJM.js +103 -0
- package/dist/chunk-LWCTKI4Z.js +18 -0
- package/dist/chunk-M3ACZWMR.js +1 -0
- package/dist/chunk-M4BVLMPH.js +31 -0
- package/dist/{chunk-NCRWOW6F.js → chunk-M5TGCSUK.js} +1 -1
- package/dist/chunk-M7LPHCP2.js +274 -0
- package/dist/{chunk-IDKRJ2F4.js → chunk-MDRVCBDO.js} +1 -1
- package/dist/chunk-MR2AUT7Q.js +1 -0
- package/dist/chunk-MXJAH2GW.js +5 -0
- package/dist/{chunk-UU6BRRYS.js → chunk-MYAIWSOO.js} +1 -1
- package/dist/{chunk-NT4A37HG.js → chunk-N2RFDHRY.js} +1 -1
- package/dist/{chunk-GSE6FXZU.js → chunk-NB4BRW3H.js} +1 -1
- package/dist/chunk-NDKSG4CC.js +97 -0
- package/dist/chunk-NK2MGR6A.js +1 -0
- package/dist/chunk-NOH63WC6.js +12 -0
- package/dist/{chunk-BVB3DTNE.js → chunk-OGWPS55W.js} +1 -1
- package/dist/chunk-OQ5CLM2H.js +4 -0
- package/dist/{chunk-PVAZCZSY.js → chunk-OQU3HLAE.js} +1 -1
- package/dist/chunk-OVWUGAEU.js +11 -0
- package/dist/chunk-OX7UVDSU.js +6 -0
- package/dist/chunk-P33TONYG.js +1 -0
- package/dist/chunk-PEVIRAMR.js +6 -0
- package/dist/{chunk-YPCXVZ2N.js → chunk-PGLWZMJU.js} +4 -4
- package/dist/chunk-PIAD3F6M.js +16 -0
- package/dist/chunk-PMHP57MH.js +20 -0
- package/dist/{chunk-F3PZGSOY.js → chunk-POKY4RWR.js} +1 -1
- package/dist/chunk-PSSYLJG4.js +2 -0
- package/dist/chunk-PYIICTLX.js +1 -0
- package/dist/chunk-PZUGDE7N.js +2 -0
- package/dist/{chunk-NU5WLZ6Y.js → chunk-Q2SZCZE7.js} +1 -1
- package/dist/{chunk-MUM34KUM.js → chunk-Q2XRITUG.js} +1 -1
- package/dist/chunk-Q5MEFIMV.js +4 -0
- package/dist/chunk-Q66CI37F.js +7 -0
- package/dist/chunk-QFWWCZOI.js +1 -0
- package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
- package/dist/chunk-QKVVJXWS.js +3 -0
- package/dist/chunk-QN3774QI.js +1 -0
- package/dist/chunk-R2BDABJD.js +213 -0
- package/dist/{chunk-7HWMURCW.js → chunk-R7EMV77H.js} +1 -1
- package/dist/chunk-RFGEM5JC.js +3 -0
- package/dist/{chunk-7A3RW2VM.js → chunk-RVQV6G5M.js} +1 -1
- package/dist/chunk-S67I4E7M.js +5 -0
- package/dist/chunk-SFPXYHHL.js +1 -0
- package/dist/{chunk-4OCVXE5Y.js → chunk-SFQEHDJY.js} +1 -1
- package/dist/chunk-SL3VBI62.js +3 -0
- package/dist/{chunk-LOWSU4BB.js → chunk-SNNZ4U2W.js} +1 -1
- package/dist/chunk-T2IUXXCT.js +1 -0
- package/dist/chunk-TPSA4JN5.js +1 -0
- package/dist/chunk-TTEF7GTX.js +1 -0
- package/dist/{chunk-FQL2WEKX.js → chunk-U25W35TX.js} +1 -1
- package/dist/chunk-UIQL5ZF3.js +1 -0
- package/dist/chunk-UK6576EO.js +1 -0
- package/dist/chunk-ULD7CIOY.js +4 -0
- package/dist/{chunk-D3KFKT4D.js → chunk-UOS2XLGG.js} +1 -1
- package/dist/{chunk-EMH7OHCW.js → chunk-UVRKTMF7.js} +1 -1
- package/dist/{chunk-ZTICX3AO.js → chunk-UWMZ5CSB.js} +1 -1
- package/dist/chunk-UZROQRLX.js +2 -0
- package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
- package/dist/chunk-VB7YQMAM.js +5 -0
- package/dist/chunk-VHUD3CBC.js +3 -0
- package/dist/chunk-VMMUJN4T.js +17 -0
- package/dist/{chunk-S36VGP37.js → chunk-VW6QS7DO.js} +1 -1
- package/dist/chunk-VWH3VPYI.js +1 -0
- package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
- package/dist/chunk-WDFCOZAY.js +16 -0
- package/dist/chunk-WFWISGLS.js +1 -0
- package/dist/chunk-WGUOLSMG.js +1 -0
- package/dist/{chunk-PFXNBHQQ.js → chunk-WJSUIUBW.js} +2 -2
- package/dist/{chunk-TFXUDHCP.js → chunk-WMAFG2JD.js} +1 -1
- package/dist/chunk-X2H6I2WW.js +5 -0
- package/dist/{chunk-DSS4ECIH.js → chunk-X7HVAVSZ.js} +1 -1
- package/dist/{chunk-NYYXH2SX.js → chunk-XBQDMGUN.js} +1 -1
- package/dist/chunk-XITZIDCL.js +18 -0
- package/dist/chunk-XKRJKUA7.js +1 -0
- package/dist/{chunk-FEQHCE2E.js → chunk-XM7YUXTF.js} +2 -2
- package/dist/chunk-XMODGI45.js +1 -0
- package/dist/{chunk-B3M3KIOU.js → chunk-XNNKLUTN.js} +1 -1
- package/dist/chunk-XTREQ4A2.js +1 -0
- package/dist/chunk-YGYEM6QO.js +1 -0
- package/dist/{chunk-LWU5TKNA.js → chunk-YKS7MH3F.js} +9 -6
- package/dist/chunk-YTUDXZLN.js +1 -0
- package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
- package/dist/chunk-YVVU4J5O.js +3 -0
- package/dist/{chunk-4TZCRMBJ.js → chunk-YVY32DNA.js} +1 -1
- package/dist/chunk-Z5SILNH2.js +7 -0
- package/dist/chunk-ZAA2DXK5.js +5 -0
- package/dist/chunk-ZDQO6CNY.js +1 -0
- package/dist/chunk-ZGV3HNEV.js +1 -0
- package/dist/chunk-ZQDDRIBA.js +22 -0
- package/dist/{chunk-QTLGMJDW.js → chunk-ZT5WFUKJ.js} +4 -4
- package/dist/chunk-ZYQ2XWC5.js +5 -0
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +34 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +53 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +6 -6
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.d.ts +64 -0
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/fetch-result.js +22 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
- package/dist/cli/services/commands/doc/fetch.js +2 -15
- package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/search-result.js +14 -0
- package/dist/cli/services/commands/doc/search.d.ts +9 -1
- package/dist/cli/services/commands/doc/search.js +27 -2
- package/dist/cli/services/commands/doc/types.d.ts +107 -0
- package/dist/cli/services/commands/doc/types.js +47 -0
- package/dist/cli/services/commands/help/types.d.ts +6 -6
- package/dist/command-event-context-LFUZ7UCA.js +1 -0
- package/dist/command-json-schema-2UMKY7MY.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-RI3TL6I4.js +1 -0
- package/dist/custom-oclif-loader-IZCKN67O.js +1 -0
- package/dist/deprecations-IFVUXXDB.js +1 -0
- package/dist/dist-4H2B7BMN.js +1 -0
- package/dist/dist-QNWOGQN3.js +1 -0
- package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
- package/dist/environments-CYMEN7NV.js +1 -0
- package/dist/error-IL6WQMSW.js +1 -0
- package/dist/error-handler-74HKA23T.js +1 -0
- package/dist/fs-AINFLJ2E.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +13 -13
- package/dist/is-global-2VLKV46Q.js +1 -0
- package/dist/json-error-HZB5YIHV.js +1 -0
- package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
- package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
- package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
- package/dist/{local-R3UAQN7T.js → local-KOZETREJ.js} +1 -1
- package/dist/{metadata-JWJG4JV4.js → metadata-IBPHZB7N.js} +1 -1
- package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
- package/dist/node-package-manager-DXSRNEDC.js +1 -0
- package/dist/notifications-system-XA3EBOGJ.js +1 -0
- package/dist/os-X73O7BAB.js +1 -0
- package/dist/out-B2GISN65.js +1 -0
- package/dist/output-3OYXK3Z5.js +1 -0
- package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
- package/dist/system-JWYYT4PM.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-PCG5D6RZ.js +1 -0
- package/dist/upgrade-7U2TUNC4.js +1 -0
- package/dist/version-7DGU2KYH.js +1 -0
- package/dist/version-SXQTRBXB.js +1 -0
- package/dist/workerd-MQZ3NKJI.js +18 -0
- package/oclif.manifest.json +1664 -427
- package/package.json +8 -8
- package/dist/analytics-APDNTBDE.js +0 -1
- package/dist/analytics-LX52KYSE.js +0 -1
- package/dist/chunk-2PDVBGQH.js +0 -7
- package/dist/chunk-2YVSZFXJ.js +0 -4
- package/dist/chunk-35WQTGN3.js +0 -5
- package/dist/chunk-37BGAWAW.js +0 -2
- package/dist/chunk-3C4WVKSO.js +0 -6
- package/dist/chunk-3LHE4GIX.js +0 -1
- package/dist/chunk-47IQIIFX.js +0 -383
- package/dist/chunk-4ES7BJEK.js +0 -1
- package/dist/chunk-4IFY7V7W.js +0 -1
- package/dist/chunk-4JGWKUJN.js +0 -2
- package/dist/chunk-4O5GQ3DS.js +0 -7
- package/dist/chunk-4O7LK5RG.js +0 -26
- package/dist/chunk-4TFJ5RW7.js +0 -8
- package/dist/chunk-4ZNBEMRT.js +0 -20
- package/dist/chunk-5JIJDUXX.js +0 -20
- package/dist/chunk-66YRAUWX.js +0 -3
- package/dist/chunk-6A4H3HPY.js +0 -7
- package/dist/chunk-6HPUOCFF.js +0 -1
- package/dist/chunk-6IDEDOXW.js +0 -2
- package/dist/chunk-6IMHGT7F.js +0 -8
- package/dist/chunk-6MC2BEW4.js +0 -1
- package/dist/chunk-73D5O7A3.js +0 -1
- package/dist/chunk-7E4MJCVE.js +0 -10
- package/dist/chunk-7HNRK2CR.js +0 -1
- package/dist/chunk-7SJHVJ3W.js +0 -5
- package/dist/chunk-ALK66U3O.js +0 -3
- package/dist/chunk-AMLCWRHU.js +0 -4
- package/dist/chunk-AYIU6Z4C.js +0 -1
- package/dist/chunk-BIWG3FQQ.js +0 -5
- package/dist/chunk-BQ3U3CQV.js +0 -1
- package/dist/chunk-C6IBY7NW.js +0 -16
- package/dist/chunk-CQF5NDTJ.js +0 -4
- package/dist/chunk-DMDLJRLW.js +0 -1
- package/dist/chunk-DMNWSUKV.js +0 -5
- package/dist/chunk-FK7GA4QQ.js +0 -1
- package/dist/chunk-FO2R6KHG.js +0 -1
- package/dist/chunk-FOAV642V.js +0 -1
- package/dist/chunk-GE4MLO3C.js +0 -5
- package/dist/chunk-GM4EFJJF.js +0 -7
- package/dist/chunk-GN66BRYF.js +0 -1
- package/dist/chunk-GPRZYFDE.js +0 -1
- package/dist/chunk-GZ7VGCVW.js +0 -3
- package/dist/chunk-HASIOUH2.js +0 -3
- package/dist/chunk-HILYTMVA.js +0 -1
- package/dist/chunk-HJHS23Q3.js +0 -1
- package/dist/chunk-HLPAVELJ.js +0 -1
- package/dist/chunk-HPM3HF7A.js +0 -1
- package/dist/chunk-HQJ62PII.js +0 -3
- package/dist/chunk-HQY6JM6G.js +0 -6
- package/dist/chunk-HSYMUYEZ.js +0 -359
- package/dist/chunk-I5PQZRYM.js +0 -32
- package/dist/chunk-IPZ6LUJV.js +0 -4
- package/dist/chunk-J4NBPC57.js +0 -1
- package/dist/chunk-J6LQR2F6.js +0 -7
- package/dist/chunk-JYGZD4HM.js +0 -1
- package/dist/chunk-K3HUQLIC.js +0 -6
- package/dist/chunk-K7D53KSJ.js +0 -1
- package/dist/chunk-KQFA5YTT.js +0 -97
- package/dist/chunk-KTD7VLHL.js +0 -2
- package/dist/chunk-L4DFMMOI.js +0 -1
- package/dist/chunk-LJZTSQRD.js +0 -11
- package/dist/chunk-LLPB6JN5.js +0 -9
- package/dist/chunk-LYIXRMQJ.js +0 -46
- package/dist/chunk-MCNK5SJ6.js +0 -2
- package/dist/chunk-MJZSSCGD.js +0 -5
- package/dist/chunk-N55MSO3X.js +0 -12
- package/dist/chunk-N5AZZYQA.js +0 -4
- package/dist/chunk-NCVGCVQ5.js +0 -6
- package/dist/chunk-O5FFMTJE.js +0 -25
- package/dist/chunk-OE3HSNSE.js +0 -16
- package/dist/chunk-ONF7XXEL.js +0 -1
- package/dist/chunk-PG4S5HJJ.js +0 -5
- package/dist/chunk-PHG4DASY.js +0 -18
- package/dist/chunk-PP4VCR4Y.js +0 -1
- package/dist/chunk-PWS4VFSD.js +0 -1
- package/dist/chunk-Q37WAD6F.js +0 -1
- package/dist/chunk-Q43LBSPT.js +0 -1
- package/dist/chunk-QAJZUJR5.js +0 -1
- package/dist/chunk-QO5RNGWA.js +0 -1
- package/dist/chunk-QPQS2YU3.js +0 -1
- package/dist/chunk-QUXQM3S3.js +0 -1
- package/dist/chunk-R3KSOCMB.js +0 -6
- package/dist/chunk-R74WHKHH.js +0 -15
- package/dist/chunk-RJSQMKKS.js +0 -1
- package/dist/chunk-RK2V6OIJ.js +0 -2
- package/dist/chunk-RUHQNF2W.js +0 -1
- package/dist/chunk-RXTLNUPF.js +0 -1
- package/dist/chunk-SNE4RHM4.js +0 -1
- package/dist/chunk-SQAS5RVZ.js +0 -10
- package/dist/chunk-SZI6G247.js +0 -103
- package/dist/chunk-TVCWDEVS.js +0 -1
- package/dist/chunk-TYMYIUIQ.js +0 -1
- package/dist/chunk-UIC7K2HX.js +0 -7
- package/dist/chunk-UNHT4ZFP.js +0 -317
- package/dist/chunk-UQ6ALA3Y.js +0 -3
- package/dist/chunk-UWI76E2L.js +0 -18
- package/dist/chunk-VE35YELD.js +0 -1
- package/dist/chunk-VGBUN3CZ.js +0 -17
- package/dist/chunk-VMNOSVPT.js +0 -8
- package/dist/chunk-VNFUCH6T.js +0 -1
- package/dist/chunk-W4KE7AO6.js +0 -1
- package/dist/chunk-WEPO4J2F.js +0 -19
- package/dist/chunk-WLWHCUPZ.js +0 -1
- package/dist/chunk-XGKCPD6W.js +0 -1
- package/dist/chunk-XNVOKAF2.js +0 -1
- package/dist/chunk-XSMCQLJW.js +0 -1
- package/dist/chunk-XUUIBSLW.js +0 -1
- package/dist/chunk-XWQM2NZ2.js +0 -2
- package/dist/chunk-Y3PY5LP7.js +0 -3
- package/dist/chunk-Y62EMOQA.js +0 -1
- package/dist/chunk-Y743UVBS.js +0 -16
- package/dist/chunk-YBSX53QP.js +0 -1
- package/dist/chunk-YHCP326A.js +0 -16
- package/dist/chunk-YHESTFMZ.js +0 -4
- package/dist/chunk-YT27FIQN.js +0 -275
- package/dist/chunk-YTR5JHNJ.js +0 -2
- package/dist/chunk-YYA5VGDW.js +0 -1
- package/dist/chunk-Z6X2GT6Q.js +0 -1
- package/dist/chunk-ZEE32UH6.js +0 -1
- package/dist/cli/commands/app/app-logs/sources.js +0 -1
- package/dist/command-json-schema-SS4GDJTQ.js +0 -1
- package/dist/conf-store-54YJCIDK.js +0 -1
- package/dist/custom-oclif-loader-3UBH7Q7R.js +0 -1
- package/dist/deprecations-ZX7ZKF6L.js +0 -1
- package/dist/dist-JMNE7MP6.js +0 -1
- package/dist/dist-M2AXGBOL.js +0 -1
- package/dist/environments-KD2IDYPG.js +0 -1
- package/dist/error-AA6LW3PN.js +0 -1
- package/dist/error-handler-4VW3AV2G.js +0 -1
- package/dist/fs-4QZCAEP7.js +0 -1
- package/dist/is-global-FKG327CG.js +0 -1
- package/dist/json-error-32ETFU3V.js +0 -1
- package/dist/node-package-manager-M4XHUTQR.js +0 -1
- package/dist/notifications-system-QVM2JWKB.js +0 -1
- package/dist/os-FEHBQQKP.js +0 -1
- package/dist/out-53ABAVL7.js +0 -1
- package/dist/output-2LS5AOAH.js +0 -1
- package/dist/system-TMD2LYZM.js +0 -1
- package/dist/ui-FNPICAAH.js +0 -1
- package/dist/upgrade-YYPP5VZY.js +0 -1
- package/dist/version-OX3MORI6.js +0 -1
- package/dist/version-P7D5ME4Z.js +0 -1
- package/dist/workerd-TKVRZK2F.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,g as c,i as p,j as
|
|
1
|
+
import{b as a,g as c,i as p,j as d}from"./chunk-5TB52UUV.js";import{k as h}from"./chunk-2VSNFOKD.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function f(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=f(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await d({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),{...o,createdAtRuntime:!0}}};export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-IQVRP7CT.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import{a as I,b as M}from"./chunk-ACA2BGAD.js";import{a as A}from"./chunk-FWB3GLMW.js";import{ba as u}from"./chunk-3C6VLJ5D.js";import{e as p}from"./chunk-H4V55Y3Z.js";import{b as O,c as y,f as E}from"./chunk-Q2SZCZE7.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as w}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();var k=["HONOR_BILLING_PRICE","PLAN_PRICE"],W=["OPT_OUT","WHEN_REQUIRED"],D=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=H(w(),1);var m={...O,...A,...y},K={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},B={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},et={...m,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...D]})()},it={...m,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:E(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...K},q={...m,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},nt={...q,...B};n();var l=t.string().regex(/^gid:\/\/shopify\/AppSubscriptionMigrationOperation\/[^/]+$/).describe("The Shopify AppSubscriptionMigrationOperation GID."),F=t.string().regex(/^gid:\/\/shopify\/Shop\/\d+$/).describe("The Shopify Shop GID."),o=t.object({gid:l,status:t.string().min(1).describe("Upstream status: RUNNING, COMPLETED, FAILED, or CANCELED."),total:t.number().int().nonnegative(),results:t.array(t.object({shopGid:F,code:t.string().min(1).describe("The upstream per-shop migration result code.")}).strict())}).strict(),g=t.object({message:t.string(),fieldPath:t.array(t.string()).nullable()}).strict(),C=t.discriminatedUnion("status",[t.object({status:t.literal("success"),operationGid:l,operation:o}).strict(),t.object({status:t.literal("failed"),operationGid:l,operation:o.nullable(),error:t.union([I.extend({details:t.object({userErrors:t.array(g)}).strict()}),M])}).strict()]),pt=c({name:"MigrationCancellationResult",schema:t.object({status:t.enum(["success","partial"]),operations:t.array(C)}).strict(),definitions:{MigrationCancellationOutcome:C,MigrationOperation:o,MigrationUserError:g}}),b=t.string().datetime().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/),Y=t.string().date(),N=t.object({amount:t.string().regex(/^-?\d+(?:\.\d+)?$/),currencyCode:t.string().regex(/^[A-Z]{3}$/)}).strict(),R=t.object({kind:t.string().describe("Known values: NONE, OPT_OUT, WHEN_REQUIRED."),optOutDeadline:b.nullable(),sentAt:b.nullable()}).strict(),P=t.object({shopGid:F,status:t.string().describe("Known values: UNSCHEDULED, SCHEDULED, MIGRATED."),manualSubscriptionName:t.string().nullable(),manualSubscriptionPrice:N.nullable(),manualSubscriptionInterval:t.string().describe("Known values: EVERY_30_DAYS, ANNUAL."),targetPlanHandle:t.string().nullable(),notification:R.nullable(),priceBehavior:t.string().nullable().describe("Known values: HONOR_BILLING_PRICE, PLAN_PRICE."),effectiveDate:t.union([Y,b]).nullable().describe("The upstream calendar date or whole-second UTC instant; date-only values retain their format."),lastFailureReason:t.string().nullable().describe("Known values: SUPERSEDED, SCHEDULING_FAILED.")}).strict().describe("All subscription projection fields are present; unavailable values are null."),ut=c({name:"MigrationListResult",schema:t.object({subscriptions:t.array(P).describe("The complete list across every fetched page.")}).strict(),definitions:{MigratableSubscription:P,MigratableSubscriptionPrice:N,MigratableSubscriptionNotification:R}}),T=t.object({batchIndex:t.number().int().nonnegative(),batchPayloadDigest:t.string().min(1),operation:o}).strict(),v=t.discriminatedUnion("type",[t.object({type:t.literal("submission"),batchIndex:t.number().int().nonnegative(),userErrors:t.array(g)}).strict(),t.object({type:t.literal("operations"),operationGids:t.array(l)}).strict()]);function x(){return{clientId:t.string().min(1).describe("The app client ID, not a Shopify GID."),action:t.enum(["schedule","unschedule"]),inputDigest:t.string().min(1),total:t.number().int().nonnegative(),operations:t.array(T)}}var lt=c({name:"MigrationSubmissionResult",schema:t.discriminatedUnion("status",[t.object({status:t.literal("success"),changed:t.boolean(),...x()}).strict(),t.object({status:t.literal("partial"),changed:t.boolean(),...x(),failure:v}).strict(),t.object({status:t.literal("cancelled"),changed:t.literal(!1),action:t.enum(["schedule","unschedule"]),reason:t.string()}).strict()]),definitions:{SubmittedMigrationOperation:T,MigrationOperation:o,MigrationSubmissionFailure:v,MigrationUserError:g}}),gt=c({name:"MigrationStatusResult",schema:t.object({operations:t.array(o)}).strict(),definitions:{MigrationOperation:o}});n();function J(e){return{gid:e.id,status:e.status,total:e.total,results:e.results.edges.map(({node:i})=>({shopGid:i.shopId,code:i.code}))}}function Q(e){return e.map(({message:i,field:a})=>({message:i,fieldPath:a}))}function bt(e){return{shopGid:e.shopId,status:e.status,manualSubscriptionName:e.manualSubscriptionName,manualSubscriptionPrice:e.manualSubscriptionPrice===null?null:{amount:e.manualSubscriptionPrice.amount,currencyCode:e.manualSubscriptionPrice.currencyCode},manualSubscriptionInterval:e.manualSubscriptionInterval,targetPlanHandle:e.targetPlanHandle,notification:e.notification===null?null:{kind:e.notification.kind,optOutDeadline:S(e.notification.optOutDeadline),sentAt:S(e.notification.sentAt)},priceBehavior:e.priceBehavior,effectiveDate:e.effectiveDate===null||/^\d{4}-\d{2}-\d{2}$/.test(e.effectiveDate)?e.effectiveDate:S(e.effectiveDate),lastFailureReason:e.lastFailureReason}}function S(e){return e===null?null:new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function St(e){if(e.status==="cancelled")return e;let i={changed:e.submission.operations.length>0,clientId:e.submission.clientId,action:e.submission.action,inputDigest:e.submission.inputDigest,total:e.submission.total,operations:e.submission.operations.map(({batchIndex:a,batchPayloadDigest:s,operation:f})=>({batchIndex:a,batchPayloadDigest:s,operation:J(f)}))};return e.status==="success"?{status:"success",...i}:{status:"partial",...i,failure:e.failure.type==="submission"?{type:e.failure.type,batchIndex:e.failure.batchIndex,userErrors:Q(e.failure.userErrors)}:{type:e.failure.type,operationGids:e.failure.operationIds}}}n();n();var _=p`
|
|
2
|
+
query MigratableAppSubscriptions(
|
|
3
|
+
$apiKey: String!
|
|
4
|
+
$first: Int!
|
|
5
|
+
$after: String
|
|
6
|
+
$status: AppSubscriptionMigrationStatus
|
|
7
|
+
) {
|
|
8
|
+
migratableAppSubscriptions(apiKey: $apiKey, first: $first, after: $after, status: $status) {
|
|
9
|
+
edges {
|
|
10
|
+
cursor
|
|
11
|
+
node {
|
|
12
|
+
shopId
|
|
13
|
+
status
|
|
14
|
+
manualSubscriptionName
|
|
15
|
+
manualSubscriptionPrice {
|
|
16
|
+
amount
|
|
17
|
+
currencyCode
|
|
18
|
+
}
|
|
19
|
+
manualSubscriptionInterval
|
|
20
|
+
targetPlanHandle
|
|
21
|
+
notification {
|
|
22
|
+
kind
|
|
23
|
+
optOutDeadline
|
|
24
|
+
sentAt
|
|
25
|
+
}
|
|
26
|
+
priceBehavior
|
|
27
|
+
effectiveDate
|
|
28
|
+
lastFailureReason
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
pageInfo {
|
|
32
|
+
hasNextPage
|
|
33
|
+
endCursor
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`,U=p`
|
|
38
|
+
mutation AppSubscriptionMigrationOperationCreate($input: AppSubscriptionMigrationOperationCreateInput!) {
|
|
39
|
+
appSubscriptionMigrationOperationCreate(input: $input) {
|
|
40
|
+
operation {
|
|
41
|
+
id
|
|
42
|
+
status
|
|
43
|
+
total
|
|
44
|
+
results(first: 250) {
|
|
45
|
+
edges {
|
|
46
|
+
node {
|
|
47
|
+
shopId
|
|
48
|
+
code
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
userErrors {
|
|
54
|
+
message
|
|
55
|
+
field
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`,G=p`
|
|
60
|
+
query AppSubscriptionMigrationOperation($apiKey: String!, $id: ID!) {
|
|
61
|
+
appSubscriptionMigrationOperation(apiKey: $apiKey, id: $id) {
|
|
62
|
+
id
|
|
63
|
+
status
|
|
64
|
+
total
|
|
65
|
+
results(first: 250) {
|
|
66
|
+
edges {
|
|
67
|
+
node {
|
|
68
|
+
shopId
|
|
69
|
+
code
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`,L=p`
|
|
76
|
+
mutation AppSubscriptionMigrationOperationCancel($input: AppSubscriptionMigrationOperationCancelInput!) {
|
|
77
|
+
appSubscriptionMigrationOperationCancel(input: $input) {
|
|
78
|
+
operation {
|
|
79
|
+
id
|
|
80
|
+
status
|
|
81
|
+
total
|
|
82
|
+
results(first: 250) {
|
|
83
|
+
edges {
|
|
84
|
+
node {
|
|
85
|
+
shopId
|
|
86
|
+
code
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
userErrors {
|
|
92
|
+
message
|
|
93
|
+
field
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`;function j(e){return e===null?null:{...e,results:{edges:e.results?.edges?.filter(i=>i!==null)??[]}}}function $(e){return{operation:j(e.operation),userErrors:e.userErrors??[]}}async function At({clientId:e,first:i,after:a,status:s}){let d=(await u.getInstance().request(_,{apiKey:e,first:i,after:a,status:s})).migratableAppSubscriptions;return d===null?null:{subscriptions:d.edges?.flatMap(h=>h===null?[]:[h.node])??[],pageInfo:d.pageInfo}}async function Dt({clientId:e,idempotencyKey:i,migrations:a}){let s=await u.getInstance().request(U,{input:{apiKey:e,idempotencyKey:i,migrations:a}});return $(s.appSubscriptionMigrationOperationCreate)}async function Ct({clientId:e,operationId:i}){let a=await u.getInstance().request(G,{apiKey:e,id:i});return j(a.appSubscriptionMigrationOperation)}async function Pt({clientId:e,operationId:i}){let a=await u.getInstance().request(L,{input:{apiKey:e,id:i}});return $(a.appSubscriptionMigrationOperationCancel)}export{k as a,W as b,et as c,it as d,q as e,nt as f,l as g,pt as h,ut as i,lt as j,gt as k,J as l,Q as m,bt as n,St as o,At as p,Dt as q,Ct as r,Pt as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b}from"./chunk-ZGV3HNEV.js";import{a as O}from"./chunk-FWB3GLMW.js";import{Da as R,Ea as l,Fa as x,Ka as j,La as v,Ma as F}from"./chunk-3C6VLJ5D.js";import{b as A,c as S}from"./chunk-Q2SZCZE7.js";import{A as P}from"./chunk-CZ22VZDA.js";import{a as y}from"./chunk-BN7ZXAZJ.js";import{h as k}from"./chunk-2VSNFOKD.js";import{wb as w}from"./chunk-LWCTKI4Z.js";import{e as C,i as p}from"./chunk-IWTNUJGY.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();o();async function m(i){let{directory:t,configName:n,configPath:s,configuration:a,remoteApp:e}=i;if(!a.client_id)throw new k("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=e.developerPlatformClient,d=await R({developerPlatformClient:c,app:e}),g=e.flags,N={directory:t,configName:n,developerPlatformClient:c,apiKey:a.client_id},f=await j(N,d,g,e.apiKey),h=p(s),L=await v({remoteApp:e,developerPlatformClient:c,specifications:d,flags:g,configFileName:h,appDirectory:f.appDirectory??t,localAppOptions:f});return x({path:C(f.appDirectory??t,h),appName:L.name,app:e})}o();var r=y({name:"AppConfigPullResult",schema:l.schema,definitions:l.definitions});o();function J(i,t){if(t==="json"){w(r.encode(i));return}P({headline:`Pulled latest configuration for "${i.app.name}"`,body:`Updated ${p(i.path)} with the remote data.`})}var u=class i extends b{static summary="Refresh an already-linked app configuration without prompts.";static descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";static get jsonOutputSchema(){return r}static description=this.descriptionForHelp();static flags={...A,...S,...O};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:s}=await F({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),a=await m({directory:t.path,configName:t.config,configPath:n.configPath,configuration:n.configuration,remoteApp:s});return J(a,t.json?"json":"text"),{app:n}}};export{u as a};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{a as Y}from"./chunk-V75WUEFU.js";import{a as u,b as le,c as de}from"./chunk-HB3MJYBK.js";import{a as re}from"./chunk-NB4BRW3H.js";import{b as ue}from"./chunk-QN3774QI.js";import{D as te,F as ne,J as se,M as ie,O as p,P as j,R as y,S as $,T as R,U as S,V as b,W as oe,Y as C,Z as ce,_ as ae,a as V,d as A,k as l,l as X,m,n as Q,o as _,q as Z,t as ee}from"./chunk-LMQGNECW.js";import{b as G}from"./chunk-ZQDDRIBA.js";import{b as q,c as J}from"./chunk-Q2SZCZE7.js";import{A as B,B as M,C as H,z as U}from"./chunk-CZ22VZDA.js";import{a as W}from"./chunk-BN7ZXAZJ.js";import{h as K}from"./chunk-2VSNFOKD.js";import{ga as P,wb as z}from"./chunk-LWCTKI4Z.js";import{b as s,c as g,d as O}from"./chunk-FZCGRIOM.js";import{b as Be}from"./chunk-YTUUU33R.js";import{e as Ue,g as d}from"./chunk-VKWPEFWQ.js";d();d();var Me={resolveSelection:ne,loadResults:ue,recordMetadata:re};function He(e,t){let n=t.checkIds.length>0?{checkIds:t.checkIds}:null,i=e.sources.deterministic!==null||e.sources.agent!==null;n&&i&&Ge(n.checkIds,e.checks);let o=n?e.checks.filter(r=>n.checkIds.includes(r.id)):e.checks;return{resultsDirectory:t.resultsDirectory,sources:e.sources,allChecks:e.checks,checks:o,filter:n,scopeDiffers:Ke(e.sources),blocking:{level:t.blocking,blockedChecks:ze(o,t.blocking)}}}function Ke({deterministic:e,agent:t}){return!e||!t?!1:JSON.stringify(e.document.coverage.scope)!==JSON.stringify(t.document.scope)}function ze(e,t){return t==="none"?0:e.filter(n=>l(n).length>0&&A[n.severity]>=A[t]).length}function Ge(e,t){let n=new Set(t.map(c=>c.id)),i=e.filter(c=>!n.has(c));if(i.length===0)return;let o=i.length===1?"check ID":"check IDs",r=new K(`Unknown ${o}: ${i.join(", ")}.`,"Pass --check-id with one of the checks in the results files.",[],[{title:"Available check IDs",body:{list:{items:t.map(c=>c.id)}}}]);throw r.code="unknown-check-id",r.details={checkIds:i},r}async function x(e,t=Me){let n=await t.resolveSelection({path:e.directory,config:e.configName,clientId:e.clientId,withoutAppConfig:e.withoutAppConfig,allowPrompts:!1,validateClientIdFlag:!0}),i=await t.loadResults(n,e.directory),o=He(i,{resultsDirectory:ee(n.appDirectory,te(n)).resultsDirectory,checkIds:e.checkIds,blocking:e.blocking});if(o.sources.deterministic!==null||o.sources.agent!==null){let r=o.allChecks.reduce((c,a)=>c+l(a).length,0);await t.recordMetadata({num_security_findings:r})}return{selection:n,result:o,commands:se(n,e.directory,i.sources.deterministic?.document.coverage.scope)}}d();d();var F=()=>g.describe(`${g.description}`),ye=()=>s.enum(["executed","not-applicable","unresolved"]),pe=()=>s.enum(["union","prefer-agent"]),T=s.object({filePath:p().describe("The absolute path of the file."),line:s.number().int().positive().nullable().describe("The one-based line, or null for the whole file."),column:s.number().int().positive().nullable().describe("The one-based column, or null when none is recorded.")}).strict().describe("A place in a file."),Se=s.object({location:T,quote:s.string().min(1).nullable().describe("The quoted source, redacted, or null when none is recorded.")}).strict().describe("Source that supports a finding."),ve=()=>({disposition:s.enum(["active","suppressed","superseded"]).describe("Whether the finding counts: active; suppressed by the agent; or superseded, a deterministic finding that a check's prefer-agent agent result replaces."),location:T,message:s.string().describe("What the finding is, redacted."),snippet:s.string().min(1).nullable().describe("The flagged code, redacted, or null when none is recorded."),evidence:s.array(Se)}),ke=s.object({source:s.literal("deterministic"),...ve(),fix:s.object({description:s.string(),guide:s.string().min(1).nullable().describe("A guide to the fix, or null when none is recorded."),automated:s.boolean().describe("Whether the fix can be applied automatically.")}).strict().nullable().describe("How to fix the finding, or null when none is recorded.")}).strict().describe("A finding from deterministic-findings.json."),we=s.object({source:s.literal("agent"),...ve(),confidence:s.enum(["high","medium","low"]).nullable().describe("The agent's confidence, or null when it didn't report one."),reasoning:s.string().min(1).nullable().describe("The agent's reasoning, redacted, or null when none is recorded."),suppression:s.object({justification:s.string()}).strict().nullable().describe("Why the agent suppressed the finding, or null when it is not suppressed.")}).strict().describe("A finding from agent-findings.json."),Ae=s.discriminatedUnion("source",[ke,we]),D=s.object({version:s.number().int().positive().describe("The check version: the catalog version for deterministic results, the one the agent claimed for agent results."),status:ye().describe("The source's own status for the check."),reason:s.object({code:s.string().describe("A short code. Agent codes are free-form. Deterministic codes: capability_absent, no_relevant_files, unsupported_framework, unsupported_language, parser_unavailable, agent_investigation_required, input_rejected."),message:s.string()}).strict().nullable().describe("Why the check is unresolved or not applicable, or null when none is recorded."),analysisMode:s.enum(["regex","structured-config","ast"]).nullable().describe("How the deterministic check analyzed the files. Null for agent results."),generatedAt:F().nullable().describe("When the source recorded the check, or null when the recorded time is not a valid instant.")}).strict().describe("One source's own result for a check."),he=s.object({id:s.string().describe("The check ID, such as CREDENTIAL_LOG_LEAKAGE."),title:s.string(),severity:s.enum(["high","medium","low"]),description:s.string(),guide:s.string().min(1).nullable().describe("A guide to the check, or null when none is recorded."),docsUrl:s.string().url().nullable().describe("The check's page on shopify.dev, or null when the results files predate it."),precedence:pe().describe("How the sources combine: union keeps both sources' findings; prefer-agent lets the agent result replace the deterministic one."),appliedPrecedence:pe().describe("The precedence that applied: union when a prefer-agent agent result is older than the deterministic one."),status:ye().describe("The combined status. Under union, executed when either source executed the check."),bySource:s.object({deterministic:D.nullable(),agent:D.nullable()}).strict().describe("Each source's own result, or null when that source didn't record the check."),findings:s.array(Ae).describe("Every finding of both sources, including suppressed and superseded ones, whatever --verbose. Sorted by file, line, then source.")}).strict().describe("One check, combined from both results files."),fe=s.object({framework:s.enum(["react-router","none","unknown","mixed"]),surface:s.enum(["react-router","theme-app-extension","config-only","unknown","mixed"]),languages:s.array(s.object({name:s.string().describe("The language, such as typescript."),support:s.enum(["supported","unsupported"]).describe("Whether the deterministic checks analyze it."),files:s.array(s.object({path:p()}).strict())}).strict())}).strict().describe("What the latest check detected in the app."),ge=s.object({filesScanned:s.number().int().nonnegative().describe("The number of files scanned."),filesSkipped:s.array(s.object({path:p(),reason:s.enum(["too-large","unreadable"]),sizeBytes:s.number().int().nonnegative().nullable().describe("The file size, or null when unknown."),detail:s.string().min(1).nullable().describe("Why the file was unreadable, or null when none is recorded.")}).strict()),gaps:s.array(s.object({code:s.enum(["skipped-file","unsupported-framework","unsupported-language","unresolved-check"]),message:s.string(),checkId:s.string().nullable().describe("The check that the gap concerns, or null."),filePath:p().nullable().describe("The file that the gap concerns, or null.")}).strict()),scanDirectories:s.array($)}).strict().describe("What the latest check covered."),me=s.object({path:p().describe("The absolute path of deterministic-findings.json."),generatedAt:F().nullable().describe("When check wrote the file, or null when the recorded time is not a valid instant."),engine:s.object({name:s.string(),version:s.string(),ruleset:s.string()}).strict(),scope:y}).strict().describe("deterministic-findings.json, which check writes, with the scope of the scan."),be=s.object({path:p().describe("The absolute path of agent-findings.json."),generatedAt:F().nullable().describe("When record wrote the file, or null when the recorded time is not a valid instant."),engine:s.object({name:s.string(),version:s.string()}).strict(),scope:y}).strict().describe("agent-findings.json, which record writes, with the scope that the agent reported."),v=W({name:"AppSecurityReviewResult",schema:s.object({status:s.literal("success"),valid:s.boolean().describe("Whether --blocking passed: no check in checks has an active finding and a severity at or above the level. Unresolved checks never fail it, and --blocking none always passes."),app:j,resultsDirectory:p().describe("The absolute path of the results directory."),resultsFiles:s.object({deterministic:me.nullable(),agent:be.nullable()}).strict().describe("The results files that the review combines. Null when a file does not exist."),detection:fe.nullable().describe("What the latest check detected in the app, or null without deterministic-findings.json."),coverage:ge.nullable().describe("What the latest check covered, or null without deterministic-findings.json."),scopeDiffers:s.boolean().describe("Whether the agent reported another scope than the latest scan used. False unless both results files exist."),checks:s.array(he).describe("The checks after --check-id, most severe first, then by ID. Empty when no results file exists."),blocking:R}).strict().describe("The combined results of the app security check."),definitions:{AppSecurityApp:j,AppSecurityScope:y,AppSecurityScanDirectory:$,AppSecurityBlocking:R,AppSecurityDeterministicResultsFile:me,AppSecurityAgentResultsFile:be,AppSecurityDetection:fe,AppSecurityCoverage:ge,AppSecurityCheck:he,AppSecuritySourceResult:D,AppSecurityFinding:Ae,AppSecurityDeterministicFinding:ke,AppSecurityAgentFinding:we,AppSecurityLocation:T,AppSecurityEvidence:Se}});d();var Re={high:"High",medium:"Medium",low:"Low"},qe={executed:"passed",not_applicable:"not applicable",unresolved:"unresolved"},Je={executed:"executed",not_applicable:"not applicable",unresolved:"unresolved"},k=["deterministic","agent"],Ye={deterministic:"deterministic-findings.json",agent:"agent-findings.json"},_e=3,Ve="Agent findings were recorded for a different scope than the latest scan.",Ce="agent result stale",Xe="The agent result is older than the deterministic result, so both are shown.",Qe={info:U,success:B,warning:M,error:H};function xe(e){for(let t of Ze(e))Qe[t.type](t.options)}function Ze(e){let{checks:t}=e.result,n=t.filter(r=>r.status==="unresolved"&&l(r).length===0),i=t.filter(r=>r.status!=="unresolved"&&l(r).length===0),o=t.filter(r=>l(r).length>0);return[...n.length>0?[ht(n,e.verbose)]:[],...i.length>0?[ft(i,e.verbose)]:[],...o.map(r=>mt(r,e.verbose,e.now)),dt(et(e))]}function et(e){let{result:t}=e,n=t.sources.deterministic!==null||t.sources.agent!==null,i=_(t.checks),o=t.sources.deterministic?.document,r=t.blocking.blockedChecks>0,c=t.checks.filter(m).length;return{type:nt(t.checks,i,n),headline:st(t.checks,i,n),...t.filter&&n?{filterLine:`Showing ${t.checks.length} of ${t.allChecks.length} checks (--check-id).`}:{},checksWithFindings:t.checks.filter(a=>l(a).length>0).map(it),otherChecks:ot(i),...c>0?{staleAgentResults:tt(c)}:{},...o?{coverage:ct(o)}:{},scopeLines:at(t.sources),...t.scopeDiffers?{scopeNote:Ve}:{},resultsFiles:{directory:t.resultsDirectory,rows:k.map(a=>ut(a,t.sources[a]?.document,e.now))},...r?{blocking:`${u(t.blocking.blockedChecks,"check")} at or above ${t.blocking.level} (--blocking ${t.blocking.level}).`}:{nextSteps:lt(t,i,n,c,e.commands)}}}function tt(e){let t=e===1?"shows":"show";return`${u(e,"check")} ${t} both sources because the agent results are older than the deterministic results.`}function nt(e,t,n){return n?e.some(i=>i.severity==="high"&&l(i).length>0)?"error":t.withFindings>0||t.unresolved>0?"warning":"success":"info"}function st(e,t,n){if(!n)return"No app security check results to review.";if(t.withFindings===0)return`No findings in ${u(e.length,"check")}.`;let i=t.unresolved>0?` ${u(t.unresolved,"check")} unresolved.`:"";return`${le(t)}.${i}`}function it(e){return{severity:Re[e.severity],id:e.id,counts:rt(e)}}function rt(e){let t=l(e);return k.map(n=>[n,t.filter(i=>i.source===n).length]).filter(([,n])=>n>0).map(([n,i])=>`${i} ${n}`).join(", ")}function ot(e){return[w(de(e)),De(e)].filter(t=>t!=="")}function De(e){return w([e.suppressed>0?`${u(e.suppressed,"finding")} suppressed`:void 0,e.superseded>0?`${u(e.superseded,"finding")} superseded`:void 0])}function E(e){return De(_([e]))}function w(e){return e.filter(t=>t!==void 0).join(" \xB7 ")}function ct(e){let t=e.coverage.files_skipped,{too_large:n,unreadable:i}=Z(t),o=[n>0?`${n} too large`:void 0,i>0?`${i} unreadable`:void 0].filter(h=>h!==void 0),r=t.length===0?"none skipped":`${t.length} skipped (${o.join(", ")})`,c=e.detection.languages.filter(h=>h.support==="unsupported"),a=c.length===0?"":` Unsupported ${c.length===1?"language":"languages"}: ${c.map(h=>`${h.name} (${u(h.files.length,"file")})`).join(", ")}.`;return`Deterministic coverage: ${u(e.coverage.files_scanned,"file")} scanned, ${r}.${a}`}function je(e){let t=[...e.include_dirs.map(n=>`--include-dir ${n}`),...e.excludes.map(n=>`--exclude ${n}`),...e.no_git_ignore?["--no-git-ignore"]:[]];return t.length===0?"none":t.join(" ")}function at({deterministic:e,agent:t}){return[...e?[`Scan directories: ${e.document.coverage.scan_directories.map(({directory:n})=>n).join(", ")}`,`Scan scope: ${je(e.document.coverage.scope)}`]:[],...t?[`Scope reported by the agent: ${je(t.document.scope)}`]:[]]}function ut(e,t,n){let i=Ye[e];return t?{name:i,updated:Fe(t.generated_at,n),engine:t.engine.version}:{name:i,updated:"not found"}}function Fe(e,t){let n=Date.parse(e);return Number.isNaN(n)?"unknown":P(new Date(n),t)}function lt(e,t,n,i,o){let r={command:ie(o.scan)};if(!n)return[["Run",r,"or have your coding agent run it."]];let c=[];if(t.withFindings>0){let a=["Fix the issues, then run",r,"again."];e.sources.agent===null?c.push(a,"For a deeper review, have your agent run the same command and record its findings."):i>0?c.push(a):c.push([...a,"To refresh agent findings, have your agent run the command and record its findings."])}return i>0?c.push(["Agent results are older than the deterministic results. Have your coding agent run",r,"and record its findings again to refresh them."]):t.withFindings===0&&e.sources.agent===null&&c.push(["For a deeper review, have your coding agent run",r,{char:"."}]),c}function dt(e){let t=[];return e.filterLine&&t.push({body:{subdued:e.filterLine}}),e.checksWithFindings.length>0&&t.push({title:"Checks with findings",body:{tabularData:e.checksWithFindings.map(n=>[n.severity,n.id,n.counts]),firstColumnSubdued:!0}}),e.otherChecks.length>0&&t.push({title:"Other checks",body:e.otherChecks.join(`
|
|
2
|
+
`)}),e.staleAgentResults&&t.push({body:e.staleAgentResults}),e.coverage&&t.push({body:{subdued:e.coverage}}),e.scopeLines.length>0&&t.push({body:{subdued:e.scopeLines.join(`
|
|
3
|
+
`)}}),e.scopeNote&&t.push({body:e.scopeNote}),t.push({title:`Results files in ${e.resultsFiles.directory}`,body:{tabularData:[["",{subdued:"Updated"},{subdued:"Engine"}],...e.resultsFiles.rows.map(pt)]}}),e.blocking===void 0?e.nextSteps.length>0&&t.push({title:"Next steps",body:{list:{items:e.nextSteps}}}):t.push({title:"Blocking",body:e.blocking}),{type:e.type,options:{headline:e.headline,customSections:t}}}function pt(e){return e.engine===void 0?[e.name,{subdued:e.updated}]:[e.name,e.updated,e.engine]}function ht(e,t){return{type:"warning",options:{headline:`${u(e.length,"check")} unresolved.`,customSections:e.flatMap(n=>[{title:`${n.id} \xB7 ${n.title}`,body:{tabularData:Te(n,{withDispositions:!0}),firstColumnSubdued:!0}},...t?n.findings.map(i=>I(i,t,`${n.id} \xB7 `)):[]])}}}function ft(e,t){let n=e.filter(X).length,i=e.length-n;return{type:"info",options:{headline:[n>0?`${u(n,"check")} passed.`:void 0,i>0?`${u(i,"check")} not applicable.`:void 0].filter(r=>r!==void 0).join(" "),customSections:[{body:{tabularData:e.map(gt)}},...t?e.flatMap(r=>r.findings.map(c=>I(c,t,`${r.id} \xB7 `))):[]]}}}function gt(e){let t=E(e);return[e.id,w([qe[e.status],t===""?void 0:t,m(e)?Ce:void 0])]}function mt(e,t,n){let i=E(e),o=t?e.findings:l(e);return{type:e.severity==="high"?"error":"warning",options:{headline:`${Re[e.severity]} \xB7 ${e.id} \xB7 ${e.title}`,...i===""?{}:{body:{subdued:i}},...e.docs_url?{link:{label:`${e.id} on shopify.dev`,url:e.docs_url}}:{},customSections:[...bt(e,n),...o.map(r=>I(r,t))]}}}function bt(e,t){if(m(e))return[{body:{tabularData:k.flatMap(c=>{let a=e.by_source[c];return a?[[c,Ee(a),Fe(a.generated_at,t)]]:[]}),firstColumnSubdued:!0}},{body:{subdued:Xe}}];let{deterministic:n,agent:i}=e.by_source;return n!==null&&i!==null&&n.status!==i.status?[{body:{tabularData:Te(e,{withDispositions:!1}),firstColumnSubdued:!0}}]:[]}function Te(e,t){let n=m(e),i=k.flatMap(r=>{let c=e.by_source[r];if(!c)return[];let a=n&&r==="agent"?Ce:void 0;return[[r,w([Ee(c),a])]]}),o=t.withDispositions?E(e):"";return o===""?i:[...i,["findings",o]]}function Ee(e){let t=Je[e.status];return e.reason?`${t} \u2014 ${e.reason.message}`:t}function I(e,t,n=""){let i=e.disposition==="active"?"":` (${e.disposition})`,o=[e.message];if(e.snippet&&o.push({subdued:`
|
|
4
|
+
Code: ${e.snippet}`}),e.source==="deterministic"){e.fix&&o.push({subdued:`
|
|
5
|
+
Fix: ${e.fix.description}`});let r=e.fix?.guide;r&&o.push({subdued:`
|
|
6
|
+
Guide: ${r}`})}else e.confidence&&o.push({subdued:`
|
|
7
|
+
Confidence: ${e.confidence}`}),e.reasoning&&o.push({subdued:`
|
|
8
|
+
Reasoning: ${t?e.reasoning:yt(e.reasoning)}`});return t&&(o.push(...e.evidence.map(r=>({subdued:`
|
|
9
|
+
Evidence: ${$e(r.location)}${r.quote?` \u2014 ${r.quote}`:""}`}))),Q(e,e.source)&&e.suppression&&o.push({subdued:`
|
|
10
|
+
Suppressed: ${e.suppression.justification}`})),{title:`${n}${e.source} \xB7 ${$e(e.location)}${i}`,body:o}}function yt(e){let t=e.split(`
|
|
11
|
+
`);return t.length<=_e?e:`${t.slice(0,_e).join(`
|
|
12
|
+
`)}\u2026`}function $e(e){return e.line===void 0?e.file:`${e.file}:${e.line}`}var Ne={executed:"executed",not_applicable:"not-applicable",unresolved:"unresolved"},St={regex:"regex",structured_config:"structured-config",ast:"ast"},vt={react_router:"react-router",none:"none",unknown:"unknown",mixed:"mixed"},kt={react_router:"react-router",theme_app_extension:"theme-app-extension",config_only:"config-only",unknown:"unknown",mixed:"mixed"},wt={too_large:"too-large",unreadable:"unreadable"},At={skipped_file:"skipped-file",unsupported_framework:"unsupported-framework",unsupported_language:"unsupported-language",unresolved_check:"unresolved-check"};function Oe(e,t,n){n==="json"?z(v.encode(_t(e))):xe({result:e.result,verbose:t.verbose,now:new Date,commands:e.commands}),e.result.blocking.blockedChecks>0&&(process.exitCode=1)}function _t({selection:e,result:t}){let{appDirectory:n}=e,i=t.sources.deterministic?.document;return{status:"success",valid:t.blocking.blockedChecks===0,app:oe(e),resultsDirectory:S(t.resultsDirectory),resultsFiles:jt(t.sources),detection:i?$t(i.detection,n):null,coverage:i?Rt(i.coverage,n):null,scopeDiffers:t.scopeDiffers,checks:t.checks.map(o=>Ct(o,n)),blocking:ae(t.blocking)}}function jt({deterministic:e,agent:t}){return{deterministic:e?{path:S(e.path),generatedAt:L(e.document.generated_at),engine:{name:e.document.engine.name,version:e.document.engine.version,ruleset:e.document.engine.ruleset},scope:C(e.document.coverage.scope)}:null,agent:t?{path:S(t.path),generatedAt:L(t.document.generated_at),engine:{name:t.document.engine.name,version:t.document.engine.version},scope:C(t.document.scope)}:null}}function L(e){let t=Date.parse(e);if(Number.isNaN(t))return null;let n=O(new Date(t));return g.safeParse(n).success?n:null}function f(e){return e===void 0||e===""?null:e}function Ie(e){return e??null}function We(e,t){return{filePath:b(t,e.file),line:Ie(e.line),column:Ie(e.column)}}function $t(e,t){return{framework:vt[e.framework],surface:kt[e.surface],languages:e.languages.map(n=>({name:n.name,support:n.support,files:n.files.map(i=>({path:b(t,i)}))}))}}function Rt(e,t){return{filesScanned:e.files_scanned,filesSkipped:e.files_skipped.map(n=>({path:b(t,n.path),reason:wt[n.reason],sizeBytes:n.size_bytes??null,detail:f(n.detail)})),gaps:e.gaps.map(n=>({code:At[n.code],message:n.message,checkId:n.check_id??null,filePath:n.file===void 0?null:b(t,n.file)})),scanDirectories:e.scan_directories.map(n=>ce(t,n))}}function Ct(e,t){return{id:e.id,title:e.title,severity:e.severity,description:e.description,guide:f(e.guide),docsUrl:e.docs_url??null,precedence:e.precedence,appliedPrecedence:e.applied_precedence,status:Ne[e.status],bySource:{deterministic:e.by_source.deterministic?Le(e.by_source.deterministic):null,agent:e.by_source.agent?Le(e.by_source.agent):null},findings:e.findings.map(n=>xt(n,t))}}function Le(e){return{version:e.version,status:Ne[e.status],reason:e.reason?{code:e.reason.code,message:e.reason.message}:null,analysisMode:e.analysis_mode?St[e.analysis_mode]:null,generatedAt:L(e.generated_at)}}function xt(e,t){let n={disposition:e.disposition,location:We(e.location,t),message:e.message,snippet:f(e.snippet),evidence:e.evidence.map(i=>Dt(i,t))};return e.source==="deterministic"?{source:"deterministic",...n,fix:e.fix?{description:e.fix.description,guide:f(e.fix.guide),automated:e.fix.automated}:null}:{source:"agent",...n,confidence:e.confidence??null,reasoning:f(e.reasoning),suppression:e.suppression?{justification:e.suppression.justification}:null}}function Dt(e,t){return{location:We(e.location,t),quote:f(e.quote)}}var Pe=Ue(Be(),1);var N=class e extends G{static summary="Show the combined app security check results.";static descriptionWithMarkdown="Combines the deterministic results (`deterministic-findings.json`, written by `shopify app security check`) with the recorded agent results (`agent-findings.json`, written by `shopify app security record`) and shows one view of every check: its findings, status and source. Both files are in the results directory, `.shopify/app-security/<results key>/`. `--client-id` is checked against your Shopify account before any results are read, so it needs you to be logged in.\n\nThe summary shows the scan directories and the scope of the latest scan, and the scope the agent reported. It notes when the agent findings were recorded for a different scope than the latest scan; that doesn't change the exit code.\n\nThe agent results are optional. Use `--check-id` to narrow the review to specific checks, `--verbose` for full reasoning, evidence and suppressed findings, and `--blocking` to exit with code 1 when a check with findings is at or above a severity. With `--json`, the result always includes every finding in full.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static get jsonOutputSchema(){return v}static description=this.descriptionForHelp();static flags={...q,...V,"check-id":Pe.Flags.string({description:"Show only this check. Repeat the flag to show several checks.",env:"SHOPIFY_FLAG_CHECK_ID",multiple:!0}),...Y,...J};async run(){let{flags:t}=await this.parse(e),n=await x({directory:t.path,configName:t.config,clientId:t["client-id"],withoutAppConfig:!!t["without-app-config"],checkIds:t["check-id"]??[],blocking:t.blocking});Oe(n,{verbose:!!t.verbose},t.json?"json":"text")}};export{N as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-UVRKTMF7.js";import{Ma as D}from"./chunk-3C6VLJ5D.js";import{b as u,d as B}from"./chunk-AJMDF3QC.js";import{b as W,j as y}from"./chunk-H4V55Y3Z.js";import{C as _,J as N,U as F}from"./chunk-CZ22VZDA.js";import{h as s,k as C}from"./chunk-2VSNFOKD.js";import{Sa as A,la as T,qb as m,sb as o}from"./chunk-LWCTKI4Z.js";import{e as z,g as t}from"./chunk-VKWPEFWQ.js";t();var b=z(W(),1);function H(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function J(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}function g(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}if(n.definitions.filter(i=>i.kind==="OperationDefinition").length!==1)throw new s("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}function X(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}return n.definitions.find(i=>i.kind==="OperationDefinition")?.operation==="mutation"}async function Y(e){let{adminSession:n,userSpecifiedVersion:a,minimumDefaultVersion:i}=e;if(a==="unstable")return a;let r=await B(n);if(!a){let c=r.filter(v=>v.supported).map(v=>v.handle);i&&c.push(i);let f=c.sort().reverse()[0];if(!f)throw new s("No supported API versions available for this store.");return f}let l=r.map(c=>c.handle);if(l.includes(a))return a;let d=o`Invalid API version: ${a}`.value,k=o`Allowed versions: ${l.join(", ")}`.value;throw new s(d,k)}t();t();var p="2026-01";t();async function E(e){let n;if(e.query!==void 0){if(!e.query.trim())throw new s("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");n=e.query}else if(e.queryFile){if(!await A(e.queryFile))throw new s(o`Query file not found at ${m.path(e.queryFile)}. Please check the path and try again.`);let a=await T(e.queryFile,{encoding:"utf8"});if(!a.trim())throw new s(o`Query file at ${m.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);n=a}else throw new C("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");return g(n),n}t();t();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function Z(e){let{adminSession:n,query:a,version:i}=e;return(await u({query:R,session:n,variables:{query:a},...i&&{version:i}})).bulkOperationRunQuery}t();t();t();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function h(e){let{adminSession:n,variablesJsonl:a}=e,i=Buffer.from(a??"","utf-8"),r="bulk-variables.jsonl",l=i.length,d=await ee(n,r,l),k=ne(d);return await ie(i,k.url,k.parameters,r),k.stagedUploadKey}async function ee(e,n,a){return u({query:L,session:e,variables:{input:[{filename:n,fileSize:a.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function ne(e){if(!e.stagedUploadsCreate)throw new s("No response received from stagedUploadsCreate mutation");if(e.stagedUploadsCreate.userErrors.length>0){let i=e.stagedUploadsCreate.userErrors.map(r=>r.message).join(", ");throw new s(`Failed to create staged upload: ${i}`)}let n=e.stagedUploadsCreate.stagedTargets?.[0];if(!n)throw new s("No staged upload target returned from Shopify");if(!n.url||!n.resourceUrl)throw new s("Invalid staged upload target: missing required URLs");let a=n.parameters.find(i=>i.name==="key")?.value;if(!a)throw new s("No key parameter found in staged upload target");return{url:n.url,resourceUrl:n.resourceUrl,parameters:n.parameters,stagedUploadKey:a}}async function ie(e,n,a,i){let r=new FormData;for(let d of a)r.append(d.name,d.value);r.append("file",new Blob([new Uint8Array(e)],{type:"text/jsonl"}),i);let l=await N({title:o`Uploading bulk operation variables`,task:async()=>y(n,{method:"POST",body:r},"slow-request"),renderOptions:{stdout:process.stderr}});if(!l.ok){let d=await l.text();throw new s(`Failed to upload file to staged URL: ${l.statusText}
|
|
2
2
|
${d}`)}}t();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mutation"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunMutation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"mutation"},value:{kind:"Variable",name:{kind:"Name",value:"mutation"}}},{kind:"Argument",name:{kind:"Name",value:"stagedUploadPath"},value:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}}},{kind:"Argument",name:{kind:"Name",value:"clientIdentifier"},value:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function ae(e){let{adminSession:n,query:a,variablesJsonl:i,version:r}=e,l=await h({adminSession:n,variablesJsonl:i});return(await u({query:U,session:n,variables:{mutation:a,stagedUploadPath:l},...r&&{version:r}})).bulkOperationRunMutation}t();t();var S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};t();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function te(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:S,session:n,variables:{id:a},version:i??p})).bulkOperation}async function re(e){let{adminSession:n,version:a,sinceDays:i=7,first:r=100}=e,l=new Date(Date.now()-i*24*60*60*1e3).toISOString().split("T")[0];return(await u({query:q,session:n,variables:{query:`created_at:>=${l}`,first:r,sortKey:"CREATED_AT"},version:a??p})).bulkOperations.nodes}t();t();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationCancel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationCancel"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"fileSize"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"query"}},{kind:"Field",name:{kind:"Name",value:"rootObjectCount"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function oe(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:P,session:n,variables:{id:a},version:i??p})).bulkOperationCancel}t();t();function O(e){switch(e.status){case"RUNNING":return o`Bulk operation in progress${e.objectCount>0?m.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return o`Starting`;case"COMPLETED":return o`Bulk operation succeeded: ${m.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return o`Bulk operation failed. ${m.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return o`Bulk operation canceling...`;case"CANCELED":return o`Bulk operation canceled.`;case"EXPIRED":return o`Bulk operation expired.`;default:return o`Bulk operation status: ${e.status}`}}function le(e,n){let a=e.map(i=>o`${i.field?.join(".")??"unknown"}: ${i.message}`.value).join(`
|
|
3
3
|
`);_({headline:n,body:a})}function de(e){let n=O(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let a=[o`ID: ${m.cyan(e.id)}`.value,o`Status: ${m.yellow(e.status)}`.value,o`Created at: ${m.gray(String(e.createdAt))}`.value,...e.completedAt?[o`Completed at: ${m.gray(String(e.completedAt))}`.value]:[]];return{headline:o`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:o`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:a}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:n,renderType:"info"}}}var se=["COMPLETED","FAILED","CANCELED","EXPIRED"],V=1,ue=5,M=10,$=3e3,Q=300;async function me(e,n){return N({title:o`Starting bulk operation`,task:async()=>{let a=Date.now(),i=j({adminSession:e,operationId:n,pollIntervalSeconds:Q/1e3,useAdaptivePolling:!1}),r;do{let{value:l,done:d}=await i.next();if(r=l,d)return r}while(Date.now()-a<$);return r},renderOptions:{stdout:process.stderr}})}async function ke(e,n,a,i){return N({title:o`Polling bulk operation`,task:async r=>{let l=j({adminSession:e,operationId:n,pollIntervalSeconds:ue,initialPollIntervalSeconds:V,initialPollCount:M,useAdaptivePolling:!0,abortSignal:a});for(;;){let{value:d,done:k}=await l.next();if(k)return d;r(O(d))}},onAbort:i,renderOptions:{stdout:process.stderr}})}async function*j({adminSession:e,operationId:n,pollIntervalSeconds:a,useAdaptivePolling:i=!1,initialPollIntervalSeconds:r=V,initialPollCount:l=M,abortSignal:d}){let k=0;for(;;){let c=await pe(e,n);if(!c.bulkOperation)throw new Error("bulk operation not found");let f=c.bulkOperation;if(se.includes(f.status)||d?.aborted)return f;yield f,k++;let v=a;if(i&&k<=l&&(v=r),d){let w,K=new Promise(G=>{let I=()=>G();d.addEventListener("abort",I,{once:!0}),w=()=>d.removeEventListener("abort",I)});await Promise.race([F(v),K]),w?.()}else await F(v)}}async function pe(e,n){return u({query:S,session:e,variables:{id:n},version:p})}t();async function ce(e){let n=await y(e);if(!n.ok)throw new s(`Failed to download bulk operation results: ${n.statusText}`);return n.text()}function ve(e){return e.trim().split(`
|
|
4
4
|
`).filter(a=>a.trim().length>0).some(a=>{let i;try{i=JSON.parse(a)}catch(l){if(l instanceof SyntaxError)return!1;throw l}if(Array.isArray(i.errors)&&i.errors.length>0)return!0;if(!i.data)return!1;let r=Object.values(i.data)[0];return r?.userErrors!==void 0&&r.userErrors.length>0})}t();async function fe(e){let n=await D({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),a=await x({appContextResult:n,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:n,store:a}}async function Jn(e){let n=await E({query:e.query,queryFile:e["query-file"]}),{appContextResult:a,store:i}=await fe(e);return{query:n,appContextResult:a,store:i}}export{p as a,H as b,J as c,g as d,X as e,Y as f,E as g,Z as h,ae as i,te as j,re as k,oe as l,O as m,le as n,de as o,me as p,ke as q,ce as r,ve as s,fe as t,Jn as u};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as $}from"./chunk-UVRKTMF7.js";import{a as V}from"./chunk-ZGV3HNEV.js";import{a as w}from"./chunk-FWB3GLMW.js";import{L as P,Ma as x}from"./chunk-3C6VLJ5D.js";import{e as L}from"./chunk-AJMDF3QC.js";import{b as ae}from"./chunk-UOS2XLGG.js";import{D,S as T,ea as A,ia as j,u as g}from"./chunk-H4V55Y3Z.js";import{b as E,c as M}from"./chunk-Q2SZCZE7.js";import{I as R,J as k,z as O}from"./chunk-CZ22VZDA.js";import{a as h}from"./chunk-BN7ZXAZJ.js";import{k as I}from"./chunk-2VSNFOKD.js";import{qb as p,sb as c,wb as C,yb as v}from"./chunk-LWCTKI4Z.js";import{b as m}from"./chunk-FZCGRIOM.js";import{b as te}from"./chunk-YTUUU33R.js";import{e as _,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"30"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetafieldForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetafieldForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetafieldDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}},{kind:"Field",name:{kind:"Name",value:"customerAccount"}}]}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminFilterable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]};r();async function de(i){let n="Admin",e=L(i.storeFqdn,"unstable");return{token:i.token,api:n,url:e}}async function U(i){return j({query:i.query,...await de(i.session),variables:i.variables,autoRateLimitRestore:i.autoRateLimitRestore})}r();var K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metaobjectDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaobjectDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaobjectForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetaobjectForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetaobjectDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}}]}},{kind:"Field",name:{kind:"Name",value:"displayNameKey"}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"translatable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"renderable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaTitleKey"}},{kind:"Field",name:{kind:"Name",value:"metaDescriptionKey"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"fieldDefinitions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"required"}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]}}]};var H=_(ae(),1);var oe={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",customer:"CUSTOMER",delivery_customization:"DELIVERY_CUSTOMIZATION",delivery_method:"DELIVERY_METHOD",delivery_option_generator:"DELIVERY_OPTION_GENERATOR",discount:"DISCOUNT",draft_order:"DRAFTORDER",fulfillment_constraint_rule:"FULFILLMENT_CONSTRAINT_RULE",gift_card_transaction:"GIFT_CARD_TRANSACTION",order_routing_location_rule:"ORDER_ROUTING_LOCATION_RULE",payment_customization:"PAYMENT_CUSTOMIZATION",selling_plan:"SELLING_PLAN",shop:"SHOP",validation:"VALIDATION",variant:"PRODUCTVARIANT",cart_transform:"CARTTRANSFORM"};async function B({query:i,session:n,toNodes:e,toVariables:t,performQuery:d=a=>U({query:i,session:n,variables:a,autoRateLimitRestore:!0})}){let a;try{let o=e(await d(t(a))),s=[];for(s.push(...o.nodes);o.pageInfo.hasNextPage;)a=o.pageInfo.endCursor,o=e(await d(t(a))),s.push(...o.nodes);return{status:"ok",items:s}}catch(o){if(o instanceof Error&&o.message.includes("ACCESS_DENIED"))return{status:"scope_error"};throw o}}function G(i,n){let e="";for(let t of i)e=(0,H.updateTomlValues)(e,t);return`# ${n}
|
|
2
|
+
${e}`}function se(i,n){let e=n.map(fe).map(a=>{switch(a.status){case"ok":{let{typeName:o,patches:s}=a;return G(s,`type: $app:${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null),t=i.flatMap(({items:a,ownerType:o,graphQLOwner:s})=>a.map(l=>({result:pe(l,o),graphQLOwner:s}))).map(({result:a,graphQLOwner:o})=>{switch(a.status){case"ok":{let{namespace:s,key:l,patches:S}=a;return G(S,`namespace: ${s==="app"?"$app":`$app:${s}`} key: ${l} owner_type: ${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null);return{tomlContent:[...e,...t].join(`
|
|
3
|
+
`),metafieldCount:t.length,metaobjectCount:e.length}}async function Y(i){let n=await ue(i),e=await le(n),t=await re(n),d=e.nodes,a=t.nodes;i.includeExistingDeclaredDefinitions||(d=me(d,i.appConfiguration),a=ce(a,i.appConfiguration));let{tomlContent:o,metafieldCount:s,metaobjectCount:l}=se(d,a);return{status:"success",storeDomain:n.storeFqdn,metafieldCount:s,metaobjectCount:l,tomlContent:o,skippedSections:[...e.skippedSections,...t.skippedSections]}}async function le(i){let n=[];return await R(Object.entries(oe).map(([e,t])=>({title:c`Loading ${p.green(e)} metafields`,task:async()=>{let d=await B({query:q,session:i,toNodes:a=>a.metafieldDefinitions,toVariables:a=>({ownerType:t,after:a})});n.push({metafields:d,ownerType:e,graphQLOwner:t})}}))),{nodes:n.map(({metafields:e,ownerType:t,graphQLOwner:d})=>e.status==="ok"?{ownerType:t,items:e.items,graphQLOwner:d}:null).filter(e=>e!==null),skippedSections:n.filter(({metafields:e})=>e.status==="scope_error").map(({graphQLOwner:e})=>({type:"metafields",ownerType:e}))}}async function re(i){let n=await k({title:c`Loading ${p.green("metaobjects")}`,task:async()=>B({query:K,session:i,toNodes:e=>e.metaobjectDefinitions,toVariables:e=>({after:e})})});return n.status==="ok"?{nodes:n.items,skippedSections:[]}:{nodes:[],skippedSections:[{type:"metaobjects"}]}}function me(i,n){return i.map(e=>{let t=e.items.filter(d=>!J(n,[e.ownerType,"metafields",f(d.namespace)??"",d.key]));return t.length>0?{...e,items:t}:null}).filter(e=>e!==null)}function ce(i,n){return i.filter(e=>!J(n,["metaobjects","app",f(e.type)??""]))}function J(i,n){let e=i;for(let t of n){if(!e[t])return!1;e=e[t]}return!0}async function ue(i){let{remoteApp:n,store:e}=i,t=n.apiSecretKeys[0]?.secret;if(!t)throw new I("No API secret keys found for app");return await T(e.shopDomain,n.apiKey,t)}function f(i){if(!i.match(/^app--\d+/))return null;let n="app";return i.match(/^app--\d+--/)&&(n=i.replace(/^app--\d+--/,"")),n}function pe(i,n){let e=f(i.namespace);if(!e)return{status:"not_app_reserved"};let t=i.key,d=ke(i),a=be(d,n,e,t);return{status:"ok",key:t,namespace:e,patches:a}}function fe(i){let n=f(i.type);if(!n)return{status:"not_app_reserved"};let e=ve(i,n),t=Ne(e,n);return{status:"ok",typeName:n,patches:t}}function ke(i){let n={name:i.name===i.key?void 0:i.name,type:i.type.name,description:i.description??void 0,capabilities:u({admin_filterable:i.capabilities.adminFilterable.enabled||void 0}),access:u({admin:Z(i.access.admin),storefront:X(i.access.storefront),customer_account:Se(i.access.customerAccount)}),validations:z(i.validations)},{type:e,validations:t}=W(n.type,n.validations);return n.type=e,n.validations=t,n}function ve(i,n){return{name:i.name===n?void 0:i.name,description:i.description??void 0,display_name_field:i.displayNameKey??void 0,access:u({admin:Z(i.access.admin),storefront:X(i.access.storefront)}),capabilities:u({translatable:i.capabilities.translatable.enabled||void 0,publishable:i.capabilities.publishable.enabled||void 0,renderable:i.capabilities.renderable?.enabled||void 0,renderable_meta_title_field:i.capabilities.renderable?.data?.metaTitleKey??void 0,renderable_meta_description_field:i.capabilities.renderable?.data?.metaDescriptionKey??void 0}),fields:Object.fromEntries(i.fieldDefinitions.map(e=>{let t={type:e.type.name,description:e.description??void 0,name:e.name===e.key?void 0:e.name,required:e.required||void 0,validations:z(e.validations)},{type:d,validations:a}=W(t.type,t.validations);return t.type=d,t.validations=a,[e.key,t]}))}}function W(i,n){if(!n)return{type:i,validations:void 0};if(n.metaobject_definition_type&&typeof n.metaobject_definition_type=="string"){let e=f(n.metaobject_definition_type);return{type:`${i}<$app:${e}>`,validations:u({...n,metaobject_definition_type:void 0})}}if(n.metaobject_definition_types&&Array.isArray(n.metaobject_definition_types)&&n.metaobject_definition_types.every(e=>typeof e=="string")){let e=n.metaobject_definition_types.map(t=>f(t));return{type:`${i}<${e.map(t=>`$app:${t}`).join(",")}>`,validations:u({...n,metaobject_definition_types:void 0})}}return{type:i,validations:n}}function z(i){let n=e=>{try{return JSON.parse(e)}catch{return e}};return u(Object.fromEntries(i.filter(e=>e.value!==void 0&&e.name!=="metaobject_definition_id"&&e.name!=="metaobject_definition_ids").map(e=>[e.name,e.value?n(e.value):void 0])))}function be(i,n,e,t){let d=[[[n,"metafields",e,t,"name"],i.name],[[n,"metafields",e,t,"type"],i.type],[[n,"metafields",e,t,"description"],i.description]],a=[[[n,"metafields",e,t,"access","admin"],i.access?.admin],[[n,"metafields",e,t,"access","storefront"],i.access?.storefront],[[n,"metafields",e,t,"access","customer_account"],i.access?.customer_account],[[n,"metafields",e,t,"capabilities","admin_filterable"],i.capabilities?.admin_filterable||void 0]];return i.validations&&Q(i.validations).forEach(({validationKey:s,actualValue:l})=>{d.push([[n,"metafields",e,t,"validations",s],l])}),[b(d),b(a)]}function Ne(i,n){let e=[[["metaobjects","app",n,"name"],i.name===n?void 0:i.name],[["metaobjects","app",n,"description"],i.description],[["metaobjects","app",n,"display_name_field"],i.display_name_field]],t=[[["metaobjects","app",n,"access","admin"],i.access?.admin],[["metaobjects","app",n,"access","storefront"],i.access?.storefront]];return i.capabilities?.translatable&&t.push([["metaobjects","app",n,"capabilities","translatable"],!0]),i.capabilities?.publishable&&t.push([["metaobjects","app",n,"capabilities","publishable"],!0]),i.capabilities?.renderable&&(t.push([["metaobjects","app",n,"capabilities","renderable"],!0]),i.capabilities?.renderable_meta_title_field&&t.push([["metaobjects","app",n,"capabilities","renderable_meta_title_field"],i.capabilities.renderable_meta_title_field]),i.capabilities?.renderable_meta_description_field&&t.push([["metaobjects","app",n,"capabilities","renderable_meta_description_field"],i.capabilities.renderable_meta_description_field])),Object.entries(i.fields).forEach(([d,a])=>{if(typeof a=="string")e.push([["metaobjects","app",n,"fields",d],a]);else{let o=Object.fromEntries(Object.entries(a).filter(([s,l])=>l!==void 0));Object.keys(o).length===1?e.push([["metaobjects","app",n,"fields",d],a.type]):(e.push([["metaobjects","app",n,"fields",d,"type"],a.type]),e.push([["metaobjects","app",n,"fields",d,"description"],a.description]),e.push([["metaobjects","app",n,"fields",d,"name"],a.name]),e.push([["metaobjects","app",n,"fields",d,"required"],a.required||void 0]),a.validations&&Q(a.validations).forEach(({validationKey:l,actualValue:S})=>{e.push([["metaobjects","app",n,"fields",d,"validations",l],S])}))}}),[b(e),b(t)]}function Q(i){return Object.entries(i).map(([n,e])=>{let t;return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||Array.isArray(e)&&e.every(d=>typeof d=="string")?t=e:t=JSON.stringify(e),{validationKey:n,actualValue:t}})}function Z(i){switch(i){case"MERCHANT_READ_WRITE":return"merchant_read_write";case"MERCHANT_READ":case"PRIVATE":case"PUBLIC_READ":case"PUBLIC_READ_WRITE":case null:case void 0:return}}function X(i){switch(i){case"PUBLIC_READ":return"public_read";case"NONE":case null:case void 0:return}}function Se(i){switch(i){case"READ":return"read";case"READ_WRITE":return"read_write";case"NONE":case null:case void 0:return}}function u(i){if(i&&!A(i)&&!(typeof i=="object"&&Object.values(i).every(n=>n===void 0)))return i}function b(i){return i.filter(([n,e])=>e!==void 0)}r();var ee=m.object({type:m.literal("metafields"),ownerType:m.string().min(1).describe("The Admin API metafield owner type, such as PRODUCT.")}).strict(),ie=m.object({type:m.literal("metaobjects")}).strict(),N=h({name:"ImportCustomDataDefinitionsResult",schema:m.object({status:m.literal("success"),storeDomain:m.string().nullable().describe("The full myshopify.com domain of the development store, or null when unavailable."),metafieldCount:m.number().int().nonnegative().describe("The number of available metafields converted to TOML."),metaobjectCount:m.number().int().nonnegative().describe("The number of available metaobjects converted to TOML."),toml:m.string().describe("Suggested native TOML for app-reserved definitions. No file is written."),skippedSections:m.array(m.discriminatedUnion("type",[ee,ie])).describe("Sections skipped because required access scopes are unavailable. An empty array means all requests were authorized.")}).strict(),definitions:{SkippedMetafields:ee,SkippedMetaobjects:ie}});r();function ne({status:i,metafieldCount:n,metaobjectCount:e,storeDomain:t,tomlContent:d,skippedSections:a},o=!1){if(o){let s=D(t);C(N.encode({status:i,storeDomain:s?`${s}.myshopify.com`:null,metafieldCount:n,metaobjectCount:e,toml:d,skippedSections:a.map(l=>l.type==="metafields"?{type:l.type,ownerType:l.ownerType}:{type:l.type})}));return}O({headline:"Conversion to TOML complete.",body:["Converted",{warn:`${n} metafields`},"and",{warn:`${e} metaobjects`},"from",{warn:t},"into TOML, ready for you to copy."],orderedNextSteps:!0,nextSteps:["Review the suggested TOML carefully before applying.",["Missing sections? Make sure your app has the required access scopes to load metafields and metaobjects (e.g.",{command:"read_customers"},"to load customer metafields,",{command:"read_metaobject_definitions"},"to load metaobjects.)"],["Missing definitions? Only metafields and metaobjects that are app-reserved (using",{command:"$app"},") will be converted."],["When you're ready, add the generated TOML to your app's configuration file and test out changes with the",{command:"shopify app dev"},"command."]]}),ye(d)}function ye(i){let n=i.split(`
|
|
4
|
+
`);for(let e of n)e.match(/^\s*\[/)?v(c`${p.green(e)}`):e.match(/^\s*#/)?v(c`${p.gray(e)}`):v(c`${e}`)}var y=_(te(),1);var F=class i extends V{static summary="Import metafield and metaobject definitions.";static descriptionWithMarkdown="Import metafield and metaobject definitions from your development store. [Read more about declarative custom data definitions](https://shopify.dev/docs/apps/build/custom-data/declarative-custom-data-definitions).";static get jsonOutputSchema(){return N}static description=this.descriptionForHelp();static flags={...E,...w,...M,store:y.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async n=>g(n)}),"include-existing":y.Flags.boolean({description:"Include existing declared definitions in the output.",default:!1,env:"SHOPIFY_FLAG_INCLUDE_EXISTING"})};async run(){let{appContextResult:n,json:e,...t}=await k({title:c`Loading application`,task:async()=>{let{flags:a}=await this.parse(i);await P(a.path);let o=await x({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),s=await $({appContextResult:o,storeFqdn:a.store,forceReselectStore:a.reset});return{appContextResult:o,json:a.json,appConfiguration:o.app.configuration,remoteApp:o.remoteApp,store:s,includeExistingDeclaredDefinitions:a["include-existing"]}}}),d=await Y(t);return ne(d,e),{app:n.app}}};export{F as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
1
|
+
import{b as a}from"./chunk-I6FRVYGE.js";import{b as s}from"./chunk-ZQDDRIBA.js";import{Ea as i}from"./chunk-H4V55Y3Z.js";import{b as m}from"./chunk-YTUUU33R.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static description="List current notifications configured for the CLI.";static hidden=!0;static flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})};async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as S}from"./chunk-FKIVKNOV.js";import{a as R}from"./chunk-T2IUXXCT.js";import{a as f}from"./chunk-7GHSE7SG.js";import{a as C}from"./chunk-ZGV3HNEV.js";import{a as j}from"./chunk-FWB3GLMW.js";import{Ma as k,O}from"./chunk-3C6VLJ5D.js";import{b as y}from"./chunk-7UOA4DI7.js";import{b as w,c as A}from"./chunk-Q2SZCZE7.js";import{a as g}from"./chunk-BN7ZXAZJ.js";import{Sa as F,la as E,qb as l,sb as c,ta as x,wb as P}from"./chunk-LWCTKI4Z.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as m,g as b}from"./chunk-IWTNUJGY.js";import{e as H,g as o}from"./chunk-VKWPEFWQ.js";o();o();async function $({app:n,remoteApp:e,organization:a,envFile:i}){let{variables:s}=await R(n,e,a),t=m(i),p=await F(t)?await E(t):null,d=y(p,Object.fromEntries(s.map(({name:N,value:T})=>[N,T]))),v=d!==p;return v&&await x(t,d),{result:{path:t,status:"success",changed:v,variables:s,content:d},previousContent:p}}o();var u=g({name:"AppEnvPullResult",schema:r.object({path:r.string().refine(b,"Expected an absolute path").describe("The absolute native dotenv file path."),status:r.literal("success"),changed:r.boolean().describe("Whether the dotenv file was created or updated."),variables:r.array(f).describe("The known app variables, not unrelated local variables."),content:r.string().describe("The complete native dotenv content, preserving existing variables and comments.")}).strict(),definitions:{AppEnvironmentVariable:f}});o();import{resolve as V}from"node:path";function W({result:n,previousContent:e},a){if(a==="json")return u.encode({...n,path:V(n.path)});let{path:i,changed:s,content:t}=n;return s?e===null?c`Created ${l.path(i)}:
|
|
2
|
+
|
|
3
|
+
${t}
|
|
4
|
+
`:c`Updated ${l.path(i)} to be:
|
|
5
|
+
|
|
6
|
+
${t}
|
|
7
|
+
|
|
8
|
+
Here's what changed:
|
|
9
|
+
|
|
10
|
+
${l.linesDiff(S(e??"",t))}
|
|
11
|
+
`:c`No changes to ${l.path(i)}`}function J(n,e){P(W(n,e))}var L=H(I(),1);var h=class n extends C{static summary="Pull app and extensions environment variables.";static descriptionWithMarkdown="Creates or updates an `.env` files that contains app and app extension environment variables.\n\n When an existing `.env` file is updated, changes to the variables are displayed in the terminal output. Existing variables and commented variables are preserved.";static get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...w,...A,...j,"env-file":L.Flags.string({hidden:!1,description:"Specify an environment file to update if the update flag is set",env:"SHOPIFY_FLAG_ENV_FILE"})};async run(){let{flags:e}=await this.parse(n),{app:a,remoteApp:i,organization:s}=await k({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),t=m(a.directory,e["env-file"]??O(a.configPath)),p=await $({app:a,remoteApp:i,organization:s,envFile:t});return J(p,e.json?"json":"text"),{app:a}}};export{h as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{b as R,c as p}from"./chunk-BAHIL37I.js";import{b as v}from"./chunk-ZQDDRIBA.js";import{k as y}from"./chunk-H4V55Y3Z.js";import{b as g,c as w}from"./chunk-Q2SZCZE7.js";import{h as i}from"./chunk-2VSNFOKD.js";import{wb as m}from"./chunk-LWCTKI4Z.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as P,g as s}from"./chunk-VKWPEFWQ.js";s();s();var O="https://shopify.dev/assistant/search",_="X-Shopify-Surface",j="cli",D=d.array(R.strip().extend({domain:d.string().nullish()}));async function x(t,e,c){let h=new URLSearchParams({query:t});e&&h.append("api_name",e),c&&h.append("api_version",c);let a;try{a=await y(`${O}?${h.toString()}`,{headers:{Accept:"application/json",[_]:j}})}catch{throw new i("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let n=await a.text();if(!a.ok){let r=`${a.status} ${a.statusText}`;try{let o=JSON.parse(n);o?.error&&(r=o.error)}catch(o){if(!(o instanceof SyntaxError))throw o}throw new i(`Search failed: ${r}`)}let l;try{l=JSON.parse(n)}catch(r){if(!(r instanceof SyntaxError))throw r;return{status:"invalid-response",body:n}}let S=D.safeParse(l);return S.success?{status:"success",results:S.data.map(({score:r,content:o,url:b,title:E,domain:F})=>({score:r,content:o,url:b,title:E,domain:F??null})),pageInfo:{hasNextPage:null},body:n}:{status:"invalid-response",body:n}}s();function A(t,e){if(e==="text"){m(t.body);return}if(t.status==="invalid-response")throw new i("Search returned an invalid documentation response.");m(p.encode({results:t.results,pageInfo:t.pageInfo}))}var u=P(I(),1),f=class t extends v{static descriptionWithMarkdown="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static description=this.descriptionForHelp();static examples=[`# search shopify.dev for a topic
|
|
2
|
+
shopify doc search --query "subscribe to webhooks"
|
|
3
|
+
|
|
4
|
+
# narrow the search to a specific API and version
|
|
5
|
+
shopify doc search --query "create a product" --api-name admin --api-version latest`,`# return typed documentation results as a JSON object
|
|
6
|
+
shopify doc search --query "subscribe to webhooks" --json`];static flags={...g,...w,query:u.Flags.string({description:"The search query.",env:"SHOPIFY_FLAG_QUERY",required:!0}),"api-name":u.Flags.string({description:"Limit results to a specific API (for example: admin, storefront, hydrogen, functions). Unrecognized values are ignored.",env:"SHOPIFY_FLAG_API_NAME"}),"api-version":u.Flags.string({description:"Limit results to a specific API version (for example: 2025-10, latest, current).",env:"SHOPIFY_FLAG_API_VERSION"})};static get jsonOutputSchema(){return p}async run(){let{flags:e}=await this.parse(t),c=await x(e.query,e["api-name"],e["api-version"]);A(c,e.json?"json":"text")}};export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,d as f,e as u}from"./chunk-LHKVXJPX.js";import{d as c,f as w,j as T}from"./chunk-5TB52UUV.js";import{g as d}from"./chunk-DJAZBPYA.js";import{G as s}from"./chunk-CZ22VZDA.js";import{h as l}from"./chunk-2VSNFOKD.js";import{T as i}from"./chunk-LWCTKI4Z.js";import{g as h}from"./chunk-VKWPEFWQ.js";h();async function q(e,r){let n=await m(e),t=new u(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",p=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&p.unshift(g(e)),(await s({message:y,choices:p}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new u(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return{...t,createdAtRuntime:!0}},label:"[Create a new theme]",group:i(c)}}export{q as a,B as b,C as c};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as L}from"./chunk-XBQDMGUN.js";import{N as H}from"./chunk-3C6VLJ5D.js";import{s as W}from"./chunk-WDFCOZAY.js";import{a as X}from"./chunk-VJEKDBGZ.js";import{a as D,d as T,x as k}from"./chunk-CZ22VZDA.js";import{h as S}from"./chunk-2VSNFOKD.js";import{Ba as I,Bb as p,Sa as A,Ta as y,ab as w,ma as O,va as g}from"./chunk-LWCTKI4Z.js";import{g as N}from"./chunk-3A3DZVEJ.js";import{c as x,d as m,f as v,h as P}from"./chunk-IWTNUJGY.js";import{e as J,g as u}from"./chunk-VKWPEFWQ.js";u();function _(){return process.hrtime()}function U(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}u();u();var $=J(X(),1),q=200,K=6e4,M=200,Y=500,Q=["**/node_modules/**","**/.git/**","**/.shopify/**","**/.DS_Store","**/*.swp","**/*.swo","**/*~"],b=class{currentEvents=[];extensionPaths=[];app;options;onChangeCallback;watcher;debouncedEmit;ignored={};extensionWatchedFiles=new Map;constructor(t,e,s=q){this.app=t,this.options=e,this.debouncedEmit=k(this.emitEvents.bind(this),s,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let e=[...this.app.configuration.extension_directories??["extensions"]].map(a=>x(this.app.directory,a));await Promise.all(e.map(async a=>{try{await g(a.replace(/\/\*+$/,""))}catch{}}));let s=[this.app.configPath,...e],i=this.getAllWatchedFiles();s.push(...i),this.close();let{default:n}=await import("./chokidar-5RWEYTNQ.js"),o=new Map;this.watcher=n.watch(s,{ignored:[...Q,a=>{let d=m(a);return this.app.realExtensions.some(c=>{if(!c.isFunctionExtension)return!1;let h=m(x(c.directory,P(c.outputRelativePath)));return d===h||d.startsWith(`${h}/`)})||Z(d,o)}],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),p(`File watcher started with ${s.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(e=>m(e.directory)).filter(e=>e!==this.app.directory),this.extensionPaths.forEach(e=>{this.ignored[e]??=this.createIgnoreInstance(e)})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(s=>({extension:s,watchedFiles:s.watchedFiles()})),e=new Set;for(let{extension:s,watchedFiles:i}of t)for(let n of i){let o=m(n);e.add(o);let a=this.extensionWatchedFiles.get(o)??new Set;a.add(s.handle),this.extensionWatchedFiles.set(o,a)}return Array.from(e)}emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(s=>s.path).join(`
|
|
2
|
+
`)}`;p(e,this.options.stdout),this.onChangeCallback?.(t)};pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(e=>e.path===t.path&&e.type===t.type&&e.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(m(t.path))?.has(t.extensionHandle))return!1;let s=(t.extensionHandle?this.app.realExtensions.find(n=>n.handle===t.extensionHandle):void 0)?.watchedFiles(),i=this.ignored[t.extensionPath];if(s)return!s.some(o=>w(t.path,o));if(i){let n=v(t.extensionPath,t.path);return i.ignores(n)}return!1}handleFileEvent=(t,e)=>{let s=_(),i=m(e),n=e===this.app.configPath,o=e.endsWith(".extension.toml");if(p(`\u{1F300}: ${t} ${e.replace(this.app.directory,"")}
|
|
3
|
+
`),n)this.handleEventForExtension(t,e,this.app.directory,s,!1);else{let a=this.extensionWatchedFiles.get(i),d=a===void 0||a.size===0;if(d&&t==="add"&&!o){let l=this.discoverFileOwners(i);l.size>0&&(this.extensionWatchedFiles.set(i,l),a=l,d=!1)}if(d&&!o&&!n){p(`\u{1F300}: File ${e} is not watched by any extension`,this.options.stdout);return}for(let l of a??[]){let c=this.app.realExtensions.find(E=>E.handle===l),h=c?m(c.directory):this.app.directory;this.handleEventForExtension(t,e,h,s,!1,l)}d&&this.handleEventForExtension(t,e,this.app.directory,s,!0)}this.debouncedEmit()};discoverFileOwners(t){let e=new Set;for(let s of this.app.realExtensions){let i=m(s.directory);i!==this.app.directory&&t.startsWith(`${i}/`)&&this.pathMatchesWatchPatterns(t,s)&&e.add(s.handle)}return e}pathMatchesWatchPatterns(t,e){let{paths:s,ignore:i}=e.watchPatterns(),n=v(m(e.directory),t);return i.some(o=>w(n,o))?!1:s.some(o=>w(n,o))}handleEventForExtension(t,e,s,i,n,o){let a=e.endsWith(".extension.toml"),d=e===this.app.configPath;switch(t){case"change":if(n)break;a||d?this.pushEvent({type:"extensions_config_updated",path:e,extensionPath:s,extensionHandle:o,startTime:i}):this.pushEvent({type:"file_updated",path:e,extensionPath:s,extensionHandle:o,startTime:i});break;case"add":if(!a){this.pushEvent({type:"file_created",path:e,extensionPath:s,extensionHandle:o,startTime:i});break}let l=0,c=P(e),h=setInterval(()=>{y(x(c,W.lockFile))?(p(`Waiting for extension to complete creation: ${e}
|
|
4
|
+
`),l+=M):(clearInterval(h),this.extensionPaths.push(c),this.pushEvent({type:"extension_folder_created",path:c,extensionPath:s,startTime:i}),this.debouncedEmit()),l>=K&&(clearInterval(h),this.options.stderr.write(`Error loading new extension at path: ${e}.
|
|
5
|
+
Please restart the process.`))},M);break;case"unlink":if(e.endsWith(W.lockFile))break;d?this.pushEvent({type:"app_config_deleted",path:e,extensionPath:s,startTime:i}):a?(this.extensionPaths=this.extensionPaths.filter(E=>E!==s),this.pushEvent({type:"extension_folder_deleted",path:s,extensionPath:s,startTime:i})):setTimeout(()=>{this.extensionPaths.includes(s)&&(this.pushEvent({type:"file_deleted",path:e,extensionPath:s,extensionHandle:o,startTime:i}),this.extensionWatchedFiles.delete(m(e)),this.debouncedEmit())},Y);break;case"addDir":case"unlinkDir":break}}close=()=>{this.watcher&&(p("Closing file watcher",this.options.stdout),this.watcher.close().then(()=>p("File watching closed",this.options.stdout)).catch(t=>p(`File watching failed to close: ${t.message}`,this.options.stderr)))};createIgnoreInstance(t){let e=x(t,".gitignore");if(!y(e))return;let s=O(e).toString().split(`
|
|
6
|
+
`).map(i=>i.trim()).filter(i=>i!==""&&!i.startsWith("#"));return $.default.default().add(s)}};function Z(r,t){let e=r.split("/");for(let s=e.length-1;s>0;s--){if(e[s]!=="target")continue;let i=e.slice(0,s).join("/"),n=t.get(i);if(n===void 0&&(n=y(x(i,"Cargo.toml")),t.set(i,n)),n)return!0}return!1}u();u();function j(r,t,e=!0){let s=r.realExtensions,i=s.map(c=>c.uid),n=t.realExtensions,o=n.map(c=>c.uid),a=n.filter(c=>!i.includes(c.uid)),d=s.filter(c=>!o.includes(c.uid)),l;return e&&(l=n.filter(c=>{let h=s.find(F=>F.uid===c.uid);if(!h)return!1;let E=JSON.stringify(h.configuration)!==JSON.stringify(c.configuration),R=h.configurationPath!==c.configurationPath;return E||R})),{created:a,updated:l??[],deleted:d}}async function V(r,t,e){if(r[0]===void 0)return;let s=r.some(o=>B.includes(o.type)),i=r.filter(o=>!B.includes(o.type));if(s)return it({event:r[0],app:t,options:e,extensions:[]});let n={app:t,extensionEvents:[],path:r[0].path,startTime:r[0].startTime};for(let o of i){let a=o.extensionHandle?t.realExtensions.filter(l=>l.handle===o.extensionHandle):t.realExtensions.filter(l=>l.directory===o.extensionPath),d=tt[o.type]({event:o,app:n.app,extensions:a,options:e});n.extensionEvents.push(...d.extensionEvents)}return n}var B=["extensions_config_updated","extension_folder_created"],tt={extension_folder_deleted:et,file_created:C,file_deleted:C,file_updated:C,app_config_deleted:st,extension_folder_created:z,extensions_config_updated:z};function et({event:r,app:t,extensions:e}){let s=e.map(i=>(t.removeExtension(i.uid),{type:f.Deleted,extension:i}));return{app:t,extensionEvents:s,startTime:r.startTime,path:r.path}}function C({event:r,app:t,extensions:e}){let s=e.map(i=>({type:f.Updated,extension:i}));return{app:t,extensionEvents:s,startTime:r.startTime,path:r.path}}function z(r){return{app:r.app,extensionEvents:[],startTime:r.event.startTime,path:r.event.path}}function st(r){throw new S("The active app.toml was deleted, exiting")}async function it({event:r,app:t}){let e=await nt(t),s=j(t,e,!0),i=s.created.map(d=>({type:f.Created,extension:d})),n=s.deleted.map(d=>({type:f.Deleted,extension:d})),o=s.updated.map(d=>({type:f.Updated,extension:d})),a=[...i,...n,...o];return{app:e,extensionEvents:a,startTime:r.startTime,path:r.path,appWasReloaded:!0}}async function nt(r){let t=_();try{let e=await H(r);return p(`App reloaded [${U(t)}ms]`),e}catch(e){let s=new Error(`Error reloading app: ${e.message}`);throw s.cause="validation-error",s}}u();import{formatMessagesSync as ot}from"esbuild";import rt from"events";var f;(function(r){r.Updated="changed",r.Deleted="deleted",r.Created="created"})(f||(f={}));var G=class extends rt{buildOutputPath;app;options;appURL;started=!1;ready=!1;initialEvents=[];fileWatcher;constructor(t,e,s,i){super(),this.app=t,this.appURL=e,this.buildOutputPath=s??x(t.directory,".shopify","dev-bundle"),this.options={stdout:process.stdout,stderr:process.stderr,signal:new D().signal},this.fileWatcher=i}async start(t,e=!0){this.started||(this.started=!0,this.options=t??this.options,await A(this.buildOutputPath)&&await I(this.buildOutputPath,{force:!0}),await g(this.buildOutputPath),e&&(this.initialEvents=this.app.realExtensions.map(s=>({type:f.Updated,extension:s})),await this.buildExtensions(this.initialEvents)),this.fileWatcher=this.fileWatcher??new b(this.app,this.options),this.fileWatcher.onChange(s=>{V(s,this.app,this.options).then(async i=>{if(i?.extensionEvents.length===0&&p("Change detected, but no extensions were affected"),!i)return;this.app=i.app,i.appWasReloaded&&this.fileWatcher?.updateApp(this.app),await this.rescanImports(i);let n=i.extensionEvents.filter(o=>o.type!==f.Deleted);await this.buildExtensions(n),i.appWasReloaded||await this.app.generateExtensionTypes(),await this.deleteExtensionsBuildOutput(i),this.emit("all",i)}).catch(i=>{this.emit("error",i)})}),await this.fileWatcher.start(),this.ready=!0,this.emit("ready",{app:this.app,extensionEvents:this.initialEvents}))}onEvent(t){return this.addListener("all",t),this}onStart(t){if(this.ready){let e={app:this.app,extensionEvents:this.initialEvents,startTime:[0,0],path:""};t(e)?.catch(()=>{})}else this.once("ready",t);return this}onError(t){return this.addListener("error",t),this}async deleteExtensionsBuildOutput(t){let s=t.extensionEvents.filter(i=>i.type===f.Deleted).map(i=>i.extension).map(async i=>{let n=x(this.buildOutputPath,i.getOutputFolderId());return I(n,{force:!0})});await Promise.all(s)}async buildExtensions(t){let e=L(t,n=>n.extension.uid),s=[];for(let n of Object.values(e))n.length>0&&n[0]&&s.push({extension:n[0].extension,events:n});let i=s.map(async({extension:n,events:o})=>T({outputPrefix:n.handle,stripAnsi:!1},async()=>{try{await this.buildExtension(n);let a={status:"ok",uid:n.uid};o.forEach(d=>{d.buildResult=a})}catch(a){let d=a.errors??[],l=a.message,c;if(d.length){let E=d[0];l=E?.text,c=E?.location?.file,ot(d,{kind:"error",color:!N()}).forEach(F=>{this.options.stderr.write(F)})}else this.options.stderr.write(a.message);let h={status:"error",error:l,file:c,uid:n.uid};o.forEach(E=>{E.buildResult=h})}}));return Promise.all(i)}async buildExtension(t){let e={app:this.app,stdout:this.options.stdout,stderr:this.options.stderr,useTasks:!1,environment:"development",appURL:this.appURL};await t.buildForBundle(e,this.buildOutputPath)}async rescanImports(t){if(t.path.endsWith(".toml"))return;let s=t.extensionEvents.filter(i=>i.type!==f.Deleted).map(i=>i.extension);s.length>0&&(await Promise.all(s.map(async o=>o.rescanImports()))).some(o=>o)&&await this.fileWatcher?.start()}};export{_ as a,U as b,f as c,G as d};
|