shopify 5.0.2 → 5.2.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-23GM6KJU.js +1 -0
- package/dist/analytics-743FYOAE.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-RPCIFYCY.js → chunk-2EQRXSF6.js} +2 -2
- package/dist/{chunk-NXAEBGMO.js → chunk-2IXP3IPE.js} +1 -1
- package/dist/{chunk-T4XJKM6B.js → chunk-2KACAQJS.js} +1 -1
- package/dist/chunk-2KFYIYLI.js +1 -0
- package/dist/chunk-2OCSYLKZ.js +1 -0
- package/dist/{chunk-AQKWPRZE.js → chunk-2PILNMHJ.js} +2 -2
- package/dist/chunk-36S6MFJQ.js +47 -0
- package/dist/{chunk-TFPW2VGN.js → chunk-3DB4EC62.js} +1 -1
- package/dist/chunk-3GL3IT4K.js +16 -0
- package/dist/{chunk-C3RFAKWR.js → chunk-3JRB7Q3T.js} +1 -1
- package/dist/chunk-3KGN6N7E.js +1 -0
- package/dist/chunk-3OYMK5X6.js +11 -0
- package/dist/chunk-3PYDIBTX.js +1 -0
- package/dist/chunk-422BGHXN.js +1 -0
- package/dist/chunk-43C32FUQ.js +1 -0
- package/dist/chunk-4AN7ECPE.js +9 -0
- package/dist/chunk-4AWVU2OV.js +1 -0
- package/dist/chunk-4IP37MBX.js +1 -0
- package/dist/chunk-4KBOLN7Q.js +8 -0
- package/dist/chunk-4LJERO23.js +89 -0
- package/dist/chunk-4M5WHOZW.js +1 -0
- package/dist/chunk-4RO35FFQ.js +1 -0
- package/dist/chunk-4ZS5354G.js +3 -0
- package/dist/chunk-55AWBPKU.js +7 -0
- package/dist/chunk-5BUYR23E.js +1 -0
- package/dist/chunk-5EDA7PVE.js +11 -0
- package/dist/{chunk-UKWIWCOH.js → chunk-5P6OELKZ.js} +1 -1
- package/dist/chunk-5PVXLQNX.js +1 -0
- package/dist/{chunk-J5ERDFIC.js → chunk-5S2P4MHJ.js} +1 -1
- package/dist/{chunk-26PWHH3B.js → chunk-5TJJVSCI.js} +1 -1
- package/dist/chunk-5TOK5OJS.js +1 -0
- package/dist/chunk-5ZG2SWU2.js +1 -0
- package/dist/{chunk-SLY27GDC.js → chunk-62F4ZMSC.js} +2 -2
- package/dist/chunk-652NT7OW.js +1 -0
- package/dist/chunk-6B5KM3A4.js +97 -0
- package/dist/chunk-6LCESSY3.js +1 -0
- package/dist/chunk-6QHDMCAA.js +1 -0
- package/dist/{chunk-D2KIGKBI.js → chunk-7A4ZE5IS.js} +60 -60
- package/dist/{chunk-CGVROSPS.js → chunk-7AQZKPJU.js} +1 -1
- package/dist/chunk-7FBOMPO5.js +203 -0
- package/dist/chunk-7HECBXSP.js +1 -0
- package/dist/chunk-7UK565VJ.js +1 -0
- package/dist/{chunk-LHXFTFFM.js → chunk-A5BSUUNQ.js} +1 -1
- package/dist/chunk-ADGE7MKB.js +1 -0
- package/dist/chunk-AEWRZ7AE.js +1 -0
- package/dist/chunk-ALDJTWCO.js +1 -0
- package/dist/chunk-ARL5WBDK.js +1 -0
- package/dist/chunk-AXFEIJC7.js +1 -0
- package/dist/{chunk-KZRLZWOU.js → chunk-AYGL6F3P.js} +1 -1
- package/dist/{chunk-URXM5A2K.js → chunk-AYTTE7X5.js} +1 -1
- package/dist/{chunk-3ODQKAEA.js → chunk-BDIZUTKC.js} +1 -1
- package/dist/chunk-BQKF4SRH.js +6 -0
- package/dist/chunk-C2AOCLEZ.js +1 -0
- package/dist/{chunk-WRZWHT6M.js → chunk-C2SGJ5IG.js} +1 -1
- package/dist/chunk-C3S3UMV3.js +1 -0
- package/dist/{chunk-WBJ6ZHYH.js → chunk-C5DKLOW4.js} +37 -37
- package/dist/chunk-C72QNK6O.js +4 -0
- package/dist/{chunk-6ES4KRFW.js → chunk-CA3GVT4D.js} +1 -1
- package/dist/chunk-CCLU5ZRK.js +9 -0
- package/dist/chunk-CE6XQDAG.js +10 -0
- package/dist/chunk-CEJ5WS4I.js +5 -0
- package/dist/{chunk-VEUKT5EI.js → chunk-CIBBQO2L.js} +2 -2
- package/dist/{chunk-IILLQOUC.js → chunk-CKJXJ6HD.js} +1 -1
- package/dist/{chunk-MEYVUHQH.js → chunk-COGKVNQB.js} +1 -1
- package/dist/chunk-CQAD5WML.js +1 -0
- package/dist/chunk-CQPZOXWO.js +6 -0
- package/dist/{chunk-62EOM3Y2.js → chunk-CZYQIWNL.js} +1 -1
- package/dist/chunk-DA5RQFXA.js +10 -0
- package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
- package/dist/{chunk-Q5IC3IYY.js → chunk-DESZFFOK.js} +1 -1
- package/dist/{chunk-PLSS456F.js → chunk-DKR7562G.js} +1 -1
- package/dist/{chunk-LGXI7EGM.js → chunk-DNNTAMC5.js} +2 -2
- package/dist/chunk-DUPQUQ2Z.js +1 -0
- package/dist/{chunk-Q4JYAUVL.js → chunk-DUTIWCJ2.js} +1 -1
- package/dist/chunk-E6JEBSHZ.js +20 -0
- package/dist/chunk-E6KNAPIY.js +4 -0
- package/dist/chunk-E7XCCLQH.js +1 -0
- package/dist/chunk-EE72PCKT.js +1 -0
- package/dist/chunk-EEYXBKR7.js +4 -0
- package/dist/{chunk-ZRI3SSLG.js → chunk-EGLA3WLZ.js} +2 -2
- package/dist/chunk-EVQPYZ7F.js +5 -0
- package/dist/chunk-FDFE3SSG.js +35 -0
- package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
- package/dist/chunk-FI5TQHUA.js +1 -0
- package/dist/chunk-FIKZQ4RA.js +1 -0
- package/dist/chunk-FJOVMEPN.js +3 -0
- package/dist/{chunk-ER6C5WS3.js → chunk-FLARCZ5F.js} +1 -1
- package/dist/chunk-FOMMPAWZ.js +1 -0
- package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
- package/dist/{chunk-HXZAY5OA.js → chunk-G3DXNSA2.js} +1 -1
- package/dist/{chunk-XWSWXQCC.js → chunk-G7JO3W2R.js} +1 -1
- package/dist/{chunk-WESTVWWD.js → chunk-GABIWYY3.js} +1 -1
- package/dist/chunk-GFSEU7PF.js +6 -0
- package/dist/chunk-GFVUWVEM.js +1 -0
- package/dist/{chunk-ISKQQXLZ.js → chunk-GHNSXX7R.js} +1 -1
- package/dist/{chunk-2L6AN3QA.js → chunk-GQ3LY7BY.js} +1 -1
- package/dist/{chunk-2A2JSAAA.js → chunk-H45S4MGC.js} +1 -1
- package/dist/chunk-HEB4YYM6.js +9 -0
- package/dist/{chunk-CXI3RHPW.js → chunk-HI5FTI3M.js} +1 -1
- package/dist/chunk-HJ24NEP5.js +1 -0
- package/dist/chunk-HQFXVVTB.js +1 -0
- package/dist/{chunk-TODZ3TJR.js → chunk-HR6R7JXN.js} +1 -1
- package/dist/chunk-HRHJA5ZP.js +3 -0
- package/dist/{chunk-QEKGGTMN.js → chunk-HT5JQJMB.js} +1 -1
- package/dist/chunk-HT7273V7.js +1 -0
- package/dist/{chunk-UXVXVI6O.js → chunk-HUB4HDWN.js} +78 -76
- package/dist/chunk-IATNIWOC.js +13 -0
- package/dist/chunk-IHVWDKDV.js +2 -0
- package/dist/{chunk-3KM5ZOW2.js → chunk-IKXUYCK7.js} +1 -1
- package/dist/chunk-IVQN2RUP.js +1 -0
- package/dist/chunk-IWNFPBH2.js +33 -0
- package/dist/{chunk-ESFCYB46.js → chunk-J324ZPO6.js} +1 -1
- package/dist/{chunk-KNWT7JLL.js → chunk-JJQ3DJG5.js} +2 -2
- package/dist/{chunk-7CCTPBCT.js → chunk-JLAN6JXJ.js} +1 -1
- package/dist/chunk-K2GCCCCV.js +1 -0
- package/dist/{chunk-NVKJ7ZLP.js → chunk-K4KKSBUW.js} +1 -1
- package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
- package/dist/{chunk-QDCLL5OI.js → chunk-K5UVCBIP.js} +1 -1
- package/dist/{chunk-64G5TGFF.js → chunk-KN2JIDNO.js} +1 -1
- package/dist/chunk-KORVOCNN.js +1 -0
- package/dist/chunk-KRQCQ57O.js +1 -0
- package/dist/{chunk-3MYDSQHF.js → chunk-KT2AMFVW.js} +1 -1
- package/dist/chunk-L23Q53FM.js +70 -0
- package/dist/{chunk-UBP3LQFY.js → chunk-L3DTONOI.js} +2 -2
- package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
- package/dist/chunk-LRETOC6P.js +1 -0
- package/dist/chunk-LXFWK3O2.js +1 -0
- package/dist/chunk-LZ2TN7EZ.js +1 -0
- package/dist/chunk-MBAPM5HA.js +15 -0
- package/dist/{chunk-UUAKOX7E.js → chunk-MGZK5EQW.js} +2 -2
- package/dist/chunk-MKUXSM33.js +1 -0
- package/dist/chunk-MQ55QUOJ.js +276 -0
- package/dist/chunk-NAQJMRPT.js +2296 -0
- package/dist/{chunk-DZKFP6H2.js → chunk-NMXRDF4T.js} +1 -1
- package/dist/chunk-NOWM3CCG.js +1 -0
- package/dist/chunk-NVDFXEQ5.js +5 -0
- package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
- package/dist/{chunk-B2O3ANRZ.js → chunk-OCILF2DD.js} +1 -1
- package/dist/{chunk-67L7FIB6.js → chunk-OGBMFGYC.js} +1 -1
- package/dist/chunk-OIQ5NQ5I.js +18 -0
- package/dist/chunk-OKRKVVTK.js +103 -0
- package/dist/chunk-ONNUEQGR.js +3 -0
- package/dist/chunk-OSASE35V.js +6 -0
- package/dist/chunk-OTMTS5L4.js +3 -0
- package/dist/chunk-OWPAHXDF.js +3 -0
- package/dist/chunk-P7HZGJRU.js +6 -0
- package/dist/chunk-PIU3GVJ4.js +1 -0
- package/dist/{chunk-2WJOTJOD.js → chunk-PSNCWS3Q.js} +2 -2
- package/dist/chunk-PSREELSQ.js +22 -0
- package/dist/{chunk-AQ6EVL73.js → chunk-Q2CKRCPM.js} +1 -1
- package/dist/chunk-QA2D7DT2.js +1 -0
- package/dist/chunk-QBRRFFMZ.js +1 -0
- package/dist/chunk-QDMTJKQ3.js +1 -0
- package/dist/{chunk-3Z3MADXZ.js → chunk-QIJ7D2JS.js} +1 -1
- package/dist/chunk-QLN6IOOY.js +1 -0
- package/dist/chunk-QU3USVKT.js +1 -0
- package/dist/chunk-R2E6TMBE.js +22 -0
- package/dist/chunk-R4E2E4NN.js +1 -0
- package/dist/chunk-R5COVIJM.js +1 -0
- package/dist/chunk-RFJ2LI64.js +81 -0
- package/dist/chunk-RNF6T6IO.js +5 -0
- package/dist/chunk-RSNFNZ6F.js +2 -0
- package/dist/{chunk-I4CEH7AK.js → chunk-RZ3UGOV4.js} +2 -2
- package/dist/{chunk-35XFNKNB.js → chunk-S23ZG2RG.js} +1 -1
- package/dist/{chunk-PF53E2DC.js → chunk-SAK42CAY.js} +1 -1
- package/dist/chunk-SBX7CMHM.js +1 -0
- package/dist/{chunk-S5P7KWY4.js → chunk-SGQTRKYZ.js} +1 -1
- package/dist/chunk-SNPJVVVE.js +5 -0
- package/dist/chunk-SNRGS3YU.js +1 -0
- package/dist/chunk-SUTSCIXU.js +7 -0
- package/dist/chunk-SWFCT5B7.js +2 -0
- package/dist/{chunk-4KECSZTL.js → chunk-SZ64GAVG.js} +2 -2
- package/dist/{chunk-WBVS5NBV.js → chunk-TDHIOONG.js} +2 -2
- package/dist/{chunk-W37IFK3P.js → chunk-TLN4BKXJ.js} +102 -102
- package/dist/{chunk-QW52RPAU.js → chunk-TXMZPF2U.js} +1 -1
- package/dist/chunk-TZHVCMZN.js +6 -0
- package/dist/{chunk-IHXGZW42.js → chunk-TZOB52QK.js} +1 -1
- package/dist/{chunk-N57Y7THE.js → chunk-U5BKU3OL.js} +1 -1
- package/dist/{chunk-Y55T4IIQ.js → chunk-UK3BDOHR.js} +1 -1
- package/dist/chunk-UORSJB4A.js +857 -0
- package/dist/chunk-UU6UQ2QY.js +1 -0
- package/dist/{chunk-PWAT52M4.js → chunk-UY44O4IZ.js} +1 -1
- package/dist/{chunk-QF5WKTPD.js → chunk-V3H6SYK3.js} +1 -1
- package/dist/{chunk-YTUUU33R.js → chunk-VBPMVVLV.js} +1 -1
- package/dist/{chunk-SNH4XZ6E.js → chunk-VGBCG3I5.js} +1 -1
- package/dist/{chunk-QEVTBD33.js → chunk-VHRUPKWH.js} +1 -1
- package/dist/chunk-VVHJ2AUF.js +3 -0
- package/dist/chunk-WB5GRBHW.js +1 -0
- package/dist/{chunk-YSWVYPWR.js → chunk-WBKQSSWW.js} +1 -1
- package/dist/{chunk-SIL6HPMK.js → chunk-WDXDT7XY.js} +2 -2
- package/dist/{chunk-SACNUF4I.js → chunk-WHOD5I7N.js} +1 -1
- package/dist/{chunk-Z2WAW6MM.js → chunk-WL3M63DG.js} +1 -1
- package/dist/{chunk-LEHBZKK3.js → chunk-WLJDMI7E.js} +1 -1
- package/dist/{chunk-PTSCGSQV.js → chunk-WZ3QWPK5.js} +2 -2
- package/dist/{chunk-H6GNKWYM.js → chunk-X5V7AGVU.js} +1 -1
- package/dist/{chunk-RPVZ2JON.js → chunk-X76AYO36.js} +1 -1
- package/dist/chunk-XB7H2RYV.js +31 -0
- package/dist/chunk-XHHAVKKV.js +1 -0
- package/dist/chunk-XKNDU62O.js +1 -0
- package/dist/chunk-XVJRGOJA.js +4 -0
- package/dist/chunk-Y3ZAQZPH.js +16 -0
- package/dist/chunk-YF4AXKM4.js +1 -0
- package/dist/chunk-YGN65N6W.js +16 -0
- package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
- package/dist/chunk-YTC367JI.js +3 -0
- package/dist/{chunk-ZBL7XMJ6.js → chunk-Z2FGYMJ6.js} +2 -2
- package/dist/chunk-Z3QZNLT5.js +1 -0
- package/dist/chunk-ZC3EDADH.js +26 -0
- package/dist/chunk-ZLITAXPT.js +1 -0
- package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
- package/dist/chunk-ZNEQZV5K.js +3 -0
- package/dist/chunk-ZOU6SOXW.js +20 -0
- package/dist/{chunk-YV2TP44L.js → chunk-ZQNGYJKJ.js} +1 -1
- package/dist/chunk-ZRM7ESSS.js +4 -0
- package/dist/chunk-ZX33FUW3.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.d.ts +10 -10
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.d.ts +7 -7
- 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.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
- 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 +21 -21
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +23 -23
- 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 +90 -90
- 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.d.ts +7 -7
- 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 +24 -24
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.d.ts +7 -7
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli-version-check-BW2CUMX4.js +1 -0
- package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
- package/dist/command-json-schema-LGR44Q2G.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-TODPQ2LC.js +1 -0
- package/dist/configs/all.yml +9 -0
- package/dist/configs/recommended.yml +9 -0
- package/dist/custom-oclif-loader-BPE2TH4B.js +1 -0
- package/dist/data/filters.json +41 -2
- package/dist/data/local_block_entry.json +1 -1
- package/dist/data/manifest_theme.json +1 -0
- package/dist/data/objects.json +279 -44
- package/dist/data/section.json +15 -1
- package/dist/data/setting.json +9 -5
- package/dist/data/shopify_system_translations.json +312 -32
- package/dist/data/strict_settings.json +24 -0
- package/dist/data/tags.json +57 -24
- package/dist/data/theme_block.json +1 -1
- package/dist/deprecations-5CSI24TV.js +1 -0
- package/dist/dist-LPKYTX3M.js +1 -0
- package/dist/dist-WT6MPTKJ.js +1 -0
- package/dist/environment-5P7JJ3GI.js +1 -0
- package/dist/environments-3HTT5CVC.js +1 -0
- package/dist/error-PFOKPWFX.js +1 -0
- package/dist/error-handler-23FASAEU.js +1 -0
- package/dist/fs-RA25PWSJ.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 +2 -2
- 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/http-EVDTYINS.js +1 -0
- package/dist/http-proxy-node16-NZZ674YW.js +38 -0
- package/dist/index.js +12 -12
- package/dist/is-global-3DNAMKUU.js +1 -0
- package/dist/json-error-HGCRNJRF.js +1 -0
- package/dist/latest-version-75YEFEMK.js +9 -0
- package/dist/lib-4ZA53LTZ.js +1 -0
- package/dist/lib-F3MES3XF.js +1 -0
- package/dist/lib-XPJABU24.js +1 -0
- package/dist/{local-OKPVB4NH.js → local-LNGPIGLG.js} +1 -1
- package/dist/metadata-VHLSUKCW.js +1 -0
- package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
- package/dist/node-package-manager-SSFNUVWB.js +1 -0
- package/dist/notifications-system-3NQRYYKW.js +1 -0
- package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
- package/dist/os-KIKVJONE.js +1 -0
- package/dist/output-DUJTSURG.js +1 -0
- package/dist/{prettier-EGVCP5CY.js → prettier-NOE3TJJ5.js} +1 -1
- package/dist/registry-auth-token-EDH77OOW.js +1 -0
- package/dist/registry-url-JMNV3LLX.js +1 -0
- package/dist/semver-HHZRKD6Y.js +1 -0
- package/dist/system-CGOZSROX.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-YMBFS3NG.js +1 -0
- package/dist/upgrade-73RRPDSC.js +1 -0
- package/dist/version-AMUEEBIG.js +1 -0
- package/dist/version-S4MGCKDO.js +1 -0
- package/dist/workerd-DRWNY3S4.js +18 -0
- package/oclif.manifest.json +25618 -1167
- package/package.json +7 -7
- package/dist/analytics-NMMVOF4B.js +0 -1
- package/dist/analytics-UK77WNLG.js +0 -1
- package/dist/chunk-224UPIYS.js +0 -4
- package/dist/chunk-27NXPOAS.js +0 -1
- package/dist/chunk-2MT3LSMZ.js +0 -1
- package/dist/chunk-2T4HDR6R.js +0 -70
- package/dist/chunk-2ZBXHCQZ.js +0 -1
- package/dist/chunk-335BUVBP.js +0 -1
- package/dist/chunk-33ZE3DRQ.js +0 -16
- package/dist/chunk-34MOWGRL.js +0 -1
- package/dist/chunk-3JSKNXL7.js +0 -1
- package/dist/chunk-3MG4MTWQ.js +0 -1
- package/dist/chunk-3XRI3D44.js +0 -1
- package/dist/chunk-43R5VGKT.js +0 -1
- package/dist/chunk-4WYKPIN3.js +0 -1
- package/dist/chunk-5AEZJZNQ.js +0 -1
- package/dist/chunk-5ED7SOQZ.js +0 -20
- package/dist/chunk-5IDJALJH.js +0 -1
- package/dist/chunk-66TMIQMB.js +0 -1
- package/dist/chunk-74NRFUGQ.js +0 -1
- package/dist/chunk-7GUMJ5E4.js +0 -1
- package/dist/chunk-7NFTSBHQ.js +0 -10
- package/dist/chunk-ACZNWIRY.js +0 -1
- package/dist/chunk-AUE7LM32.js +0 -1
- package/dist/chunk-AXL2VIWA.js +0 -16
- package/dist/chunk-B3ZJGYZY.js +0 -3
- package/dist/chunk-BOAGJ6P5.js +0 -1
- package/dist/chunk-BWN2QG6D.js +0 -5
- package/dist/chunk-CCUQM4FX.js +0 -6
- package/dist/chunk-CLUUA3HX.js +0 -3
- package/dist/chunk-CYEEGTVZ.js +0 -11
- package/dist/chunk-DBDTE3EE.js +0 -5
- package/dist/chunk-DLVB3237.js +0 -31
- package/dist/chunk-DN6X7SHW.js +0 -2
- package/dist/chunk-E5COIKGY.js +0 -5
- package/dist/chunk-E6RONHMT.js +0 -1
- package/dist/chunk-EAZIQI2D.js +0 -1
- package/dist/chunk-EEY4FKAW.js +0 -1
- package/dist/chunk-EKFPTBXC.js +0 -1
- package/dist/chunk-F3CK3EJJ.js +0 -1
- package/dist/chunk-FEBOZ2XX.js +0 -31
- package/dist/chunk-FFSDGRAN.js +0 -1
- package/dist/chunk-FZCGRIOM.js +0 -1
- package/dist/chunk-GNCVDN7U.js +0 -1
- package/dist/chunk-GQLNG537.js +0 -836
- package/dist/chunk-GVI3DWSB.js +0 -4
- package/dist/chunk-GW7YIJPJ.js +0 -5
- package/dist/chunk-H6GYBLVQ.js +0 -2
- package/dist/chunk-HB3MJYBK.js +0 -1
- package/dist/chunk-HSKDFEXW.js +0 -1
- package/dist/chunk-HTRJU4R4.js +0 -1
- package/dist/chunk-I7PEEJVH.js +0 -1
- package/dist/chunk-IHMATNOR.js +0 -1
- package/dist/chunk-IJY3RJPJ.js +0 -47
- package/dist/chunk-J3JPJCWP.js +0 -1
- package/dist/chunk-J55GQLP4.js +0 -1
- package/dist/chunk-JLQRDFR5.js +0 -18
- package/dist/chunk-JPWRZ5SL.js +0 -16
- package/dist/chunk-K7ZSPQKL.js +0 -4
- package/dist/chunk-L5TSPCSY.js +0 -26
- package/dist/chunk-LUGMXSRI.js +0 -9
- package/dist/chunk-M2CWCOFU.js +0 -11
- package/dist/chunk-M5VIFG2V.js +0 -1
- package/dist/chunk-MADINS4Z.js +0 -1
- package/dist/chunk-MGHPF7HU.js +0 -6
- package/dist/chunk-MHR5OHT5.js +0 -10
- package/dist/chunk-MXEXP3HT.js +0 -15
- package/dist/chunk-OJULL7HT.js +0 -1
- package/dist/chunk-OMPQ7REW.js +0 -3
- package/dist/chunk-OR4IJ4BQ.js +0 -1
- package/dist/chunk-P2RMFHQP.js +0 -1
- package/dist/chunk-P4VZYOKO.js +0 -15
- package/dist/chunk-PDZBKVWL.js +0 -97
- package/dist/chunk-Q2KWXZQB.js +0 -12
- package/dist/chunk-QFSENE5T.js +0 -3
- package/dist/chunk-QFWWCZOI.js +0 -1
- package/dist/chunk-QFYLJVJW.js +0 -77
- package/dist/chunk-QQJNQNKP.js +0 -6
- package/dist/chunk-R4UVIYZP.js +0 -4
- package/dist/chunk-RLNIOJH3.js +0 -272
- package/dist/chunk-RW6G4ZPU.js +0 -1
- package/dist/chunk-S4LOWCGS.js +0 -1
- package/dist/chunk-SB27UOXX.js +0 -1
- package/dist/chunk-SHD4VV5V.js +0 -3
- package/dist/chunk-SK7EPN6C.js +0 -1
- package/dist/chunk-TAWCKJKP.js +0 -1
- package/dist/chunk-U2T5HPRD.js +0 -319
- package/dist/chunk-U6YOP562.js +0 -1
- package/dist/chunk-UPPO3BMT.js +0 -7
- package/dist/chunk-USXIXANP.js +0 -103
- package/dist/chunk-UV5GAGAD.js +0 -1
- package/dist/chunk-UY6W2EVZ.js +0 -1
- package/dist/chunk-UYELAINQ.js +0 -16
- package/dist/chunk-V75WUEFU.js +0 -1
- package/dist/chunk-VAVXDIUX.js +0 -6
- package/dist/chunk-VGSH52JM.js +0 -1
- package/dist/chunk-VHZ6RL67.js +0 -1
- package/dist/chunk-VQA3X7O3.js +0 -1
- package/dist/chunk-VZCMJRYV.js +0 -1
- package/dist/chunk-W56ZGEQQ.js +0 -2265
- package/dist/chunk-WCC52MR2.js +0 -1
- package/dist/chunk-WSDKCQH6.js +0 -6
- package/dist/chunk-X2PFXSU4.js +0 -1
- package/dist/chunk-X5NIAZA4.js +0 -1
- package/dist/chunk-XBMD3FEZ.js +0 -3
- package/dist/chunk-XDVPIGXE.js +0 -2
- package/dist/chunk-XLIJYJ6Q.js +0 -1
- package/dist/chunk-XUHGWIWW.js +0 -4
- package/dist/chunk-Y5CVX5LJ.js +0 -1
- package/dist/chunk-Y6J46XYF.js +0 -3
- package/dist/chunk-YKMINHYY.js +0 -3
- package/dist/chunk-ZDQO6CNY.js +0 -1
- package/dist/chunk-ZGASBRSQ.js +0 -5
- package/dist/chunk-ZGBTO46A.js +0 -1
- package/dist/chunk-ZJOX5HW4.js +0 -22
- package/dist/chunk-ZOOT3GBY.js +0 -5
- package/dist/command-json-schema-F5XF7XHL.js +0 -1
- package/dist/conf-store-5CBLWTOC.js +0 -1
- package/dist/custom-oclif-loader-UDVUFKMD.js +0 -1
- package/dist/deprecations-EOHPSTCS.js +0 -1
- package/dist/dist-RNV3GFZ7.js +0 -1
- package/dist/dist-ZFKWJVNB.js +0 -1
- package/dist/environment-O7ECODHU.js +0 -1
- package/dist/environments-4FLRZW4P.js +0 -1
- package/dist/error-JY2ADS6S.js +0 -1
- package/dist/error-handler-4GCXKC6I.js +0 -1
- package/dist/fs-XS5YF34R.js +0 -1
- package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
- package/dist/is-global-27MUENOK.js +0 -1
- package/dist/json-error-S5XFS3UX.js +0 -1
- package/dist/latest-version-LDWU5F7A.js +0 -49
- package/dist/lib-PJHT4MKY.js +0 -1
- package/dist/lib-VKSQ65BQ.js +0 -1
- package/dist/lib-YEZOHXF3.js +0 -1
- package/dist/metadata-2YJBAKR7.js +0 -1
- package/dist/node-package-manager-B3OW3PFQ.js +0 -1
- package/dist/notifications-system-BWTDYBG2.js +0 -1
- package/dist/os-F6QKJCFW.js +0 -1
- package/dist/output-BRIPK7UC.js +0 -1
- package/dist/system-466QKFDI.js +0 -1
- package/dist/ui-VJTNGCS6.js +0 -1
- package/dist/upgrade-VHVJLXKX.js +0 -1
- package/dist/version-FETZRLZO.js +0 -1
- package/dist/version-T4XXTJMB.js +0 -1
- package/dist/workerd-32DMKLMN.js +0 -18
- /package/dist/{chunk-YLQ3LNNY.js → chunk-HVECVOIO.js} +0 -0
- /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as R,g as O}from"./chunk-VKWPEFWQ.js";var D=R((ar,x)=>{"use strict";O();x.exports=$;function $(r,e,n){r instanceof RegExp&&(r=w(r,n)),e instanceof RegExp&&(e=w(e,n));var t=k(r,e,n);return t&&{start:t[0],end:t[1],pre:n.slice(0,t[0]),body:n.slice(t[0]+r.length,t[1]),post:n.slice(t[1]+e.length)}}function w(r,e){var n=e.match(r);return n?n[0]:null}$.range=k;function k(r,e,n){var t,a,u,g,f,i=n.indexOf(r),o=n.indexOf(e,i+1),v=i;if(i>=0&&o>0){if(r===e)return[i,o];for(t=[],u=n.length;v>=0&&!f;)v==i?(t.push(v),i=n.indexOf(r,v+1)):t.length==1?f=[t.pop(),o]:(a=t.pop(),a<u&&(u=a,g=o),o=n.indexOf(e,v+1)),v=i<o&&i>=0?i:o;t.length&&(f=[u,g])}return f}});var tr=R((fr,z)=>{O();var H=D();z.exports=Y;var T="\0SLASH"+Math.random()+"\0",B="\0OPEN"+Math.random()+"\0",I="\0CLOSE"+Math.random()+"\0",G="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0",W=1e5,F=4e6,J=1e3,K=1e3;function j(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function Q(r){return r.split("\\\\").join(T).split("\\{").join(B).split("\\}").join(I).split("\\,").join(G).split("\\.").join(Z)}function U(r){return r.split(T).join("\\").split(B).join("{").split(I).join("}").split(G).join(",").split(Z).join(".")}function S(r,e){for(var n=0;n<e.length;n++)r.push(e[n])}function V(r){for(var e=[],n="";;){var t=H("{","}",r);if(!t){var a=r.split(",");return a[0]=n+a[0],S(e,a),e}var u=t.pre,g=t.body,f=t.post,i=u.split(",");if(i[0]=n+i[0],i[i.length-1]+="{"+g+"}",!f.length)return S(e,i),e;n=i.pop(),S(e,i),r=f}}function Y(r,e){if(!r)return[];e=e||{};var n=e.max==null?W:e.max,t=e.maxLength==null?F:e.maxLength,a=e.maxDepth==null?J:e.maxDepth,u=e.maxRewrites==null?K:e.maxRewrites;return r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),C(Q(r),n,t,a,0,u,!0).map(U)}function q(r){return"{"+r+"}"}function L(r){return/^-?0\d/.test(r)}function rr(r,e){return r<=e}function er(r,e){return r>=e}function M(r,e,n,t,a,u){for(var g=[],f=0,i=0;i<r.length;i++)for(var o=0;o<n.length;o++){if(g.length>=t)return g;var v=r[i]+e+n[o];if(!(u&&!v)){if(f+v.length>a)return g;g.push(v),f+=v.length}}return g}function nr(r,e,n,t){var a=r.split(/\.\./),u=[];if(a[0]===void 0||a[1]===void 0)return u;var g=j(a[0]),f=j(a[1]),i=Math.max(a[0].length,a[1].length),o=a.length===3&&a[2]!==void 0?Math.max(Math.abs(j(a[2])),1):1,v=rr,E=f<g;E&&(o*=-1,v=er);for(var y=a.some(L),p=0,d=g;v(d,f)&&u.length<n;d+=o){var h;if(e)h=String.fromCharCode(d),h==="\\"&&(h="");else if(h=String(d),y){var s=i-h.length;if(s>0){var c=new Array(s+1).join("0");d<0?h="-"+c+h.slice(1):h=c+h}}if(p+h.length>t)break;u.push(h),p+=h.length}return u}function C(r,e,n,t,a,u,g){if(a>t)return[r];for(var f=[""],i=0,o=!1,v=!0;;){let l=H("{","}",r);if(!l)return M(f,r,[""],e,n,o);let b=l.pre;if(/\$$/.test(b)){if(f=M(f,b+"{"+l.body+"}",[""],e,n,o&&!l.post.length),v=!1,!l.post.length)break;r=l.post;continue}var E=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body),p=E||y,d=l.body.indexOf(",")>=0;if(!p&&!d){if(i<u&&l.post.match(/,(?!,).*\}/)){i++,r=l.pre+"{"+l.body+I+l.post,g=!0;continue}return M(f,b+"{"+l.body+"}"+l.post,[""],e,n,o)}v&&(o=g&&!p,v=!1);var h;if(p)h=nr(l.body,y,e,n);else{var s=V(l.body);if(s.length===1&&s[0]!==void 0&&(s=C(s[0],e,n,t,a+1,u,!1).map(q),s.length===1)){if(f=M(f,b+s[0],[""],e,n,o&&!l.post.length),!l.post.length)break;r=l.post;continue}for(var c=o&&!l.post.length&&!b,N=0;c&&N<f.length;N++)f[N]&&(c=!1);h=[];var X=0;r:for(var m=0;m<s.length;m++)for(var _=C(s[m],e,n,t,a+1,u,!1),P=0;P<_.length;P++){var A=_[P];if(!(c&&!A)){if(h.length>=e||X+A.length>n)break r;h.push(A),X+=A.length}}}if(f=M(f,b,h,e,n,o&&!l.post.length),!l.post.length)break;r=l.post}return f}});export{D as a,tr as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-IKXUYCK7.js";import{i as r}from"./chunk-B4OMIONW.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();function v(o){o.verbose&&(process.env[n.verbose.env]="true"),o.noColor&&(r.level=0,process.env.FORCE_COLOR="0")}export{v as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{A as O,B as Z,g as j,o as W,p as J,q as N,r as q,s as L,t as B,u as R,v as K,w as I,x as Q,y as S,z as Y}from"./chunk-7FBOMPO5.js";import{I as f,u as A,x as z}from"./chunk-HEB4YYM6.js";import{d as X}from"./chunk-HR6R7JXN.js";import{C as h,y as $}from"./chunk-7A4ZE5IS.js";import{j as E,m as H}from"./chunk-FJOVMEPN.js";import{Sa as k,X as p,_ as w,pa as V,va as U,vb as G,xa as P}from"./chunk-OIQ5NQ5I.js";import{c as y,i as F}from"./chunk-IWTNUJGY.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();function ee(e){if(e.reason==="no-extensions")throw new E("No extensions to migrate");$({headline:["Imported the following extensions from the dashboard:"],body:e.extensions.map(({extension:t,directory:n})=>G`• "${t.title}" at: ${y("extensions",F(n))}`.value).join(`
|
|
2
2
|
`)})}s();s();function te(e){switch(e){case g.Offsite:return N;case g.CreditCard:return S;case g.CustomCreditCard:return I;case g.CustomOnsite:return R;case g.Redeemable:return L;case g.CardPresent:return O}}var g;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(g||(g={}));function ne(e,t){let n=e.activeVersion?.context??e.draftVersion?.context??te(e.type);switch(n){case N:return x(e,t,q);case S:return x(e,t,Y);case I:return x(e,t,Q);case R:return x(e,t,K);case L:return x(e,t,B);case O:return x(e,t,Z);default:throw new Error(`Unsupported extension: ${n}`)}}function x(e,t,n){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let a=JSON.parse(o),c=n(a,t);c&&delete c.api_version;let l=e.activeVersion?.context??e.draftVersion?.context??te(e.type);return{api_version:a.api_version,extensions:[{name:e.title,type:"payments_extension",handle:p(e.title.substring(0,f)),...c,targeting:[{target:`${l}`}]}]}}s();s();var ue=new Map(J.map(e=>[e[1],e[0]])),me=(e,t)=>{let n=ue.get(e.uiType);if(!n)throw new E(`Field type ${e.uiType} is not supported`);let i={key:e.name,description:e.description??void 0,type:n};return t==="flow_action_definition"&&(i.name=e.label,i.required=e.required),i},de=(e,t)=>{let o={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},ie=(e,t)=>t?t.map(i=>i.uiType==="commerce-object-id"||i.uiType==="marketing-activity-id"||W.includes(i.uiType)?de(i,e):me(i,e)):[];function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let n=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,i;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(t);i={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:p(e.title.substring(0,f)),url:o.url}]}}else{let o=JSON.parse(t),a=ie(e.type,o.fields??[]);i={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:p(e.title.substring(0,f)),description:o.description,runtime_url:o.url??n,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(a?.length??0)>0?{fields:a}:void 0}}return i}s();s();var re=e=>{let t=e.split("#");if(t.length!==2||t.some(c=>c===""||c===void 0))throw new Error("Invalid context");let n="admin",i=_e(t[0]??""),o=ge(t[1]??""),a="link";return o==="selection"?[n,`${i}-index`,`${o}-action`,a].join("."):[n,`${i}-${o}`,"action",a].join(".")},ge=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},_e=e=>e.toLocaleLowerCase()==="variants"?"product-variant":w(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function se(e,t,n){let i=e.activeVersion?.config??e.draftVersion?.config;if(!i)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let a=JSON.parse(i);if(n.embedded)try{let l=new URL(a.url),_=l.pathname.startsWith("/")?l.pathname.substring(1):l.pathname,r=new URL(`app://${_}`);r.search=l.search,r.hash=l.hash,a.url=r.toString()}catch{}return{extensions:[{type:"admin_link",name:a.text,handle:p(e.title.substring(0,f)),targeting:[{url:a.url,target:re(o)}]}]}}s();var ye={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},Ee={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function xe(e){let t=new URL(e);return t.pathname+t.search+t.hash}function ae(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let n=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:p(e.title.substring(0,f)),title:n.title,description:n.description,api_path:xe(n.app_api_url),tactic:n.tactic,marketing_channel:ye[n.platform]??"",referring_domain:Ee[n.platform]??"",is_automation:n.is_automation,use_external_editor:n.use_external_editor,preview_data:n.preview_data,fields:n.fields.map(({id:o,...a})=>a)}]}}s();function ce(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let n=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:p(e.title.substring(0,f)),pattern:n.pattern}]}}var M=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:ne},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:oe},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:ae},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:ce},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:se}];function le(e){return M.filter(t=>t.extensionTypes.some(n=>e.some(i=>i.type.toLowerCase()===n.toLowerCase())))}async function Et(e){if(e.length===1&&e[0])return e[0];let t=e.map(o=>({label:o.label,value:o.value})),n=await h({message:"Extension type to migrate",choices:t}),i=e.find(o=>o.value===n);if(i===void 0)throw new E("Invalid migration choice");return i}s();var St=M.flatMap(e=>e.extensionTypes),m;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(m||(m={}));async function he({name:e,app:t}){let n=w(e),i=y(t.directory,z.extensions.directoryName,n);if(await k(i)){let o=[{label:"Overwrite local TOML with remote configuration",value:m.Write},{label:"Keep local TOML",value:m.Skip},{label:"Cancel",value:m.Cancel}],a=await h({message:`Directory "${n}" already exists. What would you like to do?`,choices:o});return{directory:i,action:a}}return await U(i),await V(y(i,A.lockFile)),{directory:i,action:m.Write}}var C=class extends H{pendingImports;selectedExtensions;constructor(t,n){super(),this.pendingImports=t,this.selectedExtensions=n}completedImports(){return pe(this.pendingImports,this.selectedExtensions)}},b=class extends Error{originalError;pendingImports;selectedExtensions;constructor(t,n,i){super(t instanceof Error?t.message:"Dashboard extension import failed"),this.originalError=t,this.pendingImports=n,this.selectedExtensions=i}completedImports(){return pe(this.pendingImports,this.selectedExtensions)}};async function pe(e,t){let n=await Promise.allSettled(e);return{extensions:n.flatMap(i=>i.status==="fulfilled"?[i.value]:[]),failures:n.flatMap((i,o)=>i.status==="rejected"&&!(i.reason instanceof C)?[{extension:t[o],error:i.reason}]:[])}}async function Ce(e){let{app:t,extensionTypes:n,extensions:i,buildExtensionConfig:o,all:a}=e,c=i.filter(r=>n.includes(r.type.toLowerCase()));if(c=we(t,c),c.length===0)return{status:"skipped",reason:"no-extensions",extensions:[],extensionUuids:{}};if(!a){let r=c.map(u=>({label:u.title,value:u.uuid}));c.length>1&&r.push({label:"All",value:"All"});let d=await h({message:"Extensions to migrate",choices:r});d!=="All"&&(c=[c.find(u=>u?.uuid===d)])}let l={},_=c.map(async r=>{let{directory:d,action:u}=await he({app:t,name:r.title});if(u===m.Cancel)throw new C(_,c);let T=p(r.title.substring(0,f));l[T]=r.uuid;let v=y(d,"shopify.extension.toml");if(u===m.Write){let D=o(r,i,t.configuration);await new X(v,D).replace(D);let fe=y(d,A.lockFile);await P(fe)}return{extension:r,directory:d,configurationPath:u===m.Write||await k(v)?v:null,changed:u===m.Write}});try{return{status:"success",reason:null,extensions:await Promise.all(_),extensionUuids:l}}catch(r){throw r instanceof C?r:new b(r,_,c)}}function we(e,t){let n=e.dotenv?.variables??{},i=e.allExtensions.map(o=>n[o.idEnvironmentVariableName]);return t.filter(o=>!i.includes(o.uuid))}async function Ot(e){let t=le(e.extensions);await Promise.all(t.map(async n=>{let i=await Ce({...e,extensionTypes:n.extensionTypes,buildExtensionConfig:n.buildExtensionConfig,all:!0}).catch(o=>{throw o instanceof b?o.originalError:o});ee(i),await j({app:e.app,appApiKey:e.remoteApp.apiKey,extensionUuids:i.extensionUuids,command:"import-extensions"})}))}s();async function Ft({developerPlatformClient:e,apiKey:t,organizationId:n,extensionTypes:i,onlyDashboardManaged:o=!1}){let a=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:n}),{dashboardManagedExtensionRegistrations:c,extensionRegistrations:l}=a.app;return(o?c:l.concat(c)).filter(r=>{let d=i.includes(r.type.toLowerCase()),u=r.activeVersion&&r.activeVersion.config,T=r.draftVersion&&r.draftVersion.config;return d&&(u??T)})}export{ee as a,le as b,Et as c,St as d,C as e,b as f,Ce as g,we as h,Ot as i,Ft as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Gi,c as Ki,d as ln,e as ao,f as un,g as qe,h as lo,i as uo,j as fo,k as po,l as ho,m as mo,n as go,o as _o,p as yo}from"./chunk-QFYLJVJW.js";import{b as ro,c as oo}from"./chunk-ZGASBRSQ.js";import{b as so}from"./chunk-I5A6BPCP.js";import{a as io}from"./chunk-CX5CC6P5.js";import{a as co}from"./chunk-IGE4Y5SE.js";import{a as v,c as y,g as f}from"./chunk-VKWPEFWQ.js";var $=y(F=>{"use strict";f();Object.defineProperty(F,"__esModule",{value:!0});F.pickBy=bo;F.compact=vo;F.uniqBy=wo;F.last=Oo;F.sortBy=jo;F.castArray=Po;F.isProd=Co;F.maxBy=Eo;F.sumBy=$o;F.capitalize=qo;F.isTruthy=Do;F.isNotFalsy=xo;F.uniq=Fo;F.mapValues=Ao;F.mergeNestedObjects=Mo;function bo(t,e){return Object.entries(t).reduce((n,[i,s])=>(e(s)&&(n[i]=s),n),{})}function vo(t){return t.filter(e=>!!e)}function wo(t,e){return t.filter((n,i)=>{let s=e(n);return!t.some((r,o)=>o>i&&e(r)===s)})}function Oo(t){if(t)return t.at(-1)}function dn(t,e){if(t=t===void 0?0:t,e=e===void 0?0:e,Array.isArray(t)&&Array.isArray(e)){if(t.length===0&&e.length===0)return 0;let n=dn(t[0],e[0]);return n!==0?n:dn(t.slice(1),e.slice(1))}return t<e?-1:t>e?1:0}function jo(t,e){return t.sort((n,i)=>dn(e(n),e(i)))}function Po(t){return t===void 0?[]:Array.isArray(t)?t:[t]}function Co(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Eo(t,e){if(t.length!==0)return t.reduce((n,i)=>{let s=e(i),r=e(n);return s>r?i:n})}function $o(t,e){return t.reduce((n,i)=>n+e(i),0)}function qo(t){return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():""}function Do(t){return["1","true","y","yes"].includes(t.toLowerCase())}function xo(t){return!["0","false","n","no"].includes(t.toLowerCase())}function Fo(t){return[...new Set(t)].sort()}function Ao(t,e){return Object.entries(t).reduce((n,[i,s])=>(n[i]=e(s,i),n),{})}function So(t,e){return e.split(".").reduce((n,i)=>n?.[i],t)}function Mo(t,e){return Object.fromEntries(t.flatMap(n=>Object.entries(So(n,e)??{})).reverse())}});var X=y(ie=>{"use strict";f();Object.defineProperty(ie,"__esModule",{value:!0});ie.fileExists=ie.dirExists=void 0;ie.readJson=Ji;ie.safeReadJson=Ro;ie.existsSync=No;var Io=v("node:fs"),hn=v("node:fs/promises"),ko=$(),To=async t=>{let e;try{e=await(0,hn.stat)(t)}catch{throw new Error(`No directory found at ${t}`)}if(!e.isDirectory())throw new Error(`${t} exists but is not a directory`);return t};ie.dirExists=To;var Lo=async t=>{let e;try{e=await(0,hn.stat)(t)}catch{throw new Error(`No file found at ${t}`)}if(!e.isFile())throw new Error(`${t} exists but is not a file`);return t};ie.fileExists=Lo;var pn=class extends Map{set(e,n){return((0,ko.isProd)()??!1)&&super.set(e,n),this}},fn=new pn;async function Ji(t,e=!0){if(e&&fn.has(t))return JSON.parse(fn.get(t));let n=await(0,hn.readFile)(t,"utf8");return fn.set(t,n),JSON.parse(n)}async function Ro(t,e=!0){try{return await Ji(t,e)}catch{}}function No(t){return(0,Io.existsSync)(t)}});var Xi=y(M=>{"use strict";f();Object.defineProperty(M,"__esModule",{value:!0});M.string=M.url=M.file=M.directory=M.integer=M.boolean=void 0;M.custom=me;var Ho=v("node:url"),Yi=X(),Bo=$();function me(t){return(e={})=>({parse:async(n,i,s)=>n,...t,...e,input:[],type:"option"})}M.boolean=me({parse:async t=>!!t&&(0,Bo.isNotFalsy)(t)});M.integer=me({async parse(t,e,n){if(!/^-?\d+$/.test(t))throw new Error(`Expected an integer but received: ${t}`);let i=Number.parseInt(t,10);if(n.min!==void 0&&i<n.min)throw new Error(`Expected an integer greater than or equal to ${n.min} but received: ${t}`);if(n.max!==void 0&&i>n.max)throw new Error(`Expected an integer less than or equal to ${n.max} but received: ${t}`);return i}});M.directory=me({async parse(t,e,n){return n.exists?(0,Yi.dirExists)(t):t}});M.file=me({async parse(t,e,n){return n.exists?(0,Yi.fileExists)(t):t}});M.url=me({async parse(t){try{return new Ho.URL(t)}catch{throw new Error(`Expected a valid url but received: ${t}`)}}});var Wo=me({});M.string=Wo});var Zi=y((Rf,zo)=>{zo.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.8.3",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.4",semver:"^7.7.3","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.14","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.1",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var G=y(gn=>{"use strict";f();Object.defineProperty(gn,"__esModule",{value:!0});var Uo=v("node:fs"),Vo=v("node:path"),mn=class t extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return t.instance||(t.instance=new t),t.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Zi().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,Uo.readFileSync)((0,Vo.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};gn.default=mn});var k=y(le=>{"use strict";f();var Go=le&&le.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(le,"__esModule",{value:!0});le.getLogger=Qi;le.makeDebug=Yo;le.setLogger=Xo;le.clearLoggers=Zo;var Ko=Go(oo()),yn="oclif";function Ct(t=yn){let e=(0,Ko.default)(t);return{child:(n,i)=>Ct(`${t}${i??":"}${n}`),debug:e,error:(n,...i)=>Ct(`${t}:error`).debug(n,...i),info:e,namespace:t,trace:e,warn:e}}var se=new Map;function Qi(t){let e=se.get("root");if(e||_n(Ct(yn)),e=se.get("root"),t){let n=se.get(t);if(n)return n;let i=e.child(t);return se.set(t,i),i}return e}function Jo(t){return typeof t.child=="function"&&typeof t.debug=="function"&&typeof t.error=="function"&&typeof t.info=="function"&&typeof t.trace=="function"&&typeof t.warn=="function"&&typeof t.namespace=="string"}function _n(t){se.has(t.namespace)||se.has("root")||(Jo(t)?(se.set(t.namespace,t),se.set("root",t)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function Yo(t){return(e,...n)=>Qi(t).debug(e,...n)}function Xo(t){t&&typeof t!="string"&&"logger"in t&&t.logger?_n(t.logger):_n(Ct(yn))}function Zo(){se.clear()}});var tt=y(xe=>{"use strict";f();Object.defineProperty(xe,"__esModule",{value:!0});xe.stderr=xe.stdout=void 0;var De=v("node:util"),Qo=(t,...e)=>{!t&&e?console.log((0,De.format)(...e)):t?console.log(typeof t=="string"?(0,De.format)(t,...e):(0,De.format)(...t,...e)):console.log()};xe.stdout=Qo;var ea=(t,...e)=>{!t&&e?console.error((0,De.format)(...e)):t?console.error(typeof t=="string"?(0,De.format)(t,...e):(0,De.format)(...t,...e)):console.error()};xe.stderr=ea});var re=y(Et=>{"use strict";f();Object.defineProperty(Et,"__esModule",{value:!0});Et.settings=void 0;globalThis.oclif||(globalThis.oclif={});Et.settings=globalThis.oclif});var Ae=y(Fe=>{"use strict";f();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.errtermwidth=Fe.stdtermwidth=void 0;var ta=re();function es(t){if(!t.isTTY)return 80;let e=t.getWindowSize()[0];return e<1?80:e<40?40:e}var ts=Number.parseInt(process.env.OCLIF_COLUMNS,10)||ta.settings.columns;Fe.stdtermwidth=ts||es(process.stdout);Fe.errtermwidth=ts||es(process.stderr)});var ns=y($t=>{"use strict";f();Object.defineProperty($t,"__esModule",{value:!0});$t.STANDARD_ANSI=void 0;$t.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ss=y(bn=>{"use strict";f();Object.defineProperty(bn,"__esModule",{value:!0});bn.supportsColor=na;var is=ro();function na(){return!!is.stdout&&!!is.stderr}});var W=y(Se=>{"use strict";f();var ia=Se&&Se.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Se,"__esModule",{value:!0});Se.colorize=oa;Se.parseTheme=os;var vn=ia(qe()),sa=ns(),ra=ss();function rs(t){return sa.STANDARD_ANSI.includes(t)}function oa(t,e){if(!t||!(0,ra.supportsColor)())return e;if(rs(t))return vn.default[t](e);if(t.startsWith("#"))return vn.default.hex(t)(e);if(t.startsWith("rgb")){let[n,i,s]=t.slice(4,-1).split(",").map(r=>Number.parseInt(r.trim(),10));return vn.default.rgb(n,i,s)(e)}return e}function os(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?aa(n):os(n)]).filter(([e,n])=>n))}function aa(t){return t.startsWith("#")||t.startsWith("rgb")||rs(t)?t:void 0}});var ge=y(ue=>{"use strict";f();var qt=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ue,"__esModule",{value:!0});ue.CLIError=void 0;ue.addOclifExitCode=cs;var ca=qt(Ki()),wn=qt(ln()),la=qt(un()),ua=qt(G()),da=Ae(),fa=re(),as=W();function cs(t,e){return"oclif"in t||(t.oclif={}),t.oclif.exit=e?.exit===void 0?ua.default.getInstance().get("exitCodes")?.default??2:e.exit,t}var nt=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,n={}){super(e instanceof Error?e.message:e),cs(this,n),this.code=n.code,this.suggestions=n.suggestions}get bang(){try{return(0,as.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,ca.default)(super.stack,{pretty:!0})}render(){if(fa.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,la.default)(e,da.errtermwidth-6,{hard:!0,trim:!1}),e=(0,wn.default)(e,3),e=(0,wn.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,wn.default)(e,1),e}};ue.CLIError=nt;(function(t){class e extends t{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,as.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}t.Warn=e})(nt||(ue.CLIError=nt={}))});var xt=y(Me=>{"use strict";f();var ls=Me&&Me.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Me,"__esModule",{value:!0});Me.applyPrettyPrintOptions=ga;Me.default=ya;var Dt=ls(ln()),pa=ls(un()),ha=Ae(),ma=re();function ga(t,e){let n=["message","code","ref","suggestions"];for(let i of n)!(i in t)&&e[i]&&(t[i]=e[i]);return t}var _a=t=>{let e="Try this:";if(!t||t.length===0)return;if(t.length===1)return`${e} ${t[0]}`;let n=t.map(i=>`* ${i}`).join(`
|
|
1
|
+
import{a as Gi,b as ro,c as oo,e as Ki,f as ln,g as ao,h as un,i as qe,j as lo,k as uo,l as fo,m as po,o as ho,p as mo,q as go,r as _o,s as yo}from"./chunk-RFJ2LI64.js";import{b as so}from"./chunk-I5A6BPCP.js";import{a as io}from"./chunk-O472FAYX.js";import{a as co}from"./chunk-IGE4Y5SE.js";import{a as v,c as y,g as f}from"./chunk-VKWPEFWQ.js";var $=y(F=>{"use strict";f();Object.defineProperty(F,"__esModule",{value:!0});F.pickBy=bo;F.compact=vo;F.uniqBy=wo;F.last=Oo;F.sortBy=jo;F.castArray=Po;F.isProd=Co;F.maxBy=Eo;F.sumBy=$o;F.capitalize=qo;F.isTruthy=Do;F.isNotFalsy=xo;F.uniq=Fo;F.mapValues=Ao;F.mergeNestedObjects=Mo;function bo(t,e){return Object.entries(t).reduce((n,[i,s])=>(e(s)&&(n[i]=s),n),{})}function vo(t){return t.filter(e=>!!e)}function wo(t,e){return t.filter((n,i)=>{let s=e(n);return!t.some((r,o)=>o>i&&e(r)===s)})}function Oo(t){if(t)return t.at(-1)}function dn(t,e){if(t=t===void 0?0:t,e=e===void 0?0:e,Array.isArray(t)&&Array.isArray(e)){if(t.length===0&&e.length===0)return 0;let n=dn(t[0],e[0]);return n!==0?n:dn(t.slice(1),e.slice(1))}return t<e?-1:t>e?1:0}function jo(t,e){return t.sort((n,i)=>dn(e(n),e(i)))}function Po(t){return t===void 0?[]:Array.isArray(t)?t:[t]}function Co(){return!["development","test"].includes(process.env.NODE_ENV??"")}function Eo(t,e){if(t.length!==0)return t.reduce((n,i)=>{let s=e(i),r=e(n);return s>r?i:n})}function $o(t,e){return t.reduce((n,i)=>n+e(i),0)}function qo(t){return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():""}function Do(t){return["1","true","y","yes"].includes(t.toLowerCase())}function xo(t){return!["0","false","n","no"].includes(t.toLowerCase())}function Fo(t){return[...new Set(t)].sort()}function Ao(t,e){return Object.entries(t).reduce((n,[i,s])=>(n[i]=e(s,i),n),{})}function So(t,e){return e.split(".").reduce((n,i)=>n?.[i],t)}function Mo(t,e){return Object.fromEntries(t.flatMap(n=>Object.entries(So(n,e)??{})).reverse())}});var X=y(ie=>{"use strict";f();Object.defineProperty(ie,"__esModule",{value:!0});ie.fileExists=ie.dirExists=void 0;ie.readJson=Ji;ie.safeReadJson=Ro;ie.existsSync=No;var Io=v("node:fs"),hn=v("node:fs/promises"),ko=$(),To=async t=>{let e;try{e=await(0,hn.stat)(t)}catch{throw new Error(`No directory found at ${t}`)}if(!e.isDirectory())throw new Error(`${t} exists but is not a directory`);return t};ie.dirExists=To;var Lo=async t=>{let e;try{e=await(0,hn.stat)(t)}catch{throw new Error(`No file found at ${t}`)}if(!e.isFile())throw new Error(`${t} exists but is not a file`);return t};ie.fileExists=Lo;var pn=class extends Map{set(e,n){return((0,ko.isProd)()??!1)&&super.set(e,n),this}},fn=new pn;async function Ji(t,e=!0){if(e&&fn.has(t))return JSON.parse(fn.get(t));let n=await(0,hn.readFile)(t,"utf8");return fn.set(t,n),JSON.parse(n)}async function Ro(t,e=!0){try{return await Ji(t,e)}catch{}}function No(t){return(0,Io.existsSync)(t)}});var Xi=y(M=>{"use strict";f();Object.defineProperty(M,"__esModule",{value:!0});M.string=M.url=M.file=M.directory=M.integer=M.boolean=void 0;M.custom=me;var Ho=v("node:url"),Yi=X(),Bo=$();function me(t){return(e={})=>({parse:async(n,i,s)=>n,...t,...e,input:[],type:"option"})}M.boolean=me({parse:async t=>!!t&&(0,Bo.isNotFalsy)(t)});M.integer=me({async parse(t,e,n){if(!/^-?\d+$/.test(t))throw new Error(`Expected an integer but received: ${t}`);let i=Number.parseInt(t,10);if(n.min!==void 0&&i<n.min)throw new Error(`Expected an integer greater than or equal to ${n.min} but received: ${t}`);if(n.max!==void 0&&i>n.max)throw new Error(`Expected an integer less than or equal to ${n.max} but received: ${t}`);return i}});M.directory=me({async parse(t,e,n){return n.exists?(0,Yi.dirExists)(t):t}});M.file=me({async parse(t,e,n){return n.exists?(0,Yi.fileExists)(t):t}});M.url=me({async parse(t){try{return new Ho.URL(t)}catch{throw new Error(`Expected a valid url but received: ${t}`)}}});var Wo=me({});M.string=Wo});var Zi=y((Rf,zo)=>{zo.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"4.8.3",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"ansi-escapes":"^4.3.2",ansis:"^3.17.0","clean-stack":"^3.0.1","cli-spinners":"^2.9.2",debug:"^4.4.3",ejs:"^3.1.10","get-package-type":"^0.1.0","indent-string":"^4.0.0","is-wsl":"^2.2.0",lilconfig:"^3.1.3",minimatch:"^10.2.4",semver:"^7.7.3","string-width":"^4.2.3","supports-color":"^8",tinyglobby:"^0.2.14","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^19","@eslint/compat":"^1.4.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","@oclif/prettier-config":"^0.2.1","@oclif/test":"^4","@types/benchmark":"^2.1.5","@types/chai":"^4.3.16","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/mocha":"^10.0.10","@types/node":"^18","@types/pnpapi":"^0.0.5","@types/sinon":"^17.0.3","@types/supports-color":"^8.1.3","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.5.0","chai-as-promised":"^7.1.2",commitlint:"^19","cross-env":"^7.0.3",eslint:"^9","eslint-config-oclif":"^6","eslint-config-prettier":"^10",husky:"^9.1.7","lint-staged":"^15",madge:"^6.1.0",mocha:"^11.7.5",nyc:"^15.1.0",prettier:"^3.8.1",shx:"^0.4.0",sinon:"^18","ts-node":"^10.9.2",tsd:"^0.33.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",exports:{".":"./lib/index.js","./args":"./lib/args.js","./command":"./lib/command.js","./config":"./lib/config/index.js","./errors":"./lib/errors/index.js","./execute":"./lib/execute.js","./flags":"./lib/flags.js","./flush":"./lib/flush.js","./handle":"./lib/errors/handle.js","./help":"./lib/help/index.js","./hooks":"./lib/interfaces/hooks.js","./interfaces":"./lib/interfaces/index.js","./logger":"./lib/logger.js","./package.json":"./package.json","./parser":"./lib/parser/index.js","./performance":"./lib/performance.js","./run":"./lib/main.js","./settings":"./lib/settings.js","./util/ids":"./lib/util/ids.js","./ux":"./lib/ux/index.js"},repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky","test:circular-deps":"yarn build && madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts" --parallel'},types:"lib/index.d.ts"}});var G=y(gn=>{"use strict";f();Object.defineProperty(gn,"__esModule",{value:!0});var Uo=v("node:fs"),Vo=v("node:path"),mn=class t extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return t.instance||(t.instance=new t),t.instance}get(e){return super.get(e)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Zi().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,Uo.readFileSync)((0,Vo.join)(__dirname,"..","package.json"),"utf8")).version}}catch{return{name:"@oclif/core",version:"unknown"}}}}};gn.default=mn});var k=y(le=>{"use strict";f();var Go=le&&le.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(le,"__esModule",{value:!0});le.getLogger=Qi;le.makeDebug=Yo;le.setLogger=Xo;le.clearLoggers=Zo;var Ko=Go(oo()),yn="oclif";function Ct(t=yn){let e=(0,Ko.default)(t);return{child:(n,i)=>Ct(`${t}${i??":"}${n}`),debug:e,error:(n,...i)=>Ct(`${t}:error`).debug(n,...i),info:e,namespace:t,trace:e,warn:e}}var se=new Map;function Qi(t){let e=se.get("root");if(e||_n(Ct(yn)),e=se.get("root"),t){let n=se.get(t);if(n)return n;let i=e.child(t);return se.set(t,i),i}return e}function Jo(t){return typeof t.child=="function"&&typeof t.debug=="function"&&typeof t.error=="function"&&typeof t.info=="function"&&typeof t.trace=="function"&&typeof t.warn=="function"&&typeof t.namespace=="string"}function _n(t){se.has(t.namespace)||se.has("root")||(Jo(t)?(se.set(t.namespace,t),se.set("root",t)):process.emitWarning("Logger does not match the Logger interface. Using default logger."))}function Yo(t){return(e,...n)=>Qi(t).debug(e,...n)}function Xo(t){t&&typeof t!="string"&&"logger"in t&&t.logger?_n(t.logger):_n(Ct(yn))}function Zo(){se.clear()}});var tt=y(xe=>{"use strict";f();Object.defineProperty(xe,"__esModule",{value:!0});xe.stderr=xe.stdout=void 0;var De=v("node:util"),Qo=(t,...e)=>{!t&&e?console.log((0,De.format)(...e)):t?console.log(typeof t=="string"?(0,De.format)(t,...e):(0,De.format)(...t,...e)):console.log()};xe.stdout=Qo;var ea=(t,...e)=>{!t&&e?console.error((0,De.format)(...e)):t?console.error(typeof t=="string"?(0,De.format)(t,...e):(0,De.format)(...t,...e)):console.error()};xe.stderr=ea});var re=y(Et=>{"use strict";f();Object.defineProperty(Et,"__esModule",{value:!0});Et.settings=void 0;globalThis.oclif||(globalThis.oclif={});Et.settings=globalThis.oclif});var Ae=y(Fe=>{"use strict";f();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.errtermwidth=Fe.stdtermwidth=void 0;var ta=re();function es(t){if(!t.isTTY)return 80;let e=t.getWindowSize()[0];return e<1?80:e<40?40:e}var ts=Number.parseInt(process.env.OCLIF_COLUMNS,10)||ta.settings.columns;Fe.stdtermwidth=ts||es(process.stdout);Fe.errtermwidth=ts||es(process.stderr)});var ns=y($t=>{"use strict";f();Object.defineProperty($t,"__esModule",{value:!0});$t.STANDARD_ANSI=void 0;$t.STANDARD_ANSI=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"]});var ss=y(bn=>{"use strict";f();Object.defineProperty(bn,"__esModule",{value:!0});bn.supportsColor=na;var is=ro();function na(){return!!is.stdout&&!!is.stderr}});var W=y(Se=>{"use strict";f();var ia=Se&&Se.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Se,"__esModule",{value:!0});Se.colorize=oa;Se.parseTheme=os;var vn=ia(qe()),sa=ns(),ra=ss();function rs(t){return sa.STANDARD_ANSI.includes(t)}function oa(t,e){if(!t||!(0,ra.supportsColor)())return e;if(rs(t))return vn.default[t](e);if(t.startsWith("#"))return vn.default.hex(t)(e);if(t.startsWith("rgb")){let[n,i,s]=t.slice(4,-1).split(",").map(r=>Number.parseInt(r.trim(),10));return vn.default.rgb(n,i,s)(e)}return e}function os(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?aa(n):os(n)]).filter(([e,n])=>n))}function aa(t){return t.startsWith("#")||t.startsWith("rgb")||rs(t)?t:void 0}});var ge=y(ue=>{"use strict";f();var qt=ue&&ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ue,"__esModule",{value:!0});ue.CLIError=void 0;ue.addOclifExitCode=cs;var ca=qt(Ki()),wn=qt(ln()),la=qt(un()),ua=qt(G()),da=Ae(),fa=re(),as=W();function cs(t,e){return"oclif"in t||(t.oclif={}),t.oclif.exit=e?.exit===void 0?ua.default.getInstance().get("exitCodes")?.default??2:e.exit,t}var nt=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(e,n={}){super(e instanceof Error?e.message:e),cs(this,n),this.code=n.code,this.suggestions=n.suggestions}get bang(){try{return(0,as.colorize)("red",process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,ca.default)(super.stack,{pretty:!0})}render(){if(fa.settings.debug)return this.stack;let e=`${this.name}: ${this.message}`;return e=(0,la.default)(e,da.errtermwidth-6,{hard:!0,trim:!1}),e=(0,wn.default)(e,3),e=(0,wn.default)(e,1,{includeEmptyLines:!0,indent:this.bang}),e=(0,wn.default)(e,1),e}};ue.CLIError=nt;(function(t){class e extends t{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return(0,as.colorize)("yellow",process.platform==="win32"?"\xBB":"\u203A")}catch{}}}t.Warn=e})(nt||(ue.CLIError=nt={}))});var xt=y(Me=>{"use strict";f();var ls=Me&&Me.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Me,"__esModule",{value:!0});Me.applyPrettyPrintOptions=ga;Me.default=ya;var Dt=ls(ln()),pa=ls(un()),ha=Ae(),ma=re();function ga(t,e){let n=["message","code","ref","suggestions"];for(let i of n)!(i in t)&&e[i]&&(t[i]=e[i]);return t}var _a=t=>{let e="Try this:";if(!t||t.length===0)return;if(t.length===1)return`${e} ${t[0]}`;let n=t.map(i=>`* ${i}`).join(`
|
|
2
2
|
`);return`${e}
|
|
3
3
|
${(0,Dt.default)(n,2)}`};function ya(t){if(ma.settings.debug)return t.stack;let{bang:e,code:n,message:i,name:s,ref:r,suggestions:o}=t,c=i?`${s||"Error"}: ${i}`:void 0,l=n?`Code: ${n}`:void 0,u=_a(o),p=r?`Reference: ${r}`:void 0,a=[c,l,u,p].filter(Boolean).join(`
|
|
4
4
|
`),d=(0,pa.default)(a,ha.errtermwidth-6,{hard:!0,trim:!1});return d=(0,Dt.default)(d,3),d=(0,Dt.default)(d,1,{includeEmptyLines:!0,indent:e||""}),d=(0,Dt.default)(d,1),d}});var Ie=y(Z=>{"use strict";f();var ba=Z&&Z.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),va=Z&&Z.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wa=Z&&Z.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),s=0;s<i.length;s++)i[s]!=="default"&&ba(n,e,i[s]);return va(n,e),n}})();Object.defineProperty(Z,"__esModule",{value:!0});Z.error=fs;var Oa=k(),ja=tt(),us=ge(),ds=wa(xt());function fs(t,e={}){let n;if(typeof t=="string")n=new us.CLIError(t,e);else if(t instanceof Error)n=(0,us.addOclifExitCode)(t,e);else throw new TypeError("first argument must be a string or instance of Error");if(n=(0,ds.applyPrettyPrintOptions)(n,e),e.exit===!1){let i=(0,ds.default)(n);i&&(0,ja.stderr)(i),n?.stack&&(0,Oa.getLogger)().error(n.stack)}else throw n}Z.default=fs});var At=y(Ft=>{"use strict";f();Object.defineProperty(Ft,"__esModule",{value:!0});Ft.ExitError=void 0;var Pa=ge(),On=class extends Pa.CLIError{code="EEXIT";constructor(e=1){super(`EEXIT: ${e}`,{exit:e})}render(){return""}};Ft.ExitError=On});var Pn=y(St=>{"use strict";f();Object.defineProperty(St,"__esModule",{value:!0});St.ModuleLoadError=void 0;var Ca=ge(),jn=class extends Ca.CLIError{code="MODULE_NOT_FOUND";constructor(e){super(`[MODULE_NOT_FOUND] ${e}`,{exit:1}),this.name="ModuleLoadError"}};St.ModuleLoadError=jn});var Mt=y(Cn=>{"use strict";f();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.exit=$a;var Ea=At();function $a(t=0){throw new Ea.ExitError(t)}});var ke=y(_e=>{"use strict";f();var qa=_e&&_e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_e,"__esModule",{value:!0});_e.warn=En;_e.memoizedWarn=Aa;var Da=k(),xa=tt(),ps=ge(),Fa=qa(xt());function En(t){let e;if(typeof t=="string")e=new ps.CLIError.Warn(t);else if(t instanceof Error)e=(0,ps.addOclifExitCode)(t);else throw new TypeError("first argument must be a string or instance of Error");let n=(0,Fa.default)(e);n&&(0,xa.stderr)(n),e?.stack&&(0,Da.getLogger)().error(e.stack)}var hs=new Set;function Aa(t){hs.has(t)||En(t),hs.add(t)}_e.default=En});var vs=y($n=>{"use strict";f();Object.defineProperty($n,"__esModule",{value:!0});$n.readTSConfig=ka;var ms=v("node:fs/promises"),ys=v("node:path"),Sa=ke(),Ma=k(),gs=$(),Ia=(0,Ma.makeDebug)("read-tsconfig");function _s(t,e){try{return v.resolve(e,{paths:[t]})}catch{}}async function bs(t,e){let n;try{n=await e(t)}catch{n=!1}if(n)return t;let i=(0,ys.dirname)(t);if(i!==t)return bs(i,e)}async function ka(t,e="tsconfig.json"){let n=[],i;try{i=co()}catch{try{i=v(t+"/node_modules/typescript")}catch{}}if(!i){(0,Sa.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let s=async r=>{let o=await bs(r,async c=>(await(0,ms.readdir)(c)).includes("package.json"));if(o)try{let c=await(0,ms.readFile)(r,"utf8"),l=i?.parseConfigFileTextToJson(r,c).config;if(n.push(l),l.extends){if(l.extends.startsWith(".")){let p=_s(o,l.extends);return p?s(p):void 0}let u=_s(o,l.extends);if(u)return s(u)}return l}catch(c){Ia(c)}};return await s((0,ys.join)(t,e)),{compilerOptions:(0,gs.mergeNestedObjects)(n,"compilerOptions"),"ts-node":(0,gs.mergeNestedObjects)(n,"ts-node")}}});var Te=y(ye=>{"use strict";f();Object.defineProperty(ye,"__esModule",{value:!0});ye.collectUsableIds=void 0;ye.makeDebug=La;ye.getPermutations=qn;ye.getCommandIdPermutations=Ra;var Ta=k();function La(...t){return(e,...n)=>(0,Ta.getLogger)(["config",...t].join(":")).debug(e,...n)}function qn(t){if(t.length===0)return[];if(t.length===1)return[t];let e=[],n=qn(t.slice(1)),i=t[0];for(let s=0,r=n.length;s<r;s++){let o=n[s];for(let c=0,l=o.length;c<=l;c++){let u=o.slice(0,c),p=o.slice(c),a=[...u,i,...p];e.push(a)}}return e}function Ra(t){return qn(t.split(":")).flatMap(e=>e.join(":"))}var Na=t=>new Set(t.flatMap(e=>e.split(":").map((n,i,s)=>s.slice(0,i+1).join(":"))));ye.collectUsableIds=Na});var Le=y(K=>{"use strict";f();var Ha=K&&K.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K,"__esModule",{value:!0});K.TS_CONFIGS=void 0;K.tsPath=tc;var ws=v("node:fs/promises"),T=v("node:path"),Ba=v("node:url"),Wa=Ha(G()),it=ke(),Os=re(),za=X(),Ua=vs(),Dn=$(),Va=Te(),P=(0,Va.makeDebug)("ts-path");K.TS_CONFIGS={};var It=new Set;function Ga(){return process.execPath.split(T.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(T.sep).includes("ts-node")||process.execArgv[0].split(T.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(T.sep).includes("tsx")?"tsx":"node"}var xn=Ga();function Ka(t){return"code"in t&&t.code==="ENOENT"}async function Ja(t){try{if(K.TS_CONFIGS[t])return K.TS_CONFIGS[t];let e=await(0,Ua.readTSConfig)(t);return e?(P("tsconfig: %O",e),K.TS_CONFIGS[t]=e,K.TS_CONFIGS[t]):void 0}catch(e){if(Ka(e))return;P(`Could not parse tsconfig.json. Skipping typescript path lookup for ${t}.`),(0,it.memoizedWarn)(`Could not parse tsconfig.json for ${t}. Falling back to compiled source.`)}}async function Ya(t,e){if(!It.has(t))try{let n=e==="module"?"tsx/esm/api":"tsx/cjs/api",i=v.resolve(n,{paths:[t]});if(!i)return;P("registering tsx at",t),P("tsx path:",i);let{href:s}=(0,Ba.pathToFileURL)(i);P("tsx href:",s);let{register:r}=await import(s);P("Successfully imported tsx"),r(),It.add(t)}catch(n){P(`Could not find tsx. Skipping tsx registration for ${t}.`),P(n)}}async function Xa(t,e){if(It.has(t))return;P("registering ts-node at",t);let n=v.resolve("ts-node",{paths:[t,__dirname]});P("ts-node path:",n);let i;try{i=v(n),P("Successfully required ts-node")}catch(p){P(`Could not find ts-node at ${n}. Skipping ts-node registration for ${t}.`),P(p),(0,it.memoizedWarn)(`Could not find ts-node at ${n}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let s=[(0,T.join)(t,"node_modules","@types")],r=[];if(e.compilerOptions.rootDirs)for(let p of e.compilerOptions.rootDirs)r.push((0,T.join)(t,p));else e.compilerOptions.rootDir?r.push((0,T.join)(t,e.compilerOptions.rootDir)):e.compilerOptions.baseUrl?r.push((0,T.join)(t,e.compilerOptions.baseUrl)):r.push((0,T.join)(t,"src"));let{baseUrl:o,rootDir:c,...l}=e.compilerOptions,u={compilerOptions:{...l,rootDirs:r,typeRoots:s},...e["ts-node"],cwd:t,esm:e["ts-node"]?.esm??!0,experimentalSpecifierResolution:e["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:t,skipProject:!0,transpileOnly:!0};P("ts-node options: %O",u),i.register(u),It.add(t)}function Za(t,e,n){return(n||t?.moduleType==="commonjs")&&e?.moduleType==="module"&&!e?.pjson.devDependencies?.tsx}function Qa(t,e,n){if(e?.moduleType!=="module"||n)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return xn==="ts-node"&&i>=20}async function ec(t,e,n){let i=await Ja(t);if(!i)return e;P(`Determining path for ${e}`),xn==="bun"?P(`Skipping ts-node registration for ${t} because the runtime is: ${xn}`):(await Ya(t,n?.moduleType),await Xa(t,i));let{baseUrl:s,outDir:r,rootDir:o,rootDirs:c}=i.compilerOptions,l=o??(c??[])[0]??s;if(!l)return P(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${e}`),e;if(!r)return P(`no outDir specified in tsconfig.json. Returning default path ${e}`),e;let u=(0,T.join)(t,r),p=(0,T.join)(t,l),a=(0,T.relative)(u,e),d=(0,T.join)(p,a).replace(/\.js$/,"");return P(`lib dir: ${u}`),P(`src dir: ${p}`),P(`src directory to find: ${d}`),(0,za.existsSync)(d)?(P(`Found source directory for ${e} at ${d}`),d):(await Promise.all([(0,ws.access)(`${d}.ts`).then(()=>`${d}.ts`).catch(()=>!1),(0,ws.access)(`${d}.tsx`).then(()=>`${d}.tsx`).catch(()=>!1)])).some(Boolean)?(P(`Found source file for ${e} at ${d}`),d):(P(`No source file found. Returning default path ${e}`),(0,Dn.isProd)()||(0,it.memoizedWarn)(`Could not find source for ${e} based on tsconfig. Defaulting to compiled source.`),e)}async function tc(t,e,n){let i=n?.options.isRoot?n:Wa.default.getInstance().get("rootPlugin");if(!e)return e;e=e.startsWith(t)?e:(0,T.join)(t,e);let s=Os.settings.enableAutoTranspile??Os.settings.tsnodeEnabled;if(s===!1)return P(`Skipping typescript path lookup for ${t} because enableAutoTranspile is explicitly set to false`),e;let r=(0,Dn.isProd)();if(s===void 0&&r&&n?.type!=="link")return P(`Skipping typescript path lookup for ${t} because NODE_ENV is NOT "test" or "development"`),e;if(Za(i,n,r)){P(`Skipping typescript path lookup for ${t} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`);let o=process.env.OCLIF_DISABLE_LINKED_ESM_WARNING&&(0,Dn.isTruthy)(process.env.OCLIF_DISABLE_LINKED_ESM_WARNING);return n?.type==="link"&&!o&&(0,it.memoizedWarn)(`${n?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),e}if(Qa(t,n,r))return P(`Skipping typescript path lookup for ${t} because ts-node is run in node version ${process.version}"`),(0,it.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),e;try{return await ec(t,e,n)}catch(o){return P(o),e}}});var st=y(Re=>{"use strict";f();Object.defineProperty(Re,"__esModule",{value:!0});Re.load=oc;Re.loadWithData=ac;Re.loadWithDataFromManifest=cc;Re.isPathModule=An;var nc=lo(),ic=v("node:fs"),kt=v("node:path"),Sn=v("node:url"),js=Le(),Fn=Pn(),Cs=X(),sc=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],rc=t=>t.type!==void 0;function Mn(t,e,n){throw t.code==="MODULE_NOT_FOUND"||t.code==="ERR_MODULE_NOT_FOUND"?new Fn.ModuleLoadError(`${e?"import()":"require"} failed to load ${n}: ${t.message}`):t}async function oc(t,e){let n,i;try{return{filePath:n,isESM:i}=await Es(t,e),i?await import((0,Sn.pathToFileURL)(n).href):v(n)}catch(s){Mn(s,i,n??e)}}async function ac(t,e){let n,i;try{({filePath:n,isESM:i}=await Es(t,e));let s=i?await import((0,Sn.pathToFileURL)(n).href):v(n);return{filePath:n,isESM:i,module:s}}catch(s){Mn(s,i,n??e)}}async function cc(t,e){let{id:n,isESM:i,relativePath:s}=t;if(!s)throw new Fn.ModuleLoadError(`Cached command ${n} does not have a relative path`);if(i===void 0)throw new Fn.ModuleLoadError(`Cached command ${n} does not have the isESM property set`);let r=(0,kt.join)(e,s.join(kt.sep));try{let o=i?await import((0,Sn.pathToFileURL)(r).href):v(r);return{filePath:r,isESM:i,module:o}}catch(o){Mn(o,i,r??e)}}function An(t){switch((0,kt.extname)(t).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return nc.sync(t)==="module";case".mjs":case".mts":return!0;default:return!1}}async function Es(t,e){let n,i;try{i=v.resolve(e),n=An(i)}catch{i=(rc(t)?await(0,js.tsPath)(t.root,e,t):await(0,js.tsPath)(t.root,e))??e;let s=!1,r=!1;if((0,Cs.existsSync)(i)){s=!0;try{(0,ic.lstatSync)(i)?.isDirectory?.()&&(s=!1,r=!0)}catch{}}if(!s){let o=Ps(i);!o&&r&&(o=Ps((0,kt.join)(i,"index"))),o&&(i=o)}n=An(i)}return{filePath:i,isESM:n}}function Ps(t){for(let e of sc){let n=`${t}${e}`;if((0,Cs.existsSync)(n))return n}return null}});var Lt=y(Tt=>{"use strict";f();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.SINGLE_COMMAND_CLI_SYMBOL=void 0;Tt.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var In=y(Rt=>{"use strict";f();Object.defineProperty(Rt,"__esModule",{value:!0});Rt.cacheDefaultValue=void 0;var lc=async(t,e)=>{if(!(e&&t.noCacheDefault)){if(typeof t.defaultHelp=="function")try{return await t.defaultHelp({flags:{},options:t})}catch{return}if(typeof t.default=="function")try{return await t.default({flags:{},options:t})}catch{}else return t.default}};Rt.cacheDefaultValue=lc});var be=y(Nt=>{"use strict";f();Object.defineProperty(Nt,"__esModule",{value:!0});Nt.toStandardizedId=uc;Nt.toConfiguredId=dc;function uc(t,e){return t.replaceAll(new RegExp(e.topicSeparator,"g"),":")}function dc(t,e){return t.replaceAll(new RegExp(":","g"),e.topicSeparator||":")}});var Tn=y(Ht=>{"use strict";f();Object.defineProperty(Ht,"__esModule",{value:!0});Ht.ActionBase=void 0;var $s=v("node:util"),qs=$(),kn=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get globals(){globalThis.ux=globalThis.ux||{};let e=globalThis.ux;return e.action=e.action||{},e}get output(){return this.globals.output}set output(e){this.globals.output=e}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(e){let{task:n}=this;n&&n.status!==e&&(this._updateStatus(e,n.status),n.status=e)}get task(){return this.globals.action.task}set task(e){this.globals.action.task=e}_flushStdout(){try{let e="",n;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();n=i[0],this._write(n,i[1]),e+=i[1][0].toString("utf8")}e&&n&&e.at(-1)!==`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-UK3BDOHR.js";import{b as e}from"./chunk-PSREELSQ.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static description="View the UI kit components that display static output";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-PSREELSQ.js";import{x as t}from"./chunk-7A4ZE5IS.js";import{k as r}from"./chunk-A5BSUUNQ.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static description="Run CLI doctor-release tests";static hidden=!0;async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as Se}from"./chunk-WL3M63DG.js";import{a as se}from"./chunk-3JRB7Q3T.js";import{a as ye,b as H}from"./chunk-PSREELSQ.js";import{B as w,Fa as ce,Ha as M,Ia as me,L as U,U as q}from"./chunk-UORSJB4A.js";import{e as b}from"./chunk-CE6XQDAG.js";import{d as ve}from"./chunk-IKXUYCK7.js";import{A as B,D as le,U as fe,a as ae,w as pe,z as D}from"./chunk-7A4ZE5IS.js";import{d as ie}from"./chunk-WLJDMI7E.js";import{j as re}from"./chunk-2KFYIYLI.js";import{b as ne}from"./chunk-QBRRFFMZ.js";import{d as ue,e as de}from"./chunk-HI5FTI3M.js";import{j as T,n as he}from"./chunk-FJOVMEPN.js";import{Ea as te,Eb as g,Ta as C,tb as G,vb as y,zb as ge}from"./chunk-OIQ5NQ5I.js";import{i as oe,j as L,k as R}from"./chunk-3PYDIBTX.js";import{b as Le}from"./chunk-VBPMVVLV.js";import{c as Z,e as P,h as ee,p as $}from"./chunk-IWTNUJGY.js";import{e as Oe,g as S}from"./chunk-VKWPEFWQ.js";S();var _=Oe(Le(),1);var Y={"allow-custom-checks":_.Flags.boolean({description:"Allow custom Theme Check JavaScript to run with your user permissions. Only enable this for trusted themes and checks. Only command-line arguments or the process environment can enable this.",env:"SHOPIFY_FLAG_ALLOW_CUSTOM_CHECKS",allowNo:!0}),path:_.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async n=>{let e=P(n);if(!C(e))throw new T("A path was explicitly provided but doesn't exist.",`Please check the path and try again: ${e}`);if(!te(e))throw new T("The path must be a directory, not a file.",`The provided path is not a directory: ${e}. Did you mean: ${ee(e)}`);return e},default:async()=>$(),noCacheDefault:!0}),password:_.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:_.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async n=>w(n)}),environment:_.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},we="Wrap the value in double quotes if you're using wildcards.",Ve=n=>({only:_.Flags.string({char:"o",multiple:!0,description:`${n.charAt(0).toUpperCase()+n.slice(1)} only the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:_.Flags.string({char:"x",multiple:!0,description:`Skip ${n}ing the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_IGNORE"})});S();S();S();import{AsyncLocalStorage as Ue}from"node:async_hooks";var Fe=new Ue,Ae,Ee,Te,xe;function v(){return Ae??=new b({projectName:"shopify-cli-theme-conf"}),Ae}function z(){return Ee??=new b({projectName:"shopify-cli-development-theme-config"}),Ee}function J(){return Te??=new b({projectName:"shopify-cli-repl-theme-config"}),Te}function W(){return xe??=new b({projectName:"shopify-cli-theme-store-password"}),xe}function K(n=v()){return Fe.getStore()?.store??n.get("themeStore")}function _e(n,e=v()){e.set("themeStore",n)}function rt(n=v()){return g(y`Getting development theme...`),z().get(F(n))}function ot(n,e=v()){g(y`Setting development theme...`),z().set(F(e),n)}function st(n=v()){g(y`Removing development theme...`),z().delete(F(n))}function it(n=v()){return g(y`Getting REPL theme...`),J().get(F(n))}function at(n,e=v()){g(y`Setting REPL theme to ${n}...`),J().set(F(e),n)}function ct(n=v()){g(y`Removing REPL theme...`),J().delete(F(n))}function mt(n=v()){let e=F(n);return g(y`Getting storefront password for shop ${e}...`),W().get(e)}function ut(n,e=v()){let t=F(e);g(y`Setting storefront password for shop ${t}...`),W().set(t,n)}function dt(n=v()){let e=F(n);g(y`Removing storefront password for ${e}...`),W().delete(e)}function F(n=v()){let e=K(n);if(!e)throw new he("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function Ie(n,e){return Fe.run({store:n},e)}function be(n){let e=n.store??K();if(!e)throw ce(new T("A store is required",`Specify the store passing ${y`${G.genericShellCommand(`--${Y.store.name}=example.myshopify.com`)}`.value} or set the ${y`${G.genericShellCommand(Y.store.env)}`.value} environment variable.`));return _e(e),e}S();var Ce="shopify.theme.toml",At=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Et=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],Tt=50;S();S();var V="7e9cb568cfd431c538f36d1ad3f2b4f6";var qe="shopify-cli-store",Me=240*1e3,ke;function j(){return ke??=new b({projectName:qe}),ke}function k(n){return`${V}::${De(n)}`}function De(n){return n.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function p(n){return typeof n=="string"}function Be(n){if(!n||typeof n!="object")return;let e=n;if(typeof e.id=="number")return{id:e.id,...p(e.email)?{email:e.email}:{},...p(e.firstName)?{firstName:e.firstName}:{},...p(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ge(n){if(!n||typeof n!="object")return;let e=n;if(!(!p(e.shopId)||!p(e.name)||!p(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...p(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...p(e.country)?{country:e.country}:{},...p(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function He(n){if(!n||typeof n!="object")return;let e=n;if(!p(e.store)||!p(e.clientId)||!p(e.userId)||!p(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(p)||!p(e.acquiredAt))return;let t=Be(e.associatedUser),r=e.kind==="preview"?"preview":"standard",o=r==="preview"?Ge(e.preview):void 0;if(!(r==="preview"&&!o))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...p(e.refreshToken)?{refreshToken:e.refreshToken}:{},...p(e.expiresAt)?{expiresAt:e.expiresAt}:{},...p(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...t?{associatedUser:t}:{},...r==="preview"?{kind:r}:{},...o?{preview:o}:{}}}function Pe(n,e,t){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:o}=e;if(!(r!==void 0||o!==void 0))return;let s=k(n);if(!r||typeof r!="object"||Array.isArray(r)||typeof o!="string"){t.delete(s);return}let i=Object.fromEntries(Object.entries(r).flatMap(([a,m])=>{let u=He(m);return u?[[a,u]]:[]}));if(Object.keys(i).length!==Object.keys(r).length)if(i[o])t.set(s,{currentUserId:o,sessionsByUserId:i});else{t.delete(s);return}return{currentUserId:o,sessionsByUserId:i}}function Q(n,e){return Pe(n,e.get(k(n)),e)}function Ye(n){return n.config?.store??{}}function $e(n=j()){let e=[],t=`${V}::`;for(let[r,o]of Object.entries(Ye(n))){if(!r.startsWith(t))continue;let c=Pe(r.slice(t.length),o,n),s=c?.sessionsByUserId[c.currentUserId];s&&e.push(s)}return e}function Re(n,e=j()){let t=w(n),r=Q(t,e);if(!r)return;let o=r.sessionsByUserId[r.currentUserId];if(!o){e.delete(k(t));return}return o}function $t(n,e=j()){let t=k(n.store),r=Q(n.store,e),o={currentUserId:n.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[n.userId]:n}};e.set(t,o)}function Rt(n,e,t){let r=w(n),o=typeof e=="string"?e:void 0,c=(typeof e=="string"?t:e)??j(),s=k(r);if(!o){c.delete(s);return}let i=Q(r,c);if(!i)return;let{[o]:a,...m}=i.sessionsByUserId,u=Object.keys(m);if(u.length===0){c.delete(s);return}c.set(s,{currentUserId:i.currentUserId===o?u[0]:i.currentUserId,sessionsByUserId:m})}function je(n){if(!n.expiresAt)return!1;let e=new Date(n.expiresAt).getTime();return Number.isNaN(e)?!0:e-Me<Date.now()}var X=class extends H{static baseFlags={...H.baseFlags,...ve};environmentsFilename(){return this.hasExplicitEnvironment()&&this.collectsEnvironmentResults({json:re(process.env,this.argv)})?void 0:Ce}async command(e,t,r=!1,o,c){}async run(e){let t=this.constructor,r=t.multiEnvironmentsFlags,o=this.hasExplicitEnvironment(),{args:c,flags:s}=await this.parse(t);return this.runWithParsedOutput(s,async()=>{let i="password"in t.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=o&&this.collectsEnvironmentResults(s),u=this.requiredFlagsForSingleEnvironment(r??[]),l=u.some(d=>Array.isArray(d)?d.includes("store"):d==="store");if(a.length<=1&&!(a.length>0&&m)){if(a[0]&&!s.store&&l)throw new T("Please provide a valid environment.");this.validateCommandFlags(s);let d=i?await this.createSession(s):void 0,N=this.constructor.name.toLowerCase();if(M(`theme-command:${N}:single-env:authenticated`),s.path&&!C(s.path))throw new T(`Path does not exist: ${s.path}`);try{await this.command(s,d,!1,c)}finally{await this.logAnalyticsData(d)}return}if(r===null&&a.length>1){if(s.json)throw new T("This command does not support multiple environments.");D({body:"This command does not support multiple environments."});return}let{flags:h}=await this.parse(ye(t),this.argv);if(a.length>1&&"path"in h){this.errorOnGlobalPath(!!s.json);return}let f=await this.loadEnvironments(a,s,h);m||=Array.from(f.values()).some(({flags:d})=>this.collectsEnvironmentResults(d));let x=async()=>{let d=await this.validateEnvironments(f,a.length===1?u:r??[],i,m);if((m?d.valid.some(({flags:I})=>this.requiresEnvironmentConfirmation(I)):this.requiresEnvironmentConfirmation(s))&&!await this.showConfirmation(this.constructor.name,r??[],d)){m&&this.renderEnvironmentResults(a.map(E=>({environment:E,result:{status:"cancelled"}})));return}let A=await this.runConcurrent(d.valid,m);if(m){let I=a.map(E=>{let O=d.invalid.find(Ne=>Ne.environment===E);return A.get(E)??{environment:E,error:{type:"abort",message:O?.reason??"The environment did not return a result."}}});this.renderEnvironmentResults(I),I.some(E=>"error"in E)&&(process.exitCode=1)}};return m&&R()!=="json"?oe({outputMode:"json",sink:ie},x):x()})}filterEnvironmentFlags(e){return Object.fromEntries(Object.entries(e).filter(([t])=>t!=="allow-custom-checks"))}validateCommandFlags(e){}requiredFlagsForSingleEnvironment(e){return e.filter(t=>t!=="password")}collectsEnvironmentResults(e){let t=this.constructor;return!!(e.json&&t.jsonOutputSchema)}requiresEnvironmentConfirmation(e){return"force"in this.constructor.flags&&!e.force&&(!this.collectsEnvironmentResults(e)||fe())}renderEnvironmentResults(e){let t=this.constructor;ge(t.jsonOutputSchema.encode({environments:e}))}validateNonTTYFlags(e){let t=this.constructor;"multiEnvironmentsFlags"in t&&t.multiEnvironmentsFlags!==void 0&&Array.isArray(e.environment)&&(e.environment.length>1||e.environment.length===1&&this.hasExplicitEnvironment()&&this.collectsEnvironmentResults(e))||super.validateNonTTYFlags(e)}storeAuthScopes(){}hasExplicitEnvironment(){return this.argv.some(e=>e==="--environment"||e.startsWith("--environment=")||e.startsWith("-e"))||!!process.env.SHOPIFY_FLAG_ENVIRONMENT}async loadEnvironments(e,t,r){let o=new Map;for(let s of e){let i;try{let a=await Se(s,"shopify.theme.toml",{from:t.path,silent:!0});i=a&&this.filterEnvironmentFlags(a)}catch(a){if(!this.collectsEnvironmentResults(t))throw a;o.set(s,{flags:t,validationFlags:{},parserFlags:{},error:a instanceof Error?a.message:String(a)});continue}i?.store&&typeof i.store=="string"&&(i.store=w(i.store)),typeof i?.theme=="number"?i.theme=String(i.theme):Array.isArray(i?.theme)&&(i.theme=i.theme.map(String)),i?.path&&typeof i.path=="string"&&(i.path=P(i.path)),o.set(s,{parserFlags:{...i,...r},flags:{...t,...i,...r,environment:[s]},validationFlags:{...e.length===1?t:{},...i,...r}})}if(this.collectsEnvironmentResults(t)||Array.from(o.values()).some(s=>this.collectsEnvironmentResults(s.flags))){for(let[s,i]of o)if(!i.error){i.flags={...i.flags,json:!0};try{let a=await this.parseEnvironmentFlags({json:!0,...i.parserFlags},this.constructor,r);i.flags={...i.flags,...a,environment:[s]}}catch(a){i.error=a instanceof Error?a.message:String(a)}}}return o}async validateEnvironments(e,t,r,o=!1){let c=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:u,validationFlags:l,error:h}])=>({environmentName:m,error:h,flags:u,validationFlags:l,storeAuthSession:this.storeAuthSessionFromCache(l,i)}));for(let{environmentName:m,flags:u,validationFlags:l,storeAuthSession:h,error:f}of a){if(f){s.push({environment:m,reason:f});continue}let x=this.validConfig(l,t,m,h,o);if(x!==!0){let d=x.join(", ");s.push({environment:m,reason:`Missing flags: ${d}`});continue}try{this.validateCommandFlags(u),super.validateNonTTYFlags(u)}catch(d){if(!o)throw d;s.push({environment:m,reason:d instanceof Error?d.message:String(d)});continue}c.push({environment:m,flags:u,requiresAuth:r,storeAuthSession:h})}return{valid:c,invalid:s}}async showConfirmation(e,t,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},i=[...r.valid.map(({environment:a,flags:m})=>{let u=t.map(l=>{let h=Array.isArray(l)?l.find(f=>m[f]):l;if(h==="password")return"password";if(h==="path"&&typeof m.path=="string"){let f=m.path.split(/[/\\]/);if(f.length===1)return`path: ${m.path}`;let x=f[0]===""?`/${f[1]}`:f[0],d=f.at(-1);return`path: ${x}/.../${d}`}return h&&`${h}: ${m[h]}`}).join(", ");return[a,{subdued:u||"No flags required"}]}),...r.invalid.map(({environment:a,reason:m})=>[a,{error:`Skipping | ${m}`}])];return s.infoTable={Environment:i},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),le(s)}async runConcurrent(e,t=!1){let r=new Map,o=new ae,c=e.map(a=>a.flags.store),s=new Set(c),i=c.length===s.size?[e]:this.createSequentialGroups(e);for(let a of i){let m=a.map(({environment:u,flags:l,requiresAuth:h,storeAuthSession:f})=>({prefix:u,action:async(x,d,N)=>{try{let A=l.store,I=await Ie(A,async()=>{let E=h?await this.createSession(l,f):void 0,O=this.constructor.name.toLowerCase();M(`theme-command:${O}:multi-env:authenticated`);try{return await this.command(t?{...l,json:!0}:l,E,!0,{},{stdout:x,stderr:d})}finally{await this.logAnalyticsData(E)}});r.set(u,{environment:u,result:I??{status:"cancelled"}})}catch(A){process.exitCode=1,t&&r.set(u,{environment:u,error:se(A)}),A instanceof Error&&(A.message=`Environment ${u} failed:
|
|
2
|
+
|
|
3
|
+
${A.message}`,t||R()==="json"?L({type:"diagnostic",level:"error",code:"theme-environment-failed",message:A.message}):B({body:[A.message]}))}}}));t?await Promise.all(m.map(({action:u})=>u(process.stdout,process.stderr,o.signal))):await pe({processes:m,abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}return r}createSequentialGroups(e){let t=[];return e.forEach(r=>{let o=t.find(c=>!c.some(s=>s.flags.store===r.flags.store));o?o.push(r):t.push([r])}),t}async createSession(e,t){let r=be({store:e.store}),o=e.password;return o?await q(r,o):t??await this.storeAuthSessionForTheme({store:r})??await q(r,o)}async storeAuthSessionForTheme(e){let t=this.storeAuthScopes();if(!t)return;let r=typeof e.store=="string"?e.store:void 0,o=e.password;if(!r||o)return;let c=w(r),s=Re(c);if(s)return this.adminSessionFromStoreAuthSession(s,c,t)}storeAuthSessionsForTheme(e){let t=this.storeAuthScopes();if(!t)return new Map;let r=new Set(e.filter(({store:o,password:c})=>typeof o=="string"&&!c).map(({store:o})=>w(o)));return r.size===0?new Map:new Map($e().map(o=>{let c=w(o.store);if(!r.has(c))return;let s=this.adminSessionFromStoreAuthSession(o,c,t);return s?[c,s]:void 0}).filter(o=>o!==void 0))}storeAuthSessionFromCache(e,t){let r=typeof e.store=="string"?e.store:void 0,o=e.password;if(!(!r||o))return t.get(w(r))}adminSessionFromStoreAuthSession(e,t,r){if(je(e)){g(`Ignoring stored store auth session for ${t}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){g(`Ignoring stored store auth session for ${t}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return g(`Using stored store auth session for ${t} (scopes: ${e.scopes.join(", ")}).`),U(e.userId),{token:e.accessToken,storeFqdn:t}}expandImpliedStoreAuthScopes(e){let t=new Set(e);for(let r of e){let o=r.match(/^(unauthenticated_)?write_(.*)$/);o&&t.add(`${o[1]??""}read_${o[2]}`)}return t}hasRequiredStoreAuthScopes(e,t){let r=this.expandImpliedStoreAuthScopes(e);return t.every(o=>r.has(o))}validConfig(e,t,r,o,c=!1){let s=t.filter(i=>Array.isArray(i)?!i.some(a=>this.hasRequiredFlag(e,a,o)):!this.hasRequiredFlag(e,i,o)).map(i=>Array.isArray(i)?i.join(" or "):i);return s.length>0?(c||R()==="json"?L({type:"diagnostic",level:"warning",code:"theme-environment-invalid",message:`Missing required flags in environment configuration for ${r}: ${s.join(", ")}`}):D({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:s}}]}),s):!0}hasRequiredFlag(e,t,r){return t==="password"&&r?!0:!!e[t]}errorOnGlobalPath(e){let t=Z($(),"shopify.theme.toml"),r=C(t),o="Can't use `--path` flag with multiple environments.",c=r?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."];if(e)throw new T(o,c.join(" "));B({body:[o,...c]})}async logAnalyticsData(e){if(e)try{let t=me();await ue(()=>({store_fqdn_hash:ne(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(t.timings),cmd_theme_errors:JSON.stringify(t.errors),cmd_theme_retries:JSON.stringify(t.retries),cmd_theme_events:JSON.stringify(t.events)})),await de(()=>({store_fqdn:e.storeFqdn}))}catch(t){g(`Unable to record theme analytics: ${t instanceof Error?t.message:String(t)}`)}}};export{V as a,$e as b,Re as c,$t as d,Rt as e,K as f,rt as g,ot as h,st as i,it as j,at as k,ct as l,mt as m,ut as n,dt as o,Y as p,Ve as q,be as r,At as s,Et as t,Tt as u,X as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as o}from"./chunk-CE6XQDAG.js";import{b as c}from"./chunk-QBRRFFMZ.js";import{a as u}from"./chunk-O472FAYX.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();var i=h(u(),1),f=1440*60*1e3,n;async function d(){try{let{default:t}=await import("./registry-url-JMNV3LLX.js"),e=new URL(t("@shopify"));return e.username="",e.password="",e.search="",e.hash="",e.pathname.endsWith("/")||(e.pathname+="/"),n=e.href,n}catch(t){throw n=void 0,t}}function s(t,e){return`npm-package-@shopify/cli${e?`@${e}`:""}:registry:${c(t)}`}function y(t,e){let r=s(t);return e?`${r}:range:${e}`:r}function l(t,e=n){if(!e)return;let r=o(s(e,t));if(r&&(0,i.valid)(r.value)&&(!t||(0,i.satisfies)(r.value,t))&&Date.now()-r.timestamp<f)return r.value}export{d as a,s as b,y as c,l as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N,b as $,c as g}from"./chunk-
|
|
1
|
+
import{a as N,b as $,c as g}from"./chunk-AYTTE7X5.js";import{p as D}from"./chunk-UORSJB4A.js";import{a as b,b as A}from"./chunk-ARL5WBDK.js";import{R as p,S as k,a as T}from"./chunk-7A4ZE5IS.js";import{n as P}from"./chunk-FJOVMEPN.js";import{Eb as u,Ha as I,Ka as O,N as y,Oa as F,Ta as h,wa as _,ya as U}from"./chunk-OIQ5NQ5I.js";import{g as w}from"./chunk-A5BSUUNQ.js";import{c as m,h as l,i as x}from"./chunk-IWTNUJGY.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execFileSync as z}from"child_process";var H="2026.10.3",B=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:W,darwin:G,win32:V};function X(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function C(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,e),o=Z(r,t);if(h(o))try{let i=z(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!J(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function K(r,t){await R(r,t),await F(t,"755")}async function Q(r,t){await R(r,t)}async function tt(r,t){await R(r,`${t}.tgz`);let e=x(`${t}.tgz`);await p("tar",["-xzf",e],{cwd:l(t)}),I(`${t}.tgz`),await U(`${l(t)}/cloudflared`,t)}async function R(r,t){h(l(t))||_(l(t));let e=Y.promisify(j),n=await D(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=O(t);return await e(n.body,o),t}import{Writable as rt}from"stream";import{fileURLToPath as et}from"url";var $t=$({provider:g,action:st}),nt=w()?.2:40,ot=5;async function st(r){try{let t=new E(r);return await t.startTunnel(),b(t)}catch(t){let e=new N("unknown",t.message);return A(e)}}var E=class{port;provider=g;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await C(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new T;let e=!1;if(t>=ot){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=y(o).slice(-5).join(`
|
|
2
2
|
`);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},nt*1e3);let c=this,L=new rt({write(s,ft,M){if(u(s.toString()),e)return;a??=it(s),ut(s)&&(i=!0),i&&(a?(e=!0,c.currentStatus={status:"connected",url:a}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let S=at(s);S&&o.push(S),M()}});p(ct(),n,{stdout:L,stderr:L,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new P(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),w()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function it(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${dt()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function at(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${lt(r.toString())}`}function lt(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ut(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function ct(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(et(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ti}from"./chunk-LQ7ENG4V.js";import{$ as ci,$a as Fi,A as kt,Aa as Ei,B as Cr,Ba as so,C as ei,Ca as ao,D as ti,Da as co,E as Or,Ea as Pi,F as oi,Fa as lo,G as Dr,Ga as mo,H as Zt,Ha as xi,I as eo,Ia as uo,J as ot,Ja as po,K as ri,Ka as We,L as w,La as fo,M as G,Ma as ho,N as ni,Na as Ci,O as ke,Oa as Oi,P as to,Pa as Di,Q as Et,Qa as yo,R as rt,Ra as Je,S as Oe,Sa as at,T as ii,Ta as Pt,U as _e,Ua as wo,V as De,Va as ct,W as si,Wa as vo,X as oo,Xa as Ii,Y as we,Ya as $i,Z as Rr,Za as ji,_ as ai,_a as bo,a as Bn,aa as Tr,ab as Ai,b as de,ba as Ir,bb as _i,c as j,ca as nt,d as B,da as it,e as Gn,ea as li,f as Er,fa as ro,g as Yn,ga as di,h as qn,ha as mi,i as Wn,ia as ui,ib as Ni,j as Jn,ja as pi,k as zn,ka as fi,l as R,la as qe,m as Ze,ma as hi,n as Qn,na as X,o as Ye,oa as st,p as Ce,pa as gi,q as et,qa as yi,r as Kn,ra as no,s as Xn,sa as io,t as Pr,ta as wi,u as tt,ua as ve,v as St,va as vi,w as Ae,wa as bi,x as Zn,xa as $r,y as Xt,ya as Si,z as xr,za as ki}from"./chunk-
|
|
1
|
+
import{b as Ti}from"./chunk-LQ7ENG4V.js";import{$ as ci,$a as Fi,A as kt,Aa as Ei,B as Cr,Ba as so,C as ei,Ca as ao,D as ti,Da as co,E as Or,Ea as Pi,F as oi,Fa as lo,G as Dr,Ga as mo,H as Zt,Ha as xi,I as eo,Ia as uo,J as ot,Ja as po,K as ri,Ka as We,L as w,La as fo,M as G,Ma as ho,N as ni,Na as Ci,O as ke,Oa as Oi,P as to,Pa as Di,Q as Et,Qa as yo,R as rt,Ra as Je,S as Oe,Sa as at,T as ii,Ta as Pt,U as _e,Ua as wo,V as De,Va as ct,W as si,Wa as vo,X as oo,Xa as Ii,Y as we,Ya as $i,Z as Rr,Za as ji,_ as ai,_a as bo,a as Bn,aa as Tr,ab as Ai,b as de,ba as Ir,bb as _i,c as j,ca as nt,d as B,da as it,e as Gn,ea as li,f as Er,fa as ro,g as Yn,ga as di,h as qn,ha as mi,i as Wn,ia as ui,ib as Ni,j as Jn,ja as pi,k as zn,ka as fi,l as R,la as qe,m as Ze,ma as hi,n as Qn,na as X,o as Ye,oa as st,p as Ce,pa as gi,q as et,qa as yi,r as Kn,ra as no,s as Xn,sa as io,t as Pr,ta as wi,u as tt,ua as ve,v as St,va as vi,w as Ae,wa as bi,x as Zn,xa as $r,y as Xt,ya as Si,z as xr,za as ki}from"./chunk-MGZK5EQW.js";import{a as An}from"./chunk-JLGA3B7P.js";import{b as Vn}from"./chunk-WHOD5I7N.js";import{b as _n,c as Nn,d as Kt,h as Hn,j as Ln,k as Mn,l as Un}from"./chunk-WZ3QWPK5.js";import{a as Pa}from"./chunk-UWHAOGO4.js";import{a as So}from"./chunk-FKIVKNOV.js";import{a as go,b as Ri}from"./chunk-CA3GVT4D.js";import{Ma as Ea,m as Cn,p as Se,ra as ge}from"./chunk-UORSJB4A.js";import{B as $n,l as Dn,m as Pe,p as Yt,s as Rn,u as Tn,x as In}from"./chunk-OSASE35V.js";import{c as $}from"./chunk-IKXUYCK7.js";import{B as Wt,C as $e,D as Te,G as ne,L as Jt,R as kr,a as Gt,x as W,y as H,z as te}from"./chunk-7A4ZE5IS.js";import{a as xn}from"./chunk-WLJDMI7E.js";import{c as En}from"./chunk-QBRRFFMZ.js";import{a as Y}from"./chunk-LG3KEHGD.js";import{j as g,n as zt}from"./chunk-FJOVMEPN.js";import{Ab as Qt,Ba as vr,Bb as A,Cb as jn,Da as Bt,Db as Fe,Eb as Fn,Fa as Sn,Fb as V,Ga as kn,Gb as ye,Ja as br,Kb as Ge,Na as Sr,Sa as K,U as Mt,Va as vt,_ as vn,la as ue,ma as bn,oa as Ut,ob as On,pa as wr,qb as qt,ta as oe,tb as xe,va as Vt,vb as ee,xa as Ee,xb as je}from"./chunk-OIQ5NQ5I.js";import{i as M}from"./chunk-B4OMIONW.js";import{b as u,j as Be,k as Pn}from"./chunk-3PYDIBTX.js";import{s as bt}from"./chunk-A5BSUUNQ.js";import{b as me}from"./chunk-VBPMVVLV.js";import{a as yn}from"./chunk-JD5P5RAJ.js";import{c as O,e as P,f as le,h as yr,i as Xe,j as wn}from"./chunk-IWTNUJGY.js";import{a as ka}from"./chunk-O472FAYX.js";import{e as re,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();var jr=Y({name:"HydrogenBuildResult",definitions:{AbsolutePath:B},schema:u.object({directory:B,clientDirectory:B,serverDirectory:B,serverPath:B}).strict()});var Do=re(me(),1);c();c();var ko=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function xa(e){let t="No lockfile found",o="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",r=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new g(t,o,r);te({headline:t,body:o,nextSteps:r})}function Ca(e,t){let o=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),r="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
|
|
2
2
|
`,{list:{items:o}}],i=["Delete any unneeded lockfiles","Commit the change to your repository"];if(t)throw new g(r,n,i);te({headline:r,body:n,nextSteps:i})}function Oa(e){let t="Lockfile ignored by Git",o="Your project\u2019s lockfile isn\u2019t being tracked by Git. If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying.",r=[`In your project\u2019s .gitignore file, delete any references to ${e}`,"Commit the change to your repository"];te({headline:t,body:o,nextSteps:r})}async function Hi(e,t=!1){if(Ye&&!process.env.SHOPIFY_UNIT_TEST)return;let o=[];for(let i of ko){let s=[i.lockfile,...i.alternativeLockfiles||[]];for(let a of s)if(await K(P(e,a))){o.push({packageManager:i,foundLockfile:a});break}}if(o.length===0)return xa(t);if(o.length>1)return Ca(o,t);let r=o[0].foundLockfile;(await _n(e,[r]).catch(()=>[])).length>0&&Oa(r)}c();var Da=["^cdn/","^_t/"];function Eo(e){let t=new Set;return Object.values(e.routes).filter(o=>Da.some(r=>new RegExp(r).test(o.path??""))).forEach(o=>{o.path&&t.add(o.path)}),[...t]}var Ra=["","cart","products/:productHandle","collections","collections/:collectionHandle","sitemap.xml","robots.txt","pages/:pageHandle","policies/:policyHandle","search","account","account/login","account/orders/:orderId","account/authorize"];function Po(e,t=Ra){let o=Object.values(e.routes),r=new Set(t);for(let n of t)for(let i of o)if(!n&&!i.path)r.delete(n);else if(n&&i.path){let s={path:i.path,parentId:i.parentId};for(;s.parentId&&s.parentId!=="root";){let m=o.find(l=>l.id===s.parentId);if(!m)break;s.path=m.path==null?s.path:`${m.path}/${s.path}`,s.parentId=m.parentId}let a=":?[^\\/\\?]+\\?",d=`^(${a}\\/)?`+n.replaceAll(".","\\.").replace(/\//g,`\\/(${a}\\/)?`).replace(/:[^/)?]+/g,"(:[^\\/]+|\\*)")+`(\\/${a})?$`;new RegExp(d).test(s.path)&&r.delete(n)}return[...r]}var Ne=100;function Li(e){e.length?te({headline:"Standard Shopify routes missing",body:`Your Hydrogen project is missing ${e.length} standard Shopify route${e.length>1?"s":""}.
|
|
3
3
|
Including these routes improves compatibility with Shopify\u2019s platform:
|
|
4
4
|
|
|
@@ -247,7 +247,7 @@ Skip the flag or provide the name of a template or a URL to a git repository.`,{
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
`;async function la(e){let{hydrogenStorefronts:t}=await nt(Pl,e);return t.map(o=>({...o,parsedId:it(o.id)}))}var tr=class e extends R{static get jsonOutputSchema(){return Tr}static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await Cl(t,t.json)}};async function xl({path:e=process.cwd()}){let{session:t}=await ve(e),o=await la(t);return{shop:t.storeFqdn,storefronts:o}}async function Cl(e,t){let o=await xl(e);return j(Tr,ci(o),t)||await Ol(o,e.path),o}async function Ol({shop:e,storefronts:t},o){t.length>0?(ye(),A(Tl({storefronts:t,shop:e}).toString()),t.forEach(({currentProductionDeployment:r,id:n,productionUrl:i,title:s})=>{ye(),A(ee`${M.whiteBright(s)} ${M.dim(`(id: ${it(n)})`)}`.value),i&&A(ee` ${M.whiteBright(i)}`.value),r&&A(ee` ${M.dim(Rl(r))}`.value)})):W({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${e})`,`Create a new Hydrogen storefront: Run \`${await X(o)} link\` or visit ${$s({storeFqdn:e})}`]})}var Dl=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Rl(e){let t="";if(!e)return t;if(t+=Dl.format(new Date(e.createdAt)),e.commitMessage){let o=e.commitMessage.split(/\n/)[0];t+=`, ${o}`}return t}var Tl=({storefronts:e,shop:t})=>Mt(e,o=>`Showing ${o.length} Hydrogen storefronts for the store ${t}`,o=>`Showing 1 Hydrogen storefront for the store ${t}`);c();c();var nn=Y({name:"HydrogenLoginResult",schema:u.object({storeDomain:Wn,name:u.string().nullable(),email:u.string().email().nullable()}).strict()}),sn=Y({name:"HydrogenLogoutResult",schema:u.object({status:u.literal("success"),loggedOut:u.literal(!0)}).strict()});var or=class e extends R{static get jsonOutputSchema(){return nn}static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.shop};async run(){let{flags:t}=await this.parse(e);await Il(t,t.json)}};async function Il({path:e=process.cwd(),shop:t},o){ye(),gi(!0);let{config:r}=await ve(e,t??!0),{shop:n,shopName:i,email:s}=r,a={storeDomain:zn(n),name:i||null,email:s||null};return j(nn,a,o)||vi(r),a}c();var rr=class e extends R{static get jsonOutputSchema(){return sn}static descriptionWithMarkdown="Log out from the current shop.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await $l(t,t.json)}};async function $l({path:e=process.cwd()},t){ye(),await wi(e);let o={status:"success",loggedOut:!0};return j(sn,o,t)||H({body:"You are logged out from Shopify."}),o}c();var an=re(me(),1);c();async function da(e){let{startWorkerdServer:t}=await import("./workerd-32DMKLMN.js");return t(e)}var nr=class e extends R{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...w.path,...w.port,...w.env,...w.envBranch,...w.envFile,...w.inspectorPort,...w.debug,...w.verbose,build:an.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:an.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ke(w.entry,{entry:{dependsOn:["build"]}}),...ke(w.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd(),{close:r}=await jl({...G(t),directory:o});He(async()=>{await r()})}};async function jl({port:e,directory:t,env:o,envBranch:r,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:d=!1,codegen:m=!1,codegenConfigPath:l,entry:f,envFile:p}){process.env.NODE_ENV||(process.env.NODE_ENV=d?"development":"production"),s&&no(),io()||st();let{root:y,buildPath:h,buildPathWorkerFile:b,buildPathClient:v}=Oe(t),S=await rt(y);if(S)throw new g(De);let k,x=Ot(),T=a?await ze({...{directory:y,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:m,codegenConfigPath:l},watch:d,async onServerBuildFinish(){x.state==="pending"?x.resolve():A("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await k?.reload()}}):x.resolve();S||(b=(await we(y).catch(()=>null))?.serverOutFile??O(h,"server","index.js"));let{shop:_,storefront:E}=await ro(y),D=!!_&&!!E?.id,{allVariables:q,logInjectedVariables:I}=await vo({root:y,fetchRemote:D,envBranch:r,envHandle:o,envFile:p});e||(e=await pt(ot));let N=await pt(e+100);return await x.promise,I(),k=await da({root:y,appPort:e,assetsPort:N,env:q,buildPathClient:v,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:d}),k.showBanner({mode:"preview",headlinePrefix:d?"Watching for changes. ":""}),{async close(){await Promise.allSettled([k.close(),T?.close()])}}}c();c();var cn=Y({name:"HydrogenSetupResult",schema:u.object({status:u.literal("success"),changed:u.boolean(),directory:B,name:u.string(),i18n:u.enum(["subfolders","domains","subdomains"]).nullable(),routes:u.array(Qo),routeGroups:u.record(u.array(u.string())),shortcut:u.boolean()}).strict()}),ln=Y({name:"HydrogenSetupCssResult",definitions:{AbsolutePath:B},schema:u.object({status:u.enum(["success","cancelled"]),changed:u.boolean(),directory:B,strategy:u.enum(["tailwind","vanilla-extract","css-modules","postcss"]),filePaths:u.array(B),dependenciesInstalled:u.boolean(),needsNpmReinstall:u.boolean()}).strict()}),dn=Y({name:"HydrogenSetupMarketsResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,strategy:u.enum(["subfolders","domains","subdomains"]),serverPath:B.nullable()}).strict()}),mn=Y({name:"HydrogenSetupViteResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,viteConfigPath:B,serverPath:B,dependenciesInstalled:u.literal(!0),needsMdxSetup:u.boolean()}).strict()});var ir=class e extends R{static get jsonOutputSchema(){return cn}static descriptionWithMarkdown="Scaffold routes and core functionality.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...w.markets,...w.shortcut,...ke(w.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd();await Al({...G(t),directory:o},t.json)}};async function Fl(e){let t=new Gt,{rootDirectory:o,appDirectory:r}=await _e(e.directory),n=Xe(o),i=X(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],d=e.markets?e.markets:await eo({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),m=d==="none"?void 0:d,{setupRoutes:l}=so(t),f={},p=[],y=await Kn(".."),[h,b]=await Promise.all([K(O(o,"tsconfig.json")),vt("*.d.ts",{cwd:y})]);s=s.then(()=>Promise.all([...b.map(C=>Ut(O(y,C),P(o,C))),ao({rootDirectory:o,appDirectory:r,typescript:h})])).then(async()=>{let C=await l(o,h?"ts":"js",{i18nStrategy:m,overwriteFileDeps:!0});f=C.routeGroups,p=C.routes}),m&&(s=s.then(()=>Zt(m,{rootDirectory:o})));let v=await Promise.resolve(i),{createShortcut:S,showShortcutBanner:k}=await co(t,v,e.shortcut);if(!m&&!S)return await s,{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:!1,cliCommand:v,showSummary:!1};let x=!1;return S&&(s=s.then(async()=>{await S()&&(x=!0,v=qe)}),k()),await ne(a),{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:x,cliCommand:v,showSummary:!0}}async function Al(e,t){let o=await Fl(e);return!j(cn,{status:"success",changed:!0,directory:P(o.directory),name:o.name,i18n:o.i18n??null,routes:o.generatedRoutes.map(({sourceRoute:r,destinationRoute:n,operation:i,skipReason:s})=>({sourceRoute:r,destinationRoute:n,operation:i,...s?{skipReason:s}:{}})),routeGroups:o.routes,shortcut:o.shortcut},t)&&o.showSummary&&await fo(o,{cliCommand:o.cliCommand,depsInstalled:!0,packageManager:"npm",i18n:o.i18n,routes:o.routes}),o}c();var ma=re(me(),1);var sr=class e extends R{static get jsonOutputSchema(){return ln}static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...ke(w.installDeps,{"install-deps":{default:!0}})};static args={strategy:ma.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${Pr.join()}`,options:Pr})};async run(){let{flags:t,args:o}=await this.parse(e),r=t.path?P(t.path):process.cwd();await Nl({...G(t),strategy:o.strategy,directory:r},t.json)}};async function _l({strategy:e,directory:t,force:o=!1,installDeps:r=!0}){let n=await we(t).catch(()=>null);if(!n)throw new g("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await ti(),a={directory:i.rootDirectory,strategy:s,files:[],dependenciesInstalled:!1,needsNpmReinstall:!1};if(s==="css-modules"||s==="postcss")return{...a,status:"built-in"};let d=await ei(s,i,o);if(!d)return{...a,status:"cancelled"};let{workPromise:m,generatedAssets:l,needsInstallDeps:f}=d,p=[{title:"Updating files",task:async()=>{await m}}],y=!1;if(r&&f){let h=Pe(i.rootDirectory);p.push({title:"Installing new dependencies",task:async()=>{let b=await h;y=b==="npm"||b==="unknown",await Yt({directory:i.rootDirectory,packageManager:b,args:[]})}})}return await ne(p),{...a,status:"configured",files:l,dependenciesInstalled:!!(r&&f),needsNpmReinstall:!!(f&&y&&s==="tailwind")}}async function Nl(e,t){let o=await _l(e);return j(ln,{status:o.status==="cancelled"?"cancelled":"success",changed:o.status==="configured",directory:P(o.directory),strategy:o.strategy,filePaths:o.files.map(r=>P(o.directory,r)),dependenciesInstalled:o.dependenciesInstalled,needsNpmReinstall:o.needsNpmReinstall},t)||Hl(o),o}function Hl(e){let{strategy:t,files:o}=e;if(e.status!=="cancelled"){if(e.status==="built-in"){H({headline:`Vite works out of the box with ${kt[t]}.`,body:`See the Vite documentation for more information:
|
|
250
|
+
`;async function la(e){let{hydrogenStorefronts:t}=await nt(Pl,e);return t.map(o=>({...o,parsedId:it(o.id)}))}var tr=class e extends R{static get jsonOutputSchema(){return Tr}static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await Cl(t,t.json)}};async function xl({path:e=process.cwd()}){let{session:t}=await ve(e),o=await la(t);return{shop:t.storeFqdn,storefronts:o}}async function Cl(e,t){let o=await xl(e);return j(Tr,ci(o),t)||await Ol(o,e.path),o}async function Ol({shop:e,storefronts:t},o){t.length>0?(ye(),A(Tl({storefronts:t,shop:e}).toString()),t.forEach(({currentProductionDeployment:r,id:n,productionUrl:i,title:s})=>{ye(),A(ee`${M.whiteBright(s)} ${M.dim(`(id: ${it(n)})`)}`.value),i&&A(ee` ${M.whiteBright(i)}`.value),r&&A(ee` ${M.dim(Rl(r))}`.value)})):W({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${e})`,`Create a new Hydrogen storefront: Run \`${await X(o)} link\` or visit ${$s({storeFqdn:e})}`]})}var Dl=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Rl(e){let t="";if(!e)return t;if(t+=Dl.format(new Date(e.createdAt)),e.commitMessage){let o=e.commitMessage.split(/\n/)[0];t+=`, ${o}`}return t}var Tl=({storefronts:e,shop:t})=>Mt(e,o=>`Showing ${o.length} Hydrogen storefronts for the store ${t}`,o=>`Showing 1 Hydrogen storefront for the store ${t}`);c();c();var nn=Y({name:"HydrogenLoginResult",schema:u.object({storeDomain:Wn,name:u.string().nullable(),email:u.string().email().nullable()}).strict()}),sn=Y({name:"HydrogenLogoutResult",schema:u.object({status:u.literal("success"),loggedOut:u.literal(!0)}).strict()});var or=class e extends R{static get jsonOutputSchema(){return nn}static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.shop};async run(){let{flags:t}=await this.parse(e);await Il(t,t.json)}};async function Il({path:e=process.cwd(),shop:t},o){ye(),gi(!0);let{config:r}=await ve(e,t??!0),{shop:n,shopName:i,email:s}=r,a={storeDomain:zn(n),name:i||null,email:s||null};return j(nn,a,o)||vi(r),a}c();var rr=class e extends R{static get jsonOutputSchema(){return sn}static descriptionWithMarkdown="Log out from the current shop.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await $l(t,t.json)}};async function $l({path:e=process.cwd()},t){ye(),await wi(e);let o={status:"success",loggedOut:!0};return j(sn,o,t)||H({body:"You are logged out from Shopify."}),o}c();var an=re(me(),1);c();async function da(e){let{startWorkerdServer:t}=await import("./workerd-DRWNY3S4.js");return t(e)}var nr=class e extends R{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...w.path,...w.port,...w.env,...w.envBranch,...w.envFile,...w.inspectorPort,...w.debug,...w.verbose,build:an.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:an.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ke(w.entry,{entry:{dependsOn:["build"]}}),...ke(w.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd(),{close:r}=await jl({...G(t),directory:o});He(async()=>{await r()})}};async function jl({port:e,directory:t,env:o,envBranch:r,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:d=!1,codegen:m=!1,codegenConfigPath:l,entry:f,envFile:p}){process.env.NODE_ENV||(process.env.NODE_ENV=d?"development":"production"),s&&no(),io()||st();let{root:y,buildPath:h,buildPathWorkerFile:b,buildPathClient:v}=Oe(t),S=await rt(y);if(S)throw new g(De);let k,x=Ot(),T=a?await ze({...{directory:y,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:m,codegenConfigPath:l},watch:d,async onServerBuildFinish(){x.state==="pending"?x.resolve():A("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await k?.reload()}}):x.resolve();S||(b=(await we(y).catch(()=>null))?.serverOutFile??O(h,"server","index.js"));let{shop:_,storefront:E}=await ro(y),D=!!_&&!!E?.id,{allVariables:q,logInjectedVariables:I}=await vo({root:y,fetchRemote:D,envBranch:r,envHandle:o,envFile:p});e||(e=await pt(ot));let N=await pt(e+100);return await x.promise,I(),k=await da({root:y,appPort:e,assetsPort:N,env:q,buildPathClient:v,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:d}),k.showBanner({mode:"preview",headlinePrefix:d?"Watching for changes. ":""}),{async close(){await Promise.allSettled([k.close(),T?.close()])}}}c();c();var cn=Y({name:"HydrogenSetupResult",schema:u.object({status:u.literal("success"),changed:u.boolean(),directory:B,name:u.string(),i18n:u.enum(["subfolders","domains","subdomains"]).nullable(),routes:u.array(Qo),routeGroups:u.record(u.array(u.string())),shortcut:u.boolean()}).strict()}),ln=Y({name:"HydrogenSetupCssResult",definitions:{AbsolutePath:B},schema:u.object({status:u.enum(["success","cancelled"]),changed:u.boolean(),directory:B,strategy:u.enum(["tailwind","vanilla-extract","css-modules","postcss"]),filePaths:u.array(B),dependenciesInstalled:u.boolean(),needsNpmReinstall:u.boolean()}).strict()}),dn=Y({name:"HydrogenSetupMarketsResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,strategy:u.enum(["subfolders","domains","subdomains"]),serverPath:B.nullable()}).strict()}),mn=Y({name:"HydrogenSetupViteResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,viteConfigPath:B,serverPath:B,dependenciesInstalled:u.literal(!0),needsMdxSetup:u.boolean()}).strict()});var ir=class e extends R{static get jsonOutputSchema(){return cn}static descriptionWithMarkdown="Scaffold routes and core functionality.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...w.markets,...w.shortcut,...ke(w.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd();await Al({...G(t),directory:o},t.json)}};async function Fl(e){let t=new Gt,{rootDirectory:o,appDirectory:r}=await _e(e.directory),n=Xe(o),i=X(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],d=e.markets?e.markets:await eo({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),m=d==="none"?void 0:d,{setupRoutes:l}=so(t),f={},p=[],y=await Kn(".."),[h,b]=await Promise.all([K(O(o,"tsconfig.json")),vt("*.d.ts",{cwd:y})]);s=s.then(()=>Promise.all([...b.map(C=>Ut(O(y,C),P(o,C))),ao({rootDirectory:o,appDirectory:r,typescript:h})])).then(async()=>{let C=await l(o,h?"ts":"js",{i18nStrategy:m,overwriteFileDeps:!0});f=C.routeGroups,p=C.routes}),m&&(s=s.then(()=>Zt(m,{rootDirectory:o})));let v=await Promise.resolve(i),{createShortcut:S,showShortcutBanner:k}=await co(t,v,e.shortcut);if(!m&&!S)return await s,{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:!1,cliCommand:v,showSummary:!1};let x=!1;return S&&(s=s.then(async()=>{await S()&&(x=!0,v=qe)}),k()),await ne(a),{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:x,cliCommand:v,showSummary:!0}}async function Al(e,t){let o=await Fl(e);return!j(cn,{status:"success",changed:!0,directory:P(o.directory),name:o.name,i18n:o.i18n??null,routes:o.generatedRoutes.map(({sourceRoute:r,destinationRoute:n,operation:i,skipReason:s})=>({sourceRoute:r,destinationRoute:n,operation:i,...s?{skipReason:s}:{}})),routeGroups:o.routes,shortcut:o.shortcut},t)&&o.showSummary&&await fo(o,{cliCommand:o.cliCommand,depsInstalled:!0,packageManager:"npm",i18n:o.i18n,routes:o.routes}),o}c();var ma=re(me(),1);var sr=class e extends R{static get jsonOutputSchema(){return ln}static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...ke(w.installDeps,{"install-deps":{default:!0}})};static args={strategy:ma.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${Pr.join()}`,options:Pr})};async run(){let{flags:t,args:o}=await this.parse(e),r=t.path?P(t.path):process.cwd();await Nl({...G(t),strategy:o.strategy,directory:r},t.json)}};async function _l({strategy:e,directory:t,force:o=!1,installDeps:r=!0}){let n=await we(t).catch(()=>null);if(!n)throw new g("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await ti(),a={directory:i.rootDirectory,strategy:s,files:[],dependenciesInstalled:!1,needsNpmReinstall:!1};if(s==="css-modules"||s==="postcss")return{...a,status:"built-in"};let d=await ei(s,i,o);if(!d)return{...a,status:"cancelled"};let{workPromise:m,generatedAssets:l,needsInstallDeps:f}=d,p=[{title:"Updating files",task:async()=>{await m}}],y=!1;if(r&&f){let h=Pe(i.rootDirectory);p.push({title:"Installing new dependencies",task:async()=>{let b=await h;y=b==="npm"||b==="unknown",await Yt({directory:i.rootDirectory,packageManager:b,args:[]})}})}return await ne(p),{...a,status:"configured",files:l,dependenciesInstalled:!!(r&&f),needsNpmReinstall:!!(f&&y&&s==="tailwind")}}async function Nl(e,t){let o=await _l(e);return j(ln,{status:o.status==="cancelled"?"cancelled":"success",changed:o.status==="configured",directory:P(o.directory),strategy:o.strategy,filePaths:o.files.map(r=>P(o.directory,r)),dependenciesInstalled:o.dependenciesInstalled,needsNpmReinstall:o.needsNpmReinstall},t)||Hl(o),o}function Hl(e){let{strategy:t,files:o}=e;if(e.status!=="cancelled"){if(e.status==="built-in"){H({headline:`Vite works out of the box with ${kt[t]}.`,body:`See the Vite documentation for more information:
|
|
251
251
|
${Cr[t]}`});return}H({headline:`${kt[t]} setup complete.`,body:(o.length>0?`You can now modify CSS configuration in the following files:
|
|
252
252
|
`+o.map(r=>` - ${r}`).join(`
|
|
253
253
|
`)+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as m}from"./chunk-UORSJB4A.js";import{a as k,b as G}from"./chunk-ARL5WBDK.js";import{f as H}from"./chunk-HI5FTI3M.js";import{j as u}from"./chunk-FJOVMEPN.js";import{Eb as h,Na as R,Oa as T,ja as g,ta as y,tb as p,va as x,vb as l}from"./chunk-OIQ5NQ5I.js";import{c as $,h as b}from"./chunk-IWTNUJGY.js";import{g as w}from"./chunk-VKWPEFWQ.js";w();var d=class extends Error{constructor(t,e,o){super(`The request to GitHub API URL ${t} failed with status code ${e} and the following error message: ${o.message}`)}};async function A(i,t,e={filter:()=>!0}){h(l`Getting the latest release of GitHub repository ${i}/${t}...`);let o=`https://api.github.com/repos/${i}/${t}/releases`,r=await m(o);try{let s=await r.text(),n=JSON.parse(s);if(r.status!==200)throw new d(o,r.status,n);return n.find(e.filter)}catch(s){throw s instanceof SyntaxError?new u(`Received invalid response from GitHub API (HTTP ${r.status}).`,"The response could not be parsed as JSON. The service may be temporarily unavailable. Please try again."):s}}function B(i){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(i);if(!t){let S=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return G(new Error(`Parsing the url ${i} failed. Supported formats are ${S.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",o=e==="github"?"github.com":e,r=t[4],s=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),a=t[7],f=a?`#${a}`:"",c=`git@${o}:${r}/${s}`,P=`https://${o}/${r}/${s}`,v=["https:/",o,r,s,n].join("/").concat(f);return k({full:v,site:o,user:r,name:s,ref:a,subDirectory:n,ssh:c,http:P})}function I(i){let t=new URL(i),e=t.hash?t.hash.slice(1):void 0,[o,r,s,...n]=t.pathname.split("/"),a=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${r}/${s}`,branch:e,filePath:a}}async function q(i,t,e,o){let r=`https://github.com/${i}/releases/download/${t}/${e}`;return H("cmd_all_timing_network_ms")(async()=>{h(l`Downloading ${p.link(e,r)}`),await g(async s=>{let n=$(s,e),a;try{if(a=await m(r,void 0,"slow-request"),!a.ok)throw new u(`Failed to download ${e}: ${a.statusText}`)}catch(c){throw new u(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let f=await a.arrayBuffer();await y(n,Buffer.from(f)),await T(n,493),await x(b(o)),await R(n,o)}),h(l`${p.successIcon()} Successfully downloaded ${p.path(o)}`)})}export{A as a,B as b,I as c,q as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u}from"./chunk-
|
|
1
|
+
import{d as u}from"./chunk-HR6R7JXN.js";import{z as c}from"./chunk-7A4ZE5IS.js";import{e as s}from"./chunk-HI5FTI3M.js";import{_a as d}from"./chunk-OIQ5NQ5I.js";import{p as m}from"./chunk-IWTNUJGY.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as p}from"./chunk-2KFYIYLI.js";import{a as i}from"./chunk-LG3KEHGD.js";import{Bb as a,Eb as v,Fb as h,Jb as C,ib as c,jb as f,xb as g}from"./chunk-OIQ5NQ5I.js";import{f as u,g as d,h as e,i as m,k as r}from"./chunk-3PYDIBTX.js";import{g as E}from"./chunk-A5BSUUNQ.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function b(o){let n=JSON.stringify(e.parse(o));E()&&g("info",n),C("info",c,n)}function R(o,n){if(r()!==void 0)return n();let s=p(process.env,o)?"json":"text";return m({outputMode:s,sink:s==="json"?O:(l,S)=>{S?.alreadyRendered||x(l)}},n)}var T=i({name:"CommandEvent",schema:e,definitions:{CommandDiagnosticEvent:u,CommandProgressEvent:d}});function x(o){if(o.type==="progress"){a(o.message??o.operation);return}switch(o.level){case"debug":v(o.message);break;case"info":a(o.message);break;case"warning":h(o.message);break;case"error":f(o.message,"error");break}}function O(o){b(o)}export{R as a,T as b,x as c,O as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as S}from"./chunk-VJEKDBGZ.js";import{a as f}from"./chunk-
|
|
2
|
-
`).filter(Boolean)}catch(r){if(r instanceof i&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function tt(t){return k("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:r,shallow:n,latestTag:c}=t;if(d(a`Git-cloning repository ${e} into ${o.path(r)}...`),await w(),await I(r)){if(!await v(r))throw new i(a`Can't clone to ${o.path(r)}`,"The path exists but isn't a directory.");if((await E(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new i(a`Directory ${o.path(r)} already exists and is not empty`,a`Choose a different name or remove the existing directory first.`)}let[h,g]=e.split("#");if(g&&c)throw new i("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(n&&c)throw new i("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let l=["clone","--recurse-submodules"];g&&l.push("--branch",g),n&&l.push("--depth","1"),D()||l.push("-c","core.askpass=true"),l.push(h,r);try{if(await f("git",l),c){let u=await _(r,e);await s(["checkout",u],r)}}catch(u){if(u instanceof i)throw u;if(u instanceof Error){let $=new i(u.message);throw $.stack=u.stack,$}throw u}})}async function _(t,e){let r=await L(t);if(!r)throw new i(`Couldn't obtain the most recent tag of the repository ${e}`);return r}async function et(t){let r=await s(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!r.trim())throw new i("Must have at least one commit to run command",a`Run ${o.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let n=r.split("\0");return{hash:n[0],date:n[1],message:n[2],refs:n[3],body:n[4],author_name:n[5],author_email:n[6]}}async function rt(t){await s(["add","--all"],t)}async function nt(t,e){let r=["commit","-m",t];if(e?.author){if(e.author.startsWith("-"))throw new i(`Invalid commit author: ${e.author}. Author name/email can't start with a hyphen.`);r.push("--author",e.author)}return await s(r,e?.directory),(await s(["rev-parse","HEAD"],e?.directory)).trim()}async function w(){if(!await m())throw new i("Git is necessary in the environment to continue",a`Install ${o.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}function F(t){let e=/^git version (?<version>\d+\.\d+\.\d+)(?<suffix>[.\s-].*)?$/.exec(t.trim()),r=e?.groups?.version;if(!r)return;let c=/^(?:\.rc|-rc\.?)(?<number>\d+)(?:[.\s-].*)?$/.exec(e.groups?.suffix??"")?.groups?.number;return c?`${r}-rc.${c}`:r}async function it(t,e={}){let r=await C(c=>H(t,{cwd:e.cwd,env:{GIT_DIR:c}})),n=F(r);if(!n)throw d(a`Unrecognized git --version output: ${o.raw(JSON.stringify(r.slice(0,200)))}`),new i("Couldn't determine the installed Git version.",`Install Git ${t} or later, then try again.`);if((0,A.lt)(n,t))throw new i(`Git ${t} or later is required, but version ${n} is installed.`,`Upgrade Git to version ${t} or later, then try again.`)}async function H(t,e){let{captureOutput:r}=await import("./system-
|
|
1
|
+
import{a as S}from"./chunk-VJEKDBGZ.js";import{a as f}from"./chunk-RNF6T6IO.js";import{f as k}from"./chunk-HI5FTI3M.js";import{j as i}from"./chunk-FJOVMEPN.js";import{Da as v,Eb as d,Sa as I,Va as E,ja as C,tb as o,vb as a}from"./chunk-OIQ5NQ5I.js";import{a as D,r as m}from"./chunk-A5BSUUNQ.js";import{p}from"./chunk-IWTNUJGY.js";import{a as T}from"./chunk-O472FAYX.js";import{e as G,g as b}from"./chunk-VKWPEFWQ.js";b();var A=G(T()),O=G(S());async function s(t,e){try{return(await f("git",t,{cwd:e})).stdout}catch(r){if(r instanceof Error){let n=new i(r.message);throw n.stack=r.stack,"exitCode"in r&&Object.assign(n,{exitCode:r.exitCode}),n}throw r}}async function Z(t,e="main"){if(e.startsWith("-"))throw new i(`Invalid initial branch name: ${e}. Branch names can't start with a hyphen.`);d(a`Initializing git repository at ${o.path(t)}...`),await w(),await s(["init"],t),await s(["checkout","-b",e],t)}async function V(t,e){try{return(await s(["check-ignore",...e],t)).split(`
|
|
2
|
+
`).filter(Boolean)}catch(r){if(r instanceof i&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function tt(t){return k("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:r,shallow:n,latestTag:c}=t;if(d(a`Git-cloning repository ${e} into ${o.path(r)}...`),await w(),await I(r)){if(!await v(r))throw new i(a`Can't clone to ${o.path(r)}`,"The path exists but isn't a directory.");if((await E(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new i(a`Directory ${o.path(r)} already exists and is not empty`,a`Choose a different name or remove the existing directory first.`)}let[h,g]=e.split("#");if(g&&c)throw new i("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(n&&c)throw new i("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let l=["clone","--recurse-submodules"];g&&l.push("--branch",g),n&&l.push("--depth","1"),D()||l.push("-c","core.askpass=true"),l.push(h,r);try{if(await f("git",l),c){let u=await _(r,e);await s(["checkout",u],r)}}catch(u){if(u instanceof i)throw u;if(u instanceof Error){let $=new i(u.message);throw $.stack=u.stack,$}throw u}})}async function _(t,e){let r=await L(t);if(!r)throw new i(`Couldn't obtain the most recent tag of the repository ${e}`);return r}async function et(t){let r=await s(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!r.trim())throw new i("Must have at least one commit to run command",a`Run ${o.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let n=r.split("\0");return{hash:n[0],date:n[1],message:n[2],refs:n[3],body:n[4],author_name:n[5],author_email:n[6]}}async function rt(t){await s(["add","--all"],t)}async function nt(t,e){let r=["commit","-m",t];if(e?.author){if(e.author.startsWith("-"))throw new i(`Invalid commit author: ${e.author}. Author name/email can't start with a hyphen.`);r.push("--author",e.author)}return await s(r,e?.directory),(await s(["rev-parse","HEAD"],e?.directory)).trim()}async function w(){if(!await m())throw new i("Git is necessary in the environment to continue",a`Install ${o.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}function F(t){let e=/^git version (?<version>\d+\.\d+\.\d+)(?<suffix>[.\s-].*)?$/.exec(t.trim()),r=e?.groups?.version;if(!r)return;let c=/^(?:\.rc|-rc\.?)(?<number>\d+)(?:[.\s-].*)?$/.exec(e.groups?.suffix??"")?.groups?.number;return c?`${r}-rc.${c}`:r}async function it(t,e={}){let r=await C(c=>H(t,{cwd:e.cwd,env:{GIT_DIR:c}})),n=F(r);if(!n)throw d(a`Unrecognized git --version output: ${o.raw(JSON.stringify(r.slice(0,200)))}`),new i("Couldn't determine the installed Git version.",`Install Git ${t} or later, then try again.`);if((0,A.lt)(n,t))throw new i(`Git ${t} or later is required, but version ${n} is installed.`,`Upgrade Git to version ${t} or later, then try again.`)}async function H(t,e){let{captureOutput:r}=await import("./system-CGOZSROX.js");try{return await r("git",["--version"],e)}catch(n){if(n instanceof i)throw n;if(n instanceof Error&&"code"in n&&n.code==="ENOENT")throw new i(`Git ${t} or later is required, but Git isn't installed.`,`Install Git ${t} or later, then try again.`);let c=n instanceof Error?n.message:String(n);d(a`Couldn't run git --version: ${o.raw(c)}`);let h=n instanceof Error&&"stderr"in n&&typeof n.stderr=="string"?n.stderr.trim():"";throw new i(h?`Couldn't run Git to check its version: ${h}`:"Couldn't run Git to check its version.",`Check that Git ${t} or later is installed and can run, then try again.`)}}var y=class extends i{};async function ot(t){if(await w(),!await R(t))throw new y(`${o.path(t??p())} is not a Git directory`)}async function at(t){return await m()?R(t):!1}async function R(t){try{return await f("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var x=class extends i{};async function st(t){if(!await j(t))throw new x(`${o.path(t??p())} is not a clean Git directory`)}async function j(t){return(await s(["status","--porcelain"],t)).trim()===""}async function L(t){try{return(await s(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof i&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ct(t,e="origin"){if(d(a`Removing git remote ${e} from ${o.path(t)}...`),await w(),!(await s(["remote"],t)).split(`
|
|
3
3
|
`).filter(Boolean).includes(e)){d(a`Remote ${e} does not exist, no action needed`);return}await s(["remote","remove",e],t)}export{Z as a,V as b,tt as c,et as d,rt as e,nt as f,it as g,ot as h,at as i,x as j,st as k,j as l,ct as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{S as m}from"./chunk-7A4ZE5IS.js";import{j as c}from"./chunk-FJOVMEPN.js";import{Eb as a,tb as l,vb as n}from"./chunk-OIQ5NQ5I.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
1
|
+
import{b as m}from"./chunk-PSREELSQ.js";import{F as f}from"./chunk-7A4ZE5IS.js";import{zb as c}from"./chunk-OIQ5NQ5I.js";import{b as N}from"./chunk-VBPMVVLV.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static description="View all the available command flags";static hidden=!0;static flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})};async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
|
|
2
2
|
`,o=s.map(n=>t.map(e=>n[e]).join(",")).join(`
|
|
3
3
|
`),l=`${a}${o}
|
|
4
4
|
`;c(l)}else f({rows:s,columns:{pluginName:{header:"plugin",color:"red"},command:{},flagName:{header:"long flag",color:"green"},flagChar:{header:"short flag",color:"green"},flagEnv:{header:"env variable",color:"blueBright"}}})}};export{i as a};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{c as r,d as f,e as w,f as g,g as _}from"./chunk-OWPAHXDF.js";import{a as v}from"./chunk-LZ2TN7EZ.js";import{p as o,q as p,v as d}from"./chunk-VVHJ2AUF.js";import{Ea as s}from"./chunk-UORSJB4A.js";import{b as c,c as u}from"./chunk-IKXUYCK7.js";import{j as l}from"./chunk-FJOVMEPN.js";import{zb as a}from"./chunk-OIQ5NQ5I.js";import{b as P}from"./chunk-VBPMVVLV.js";import{e as b,g as m}from"./chunk-VKWPEFWQ.js";m();var t=b(P(),1);var h=class extends d{static jsonOutputSchema=r;static summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";static usage=["theme push","theme push --unpublished --json"];static descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
|
|
2
|
+
|
|
3
|
+
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
|
|
4
|
+
|
|
5
|
+
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).
|
|
6
|
+
|
|
7
|
+
This command returns the following information:
|
|
8
|
+
|
|
9
|
+
- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
|
|
10
|
+
- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.
|
|
11
|
+
|
|
12
|
+
If you use the \`--json\` flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.
|
|
13
|
+
|
|
14
|
+
Sample output:
|
|
15
|
+
|
|
16
|
+
\`\`\`json
|
|
17
|
+
{
|
|
18
|
+
"status": "success",
|
|
19
|
+
"changed": true,
|
|
20
|
+
"issues": [],
|
|
21
|
+
"theme": {
|
|
22
|
+
"id": "108267175958",
|
|
23
|
+
"name": "MyTheme",
|
|
24
|
+
"role": "unpublished",
|
|
25
|
+
"storeDomain": "mystore.myshopify.com",
|
|
26
|
+
"editorUrl": "https://mystore.myshopify.com/admin/themes/108267175958/editor",
|
|
27
|
+
"previewUrl": "https://mystore.myshopify.com/?preview_theme_id=108267175958"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
\`\`\`
|
|
31
|
+
`;static description=this.descriptionForHelp();static flags={...c,...o,...p("upload"),...u,"allow-custom-checks":t.Flags.boolean({...o["allow-custom-checks"],env:"SHOPIFY_FLAG_ALLOW_CUSTOM_CHECKS",description:`${o["allow-custom-checks"].description} Requires --strict.`}),theme:t.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, --theme, or --unpublished in non-interactive environments. When using --unpublished without --development, use --theme to provide the new theme name.",env:"SHOPIFY_FLAG_THEME_ID"}),development:t.Flags.boolean({char:"d",description:"Push theme files from your remote development theme. Use --development, --live, --theme, or --unpublished in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),"development-context":t.Flags.string({char:"c",description:"Unique identifier for a development theme context (e.g., PR number, branch name). Reuses an existing development theme with this context name, or creates one if none exists.",env:"SHOPIFY_FLAG_DEVELOPMENT_CONTEXT",dependsOn:["development"],exclusive:["theme"]}),live:t.Flags.boolean({char:"l",description:"Push theme files from your remote live theme. Use --development, --live, --theme, or --unpublished in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"}),unpublished:t.Flags.boolean({char:"u",description:"Create a new unpublished theme and push to it. Use --development, --live, --theme, or --unpublished in non-interactive environments. When using --unpublished without --development, use --theme to provide the new theme name.",env:"SHOPIFY_FLAG_UNPUBLISHED"}),nodelete:t.Flags.boolean({char:"n",description:"Prevent deleting remote files that don't exist locally.",env:"SHOPIFY_FLAG_NODELETE"}),"allow-live":t.Flags.boolean({char:"a",description:"Allow push to a live theme. Required in non-interactive environments when targeting the live theme.",env:"SHOPIFY_FLAG_ALLOW_LIVE"}),publish:t.Flags.boolean({char:"p",description:"Publish as the live theme after uploading.",env:"SHOPIFY_FLAG_PUBLISH"}),force:t.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),strict:t.Flags.boolean({description:"Require theme check to pass without errors before pushing. Warnings are allowed.",env:"SHOPIFY_FLAG_STRICT_PUSH"}),listing:t.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),environment:o.environment};static multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live","unpublished"]},{flags:["theme"],when:e=>!!(e.unpublished&&!e.development)},{flags:["allow-live"],when:e=>!!e.live}]}inputArgv=[...this.argv];async command(e,y,i,L,F){s("theme-command:push"),await w(e,!1,await v(this.inputArgv));let n=await _({...e,allowLive:e["allow-live"],noColor:e["no-color"],developmentContext:e["development-context"]},y,i,F);return n?.hasErrors&&(process.exitCode=1),e.json&&i||(n?f(n,e.json?"json":"text"):e.json&&a(r.encode({status:"cancelled"}))),s("theme-command:push"),n??(e.json&&i?{status:"skipped",reason:"unsafe-directory"}:void 0)}validateCommandFlags(e){if(e["allow-custom-checks"]&&!e.strict)throw new l("The --allow-custom-checks flag requires --strict when using theme push.")}renderEnvironmentResults(e){g(e)}storeAuthScopes(){return["read_themes","write_themes"]}};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as h,d as s,g as F,h as $,na as S,pa as f,ra as b,sa as A,u as l}from"./chunk-UORSJB4A.js";import{b as m}from"./chunk-CE6XQDAG.js";import{j as n,k as v,n as T}from"./chunk-FJOVMEPN.js";import{tb as V,vb as y}from"./chunk-OIQ5NQ5I.js";import{i as g}from"./chunk-R4E2E4NN.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();u();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var E=new Map;async function oe(t,o,e,r){let a="Admin",c=r??await R(o),i=o.storeFqdn,p=D(o);m()==="local"&&(p["x-forwarded-host"]=i,i=new l().host("app"));let d=N(i,c,o);return b({query:t,api:a,addedHeaders:p,url:d,token:o.token,variables:e})}async function j(t){let{query:o,session:e,variables:r,version:a,responseOptions:c,preferredBehaviour:i}=t,p=a??E.get(e.storeFqdn);p??=await R(e,i);let d=e.storeFqdn,q=D(e);m()==="local"&&(q["x-forwarded-host"]=d,d=new l().host("app"));let C={url:N(d,p,e),api:"Admin",token:e.token,addedHeaders:q},k;return"refresh"in e&&(k={type:"token_refresh",handler:e.refresh}),A({...C,query:o,variables:r,responseOptions:c,unauthorizedHandler:k,preferredBehaviour:i})}function D(t){return h(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function R(t,o){let r=(await H(t,o)).reverse()[0];return E.set(t.storeFqdn,r),r}async function H(t,o){return(await I(t,o)).filter(r=>r.supported).map(r=>r.handle).sort()}var w=class extends n{constructor(o,e,r){let a=e===void 0?"":` (HTTP ${e})`,c=r?` If the problem continues, contact Shopify support and include this request ID: ${r}`:"";super(`The Admin API for ${o} returned a server error${a}.`,`This is a problem on the Shopify side, not with your command. Wait a moment and try again.${c}`)}};async function I(t,o){try{return(await j({query:x,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:o})).publicApiVersions}catch(e){if(e instanceof s&&S(e))throw new v(f(e));if(e instanceof s&&e.response.status===403){let r=t.storeFqdn.replace(".myshopify.com","");throw new n(y`Looks like you don't have access to this dev store: (${V.link(r,`https://${t.storeFqdn}`)})`,y`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof s&&e.response.status===401&&h(t)?new n(`The Theme Access password was rejected for the store ${t.storeFqdn}.`,"Theme Access passwords only work on the store they were generated for, and only with its permanent .myshopify.com domain.",["Check that the password was created in the Theme Access app on this store and has not been deleted.",["Pass the permanent domain to",{command:"--store"},{char:"."},"It is the .myshopify.com domain listed in the Shopify admin under",{subdued:"Settings > Domains"},{char:"."}]]):e instanceof s&&(e.response.status===401||e.response.status===404)?new n(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):e instanceof s&&e.response.status===402?new n(`The store ${t.storeFqdn} is currently unavailable.`,"This usually means the store is frozen, paused, or closed. Check the store in the Shopify admin and try again once it is reactivated."):e instanceof s&&e.response.status===423?new n(`The store ${t.storeFqdn} is temporarily locked.`,"Shopify locks a store for a short time, for example during maintenance. Wait a few minutes and try again."):e instanceof s&&e.response.status===422?new n(`The store ${t.storeFqdn} can't accept requests yet.`,"This usually means the store's setup isn't complete. Finish setting up the store in the Shopify admin and try again."):e instanceof s&&e.response.status>=500?new w(t.storeFqdn,e.response.status,f(e)):$(e)?new n(`Request to ${t.storeFqdn} was aborted before it completed.`,"The request was cancelled or timed out before the store responded. Try running the command again."):F(e)?new n(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new T(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function N(t,o,e){let r=o??"unstable";return e&&h(e)?`https://${g}/cli/admin/api/${r}/graphql.json`:`https://${t}/admin/api/${r}/graphql.json`}export{oe as a,j as b,H as c,w as d,I as e,N as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk-HT7273V7.js";import{a as n}from"./chunk-K4KKSBUW.js";import{Q as g}from"./chunk-7FBOMPO5.js";import{J as s,K as c,L as f,Q as m,x as p}from"./chunk-4LJERO23.js";import{b as r,c as e}from"./chunk-IKXUYCK7.js";import{b as F}from"./chunk-VBPMVVLV.js";import{e as A,g as a}from"./chunk-VKWPEFWQ.js";a();var u=A(F(),1);var{config:U,...w}=n,o=class d extends l{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static jsonOutputSchema=s;static description=this.descriptionForHelp();static usage="app config use [config] [flags]";static flags={...r,...e,...w};static args={config:u.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:i}=await this.parse(d),h=p(t.path)?.configFile??null,{app:y}=await g({directory:t.path,userProvidedConfigName:i.config});await m(t.path);let C=await f({directory:t.path,configName:i.config,reset:t.reset,previousConfigFile:h});return await c(C,t.path,t.json?"json":"text"),{app:y}}};export{o as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as D}from"./chunk-R5COVIJM.js";import{a as T}from"./chunk-K4KKSBUW.js";import{P as y,c as j,d as k,f as V}from"./chunk-7FBOMPO5.js";import{a as F}from"./chunk-4KBOLN7Q.js";import{b as I,c as S}from"./chunk-IKXUYCK7.js";import{A as b,G as A,y as R}from"./chunk-7A4ZE5IS.js";import{a as h}from"./chunk-LG3KEHGD.js";import{d as w}from"./chunk-HI5FTI3M.js";import{j as v,m as E}from"./chunk-FJOVMEPN.js";import{zb as x}from"./chunk-OIQ5NQ5I.js";import{b as n}from"./chunk-3PYDIBTX.js";import{b as U}from"./chunk-VBPMVVLV.js";import{e as M,g as i}from"./chunk-VKWPEFWQ.js";i();i();async function O(e){let{developerPlatformClient:s,app:a,remoteApp:r}=e,{extensionIdentifiersBreakdown:o,versionDetails:t}=await j(s,r,e.version),p=k({localApp:a,versionAppModules:t.appModuleVersions,activeAppVersion:await s.activeAppVersion(r)});if(!await V({configExtensionIdentifiersBreakdown:p,extensionIdentifiersBreakdown:o,appTitle:r.title,release:!0,allowUpdates:e.force||e.allowUpdates,allowDeletes:e.force||e.allowDeletes}))return{status:"cancelled"};let m=[{title:"Releasing version",task:async f=>{f.appRelease=await s.release({app:r,version:{versionId:t.uuid,appVersionId:t.id}})}}],{appRelease:{appRelease:l}}=await A(m);return l.userErrors&&l.userErrors.length>0?{status:"failed",version:t,userErrors:l.userErrors}:{status:"success",version:t}}i();var C=n.object({name:n.string(),clientId:n.string().min(1).describe("The client ID of the app receiving the release.")}).strict(),P=n.object({gid:n.string().regex(/^gid:\/\/shopify\/Version\/\d+$/).describe("The Shopify app version GID."),name:n.string().min(1).nullable().describe("The version tag, or null when no tag is available."),message:n.string().min(1).nullable().describe("The version message, or null when no message is available."),url:n.string().url().describe("The Developer Dashboard URL for this version.")}).strict(),L=n.object({version:P}).strict(),d=h({name:"AppReleaseResult",schema:n.discriminatedUnion("status",[n.object({status:n.literal("success"),app:C,release:L}).strict(),n.object({status:n.literal("cancelled")}).strict()]),definitions:{App:C,AppRelease:L,AppReleaseVersion:P}});i();function _(e,s){throw s==="text"&&e instanceof F?new v({bold:"Version couldn't be released."},["Version",{userInput:e.versionTag},"could not be found."]):e}function q(e,s,a){if(a==="json"){if(e.status==="failed"){let o=new v("Version couldn't be released.");throw o.details={userErrors:e.userErrors},o}x(d.encode(B(e,s)));return}if(e.status==="cancelled")throw new E;let r=[{link:{label:e.version.versionTag??void 0,url:e.version.location}},e.version.message?`
|
|
2
|
+
${e.version.message}`:""];if(e.status==="failed"){let o=e.userErrors.map(t=>t.message).join(", ");b({headline:"Version couldn't be released.",body:[...r,`${r.length>0?`
|
|
3
|
+
|
|
4
|
+
`:""}${o}`]})}else R({headline:"Version released to users.",body:r})}function B(e,s){return e.status==="cancelled"?{status:"cancelled"}:{status:"success",app:{name:s.title,clientId:s.apiKey},release:{version:{gid:e.version.uuid,name:e.version.versionTag===""?null:e.version.versionTag??null,message:e.version.message===""?null:e.version.message??null,url:e.version.location}}}}var c=M(U(),1);var g=class e extends D{static summary="Release an app version.";static usage="app release --version <version>";static descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";static jsonOutputSchema=d;static description=this.descriptionForHelp();static flags={...I,...T,...S,"allow-updates":c.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. Required in non-interactive environments unless --allow-deletes is provided.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":c.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. Required in non-interactive environments unless --allow-updates is provided.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:c.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes"]}]}async run(){let{flags:s}=await this.parse(e),a=s["client-id"];await w(()=>({cmd_app_reset_used:s.reset}));let r=s["allow-updates"],o=s["allow-deletes"],t=!!(r&&o),{app:p,remoteApp:u,developerPlatformClient:m}=await y({directory:s.path,clientId:a,forceRelink:s.reset,userProvidedConfigName:s.config}),l=await O({app:p,remoteApp:u,developerPlatformClient:m,force:t,allowUpdates:r,allowDeletes:o,version:s.version}).catch(f=>_(f,s.json?"json":"text"));return q(l,u,s.json?"json":"text"),{app:p}}};export{g as a};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{b as s}from"./chunk-PSREELSQ.js";import{e as j}from"./chunk-CE6XQDAG.js";import{b as m,c as u}from"./chunk-IKXUYCK7.js";import{B as F,D as I,x as h}from"./chunk-7A4ZE5IS.js";import{a as O}from"./chunk-LG3KEHGD.js";import{j as v}from"./chunk-FJOVMEPN.js";import{Eb as W,zb as E}from"./chunk-OIQ5NQ5I.js";import{b as S}from"./chunk-3PYDIBTX.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();n();n();function b(o=k()){return!!o.get("autocorrectEnabled")}function N(o,r=k()){r.set("autocorrectEnabled",o)}function k(){return D??=new j({projectName:"did-you-mean"}),D}var D;function J(){return{enabled:b()}}function y(o){return N(o),{enabled:o}}n();n();var i=O({name:"AutocorrectResult",schema:S.object({enabled:S.boolean()}).strict()});n();var w={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};function f(o,r){if(r==="json"){E(i.encode({enabled:o.enabled}));return}h({body:o.enabled?w.on:w.off})}var d=class o extends s{static summary="Enable autocorrect. Off by default.";static descriptionWithMarkdown=`Enable autocorrect. Off by default.
|
|
2
|
+
|
|
3
|
+
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
4
|
+
|
|
5
|
+
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
6
|
+
`;static jsonOutputSchema=i;static description=this.descriptionForHelp();static flags={...m,...u};async run(){let{flags:r}=await this.parse(o),e=y(!0);f(e,r.json?"json":"text")}};n();var l=class o extends s{static summary="Disable autocorrect. Off by default.";static descriptionWithMarkdown=`Disable autocorrect. Off by default.
|
|
7
|
+
|
|
8
|
+
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
9
|
+
|
|
10
|
+
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
11
|
+
`;static jsonOutputSchema=i;static description=this.descriptionForHelp();static flags={...m,...u};async run(){let{flags:r}=await this.parse(o),e=y(!1);f(e,r.json?"json":"text")}};n();var p=class o extends s{static summary="Check whether autocorrect is enabled or disabled. On by default.";static descriptionWithMarkdown=`Check whether autocorrect is enabled or disabled. On by default.
|
|
12
|
+
|
|
13
|
+
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
14
|
+
|
|
15
|
+
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
16
|
+
`;static jsonOutputSchema=i;static description=this.descriptionForHelp();static flags={...m,...u};async run(){let{flags:r}=await this.parse(o),e=J();f(e,r.json?"json":"text")}};n();var A=M(2),jo=M(3);function M(o){if(typeof o!="number"||Number.isNaN(o)||o<1||o===Number.POSITIVE_INFINITY)throw new Error("`"+o+"` is not a valid argument for `n-gram`");return r;function r(e){let a=[];if(e==null)return a;let c=typeof e.slice=="function"?e:String(e),t=c.length-o+1;if(t<1)return a;for(;t--;)a[t]=c.slice(t,t+o);return a}}function x(o){return o.replace(/:/g," ")}function R(o,r){let e=new Map;for(let c of o)e.set(c,(e.get(c)??0)+1);let a=0;for(let c of r){let t=e.get(c)??0;t>0&&(a+=1,e.set(c,t-1))}return a}function H(o){if(o.id.length<2)return;let r=new Set(o.config.commands.filter(t=>t.hidden).map(t=>t.id)),e=Array.from(new Set([...o.config.commandIDs,...o.config.commands.flatMap(t=>t.aliases)].filter(t=>!r.has(t)))),a=A(o.id),c=e.map(t=>{let g=A(t);return{score:R(g,a),cmd:t}}).filter(({score:t})=>t>=2).sort((t,g)=>{let C=g.score-t.score;return C!==0?C:t.cmd.length-g.cmd.length});if(W(`'Did you mean' options: ${JSON.stringify(c)}`),c.length>0){let{cmd:t}=c[0];return t}}async function L(o,r){return b()?(h({body:["Autocorrecting",{command:x(r)},"to",{command:x(o)},{char:"."}]}),!0):I({message:["Command",{command:r},"not found. Did you mean",{command:x(o)},{char:"?"}]})}var Ro={"config:autocorrect:off":l,"config:autocorrect:status":p,"config:autocorrect:on":d},Ho=async function(o){let r=H(o),e=x(o.id);if(o.argv&&(o.argv.includes("-f")||o.argv.includes("--force"))||!r){F(new v(`Command '${e}' not found.`));return}await L(r,e)&&await this.config.runCommand(r,o.argv)};export{H as a,L as b,Ro as c,Ho as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as c}from"./chunk-VKWPEFWQ.js";c();function l(s,n,o){let e=[];for(let t=0;t<s.length;t+=n){let r=s.slice(t,t+n);e.push(o(r))}return e}async function u(s){let o=(await Promise.allSettled(s)).find(e=>e.status==="rejected");if(o)throw o.reason}function a(s,n,o){let e=[];for(let t=0;t<s.length;t+=n){let r=s.slice(t,t+n);e.push(o(r,t))}return e}export{l as a,u as b,a as c};
|