shopify 5.0.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-QFDTQYPM.js +1 -0
- package/dist/analytics-XADBBHOH.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-24Q6X53V.js +1 -0
- package/dist/{chunk-LEHBZKK3.js → chunk-25MYHE4W.js} +1 -1
- package/dist/{chunk-TODZ3TJR.js → chunk-27JT4NA4.js} +1 -1
- package/dist/chunk-2BYW3BYX.js +1 -0
- package/dist/chunk-2KFYIYLI.js +1 -0
- package/dist/{chunk-D2KIGKBI.js → chunk-2KUM2RU4.js} +60 -60
- package/dist/chunk-2PD7TNFS.js +275 -0
- package/dist/{chunk-64G5TGFF.js → chunk-3C72S6LO.js} +1 -1
- package/dist/chunk-3FZ4LE6A.js +10 -0
- package/dist/{chunk-3MYDSQHF.js → chunk-3GD5ESWN.js} +1 -1
- package/dist/chunk-3KGN6N7E.js +1 -0
- package/dist/{chunk-KNWT7JLL.js → chunk-3MZ7ELHS.js} +2 -2
- package/dist/{chunk-PF53E2DC.js → chunk-3PS52ZT4.js} +1 -1
- package/dist/chunk-3PYDIBTX.js +1 -0
- package/dist/chunk-3Z75BVGJ.js +1 -0
- package/dist/chunk-4FWPOGPQ.js +1 -0
- package/dist/chunk-4IP37MBX.js +1 -0
- package/dist/chunk-4NFX7YCT.js +1 -0
- package/dist/chunk-4TCXPHKN.js +1 -0
- package/dist/chunk-4WBWZIN5.js +6 -0
- package/dist/chunk-5534MHZW.js +97 -0
- package/dist/{chunk-UKWIWCOH.js → chunk-5C6CXU74.js} +1 -1
- package/dist/{chunk-QEKGGTMN.js → chunk-5HOZDOJ7.js} +1 -1
- package/dist/{chunk-ER6C5WS3.js → chunk-5PSQFQL6.js} +1 -1
- package/dist/chunk-5T3ZT6CC.js +1 -0
- package/dist/chunk-62NW4EPI.js +17 -0
- package/dist/chunk-65NCQJYR.js +1 -0
- package/dist/{chunk-IHXGZW42.js → chunk-6BYHL3DS.js} +1 -1
- package/dist/chunk-6I7DT7QR.js +3 -0
- package/dist/chunk-6IMTMS2S.js +3 -0
- package/dist/chunk-7A77JCED.js +11 -0
- package/dist/chunk-7ART2IKU.js +1 -0
- package/dist/{chunk-I4CEH7AK.js → chunk-7BPT5V24.js} +2 -2
- package/dist/{chunk-Z2WAW6MM.js → chunk-7CT3NIXI.js} +1 -1
- package/dist/chunk-7DBKSSDK.js +1 -0
- package/dist/chunk-7HECBXSP.js +1 -0
- package/dist/chunk-7KID5BIR.js +4 -0
- package/dist/{chunk-2L6AN3QA.js → chunk-7N7KRZOM.js} +1 -1
- package/dist/{chunk-W37IFK3P.js → chunk-7NRHZG5Y.js} +102 -102
- package/dist/chunk-7PHDEILV.js +1 -0
- package/dist/chunk-A2NSORBM.js +2296 -0
- package/dist/chunk-A54TADAZ.js +1 -0
- package/dist/{chunk-YTUUU33R.js → chunk-AE3IQG7S.js} +1 -1
- package/dist/chunk-AGTUAQHX.js +4 -0
- package/dist/chunk-AHYI27QL.js +11 -0
- package/dist/chunk-ALINJ6J2.js +1 -0
- package/dist/chunk-AMVWKHNY.js +1 -0
- package/dist/{chunk-NVKJ7ZLP.js → chunk-ASKBYEO7.js} +1 -1
- package/dist/{chunk-62EOM3Y2.js → chunk-AVJJGQOP.js} +1 -1
- package/dist/{chunk-NXAEBGMO.js → chunk-AY3AAV77.js} +1 -1
- package/dist/{chunk-F3CK3EJJ.js → chunk-BFAOTQGH.js} +1 -1
- package/dist/{chunk-H6GNKWYM.js → chunk-BPKQA2EO.js} +1 -1
- package/dist/{chunk-WESTVWWD.js → chunk-C2HJEGTS.js} +1 -1
- package/dist/chunk-C72QNK6O.js +4 -0
- package/dist/chunk-CDSDQTNB.js +16 -0
- package/dist/chunk-CEQGOCKX.js +1 -0
- package/dist/{chunk-WCC52MR2.js → chunk-CIGWIKOW.js} +1 -1
- package/dist/chunk-CQAD5WML.js +1 -0
- package/dist/chunk-CRQQCT7F.js +1 -0
- package/dist/chunk-CZNUBAAG.js +3 -0
- package/dist/{chunk-ISKQQXLZ.js → chunk-D7IMC2G4.js} +1 -1
- package/dist/{chunk-6ES4KRFW.js → chunk-DC7ITY6T.js} +1 -1
- package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
- package/dist/{chunk-SLY27GDC.js → chunk-DDZYIC76.js} +2 -2
- package/dist/chunk-DGIIUQH3.js +1 -0
- package/dist/{chunk-3KM5ZOW2.js → chunk-DMOLPSXF.js} +1 -1
- package/dist/{chunk-LHXFTFFM.js → chunk-DOLVBTCB.js} +1 -1
- package/dist/{chunk-WBVS5NBV.js → chunk-DTKGI43P.js} +2 -2
- package/dist/{chunk-2WJOTJOD.js → chunk-DVD7I2TX.js} +2 -2
- package/dist/chunk-DVFVO6ZE.js +2 -0
- package/dist/{chunk-3XRI3D44.js → chunk-DXEMSLI6.js} +1 -1
- package/dist/chunk-EDWIWZWM.js +15 -0
- package/dist/chunk-ELR6AZT4.js +9 -0
- package/dist/chunk-EVQPYZ7F.js +5 -0
- package/dist/chunk-F5QKMDP3.js +1 -0
- package/dist/{chunk-URXM5A2K.js → chunk-F6IQWX2F.js} +1 -1
- package/dist/{chunk-SACNUF4I.js → chunk-FAVPTYIR.js} +1 -1
- package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
- package/dist/{chunk-Q4JYAUVL.js → chunk-FHKK3QU7.js} +1 -1
- package/dist/chunk-FKKJQGYX.js +7 -0
- package/dist/chunk-FQLXQ7WN.js +16 -0
- package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
- package/dist/{chunk-J5ERDFIC.js → chunk-FU7PYW7H.js} +1 -1
- package/dist/{chunk-ESFCYB46.js → chunk-FYQE5E6U.js} +1 -1
- package/dist/chunk-G3EWGBXR.js +1 -0
- package/dist/chunk-G3RNO2TC.js +1 -0
- package/dist/{chunk-35XFNKNB.js → chunk-GGCP2TIK.js} +1 -1
- package/dist/chunk-GSFWBFFH.js +1 -0
- package/dist/{chunk-ZRI3SSLG.js → chunk-H2KGP2FM.js} +2 -2
- package/dist/{chunk-GW7YIJPJ.js → chunk-H4K3F7PP.js} +1 -1
- package/dist/chunk-HGZ2HRPO.js +13 -0
- package/dist/chunk-HMPRWNGG.js +203 -0
- package/dist/chunk-HP4QYSBQ.js +1 -0
- package/dist/{chunk-RPCIFYCY.js → chunk-HSTZV6H7.js} +2 -2
- package/dist/{chunk-N57Y7THE.js → chunk-HVUMVDUG.js} +1 -1
- package/dist/{chunk-XWSWXQCC.js → chunk-HYCNYUHW.js} +1 -1
- package/dist/{chunk-CXI3RHPW.js → chunk-I3WRA2LH.js} +1 -1
- package/dist/{chunk-UUAKOX7E.js → chunk-IRLYC626.js} +2 -2
- package/dist/chunk-IWNFPBH2.js +33 -0
- package/dist/{chunk-C3RFAKWR.js → chunk-JALDNBTU.js} +1 -1
- package/dist/{chunk-QDCLL5OI.js → chunk-JC37YZ4I.js} +1 -1
- package/dist/{chunk-QF5WKTPD.js → chunk-JG4FAT2T.js} +1 -1
- package/dist/chunk-JGLLABZR.js +8 -0
- package/dist/chunk-JIY6XWSC.js +1 -0
- package/dist/{chunk-3ODQKAEA.js → chunk-JIYCZXK5.js} +1 -1
- package/dist/chunk-JMSAHCBU.js +35 -0
- package/dist/{chunk-KZRLZWOU.js → chunk-JNSVKDBY.js} +1 -1
- package/dist/chunk-JQU2BJDH.js +3 -0
- package/dist/chunk-JVY6CCLE.js +3 -0
- package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
- package/dist/chunk-KCAWHJGF.js +1 -0
- package/dist/{chunk-YV2TP44L.js → chunk-KFO2JNF5.js} +1 -1
- package/dist/chunk-KFR7HWCG.js +9 -0
- package/dist/{chunk-MEYVUHQH.js → chunk-KHZF73BL.js} +1 -1
- package/dist/{chunk-LGXI7EGM.js → chunk-KM4LE7K4.js} +2 -2
- package/dist/{chunk-IILLQOUC.js → chunk-L2PUDV7Y.js} +1 -1
- package/dist/chunk-LFBFPK22.js +1 -0
- package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
- package/dist/chunk-LGDWE3H3.js +1 -0
- package/dist/chunk-LPPEAMI6.js +1 -0
- package/dist/chunk-LXIWMYM4.js +1 -0
- package/dist/chunk-MGWCXTGD.js +1 -0
- package/dist/chunk-MGX7UG44.js +1 -0
- package/dist/chunk-MKFRKNHF.js +3 -0
- package/dist/chunk-MTT6EAQO.js +1 -0
- package/dist/{chunk-SIL6HPMK.js → chunk-MU7IVBGI.js} +2 -2
- package/dist/{chunk-QEVTBD33.js → chunk-MYMBHVC4.js} +1 -1
- package/dist/chunk-MZDBH4XV.js +4 -0
- package/dist/{chunk-Q5IC3IYY.js → chunk-NUBJ2HK7.js} +1 -1
- package/dist/{chunk-3Z3MADXZ.js → chunk-NY5N4ANL.js} +1 -1
- package/dist/{chunk-WRZWHT6M.js → chunk-NYMKGE3J.js} +1 -1
- package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
- package/dist/chunk-O7HZ3EIP.js +1 -0
- package/dist/chunk-OJOF6IYG.js +9 -0
- package/dist/{chunk-UXVXVI6O.js → chunk-ONZULPQH.js} +68 -66
- package/dist/chunk-ORMXPSJM.js +1 -0
- package/dist/chunk-ORYEDUKM.js +5 -0
- package/dist/{chunk-T4XJKM6B.js → chunk-OTMYJWIP.js} +1 -1
- package/dist/chunk-OVJVFB5E.js +20 -0
- package/dist/chunk-OWQEFORZ.js +1 -0
- package/dist/{chunk-UBP3LQFY.js → chunk-OXPEBT4I.js} +2 -2
- package/dist/chunk-OXZR2MB4.js +6 -0
- package/dist/chunk-OY5M52EF.js +6 -0
- package/dist/{chunk-2A2JSAAA.js → chunk-PJZZZNWR.js} +1 -1
- package/dist/chunk-Q2LQJYRK.js +16 -0
- package/dist/chunk-QBRRFFMZ.js +1 -0
- package/dist/{chunk-AQKWPRZE.js → chunk-QCLE5REL.js} +2 -2
- package/dist/{chunk-43R5VGKT.js → chunk-QGQWVA7N.js} +1 -1
- package/dist/chunk-QKPAB245.js +1 -0
- package/dist/chunk-QUPZOBTB.js +1 -0
- package/dist/chunk-R4E2E4NN.js +1 -0
- package/dist/{chunk-CGVROSPS.js → chunk-R6US7F33.js} +1 -1
- package/dist/chunk-RKNVTEO3.js +5 -0
- package/dist/{chunk-7CCTPBCT.js → chunk-RLOEI6VE.js} +1 -1
- package/dist/chunk-RSZAAN37.js +1 -0
- package/dist/{chunk-WBJ6ZHYH.js → chunk-S3RROJGG.js} +37 -37
- package/dist/chunk-S4KNPCW3.js +81 -0
- package/dist/{chunk-26PWHH3B.js → chunk-SBN3ILXO.js} +1 -1
- package/dist/chunk-SCDGLREP.js +1 -0
- package/dist/chunk-SHOMIS6Q.js +2 -0
- package/dist/chunk-SN3PMWUF.js +6 -0
- package/dist/chunk-SODCXZ5U.js +1 -0
- package/dist/chunk-SPJM7RTD.js +1 -0
- package/dist/chunk-SQL67BKI.js +5 -0
- package/dist/{chunk-AQ6EVL73.js → chunk-SURFUFAZ.js} +1 -1
- package/dist/{chunk-SNH4XZ6E.js → chunk-SVQDMZJO.js} +1 -1
- package/dist/chunk-T4ZOTYOY.js +1 -0
- package/dist/chunk-T6C4WC3Z.js +2 -0
- package/dist/chunk-TD6JBHUS.js +1 -0
- package/dist/chunk-TIM4CIXZ.js +22 -0
- package/dist/{chunk-B2O3ANRZ.js → chunk-TP7CTMMT.js} +1 -1
- package/dist/chunk-TSPJAMYB.js +1 -0
- package/dist/chunk-TSVEV2UD.js +26 -0
- package/dist/{chunk-ZBL7XMJ6.js → chunk-TTAT62N3.js} +2 -2
- package/dist/{chunk-S5P7KWY4.js → chunk-TUSS6PXB.js} +1 -1
- package/dist/chunk-TXP6KFWO.js +5 -0
- package/dist/chunk-TZHVCMZN.js +6 -0
- package/dist/chunk-UC4TOM36.js +3 -0
- package/dist/{chunk-RPVZ2JON.js → chunk-UFY4L5KQ.js} +1 -1
- package/dist/chunk-UU6UQ2QY.js +1 -0
- package/dist/chunk-V4FC72R6.js +1 -0
- package/dist/chunk-VA2S7W7H.js +10 -0
- package/dist/chunk-VE3IIC7H.js +1 -0
- package/dist/{chunk-PTSCGSQV.js → chunk-VJG7VXFU.js} +2 -2
- package/dist/chunk-VQSRU5XL.js +4 -0
- package/dist/chunk-VRIFLMA3.js +70 -0
- package/dist/chunk-WBJFTCEJ.js +1 -0
- package/dist/chunk-WBPP6PO7.js +31 -0
- package/dist/chunk-WE5KY6T6.js +1 -0
- package/dist/chunk-WFPVT2IY.js +1 -0
- package/dist/{chunk-PLSS456F.js → chunk-WLYXBQ2M.js} +1 -1
- package/dist/chunk-WNVOEE6T.js +7 -0
- package/dist/chunk-WPDJVUTY.js +47 -0
- package/dist/chunk-WWCYEZUU.js +1 -0
- package/dist/chunk-WWVDZ3GC.js +3 -0
- package/dist/{chunk-4KECSZTL.js → chunk-WZBZ7FWP.js} +2 -2
- package/dist/chunk-XEZPN5TR.js +22 -0
- package/dist/{chunk-QW52RPAU.js → chunk-XLMKHTJ5.js} +1 -1
- package/dist/chunk-XRNBCV2B.js +1 -0
- package/dist/{chunk-67L7FIB6.js → chunk-XWLNCBAG.js} +1 -1
- package/dist/chunk-YF4AXKM4.js +1 -0
- package/dist/chunk-YKDRUAY3.js +857 -0
- package/dist/{chunk-YSWVYPWR.js → chunk-YNFQBYSL.js} +1 -1
- package/dist/{chunk-TFPW2VGN.js → chunk-YNZLLZU2.js} +1 -1
- package/dist/chunk-YOYPYB4H.js +1 -0
- package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
- package/dist/chunk-YTL45RXR.js +103 -0
- package/dist/chunk-YVPB7OT6.js +6 -0
- package/dist/chunk-YYWSHRO2.js +89 -0
- package/dist/{chunk-DZKFP6H2.js → chunk-Z5QEXS6F.js} +1 -1
- package/dist/chunk-Z5WFRYVQ.js +6 -0
- package/dist/{chunk-PWAT52M4.js → chunk-Z6ZRS256.js} +1 -1
- package/dist/chunk-ZMOW2YZ4.js +18 -0
- package/dist/chunk-ZMU4EYXT.js +1 -0
- package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
- package/dist/chunk-ZXZWMXXK.js +7 -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-next.js +1 -0
- 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-V25AVSZ6.js +1 -0
- package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
- package/dist/command-json-schema-C5UZXP2W.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OCGEEV4U.js +1 -0
- package/dist/custom-oclif-loader-ZVUKMRGH.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 +78 -36
- package/dist/data/section.json +1 -1
- package/dist/data/shopify_system_translations.json +240 -23
- 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-A5AXXKIK.js +1 -0
- package/dist/dist-NORLLIHQ.js +1 -0
- package/dist/dist-XBM4XZS4.js +1 -0
- package/dist/environment-5P7JJ3GI.js +1 -0
- package/dist/environments-Y5JEI3U3.js +1 -0
- package/dist/error-GI4DXVDU.js +1 -0
- package/dist/error-handler-BS2ZENQV.js +1 -0
- package/dist/fs-UOOLPOHJ.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-2OXOS2AW.js +1 -0
- package/dist/http-proxy-node16-NZZ674YW.js +38 -0
- package/dist/index.js +12 -12
- package/dist/is-global-CI77T7NE.js +1 -0
- package/dist/json-error-6PBUR4LQ.js +1 -0
- package/dist/latest-version-75YEFEMK.js +9 -0
- package/dist/lib-4JVADMNT.js +1 -0
- package/dist/lib-L4STV5B2.js +1 -0
- package/dist/lib-LEEN55OD.js +1 -0
- package/dist/{local-OKPVB4NH.js → local-5NIWPWDS.js} +1 -1
- package/dist/metadata-IXPNNPNJ.js +1 -0
- package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
- package/dist/node-package-manager-ALFEGGD6.js +1 -0
- package/dist/notifications-system-FQW3GKH2.js +1 -0
- package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
- package/dist/os-6TNQTEUN.js +1 -0
- package/dist/output-LEOB5LAM.js +1 -0
- package/dist/{prettier-EGVCP5CY.js → prettier-VLTY4MIE.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-J4CTESP5.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-YDUI56E3.js +1 -0
- package/dist/upgrade-LBCZORG2.js +1 -0
- package/dist/version-2YL4YEQ2.js +1 -0
- package/dist/version-X2CPQVWQ.js +1 -0
- package/dist/workerd-5UPTEWNI.js +18 -0
- package/oclif.manifest.json +25622 -1132
- 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-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-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-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-HXZAY5OA.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-VEUKT5EI.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-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-Y55T4IIQ.js +0 -7
- 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-2S3FHQFS.js} +0 -0
- /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as $,c as M}from"./chunk-4NFX7YCT.js";import{d as N,f as Q,u as P}from"./chunk-Z5QEXS6F.js";import{a as C}from"./chunk-RSZAAN37.js";import{a as G,c as q}from"./chunk-ASKBYEO7.js";import{b as L}from"./chunk-2BYW3BYX.js";import{b as X,d as J}from"./chunk-YKDRUAY3.js";import{b as j,c as k}from"./chunk-DMOLPSXF.js";import{A as R,H as x,y as w}from"./chunk-2KUM2RU4.js";import{a as S}from"./chunk-LG3KEHGD.js";import{i as p}from"./chunk-TD6JBHUS.js";import{Sa as A,la as b,ta as E,tb as f,vb as c,zb as m}from"./chunk-ZMOW2YZ4.js";import{b as a}from"./chunk-3PYDIBTX.js";import{e as y,g as O}from"./chunk-IWTNUJGY.js";import{e as K,g as i}from"./chunk-VKWPEFWQ.js";i();i();var V=K(X(),1);async function Y(r,e){if(r)try{return JSON.parse(r)}catch(o){let t=o instanceof Error?o.message:"Unknown error";throw new p(c`Invalid JSON in ${f.yellow("--variables")} flag: ${t}`,"Please provide valid JSON format.")}else if(e){if(!await A(e))throw new p(c`Variable file not found at ${f.path(e)}. Please check the path and try again.`);let o=await b(e,{encoding:"utf8"});try{return JSON.parse(o)}catch(t){let s=t instanceof Error?t.message:"Unknown error";throw new p(c`Invalid JSON in variable file ${f.path(e)}: ${s}`,"Please provide valid JSON format.")}}}async function F(r){let{remoteApp:e,store:o,query:t,variables:s,variableFile:h,version:U}=r,{adminSession:H,version:W}=await x({title:c`Authenticating`,task:async()=>{let n=await $(e,o.shopDomain),l=await Q({adminSession:n,userSpecifiedVersion:U});return{adminSession:n,version:l}},renderOptions:{stdout:process.stderr}}),B=await Y(s,h);N(t),M(t,o);try{let n;return{status:"success",result:{data:await x({title:c`Executing GraphQL operation`,task:async()=>L({query:(0,V.parse)(t),session:H,variables:B,version:W,responseOptions:{handleErrors:!1,onResponse:u=>{n=u.extensions}}}),renderOptions:{stdout:process.stderr}}),...n===void 0?{}:{extensions:n}}}}catch(n){if(n instanceof J){let{errors:l,extensions:u,data:v}=n.response;return{status:"failed",details:{...l===void 0?{}:{errors:l},...u===void 0?{}:{extensions:u},...v===void 0?{}:{data:v}}}}throw n}}i();var z=a.unknown().and(a.record(a.unknown())),I=a.object({data:z.nullable().describe("Native GraphQL query data, preserving fields and aliases."),extensions:z.optional().describe("Native GraphQL response extensions, when supplied.")}).strict(),D=a.object({path:a.string().refine(O,"Expected an absolute filesystem path."),format:a.literal("json")}).strict().describe("Receipt for a written JSON file containing the GraphQL result, including data and optional extensions."),d=S({name:"AppExecuteResult",schema:a.union([I,D]),definitions:{AppExecuteGraphQLResult:I,AppExecuteFileReceipt:D}});i();async function T(r,e,o){if(r.status==="failed"){if(e==="json"){let s=new p("GraphQL operation failed.");throw s.details=r.details,s}R({headline:"GraphQL operation failed.",body:JSON.stringify({errors:r.details.errors},null,2)});return}let t=e==="json"?Z(r.result):JSON.stringify(r.result.data,null,2);o?(await E(o,t),e==="json"?m(d.encode({path:y(o),format:"json"})):w({headline:"Operation succeeded.",body:`Results written to ${o}`})):e==="json"?m(t):(w({headline:"Operation succeeded."}),m(t))}function Z(r){return d.validate(r),JSON.stringify(r,null,2)}var g=class r extends C{static summary="Execute GraphQL queries and mutations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";static jsonOutputSchema=d;static description=this.descriptionForHelp();static flags={...j,...G,...q,...k};async run(){let{flags:e}=await this.parse(r),{query:o,appContextResult:t,store:s}=await P(e),h=await F({organization:t.organization,remoteApp:t.remoteApp,store:s,query:o,variables:e.variables,variableFile:e["variable-file"],...e.version&&{version:e.version}});return await T(h,e.json?"json":"text",e["output-file"]),{app:t.app}}};export{g as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as U}from"./chunk-
|
|
1
|
+
import{a as U}from"./chunk-YNZLLZU2.js";import{d as I,j as _,k as A,r as D}from"./chunk-WPDJVUTY.js";import{e as k}from"./chunk-XLMKHTJ5.js";import{a as q}from"./chunk-7N7KRZOM.js";import{e as x}from"./chunk-7HECBXSP.js";import{p as E,v as F}from"./chunk-CZNUBAAG.js";import{b as O,c as j}from"./chunk-DMOLPSXF.js";import{M as L}from"./chunk-2KUM2RU4.js";import{i as d}from"./chunk-TD6JBHUS.js";import{Eb as p,_a as v,ka as S,ta as R,zb as w}from"./chunk-ZMOW2YZ4.js";import{b as t}from"./chunk-3PYDIBTX.js";import{b as X}from"./chunk-AE3IQG7S.js";import{c as h,h as $}from"./chunk-IWTNUJGY.js";import{e as z,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();var J=t.object({name:t.string(),file:t.string().optional(),line:t.number().optional(),col:t.number().optional()}).passthrough(),N=t.object({type:t.enum(["O","C"]),at:t.number(),frame:t.number()}).passthrough(),H=t.object({name:t.string(),unit:t.enum(["bytes","microseconds","milliseconds","nanoseconds","none","seconds"]),startValue:t.number(),endValue:t.number()}),B=H.extend({type:t.literal("evented"),events:t.array(N)}).passthrough(),M=H.extend({type:t.literal("sampled"),samples:t.array(t.array(t.number())),weights:t.array(t.number())}).passthrough(),C=t.object({frames:t.array(J)}).passthrough(),T=t.object({$schema:t.literal("https://www.speedscope.app/file-format-schema.json"),shared:C,profiles:t.array(t.discriminatedUnion("type",[B,M])),name:t.string().optional(),exporter:t.string().optional(),activeProfileIndex:t.number().optional()}).passthrough().describe("The native Speedscope file format, defined by its $schema URL. Original keys and extension fields are preserved."),u=x({name:"ThemeProfileResult",schema:T,project:o=>o,definitions:{ProfileFrame:J,ProfileEvent:N,ProfileShared:C,EventedProfile:B,SampledProfile:M}});var g="https://storefront.invalid",K=200;async function W(o,e,r,s,a){if(r.startsWith("//")||!URL.canParse(r,g))throw new d(`${r} isn't a valid storefront URL.`,"Pass the path of a storefront page to --url, for example /products/classic-leather-jacket.");let n=await I(o)?await U(a,o.storeFqdn):void 0;if(s)throw new d("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let f=await D(e,o,s,n),m=Y(r),i=await A(f,{method:"GET",path:m.pathname,query:[...m.searchParams],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(i.status>=300&&i.status<400)throw new d(`The page ${r} redirects (${i.status}) instead of rendering, so it can't be profiled.`,Z(m,i.headers.get("Location")));if(i.status!==200){let y=await ee(i);throw new d(`Can't profile ${r}. The storefront responded with ${i.status}.${y}`)}let c=await i.text();return{result:T.parse(JSON.parse(c)),source:c}}function Y(o){let e=new URL(o,g);return Object.keys(_).forEach(r=>e.searchParams.delete(r)),e}function G(o){return`${o.pathname}${o.search}`}function Z(o,e){if(!e||!URL.canParse(e,g))return null;let r=Y(e);if(r.pathname==="/password")return"It redirects to the storefront password page. Check the storefront password, and pass it with --store-password.";let s=G(r),a=r.origin===g,n=a?s:r.href;return s===G(o)?`It redirects to ${n}.`:a?`It redirects to ${n}. Run the command again with --url "${s}".`:`It redirects to ${n}. If that page is on your storefront, run the command again with --url "${s}".`}async function ee(o){let e=o.headers.get("x-request-id"),r=e?`
|
|
2
2
|
Request ID: ${e}`:"",s=(await o.text()).trim(),a=o.headers.get("Content-Type")?.includes("application/json")??!1,f=s.length>0&&(a||s.length<=K)?`
|
|
3
|
-
${s}`:"";return`${r}${f}`}l();l();import{fileURLToPath as te}from"node:url";async function V(...o){let e=await v("package.json",{cwd:te(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?h($(e),"assets",...o):h($(e),"dist","assets",...o)}async function Q({result:o,source:e},r){u.validate(o),r==="json"?w(e):await re(e)}async function re(o){let e=process.env.WSL_DISTRO_NAME,r=e?`//wsl$/${e}`:"",s=await V("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${s}`);let a="liquid-profile",n=Buffer.from(o).toString("base64"),f=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(n)})`,m=`speedscope-${Number(new Date)}-${process.pid}`,i=h(S(),`${m}.js`);p(`[Theme Profile] writing JS file to: ${i}`),await R(i,f),p(`[Theme Profile] JS file created successfully: ${i}`),s=`${r}${s}`,i=`${r}${i}`,s+=`#localProfilePath=${i}`;let c=h(S(),`${m}.html`);p(`[Theme Profile] writing HTML file to: ${c}`),await R(c,`<script>window.location=${JSON.stringify(s)}</script>`),p(`[Theme Profile] HTML file created successfully: ${c}`),c=`${r}${c}`,s=`file://${c}`,p(`[Theme Profile] Opening URL: ${s}`);let y=await L(s);p(`[Theme Profile] URL opened successfully: ${y}`)}var P=z(X(),1);var b=class extends F{static
|
|
3
|
+
${s}`:"";return`${r}${f}`}l();l();import{fileURLToPath as te}from"node:url";async function V(...o){let e=await v("package.json",{cwd:te(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?h($(e),"assets",...o):h($(e),"dist","assets",...o)}async function Q({result:o,source:e},r){u.validate(o),r==="json"?w(e):await re(e)}async function re(o){let e=process.env.WSL_DISTRO_NAME,r=e?`//wsl$/${e}`:"",s=await V("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${s}`);let a="liquid-profile",n=Buffer.from(o).toString("base64"),f=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(n)})`,m=`speedscope-${Number(new Date)}-${process.pid}`,i=h(S(),`${m}.js`);p(`[Theme Profile] writing JS file to: ${i}`),await R(i,f),p(`[Theme Profile] JS file created successfully: ${i}`),s=`${r}${s}`,i=`${r}${i}`,s+=`#localProfilePath=${i}`;let c=h(S(),`${m}.html`);p(`[Theme Profile] writing HTML file to: ${c}`),await R(c,`<script>window.location=${JSON.stringify(s)}</script>`),p(`[Theme Profile] HTML file created successfully: ${c}`),c=`${r}${c}`,s=`file://${c}`,p(`[Theme Profile] Opening URL: ${s}`);let y=await L(s);p(`[Theme Profile] URL opened successfully: ${y}`)}var P=z(X(),1);var b=class extends F{static jsonOutputSchema=u;static summary="Profile the Liquid rendering of a theme page.";static usage=["theme profile","theme profile --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
|
|
4
4
|
|
|
5
5
|
This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;static description=this.descriptionForHelp();static flags={...O,...E,theme:P.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:P.Flags.string({description:"The path of the page to profile, with an optional query string. For a full URL, only the path and query string are used.",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":P.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...j};static multiEnvironmentsFlags=null;async command(e,r,s=!1){let{password:a}=e,n;e.theme?n={filter:{theme:e.theme}}:n={filter:{live:!0}};let f=await q(r,n),m=`Generating Liquid profile for ${r.storeFqdn} ${e.url}`,i;return await k([{title:m,task:async()=>{i=await W(r,f.id.toString(),e.url,a,e["store-password"]),(!s||!e.json)&&await Q(i,e.json?"json":"text")}}]),i?.result}renderEnvironmentResults(e){w(u.encode({environments:e}))}};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-I3WRA2LH.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,t as a}from"./chunk-
|
|
1
|
+
import{s as r,t as a}from"./chunk-3FZ4LE6A.js";import{x as p}from"./chunk-2KUM2RU4.js";import{a as u}from"./chunk-LG3KEHGD.js";import{zb as n}from"./chunk-ZMOW2YZ4.js";import{b as o}from"./chunk-3PYDIBTX.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();function l(){return{enabled:r()}}function f(t){return a(t),{enabled:t}}e();var d=u({name:"AutoUpgradeResult",schema:o.object({enabled:o.boolean()}).strict()});e();function S(t,m){if(m==="json"){n(d.encode({enabled:t.enabled}));return}p({body:t.enabled?"Auto-upgrade on. Shopify CLI will update automatically after each command.":"Auto-upgrade off. You'll need to run `shopify upgrade` to update manually."})}export{l as a,f as b,d as c,S as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as b}from"./chunk-
|
|
1
|
+
import{g as b}from"./chunk-DOLVBTCB.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-BS2ZENQV.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as uo,e as fo,f as po}from"./chunk-PTSCGSQV.js";import{a as ho}from"./chunk-6ES4KRFW.js";import{c as mo,i as go,o as Ur}from"./chunk-YLQ3LNNY.js";import{b as et}from"./chunk-ZJOX5HW4.js";import{Da as oo,M as Yt,O as Jt,R as Wt,ha as Bt,l as qt,la as zt,u as je}from"./chunk-GQLNG537.js";import{B as eo,D as to,l as Kt,m as Xt,p as Zt,x as Ze}from"./chunk-QQJNQNKP.js";import{b as lo,c as ce}from"./chunk-3KM5ZOW2.js";import{A as ie,B as Y,D as no,E as G,F as M,I as io,K as se,N as so,z as q}from"./chunk-D2KIGKBI.js";import{a as Mt,c as Vt}from"./chunk-LEHBZKK3.js";import{o as Ht}from"./chunk-335BUVBP.js";import{a as re}from"./chunk-BN7ZXAZJ.js";import{h as p,k as Fe}from"./chunk-M5VIFG2V.js";import{Ba as Xe,Bb as I,Da as _e,Sa as w,T as jt,Va as Dt,W as Ft,Y as Nt,_ as Lt,_a as Ut,ib as Qt,la as R,nb as ro,oa as ne,qb as J,rb as ao,sb as ae,ta as C,va as $e,wb as co,xa as Ie,yb as F}from"./chunk-JLQRDFR5.js";import{i as E}from"./chunk-B4OMIONW.js";import{b as S,h as Gt,j as Te}from"./chunk-FZCGRIOM.js";import{b as ke}from"./chunk-YTUUU33R.js";import{a as Tt}from"./chunk-JD5P5RAJ.js";import{c as g,e as b,f as Q,h as O,i as K,j as Oe,m as Qe,p as Ke}from"./chunk-IWTNUJGY.js";import{b as Dr}from"./chunk-JFBCE4HN.js";import{e as ye,g as l}from"./chunk-VKWPEFWQ.js";l();import{createRequire as Hr}from"node:module";import{pathToFileURL as yo}from"node:url";var wo=Hr(import.meta.url);async function So(e){let t;try{t=wo.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(s){throw s instanceof Error&&s.code==="MODULE_NOT_FOUND"?new p("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):s}let o=await eo(t),r=o.content.exports?.["."];typeof r!="string"&&(r=r?.import),typeof r!="string"&&(r=r.default);let n=g(O(o.path),r);return import(yo(n).href)}function Gr(e,t){let o=wo.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(yo(o).href)}l();l();import{isAbsolute as Mr,resolve as Vr}from"node:path";var Pi=S.string().refine(Mr,"Expected an absolute native filesystem path").transform(e=>Vr(e)),vo=S.string().datetime({precision:0}),we=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefront\/\d+$/).describe("A Shopify HydrogenStorefront GID."),Ei=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontEnvironment\/\d+$/).describe("A Shopify HydrogenStorefrontEnvironment GID."),bo=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontDeployment\/\d+$/).describe("A Shopify HydrogenStorefrontDeployment GID."),xo=S.enum(["success","partial","skipped","cancelled"]),tt=S.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/).nullable();function Po(e){return new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function Ne(e){let t=e?.toLowerCase();return t&&/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(t)?t:null}l();import{format as qr}from"node:util";async function Eo(e){if(!X())return e();let t={log:console.log,info:console.info,debug:console.debug},o={...t};for(let r of["log","info","debug"])o[r]=(...n)=>{X()?Mt(["--json"],()=>F(qr(...n))):t[r](...n)},console[r]=o[r];try{return await e()}finally{for(let r of["log","info","debug"])console[r]===o[r]&&(console[r]=t[r])}}function X(){return Te()==="json"||Ht()}function Le(e,t,o=X()){return o?(co(e.encode(t)),!0):!1}l();var Co=S.object({gid:bo,createdAt:vo,commitMessage:S.string().nullable()}).strict(),ot=S.object({gid:we,name:S.string(),productionUrl:S.string().url().nullable()}).strict().describe("All projected fields are present; unavailable productionUrl is null."),Ro=ot.extend({currentProductionDeployment:Co.nullable()}).strict();function rt(e){return{gid:e.id,name:e.title,productionUrl:e.productionUrl||null}}function Ni({shop:e,storefronts:t}){return{storeDomain:Ne(e),storefronts:t.map(o=>({...rt(o),currentProductionDeployment:o.currentProductionDeployment?{gid:o.currentProductionDeployment.id,createdAt:Po(o.currentProductionDeployment.createdAt),commitMessage:o.currentProductionDeployment.commitMessage??null}:null}))}}var Li=re({name:"HydrogenListResult",schema:S.object({storeDomain:tt,storefronts:S.array(Ro)}).strict().describe("The complete list of Hydrogen storefronts for the store."),definitions:{Storefront:Ro,Deployment:Co}}),nt=re({name:"HydrogenLinkResult",schema:S.object({status:xo,changed:S.boolean(),storeDomain:tt,storefront:ot.nullable()}).strict(),definitions:{Storefront:ot}}),Di=re({name:"HydrogenUnlinkResult",schema:S.object({status:S.literal("success"),changed:S.boolean(),storefront:S.object({gid:we,name:S.string()}).strict().nullable()}).strict()});var We=ye(ke(),1);l();var $o=ye(ke(),1);l();import{createRequire as Ao}from"node:module";function ko({id:e,projectPath:t}){if(!(!e||!Yr(t,e)))throw new p(`\`shopify ${e.replace(/:/g," ")}\` is not supported by this version of Hydrogen`,"The installed version of @shopify/hydrogen disables this command.",["Use your framework or package tooling instead."])}function Yr(e,t){try{let n=Ao(g(e,"package.json"))("@shopify/hydrogen/package.json")?.shopify?.cli?.disabledCommands;return Array.isArray(n)&&n.includes(t)}catch{return!1}}function Oo(e){try{let o=Ao(import.meta.url)(g(e,"package.json"));return[o?.dependencies,o?.devDependencies,o?.peerDependencies].some(r=>!!r?.["@shopify/hydrogen"])}catch{return!1}}var le=class extends et{static baseFlags={...et.baseFlags,...lo};async _run(){let t=()=>Eo(()=>super._run()),{flags:o}=await $o.Parser.parse([],{flags:ce});return o.json&&(process.env.SHOPIFY_FLAG_JSON="true"),o.json&&Te()!=="json"?Gt({outputMode:"json",sink:Vt},t):t()}async init(){if(await super.init(),!this.id?.startsWith("hydrogen:")||this.id==="hydrogen:init")return;let t=this.argv.indexOf("--"),o=t<0?this.argv:this.argv.slice(0,t);if(o.some(i=>["--help","-h","--json-schema"].includes(i))||Tt(process.env.SHOPIFY_FLAG_JSON_SCHEMA))return;let r=o.findIndex(i=>/^--path($|=)/.test(i)),n=r<0?process.env.SHOPIFY_HYDROGEN_FLAG_PATH:o[r]?.startsWith("--path=")?o[r].slice(7):o[r+1],s=n&&!n.startsWith("--")?b(Ke(),n):Ke();if(!Oo(s))throw new p("Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.","Run `shopify hydrogen init` to create a new Hydrogen project or use the `--path` flag to specify an existing Hydrogen project.");ko({id:this.id,projectPath:s})}};l();var A=ye(ke(),1);l();l();l();import{fileURLToPath as Io}from"node:url";import{existsSync as Br}from"node:fs";l();import{exec as Jr}from"node:child_process";import{promisify as Wr}from"node:util";var D=Wr(Jr);function ns(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var st=new URL("../../..",import.meta.url).pathname,Se=(()=>{try{let e=g(O(st),"templates","skeleton");return Br(e)}catch{return!1}})(),ms=Se?st:void 0,zr="assets/hydrogen",Qr="starter",Z="routes",it;async function Kr(){if(it??=await Ut("package.json",{cwd:Io(import.meta.url),type:"file"}),!it)throw new p("Could not find assets directory","Please report this error.");return it}async function U(e,...t){return g(O(await Kr()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${zr}`,e??"",...t)}async function ve(e,t){t??=await at();let o=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return o.protocol==="file:"?Io(o):o.toString()}function at(e=!!process.env.SHOPIFY_UNIT_TEST){return e?De():U(Qr)}function De(){if(!Se)throw new p("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return g(O(st),"templates","skeleton")}function Xr(){return g(De(),"node_modules")}async function _o(){if(Se)return Xr();let{stdout:e}=await D("npm root");return e.trim()}var ct=["tailwind","vanilla-extract","css-modules","postcss"];async function To(e,t,o,r=(n,s)=>n){let n=await U(e);return Promise.all(Object.entries(t).map(async([s,i])=>{let a=await R(g(n,s));await C(g(o,i),r(a,s))}))}async function jo(e,t,o){let r=Object.values(e).map(s=>w(g(t,s)).then(i=>i?s:null)),n=(await Promise.all(r)).filter(Boolean);return!(n.length>0&&!o&&!await M({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}l();l();import{readdir as Zr}from"node:fs/promises";l();Ur();import*as Fo from"fs/promises";import*as No from"path";var lt={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function V(e=process.cwd()){let t=(await Fo.lstat(e)).isFile()?e:No.resolve(e,"prettier.file");try{return await mo(t)||lt}catch{return lt}}async function ee(e,t=lt,o=""){let r=Oe(o);return go(e,{parser:r===".tsx"||r===".ts"?"typescript":"babel",...t})}async function ue(e,t,o){let r=await o(await R(e));if(typeof r=="string")return t&&(r=await ee(r,t,e)),C(e,r)}var en=["tsx","ts","jsx","js","mjs","cjs"];async function T(e,t,o=en){let r=await Zr(e);if(r.includes(t)){let n=b(e,t);if(!await _e(n))return{filepath:n};for(let s of["ts","js"]){let i=b(e,`${t}/index.${s}`);if(await w(b(e,i)))return{filepath:i,extension:s,astType:s}}}else for(let n of o){let s=`${t}.${n}`;if(r.includes(s)){let i=n==="mjs"||n==="cjs"?"js":n;return{filepath:b(e,s),extension:n,astType:i}}}return{}}var Lo=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Ue(e,t,o){let r=await Ze(g(t,"package.json")),n=await Ze(g(e,"package.json")),s=new Set(["comment",...o?.ignoredKeys??[]]),i=Object.keys(n).filter(c=>!Lo.includes(c));for(let c of i){if(s.has(c))continue;let u=n[c],f=r[c],m=Array.isArray(u)&&Array.isArray(f)?[...f,...u]:typeof u=="object"&&typeof f=="object"?{...f,...u}:u;r[c]=m}let a=Object.entries(r.dependencies||{}).find(([c])=>c.startsWith("@remix-run/"))?.[1];for(let c of Lo)s.has(c)||n[c]&&(r[c]=[...new Set([...Object.keys(r[c]??{}),...Object.keys(n[c]??{})])].sort().reduce((u,f)=>{let m=n[c]?.[f]??r[c]?.[f];return f.startsWith("@remix-run/")&&a&&(m=a),u[f]=m,u},{}));await to(t,o?.onResult?.(r)??r)}l();l();async function be(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Do(e,t,o){let{filepath:r,astType:n}=await T(e,"root");if(!r||!n)throw new p(`Could not find root file in ${e}`);await ue(r,t,async s=>{let i=`import ${o.isDefault?o.name:`{${o.name}}`} from '${(o.isAbsolute?"":"./")+o.path}';`;if(s.includes(i.split("from")[0]))return;let c=(await be(n)).parse(s).root(),u=c.findAll({rule:{kind:"import_statement"}}).reverse(),f=u.find(v=>v.text().includes(".css"))||u.shift(),m=c.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!f||!m)throw new p('Could not find a "links" export in root file. Please add one and try again.');let d=f.text(),h=m.text(),x=o.isConditional?`{${o.name} && <link rel="stylesheet" href={${o.name}}></link>}`:`<link rel="stylesheet" href={${o.name}}></link>`;return s.replace(d,d+`
|
|
1
|
+
import{a as uo,e as fo,f as po}from"./chunk-VJG7VXFU.js";import{c as mo,i as go,o as Ur}from"./chunk-2S3FHQFS.js";import{a as ho}from"./chunk-DC7ITY6T.js";import{b as et}from"./chunk-XEZPN5TR.js";import{B as je,Ma as oo,T as Yt,V as Jt,Y as Wt,qa as Bt,s as qt,ua as zt}from"./chunk-YKDRUAY3.js";import{B as eo,D as to,l as Kt,m as Xt,p as Zt,x as Ze}from"./chunk-4WBWZIN5.js";import{b as lo,c as ce}from"./chunk-DMOLPSXF.js";import{B as no,C as G,D as M,G as io,I as se,L as so,x as q,y as ie,z as Y}from"./chunk-2KUM2RU4.js";import{a as Mt,d as Vt}from"./chunk-25MYHE4W.js";import{j as Ht}from"./chunk-2KFYIYLI.js";import{a as re}from"./chunk-LG3KEHGD.js";import{i as p,l as Fe}from"./chunk-TD6JBHUS.js";import{Ba as Xe,Bb as F,Da as _e,Eb as I,Sa as w,T as jt,Va as Dt,W as Ft,Y as Nt,_ as Lt,_a as Ut,kb as Qt,la as R,oa as ne,qb as ro,ta as C,tb as J,ub as ao,va as $e,vb as ae,xa as Ie,zb as co}from"./chunk-ZMOW2YZ4.js";import{i as E}from"./chunk-B4OMIONW.js";import{b as S,i as Gt,k as Te}from"./chunk-3PYDIBTX.js";import{b as ke}from"./chunk-AE3IQG7S.js";import{a as Tt}from"./chunk-JD5P5RAJ.js";import{c as g,e as b,f as Q,h as O,i as K,j as Oe,m as Qe,p as Ke}from"./chunk-IWTNUJGY.js";import{b as Dr}from"./chunk-JFBCE4HN.js";import{e as ye,g as l}from"./chunk-VKWPEFWQ.js";l();import{createRequire as Hr}from"node:module";import{pathToFileURL as yo}from"node:url";var wo=Hr(import.meta.url);async function So(e){let t;try{t=wo.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(s){throw s instanceof Error&&s.code==="MODULE_NOT_FOUND"?new p("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):s}let o=await eo(t),r=o.content.exports?.["."];typeof r!="string"&&(r=r?.import),typeof r!="string"&&(r=r.default);let n=g(O(o.path),r);return import(yo(n).href)}function Gr(e,t){let o=wo.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(yo(o).href)}l();l();import{isAbsolute as Mr,resolve as Vr}from"node:path";var Pi=S.string().refine(Mr,"Expected an absolute native filesystem path").transform(e=>Vr(e)),vo=S.string().datetime({precision:0}),we=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefront\/\d+$/).describe("A Shopify HydrogenStorefront GID."),Ei=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontEnvironment\/\d+$/).describe("A Shopify HydrogenStorefrontEnvironment GID."),bo=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontDeployment\/\d+$/).describe("A Shopify HydrogenStorefrontDeployment GID."),xo=S.enum(["success","partial","skipped","cancelled"]),tt=S.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/).nullable();function Po(e){return new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function Ne(e){let t=e?.toLowerCase();return t&&/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(t)?t:null}l();import{format as qr}from"node:util";async function Eo(e){if(!X())return e();let t={log:console.log,info:console.info,debug:console.debug},o={...t};for(let r of["log","info","debug"])o[r]=(...n)=>{X()?Mt(["--json"],()=>F(qr(...n))):t[r](...n)},console[r]=o[r];try{return await e()}finally{for(let r of["log","info","debug"])console[r]===o[r]&&(console[r]=t[r])}}function X(){return Te()==="json"||Ht()}function Le(e,t,o=X()){return o?(co(e.encode(t)),!0):!1}l();var Co=S.object({gid:bo,createdAt:vo,commitMessage:S.string().nullable()}).strict(),ot=S.object({gid:we,name:S.string(),productionUrl:S.string().url().nullable()}).strict().describe("All projected fields are present; unavailable productionUrl is null."),Ro=ot.extend({currentProductionDeployment:Co.nullable()}).strict();function rt(e){return{gid:e.id,name:e.title,productionUrl:e.productionUrl||null}}function Ni({shop:e,storefronts:t}){return{storeDomain:Ne(e),storefronts:t.map(o=>({...rt(o),currentProductionDeployment:o.currentProductionDeployment?{gid:o.currentProductionDeployment.id,createdAt:Po(o.currentProductionDeployment.createdAt),commitMessage:o.currentProductionDeployment.commitMessage??null}:null}))}}var Li=re({name:"HydrogenListResult",schema:S.object({storeDomain:tt,storefronts:S.array(Ro)}).strict().describe("The complete list of Hydrogen storefronts for the store."),definitions:{Storefront:Ro,Deployment:Co}}),nt=re({name:"HydrogenLinkResult",schema:S.object({status:xo,changed:S.boolean(),storeDomain:tt,storefront:ot.nullable()}).strict(),definitions:{Storefront:ot}}),Di=re({name:"HydrogenUnlinkResult",schema:S.object({status:S.literal("success"),changed:S.boolean(),storefront:S.object({gid:we,name:S.string()}).strict().nullable()}).strict()});var We=ye(ke(),1);l();var $o=ye(ke(),1);l();import{createRequire as Ao}from"node:module";function ko({id:e,projectPath:t}){if(!(!e||!Yr(t,e)))throw new p(`\`shopify ${e.replace(/:/g," ")}\` is not supported by this version of Hydrogen`,"The installed version of @shopify/hydrogen disables this command.",["Use your framework or package tooling instead."])}function Yr(e,t){try{let n=Ao(g(e,"package.json"))("@shopify/hydrogen/package.json")?.shopify?.cli?.disabledCommands;return Array.isArray(n)&&n.includes(t)}catch{return!1}}function Oo(e){try{let o=Ao(import.meta.url)(g(e,"package.json"));return[o?.dependencies,o?.devDependencies,o?.peerDependencies].some(r=>!!r?.["@shopify/hydrogen"])}catch{return!1}}var le=class extends et{static baseFlags={...et.baseFlags,...lo};async _run(){let t=()=>Eo(()=>super._run()),{flags:o}=await $o.Parser.parse([],{flags:ce});return o.json&&(process.env.SHOPIFY_FLAG_JSON="true"),o.json&&Te()!=="json"?Gt({outputMode:"json",sink:Vt},t):t()}async init(){if(await super.init(),!this.id?.startsWith("hydrogen:")||this.id==="hydrogen:init")return;let t=this.argv.indexOf("--"),o=t<0?this.argv:this.argv.slice(0,t);if(o.some(i=>["--help","-h","--json-schema"].includes(i))||Tt(process.env.SHOPIFY_FLAG_JSON_SCHEMA))return;let r=o.findIndex(i=>/^--path($|=)/.test(i)),n=r<0?process.env.SHOPIFY_HYDROGEN_FLAG_PATH:o[r]?.startsWith("--path=")?o[r].slice(7):o[r+1],s=n&&!n.startsWith("--")?b(Ke(),n):Ke();if(!Oo(s))throw new p("Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.","Run `shopify hydrogen init` to create a new Hydrogen project or use the `--path` flag to specify an existing Hydrogen project.");ko({id:this.id,projectPath:s})}};l();var A=ye(ke(),1);l();l();l();import{fileURLToPath as Io}from"node:url";import{existsSync as Br}from"node:fs";l();import{exec as Jr}from"node:child_process";import{promisify as Wr}from"node:util";var D=Wr(Jr);function ns(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var st=new URL("../../..",import.meta.url).pathname,Se=(()=>{try{let e=g(O(st),"templates","skeleton");return Br(e)}catch{return!1}})(),ms=Se?st:void 0,zr="assets/hydrogen",Qr="starter",Z="routes",it;async function Kr(){if(it??=await Ut("package.json",{cwd:Io(import.meta.url),type:"file"}),!it)throw new p("Could not find assets directory","Please report this error.");return it}async function U(e,...t){return g(O(await Kr()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${zr}`,e??"",...t)}async function ve(e,t){t??=await at();let o=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return o.protocol==="file:"?Io(o):o.toString()}function at(e=!!process.env.SHOPIFY_UNIT_TEST){return e?De():U(Qr)}function De(){if(!Se)throw new p("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return g(O(st),"templates","skeleton")}function Xr(){return g(De(),"node_modules")}async function _o(){if(Se)return Xr();let{stdout:e}=await D("npm root");return e.trim()}var ct=["tailwind","vanilla-extract","css-modules","postcss"];async function To(e,t,o,r=(n,s)=>n){let n=await U(e);return Promise.all(Object.entries(t).map(async([s,i])=>{let a=await R(g(n,s));await C(g(o,i),r(a,s))}))}async function jo(e,t,o){let r=Object.values(e).map(s=>w(g(t,s)).then(i=>i?s:null)),n=(await Promise.all(r)).filter(Boolean);return!(n.length>0&&!o&&!await M({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}l();l();import{readdir as Zr}from"node:fs/promises";l();Ur();import*as Fo from"fs/promises";import*as No from"path";var lt={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function V(e=process.cwd()){let t=(await Fo.lstat(e)).isFile()?e:No.resolve(e,"prettier.file");try{return await mo(t)||lt}catch{return lt}}async function ee(e,t=lt,o=""){let r=Oe(o);return go(e,{parser:r===".tsx"||r===".ts"?"typescript":"babel",...t})}async function ue(e,t,o){let r=await o(await R(e));if(typeof r=="string")return t&&(r=await ee(r,t,e)),C(e,r)}var en=["tsx","ts","jsx","js","mjs","cjs"];async function T(e,t,o=en){let r=await Zr(e);if(r.includes(t)){let n=b(e,t);if(!await _e(n))return{filepath:n};for(let s of["ts","js"]){let i=b(e,`${t}/index.${s}`);if(await w(b(e,i)))return{filepath:i,extension:s,astType:s}}}else for(let n of o){let s=`${t}.${n}`;if(r.includes(s)){let i=n==="mjs"||n==="cjs"?"js":n;return{filepath:b(e,s),extension:n,astType:i}}}return{}}var Lo=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Ue(e,t,o){let r=await Ze(g(t,"package.json")),n=await Ze(g(e,"package.json")),s=new Set(["comment",...o?.ignoredKeys??[]]),i=Object.keys(n).filter(c=>!Lo.includes(c));for(let c of i){if(s.has(c))continue;let u=n[c],f=r[c],m=Array.isArray(u)&&Array.isArray(f)?[...f,...u]:typeof u=="object"&&typeof f=="object"?{...f,...u}:u;r[c]=m}let a=Object.entries(r.dependencies||{}).find(([c])=>c.startsWith("@remix-run/"))?.[1];for(let c of Lo)s.has(c)||n[c]&&(r[c]=[...new Set([...Object.keys(r[c]??{}),...Object.keys(n[c]??{})])].sort().reduce((u,f)=>{let m=n[c]?.[f]??r[c]?.[f];return f.startsWith("@remix-run/")&&a&&(m=a),u[f]=m,u},{}));await to(t,o?.onResult?.(r)??r)}l();l();async function be(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Do(e,t,o){let{filepath:r,astType:n}=await T(e,"root");if(!r||!n)throw new p(`Could not find root file in ${e}`);await ue(r,t,async s=>{let i=`import ${o.isDefault?o.name:`{${o.name}}`} from '${(o.isAbsolute?"":"./")+o.path}';`;if(s.includes(i.split("from")[0]))return;let c=(await be(n)).parse(s).root(),u=c.findAll({rule:{kind:"import_statement"}}).reverse(),f=u.find(v=>v.text().includes(".css"))||u.shift(),m=c.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!f||!m)throw new p('Could not find a "links" export in root file. Please add one and try again.');let d=f.text(),h=m.text(),x=o.isConditional?`{${o.name} && <link rel="stylesheet" href={${o.name}}></link>}`:`<link rel="stylesheet" href={${o.name}}></link>`;return s.replace(d,d+`
|
|
2
2
|
`+i).replace(h,x+`
|
|
3
3
|
`+h)})}async function He(e,t,o,r){let{filepath:n,astType:s}=await T(e,"vite.config");if(!n||!s)throw new p(`Could not find vite.config file in ${e}`);await ue(n,t,async i=>{let a=`import ${o.isDefault?o.name:`{${o.name}}`} from '${o.path}';`;if(new RegExp(`['"]${o.path.replace("/","\\/")}['"]`).test(i))return;let u=(await be(s)).parse(i).root(),f=u.findAll({rule:{kind:"import_statement"}}).pop(),m=u.find(tn);if(!f||!m)throw new p('Could not find a "plugins" key in Vite config file. Please add one and try again.');let d=f.text(),h=m.text(),x=`${o.name}(${r?JSON.stringify(r):""})`;return i.replace(d,d+`
|
|
4
|
-
`+a).replace(h,h.replace("[",`[${x},`))})}var tn={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Uo="styles/tailwind.css";async function Ho({rootDirectory:e,appDirectory:t},o=!1){let r=Q(e,t),n={"tailwind.css":g(r,Uo)};if(!await jo(n,e,o)){F("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Ue(await U("tailwind"),e),To("tailwind",n,e),V(e).then(i=>Promise.all([Do(t,i,{name:"tailwindCss",path:`${Uo}?url`,isDefault:!0}),He(e,i,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}l();async function Go({rootDirectory:e}){return{workPromise:Promise.all([Ue(await U("vanilla-extract"),e),V(e).then(o=>He(e,o,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ut=[...ct,"none"],ft={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},ia={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Mo(e,t,o){switch(e){case"tailwind":return Ho(t,o);case"vanilla-extract":return Go(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Vo(e){let t=Object.entries({...ft,...e?.extraChoices});return G({message:"Select a styling library",...e,choices:t.map(([o,r])=>({value:o,label:r})),defaultValue:"tailwind"})}l();l();l();l();async function te(e,t,o=!0){let{transpileTs:r}=await import("./morph-
|
|
4
|
+
`+a).replace(h,h.replace("[",`[${x},`))})}var tn={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Uo="styles/tailwind.css";async function Ho({rootDirectory:e,appDirectory:t},o=!1){let r=Q(e,t),n={"tailwind.css":g(r,Uo)};if(!await jo(n,e,o)){F("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Ue(await U("tailwind"),e),To("tailwind",n,e),V(e).then(i=>Promise.all([Do(t,i,{name:"tailwindCss",path:`${Uo}?url`,isDefault:!0}),He(e,i,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}l();async function Go({rootDirectory:e}){return{workPromise:Promise.all([Ue(await U("vanilla-extract"),e),V(e).then(o=>He(e,o,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ut=[...ct,"none"],ft={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},ia={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Mo(e,t,o){switch(e){case"tailwind":return Ho(t,o);case"vanilla-extract":return Go(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Vo(e){let t=Object.entries({...ft,...e?.extraChoices});return G({message:"Select a styling library",...e,choices:t.map(([o,r])=>({value:o,label:r})),defaultValue:"tailwind"})}l();l();l();l();async function te(e,t,o=!0){let{transpileTs:r}=await import("./morph-H7XQP55V.js");return r(e,t,o)}l();var qo={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},on=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(qo)]);function rn(e,t=!1){let o={compilerOptions:{...qo}};if(e.include&&(o.include=e.include.filter(r=>t||!r.endsWith(".d.ts")).map(r=>r.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let r of on)e.compilerOptions[r]!==void 0&&(o.compilerOptions[r]=e.compilerOptions[r]);return o}async function pt(e,t=!0){let o=g(e,"app/routes.ts");if(await w(o)){let i=(await R(o)).replace("./layout.tsx","./layout.jsx");await C(o,i)}let r=await Dt("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await V();for(let s of r){if(s.endsWith(".d.ts")){t||await Ie(s);continue}let i=await R(s),a=await ee(await te(i,s,t),n);await Ie(s),await C(s.replace(/\.ts(x?)$/,".js$1"),a)}try{let s=g(e,"remix.config.js"),i=await R(s);i=i.replace(/\/server\.ts/gim,"/server.js"),await C(s,i)}catch(s){I(`Could not change TS extensions in remix.config.js:
|
|
5
5
|
`+s.stack)}try{let s=g(e,"tsconfig.json"),i=await R(s),a=rn(JSON.parse(i.replace(/^\s*\/\/.*$/gm,"")),t);await Ie(s),await C(g(e,"jsconfig.json"),JSON.stringify(a,null,2))}catch(s){I(`Could not transpile tsconfig.json:
|
|
6
6
|
`+s.stack)}try{let s=JSON.parse(await R(g(e,"package.json")));delete s.scripts.typecheck;let i=/react-router typegen\s*&&\s*/g;for(let[a,c]of Object.entries(s.scripts||{}))typeof c=="string"&&c.includes("react-router typegen")&&(s.scripts[a]=c.replace(i,""));if(!t){delete s.devDependencies.typescript,delete s.devDependencies["@shopify/oxygen-workers-types"];for(let c of Object.keys(s.devDependencies))c.startsWith("@types/")&&delete s.devDependencies[c];let a=/\s*--codegen/;s.scripts?.dev&&(s.scripts.dev=s.scripts.dev.replace(a,"")),s.scripts?.build&&(s.scripts.build=s.scripts.build.replace(a,""))}await C(g(e,"package.json"),JSON.stringify(s,null,2))}catch(s){I(`Could not remove TS dependencies from package.json:
|
|
7
7
|
`+s.stack)}try{let{filepath:s=g(e,".eslintrc.cjs")}=await T(e,".eslintrc",["cjs","js"]),i=await R(s);t||(i=i.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),i=i.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await C(s,await ee(i,n))}catch(s){I(`Could not remove TS rules from .eslintrc:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{a as fn}from"./chunk-C72QNK6O.js";import{a as W,c as S,e as tn,g as E}from"./chunk-VKWPEFWQ.js";var z=S((dn,U)=>{"use strict";E();var D=1,P=2;function on(){return""}function un(n,e,r){return n.slice(e,r).replace(/\S/g," ")}U.exports=function(n,e){e=e||{};for(var r,f,l=!1,u=!1,i=0,p="",d=e.whitespace===!1?on:un,t=0;t<n.length;t++){if(r=n[t],f=n[t+1],!u&&r==='"'){var _=n[t-1]==="\\"&&n[t-2]!=="\\";_||(l=!l)}if(!l){if(!u&&r+f==="//")p+=n.slice(i,t),i=t,u=D,t++;else if(u===D&&r+f===`\r
|
|
2
|
+
`){t++,u=!1,p+=d(n,i,t),i=t;continue}else if(u===D&&r===`
|
|
3
|
+
`)u=!1,p+=d(n,i,t),i=t;else if(!u&&r+f==="/*"){p+=n.slice(i,t),i=t,u=P,t++;continue}else if(u===P&&r+f==="*/"){t++,u=!1,p+=d(n,i,t+1),i=t+1;continue}}}return p+(u?d(n.substr(i)):n.substr(i))}});var V=S(C=>{"use strict";E();var J=W("fs"),cn=fn(),$=W("path"),sn=z(),ln=C.parse=function(n){return/^\s*{/.test(n)?JSON.parse(sn(n)):cn.parse(n)},an=C.file=function(){var n=[].slice.call(arguments).filter(function(l){return l!=null});for(var e in n)if(typeof n[e]!="string")return;var r=$.join.apply(null,n),f;try{return J.readFileSync(r,"utf-8")}catch{return}},gn=C.json=function(){var n=an.apply(null,arguments);return n?ln(n):null},En=C.env=function(n,e){e=e||process.env;var r={},f=n.length;for(var l in e)if(l.toLowerCase().indexOf(n.toLowerCase())===0){for(var u=l.substring(f).split("__"),i;(i=u.indexOf(""))>-1;)u.splice(i,1);var p=r;u.forEach(function(t,_){!t||typeof p!="object"||(_===u.length-1&&(p[t]=e[l]),p[t]===void 0&&(p[t]={}),p=p[t])})}return r},mn=C.find=function(){var n=$.join.apply(null,[].slice.call(arguments));function e(r,f){var l=$.join(r,f);try{return J.statSync(l),l}catch{if($.dirname(r)!==r)return e($.dirname(r),f)}}return e(process.cwd(),n)}});var T=S((On,M)=>{"use strict";E();function G(n){return n instanceof Buffer||n instanceof Date||n instanceof RegExp}function H(n){if(n instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(n.length):new Buffer(n.length);return n.copy(e),e}else{if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n);throw new Error("Unexpected situation")}}function I(n){var e=[];return n.forEach(function(r,f){typeof r=="object"&&r!==null?Array.isArray(r)?e[f]=I(r):G(r)?e[f]=H(r):e[f]=K({},r):e[f]=r}),e}function Z(n,e){return e==="__proto__"?void 0:n[e]}var K=M.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var n=arguments[0],e=Array.prototype.slice.call(arguments,1),r,f,l;return e.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(i){if(f=Z(n,i),r=Z(u,i),r!==n)if(typeof r!="object"||r===null){n[i]=r;return}else if(Array.isArray(r)){n[i]=I(r);return}else if(G(r)){n[i]=H(r);return}else if(typeof f!="object"||f===null||Array.isArray(f)){n[i]=K({},r);return}else{n[i]=K(f,r);return}})}),n}});var x=S((Cn,Y)=>{"use strict";E();function pn(n,e){var r=n;e.slice(0,-1).forEach(function(l){r=r[l]||{}});var f=e[e.length-1];return f in r}function Q(n){return typeof n=="number"||/^0x[0-9a-f]+$/i.test(n)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(n)}function X(n,e){return e==="constructor"&&typeof n[e]=="function"||e==="__proto__"}Y.exports=function(n,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(o){r.bools[o]=!0});var f={};function l(o){return f[o].some(function(v){return r.bools[v]})}Object.keys(e.alias||{}).forEach(function(o){f[o]=[].concat(e.alias[o]),f[o].forEach(function(v){f[v]=[o].concat(f[o].filter(function(A){return v!==A}))})}),[].concat(e.string).filter(Boolean).forEach(function(o){r.strings[o]=!0,f[o]&&[].concat(f[o]).forEach(function(v){r.strings[v]=!0})});var u=e.default||{},i={_:[]};function p(o,v){return r.allBools&&/^--[^=]+$/.test(v)||r.strings[o]||r.bools[o]||f[o]}function d(o,v,A){for(var s=o,F=0;F<v.length-1;F++){var w=v[F];if(X(s,w))return;s[w]===void 0&&(s[w]={}),(s[w]===Object.prototype||s[w]===Number.prototype||s[w]===String.prototype)&&(s[w]={}),s[w]===Array.prototype&&(s[w]=[]),s=s[w]}var O=v[v.length-1];X(s,O)||((s===Object.prototype||s===Number.prototype||s===String.prototype)&&(s={}),s===Array.prototype&&(s=[]),s[O]===void 0||r.bools[O]||typeof s[O]=="boolean"?s[O]=A:Array.isArray(s[O])?s[O].push(A):s[O]=[s[O],A])}function t(o,v,A){if(!(A&&r.unknownFn&&!p(o,A)&&r.unknownFn(A)===!1)){var s=!r.strings[o]&&Q(v)?Number(v):v;d(i,o.split("."),s),(f[o]||[]).forEach(function(F){d(i,F.split("."),s)})}}Object.keys(r.bools).forEach(function(o){t(o,u[o]===void 0?!1:u[o])});var _=[];n.indexOf("--")!==-1&&(_=n.slice(n.indexOf("--")+1),n=n.slice(0,n.indexOf("--")));for(var h=0;h<n.length;h++){var c=n[h],a,g;if(/^--.+=/.test(c)){var L=c.match(/^--([^=]+)=([\s\S]*)$/);a=L[1];var R=L[2];r.bools[a]&&(R=R!=="false"),t(a,R,c)}else if(/^--no-.+/.test(c))a=c.match(/^--no-(.+)/)[1],t(a,!1,c);else if(/^--.+/.test(c))a=c.match(/^--(.+)/)[1],g=n[h+1],g!==void 0&&!/^(-|--)[^-]/.test(g)&&!r.bools[a]&&!r.allBools&&(!f[a]||!l(a))?(t(a,g,c),h+=1):/^(true|false)$/.test(g)?(t(a,g==="true",c),h+=1):t(a,r.strings[a]?"":!0,c);else if(/^-[^-]+/.test(c)){for(var m=c.slice(1,-1).split(""),N=!1,b=0;b<m.length;b++){if(g=c.slice(b+2),g==="-"){t(m[b],g,c);continue}if(/[A-Za-z]/.test(m[b])&&g[0]==="="){t(m[b],g.slice(1),c),N=!0;break}if(/[A-Za-z]/.test(m[b])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(g)){t(m[b],g,c),N=!0;break}if(m[b+1]&&m[b+1].match(/\W/)){t(m[b],c.slice(b+2),c),N=!0;break}else t(m[b],r.strings[m[b]]?"":!0,c)}a=c.slice(-1)[0],!N&&a!=="-"&&(n[h+1]&&!/^(-|--)[^-]/.test(n[h+1])&&!r.bools[a]&&(!f[a]||!l(a))?(t(a,n[h+1],c),h+=1):n[h+1]&&/^(true|false)$/.test(n[h+1])?(t(a,n[h+1]==="true",c),h+=1):t(a,r.strings[a]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&i._.push(r.strings._||!Q(c)?c:Number(c)),e.stopEarly){i._.push.apply(i._,n.slice(h+1));break}}return Object.keys(u).forEach(function(o){pn(i,o.split("."))||(d(i,o.split("."),u[o]),(f[o]||[]).forEach(function(v){d(i,v.split("."),u[o])}))}),e["--"]?i["--"]=_.slice():_.forEach(function(o){i._.push(o)}),i}});var rn=S((Fn,nn)=>{E();var q=V(),B=W("path").join,vn=T(),y="/etc",k=process.platform==="win32",j=k?process.env.USERPROFILE:process.env.HOME;nn.exports=function(n,e,r,f){if(typeof n!="string")throw new Error("rc(name): name *must* be string");r||(r=x()(process.argv.slice(2))),e=(typeof e=="string"?q.json(e):e)||{},f=f||q.parse;var l=q.env(n+"_"),u=[e],i=[];function p(d){if(!(i.indexOf(d)>=0)){var t=q.file(d);t&&(u.push(f(t)),i.push(d))}}return k||[B(y,n,"config"),B(y,n+"rc")].forEach(p),j&&[B(j,".config",n,"config"),B(j,".config",n),B(j,"."+n,"config"),B(j,"."+n+"rc")].forEach(p),p(q.find("."+n+"rc")),l.config&&p(l.config),r.config&&p(r.config),vn.apply(null,u.concat([l,r,i.length?{configs:i,config:i[i.length-1]}:void 0]))}});E();var en=tn(rn(),1);function hn(n){let e=(0,en.default)("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${n}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`}export{hn as a};
|
|
4
|
+
/*! Bundled license information:
|
|
5
|
+
|
|
6
|
+
deep-extend/lib/deep-extend.js:
|
|
7
|
+
(*!
|
|
8
|
+
* @description Recursive object extending
|
|
9
|
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
10
|
+
* @license MIT
|
|
11
|
+
*
|
|
12
|
+
* The MIT License (MIT)
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
15
|
+
*
|
|
16
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
17
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
18
|
+
* the Software without restriction, including without limitation the rights to
|
|
19
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
20
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
21
|
+
* subject to the following conditions:
|
|
22
|
+
*
|
|
23
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
* copies or substantial portions of the Software.
|
|
25
|
+
*
|
|
26
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
28
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
29
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
30
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
31
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
32
|
+
*)
|
|
33
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as l}from"./chunk-TD6JBHUS.js";import{Kb as o,fb as y}from"./chunk-ZMOW2YZ4.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();function p(t){if(!(typeof t.command!="string"||!Array.isArray(t.args))&&t.args.every(e=>typeof e=="string"))return{command:t.command,args:t.args}}function b(t,e){return t.type===l.Abort?e?"external":"abort":"bug"}function s(t){if(t!=null)try{let e=y(t);return typeof e=="string"?o(e):void 0}catch(e){if(e instanceof TypeError)return;throw e}}function A(t){if(!Array.isArray(t))return;let e=t.map(s).filter(n=>n!==void 0);return e.length>0?e:void 0}function j(t){if(Array.isArray(t))return t.filter(e=>Array.isArray(e)).map(e=>e.map(n=>s(n)??""))}function S(t){if(typeof t!="object"||t===null||!("body"in t))return;let e="title"in t&&typeof t.title=="string"?o(t.title):void 0,n=t.body,r=typeof n=="object"&&n!==null&&"tabularData"in n?j(n.tabularData):s(n);if(r!==void 0)return{...e?{title:e}:{},body:r}}function T(t){if(!Array.isArray(t))return;let e=t.map(S).filter(n=>n!==void 0);return e.length>0?e:void 0}function E(t){let e=typeof t=="object"&&t!==null?t:{message:t},n=p(e),r=b(e,n),g=s(e.formattedMessage)??(typeof e.message=="string"?o(e.message):"Unknown error"),f=s(e.tryMessage),u=A(e.nextSteps),d=T(e.customSections),c=e.details,a={message:g,...typeof e.code=="string"&&e.code.length>0?{code:e.code}:{},...f===void 0?{}:{tryMessage:f},...u===void 0?{}:{nextSteps:u},...d===void 0?{}:{customSections:d},...c===void 0?{}:{details:c}},i;return r==="bug"?i={type:r,...a,...typeof e.stack=="string"?{stack:o(e.stack)}:{}}:r==="external"&&n?i={type:r,...a,...n}:i={type:"abort",...a},i}export{E as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as y,v}from"./chunk-
|
|
1
|
+
import{p as y,v}from"./chunk-CZNUBAAG.js";import{a as w}from"./chunk-VRIFLMA3.js";import{da as b}from"./chunk-2PD7TNFS.js";import{b as P,c as k}from"./chunk-DMOLPSXF.js";import{y as d}from"./chunk-2KUM2RU4.js";import{a as c}from"./chunk-LG3KEHGD.js";import{i as n}from"./chunk-TD6JBHUS.js";import{Sa as u,la as l,zb as g}from"./chunk-ZMOW2YZ4.js";import{b as r}from"./chunk-3PYDIBTX.js";import{e as m,g as p,m as f}from"./chunk-IWTNUJGY.js";import{e as T,g as s}from"./chunk-VKWPEFWQ.js";s();s();var _=T(b(),1),O=["AGENTS.md","DESIGN.md","assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function j(e){let t=await x(e),o=m(e,t),a=`${e}/(${O})`;return await w({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),{path:o}}async function x(e){let t=m(e,"config/settings_schema.json");if(!await u(t))throw new n("Provide a config/settings_schema.json to package your theme.");let o=await z(t);if(o===void 0||o.theme_name===void 0)throw new n("Provide a theme_info.theme_name configuration in config/settings_schema.json.");let a=[o.theme_name,o.theme_version].filter(Boolean).join("-");if(/[/\\]/.test(a)||/^[a-z]:/i.test(a))throw new n("Theme name and version must not contain paths.");return`${a}.zip`}async function z(e){let t=(0,_.parseJSON)(await l(e),null,!0);if(!t)throw new n("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}s();var i=c({name:"ThemePackageResult",schema:r.object({path:r.string().refine(p).describe("The absolute native path of the ZIP archive.")}).strict()});s();import{resolve as F}from"node:path";function S(e,t){if(t==="json"){g(i.encode({...e,path:F(e.path)}));return}d({body:["Your local theme was packaged in",{filePath:f(e.path)}]})}var h=class extends v{static jsonOutputSchema=i;static summary="Package your theme into a .zip file, ready to upload to the Online Store.";static descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
|
|
2
2
|
|
|
3
3
|
Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
|
|
4
4
|
|
|
@@ -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-HMPRWNGG.js";import{I as f,u as A,x as z}from"./chunk-OJOF6IYG.js";import{d as X}from"./chunk-27JT4NA4.js";import{C as h,y as $}from"./chunk-2KUM2RU4.js";import{i as E,k as H}from"./chunk-TD6JBHUS.js";import{Sa as k,X as p,_ as w,pa as V,va as U,vb as G,xa as P}from"./chunk-ZMOW2YZ4.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};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{A as V,P as h,W as y,Y as W,Z as De,ba as Ae,c as j,ca as Te,d as Fe,e as K,f as be,fa as Ie,ga as G,h as _e,ha as we,ia as Re,ja as xe,ka as qe,t as Ve}from"./chunk-OJOF6IYG.js";import{d as fe}from"./chunk-F5QKMDP3.js";import{B as b,N as ce,O as ve,R as O,f as me,p as ue,q as M,ra as g,sa as B,va as L,wa as Ne,x as I,xa as w,y as ke,z as P}from"./chunk-YKDRUAY3.js";import{w as $}from"./chunk-4WBWZIN5.js";import{b as pe}from"./chunk-3FZ4LE6A.js";import{a as oe}from"./chunk-JIY6XWSC.js";import{e as re,f as le}from"./chunk-2KFYIYLI.js";import{i as k,l as _}from"./chunk-TD6JBHUS.js";import{Eb as H,Fb as he,N as E,Sa as se,fa as T,la as de,tb as ye,vb as ge}from"./chunk-ZMOW2YZ4.js";import{b as m}from"./chunk-3PYDIBTX.js";import{g as Se}from"./chunk-DOLVBTCB.js";import{e as U,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();function ze(n){return me`
|
|
2
|
+
query OrganizationBetaFlags($organizationId: OrganizationID!) {
|
|
3
|
+
organization(organizationId: $organizationId) {
|
|
4
|
+
id
|
|
5
|
+
${n.map(e=>`flag_${e}: hasFeatureFlag(handle: "${e}")`).join(`
|
|
6
|
+
`)}
|
|
7
|
+
}
|
|
8
|
+
}`}d();var Ce={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OrganizationExpFlags"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"enabledFlags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"flagHandles"},value:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}}}]},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var J=class extends k{},F=class extends k{constructor(e,i){let a="unknown",t=r=>`an ${r}`;ve(e)?(a=e.orgName,t=r=>`the ${r} organization`):ce(e)&&(a=e.email,t=r=>`the ${r} user`);let o=ge`${ye.yellow(a)}`.value,l=[[`Your current active session is associated with ${t(o)} account. To start a new session with a different account, run`,{command:"shopify auth login"}],["Have you",{link:{label:"created a Shopify Partners organization",url:"https://partners.shopify.com/signup"}},{char:"?"}],["Does your account include",{subdued:"Manage app"},"permissions?, please contact the owner of the organization to grant you access."],"Have you confirmed your accounts from the emails you received?",["Need to connect to a different App or organization? Run the command again with",{command:"--reset"}]];i&&l.push(["Do you have access to the right Shopify Partners organization? The CLI is loading",{link:{label:"this organization",url:`https://partner.shopify.com/${i}`}}]),super("No Organization found",void 0,l)}};async function gi(){let n=Ue(),e=await n.organizations();if(e.length===0){let i=await n.session();throw new F(i.accountInfo)}return e}async function hi(n,e){let i=await e.orgFromId(n);if(!i)throw new F((await e.session()).accountInfo,n);return i}async function Fi(n,e,i,a=["APP_DEVELOPMENT"]){let t=await i.storeByDomain(n.id,e,a);if(!t){let l=a.length===1&&a[0]==="APP_DEVELOPMENT"?"Ensure you have provided the correct store domain, that the store is a dev store, and that you have access to the store.":"Ensure you have provided the correct store domain and that you have access to the store.";throw new J(`Could not find store for domain ${e} in organization ${n.businessName}.`,l)}return t}d();var D=class extends k{versionTag;constructor(e){super(`Version ${e} could not be found.`),this.versionTag=e}};d();var R;(function(n){n.Partners="Partners",n.BusinessPlatform="BusinessPlatform"})(R||(R={}));var Tn="https://dev.shopify.com",In=["SHOPIFY_SERVICE_ACCOUNT_TOKEN","SHOPIFY_APP_AUTOMATION_TOKEN","SHOPIFY_CLI_PARTNERS_TOKEN"];async function wn(n){let e=Ee(n.apiSecretKeys);return e||Ee(await n.developerPlatformClient.appClientSecrets(n))}async function Ri(n,e){let i=await wn(n);if(i)return i;throw new k("This command needs the app's client secret, and the App Management API didn't return one for your credentials.",e??Me())}function Me(){let n=re(),e=In.filter(i=>n[i]!==void 0);return e.length>0?`The token in ${e[0]} might not have access to the app's client secret. To use your own account, unset ${e.join(" and ")}, log in with \`shopify auth login\`, and run the command again.`:`Check that your account can view the app's client credentials in the Developer Dashboard: ${Tn}`}function xi(){he(`SHOPIFY_API_SECRET isn't included because the App Management API didn't return the app's client secret for your credentials. ${Me()}`)}function Ee(n){return n.find(e=>e.secret)?.secret}d();var Rn=h.extend({application_url:V(m.string({required_error:"Valid URL is required"})),embedded:m.boolean({required_error:"Boolean is required",invalid_type_error:"Value must be Boolean"}),app_preferences:m.object({url:V(m.string().max(255,{message:"String must be less than 255 characters"}))}).optional()}),xn={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},Q="app_home",qn=y({identifier:Q,schema:Rn,transformConfig:xn,patchWithAppDevURLs:(n,e)=>{n.application_url=e.applicationUrl},getDevSessionUpdateMessages:async n=>[`Using URL: ${n.application_url}`]}),Pi=qn;d();var zn=h.extend({name:m.string({required_error:"String is required"}).max(30,{message:"String must be less than 30 characters"}),handle:m.string({required_error:"String is required"}).max(256,{message:"String must be less than 256 characters long"}).refine(n=>n&&/^\w*(?!-)[_a-z0-9-]+(?<!-)$/.test(n),{message:"String can't contain special characters"}).optional()}),Cn={name:"name",app_handle:"handle"},Y="branding",Un=y({identifier:Y,schema:zn,transformConfig:Cn}),ji=Un;d();var En=m.object({scopes:m.string().transform(n=>T(n)??"").optional(),required_scopes:m.array(m.string()).optional(),optional_scopes:m.array(m.string()).optional(),use_legacy_install_flow:m.boolean().optional()}),Mn=m.object({redirect_urls:m.array(V(m.string()))}),Pn=h.extend({access:m.object({admin:m.object({direct_api_mode:m.union([m.literal("online"),m.literal("offline")]).optional(),embedded_app_direct_api_access:m.boolean().optional()}).optional()}).optional(),access_scopes:En.optional(),auth:Mn}),X="app_access",Pe={access:"access",scopes:"access_scopes.scopes",required_scopes:"access_scopes.required_scopes",optional_scopes:"access_scopes.optional_scopes",use_legacy_install_flow:"access_scopes.use_legacy_install_flow",redirect_url_allowlist:"auth.redirect_urls"};function On(n){let{shop_scopes:e,...i}=n,a=typeof e=="string"?T(e):void 0;if(!a)return i;let t=typeof i.scopes=="string"?i.scopes:"";return{...i,scopes:T([t,a].join(","))}}var Bn={forward:n=>W(n,Pe),reverse:n=>W(On(n),Pe,!0)},Ln=y({identifier:X,schema:Pn,transformConfig:Bn,getDevSessionUpdateMessages:async n=>{let e=n.access_scopes!==void 0,i=n.access_scopes?.use_legacy_install_flow===!0,a=n.access_scopes?.scopes==null&&n.access_scopes?.required_scopes==null;if(i||e&&a)return["Using legacy install flow - access scopes are not auto-granted"];let t=n.access_scopes?.scopes?n.access_scopes.scopes.split(",").map(o=>o.trim()).join(", "):n.access_scopes?.required_scopes?.join(", ");return t?[`Access scopes auto-granted: ${t}`]:["App has been installed"]},patchWithAppDevURLs:(n,e)=>{e.redirectUrlWhitelist&&(n.auth={redirect_urls:e.redirectUrlWhitelist})}}),Zi=Ln;d();var Oe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"websocketUrl"},value:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"warnings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Be={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"manifest"}},type:{kind:"NamedType",name:{kind:"Name",value:"JSON"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"manifest"},value:{kind:"Variable",name:{kind:"Name",value:"manifest"}}},{kind:"Argument",name:{kind:"Name",value:"inheritedModuleUids"},value:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"warnings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Le={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var $e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchStoreByDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domain"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ShopFilterInput"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"domain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var He={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListAppDevStores"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_TYPE"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"app_development",block:!1}}]},{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_STATUS"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"ACTIVE",block:!1}}]}]}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var je={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DevStoreCapReached"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devStoreCapReached"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Ke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ProvisionShopAccess"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationUserProvisionShopAccessInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationUserProvisionShopAccess"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationUserProvisionShopAccessInput"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var We={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ActiveAppReleaseFromApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AppVersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AppVersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"App"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"organizationId"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"grantedShopifyApprovalScopes"}}]}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]}}]}}]};d();var Ge={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppClientCredentials"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientCredentials"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"secrets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReleaseVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appReleaseCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"versionId"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"release"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Je={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"metadata"}},type:{kind:"NamedType",name:{kind:"Name",value:"VersionMetadataInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appVersionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}},{kind:"Argument",name:{kind:"Name",value:"metadata"},value:{kind:"Variable",name:{kind:"Name",value:"metadata"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}}]};d();var Qe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAssetURL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SourceExtension"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appRequestSourceUploadUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sourceExtension"},value:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}}},{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceUploadUrl"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Ye={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};d();var Xe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"createdBy"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versionsCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var Ze={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppInstallCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"installCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var en={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateApp"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"initialVersion"},value:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}}},{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var nn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchSpecifications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"specifications"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"features"}},{kind:"Field",name:{kind:"Name",value:"uidStrategy"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"appModuleLimit"}},{kind:"Field",name:{kind:"Name",value:"isClientProvided"}}]}},{kind:"Field",name:{kind:"Name",value:"validationSchema"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonSchema"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var an={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"listApps"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var tn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"organizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var on={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"availableTopics"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableTopics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}}]}]}}]};d();var dn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CliTesting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"address"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"topic"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cliTesting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"address"},value:{kind:"Variable",name:{kind:"Name",value:"address"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}},{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}},{kind:"Argument",name:{kind:"Name",value:"deliveryMethod"},value:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}}},{kind:"Argument",name:{kind:"Name",value:"sharedSecret"},value:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}}},{kind:"Argument",name:{kind:"Name",value:"topic"},value:{kind:"Variable",name:{kind:"Name",value:"topic"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headers"}},{kind:"Field",name:{kind:"Name",value:"samplePayload"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var sn={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:"__typename"}}]}}]}}]};d();var rn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByTarget"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"handle"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"target"},arguments:[{kind:"Argument",name:{kind:"Name",value:"handle"},value:{kind:"Variable",name:{kind:"Name",value:"handle"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var ln={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByApiType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var ee="webhooks",$n={forward:Ae,reverse:n=>Te(n)},Hn=y({identifier:ee,schema:Ie,transformConfig:$n}),Za=Hn;d();var mn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionByTag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionTag"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionByTag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"tag"},value:{kind:"Variable",name:{kind:"Name",value:"versionTag"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};d();var un={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppLogsSubscribe"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appLogsSubscribe"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopIds"},value:{kind:"Variable",name:{kind:"Name",value:"shopIds"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jwtToken"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};d();var pn=U(B()),jn=new pn.default({minTime:150,maxConcurrent:10});async function kn(n){let e="App Dev",i=b(n.shopFqdn),t=`https://${await ke(i)}/app_dev/unstable/graphql.json`,o=pe()==="local"?{"x-forwarded-host":i}:void 0;return jn.schedule(()=>g({query:n.query,api:e,url:t,token:n.token,addedHeaders:o,variables:n.variables,unauthorizedHandler:n.unauthorizedHandler,preferredBehaviour:n.requestOptions?.requestMode}))}d();var cn=U(B()),Kn=new cn.default({minTime:150,maxConcurrent:10});async function Wn(n,e,i){let a="Functions",o=`https://${await I()}/functions/unstable/organizations/${n}/${i}/graphql`;return{token:e,api:a,url:o,responseOptions:{onResponse:qe}}}async function vn(n){return await Kn.schedule(async()=>g({...await Wn(n.organizationId,n.token,n.appId),query:n.query,variables:n.variables,unauthorizedHandler:n.unauthorizedHandler}))}d();var Nn=U(B()),Gn=new Nn.default({minTime:150,maxConcurrent:10});async function fn(n){let e="Webhooks",a=`https://${await I()}/webhooks/unstable/organizations/${n.organizationId}/graphql.json`;return Gn.schedule(()=>g({query:n.query,api:e,url:a,token:n.token,variables:n.variables,unauthorizedHandler:n.unauthorizedHandler}))}import{randomUUID as Jn}from"crypto";var Sn="https://cdn.shopify.com/static/cli/extensions/templates.json",Qn=Jn(),Yn=m.object({statusCode:m.literal(200),errors:m.array(m.object({path:m.tuple([m.literal("versionByTag")]),extensions:m.object({app_errors:m.object({errors:m.array(m.object({category:m.literal("not_found")})).nonempty()})})})).nonempty()}),q=class n{static instance;static getInstance(e){return n.instance??=new n(e),n.instance}static resetInstance(){n.instance=void 0}clientName=z.AppManagement;webUiName="Developer Dashboard";organizationSource=R.BusinessPlatform;bundleFormat="br";_session;constructor(e){this._session=e}async subscribeToAppLogs(e,i){return this.appManagementRequest({query:un,variables:{shopIds:e.shopIds,apiKey:e.apiKey}})}async appLogs(e,i){let a=await ri({organizationId:i,jwtToken:e.jwtToken,cursor:e.cursor,filters:e.filters});try{let t=await a.json();return a.ok?{app_logs:t.app_logs??[],cursor:t.cursor,status:a.status}:{errors:t.errors??[`Request failed with status ${a.status}`],status:a.status}}catch(t){return{errors:[`Failed to parse response: ${t}`],status:a.status}}}async channelSpecExport(e){let i=j(e.id)??e.id,a=await Re(e.organizationId,i),t=await M(a,{method:"GET",headers:G(await this.token())}),o;try{o=await t.json()}catch{o=void 0}let l=typeof o=="object"&&o!==null&&!Array.isArray(o)?o:void 0;return t.ok&&l?{ok:!0,status:t.status,body:l}:{ok:!1,status:t.status,body:l}}async session(){if(!this._session){if(Se())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let e=await O(),{appManagementToken:i,businessPlatformToken:a,userId:t}=e,o=await L({query:tn,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:t},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(le()&&o.currentUserAccount){let l=o.currentUserAccount.organizations.nodes.map(r=>({name:r.name}));if(l.length>1)throw new _("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:l[0]?.name??"Unknown organization"},userId:t}}else o.currentUserAccount?this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UserAccount",email:o.currentUserAccount.email},userId:t}:this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UnknownAccount"},userId:t}}return this._session}async token(){return(await this.session()).token}async businessPlatformToken(){return(await this.session()).businessPlatformToken}async unsafeRefreshToken(){let e=await O({noPrompt:!0,forceRefresh:!0}),i=await this.session();return i.token=e.appManagementToken,i.businessPlatformToken=e.businessPlatformToken,i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(e){let{app:i}=await this.activeAppVersionRawResult(e);if(!i)return;let{name:a,appModules:t}=i.activeRelease.version,o=t.find(l=>l.specification.externalIdentifier==="app_home");return{id:i.id,title:a,apiKey:i.key,apiSecretKeys:[],organizationId:String(p(i.organizationId)),grantedScopes:i.activeRoot.grantedShopifyApprovalScopes,applicationUrl:o?.config?.app_url,embedded:o?.config?.embedded,flags:[],developerPlatformClient:this}}async appClientSecrets({apiKey:e}){let{app:i}=await this.appManagementRequest({query:Ge,variables:{apiKey:e}});return i?.activeRoot.clientCredentials?.secrets.map(t=>({secret:t.key}))??[]}async organizations(){return(await be()).map(i=>({...i,source:this.organizationSource}))}async orgFromId(e){let i=await _e(e,await this.businessPlatformToken(),this.createUnauthorizedHandler("businessPlatform"));if(i)return{...i,source:this.organizationSource}}async orgAndApps(e){let[i,{apps:a,hasMorePages:t}]=await Promise.all([this.orgFromId(e),this.appsForOrg(e)]);if(!i){let{accountInfo:o}=await this.session();throw new F(o,e)}return{organization:i,apps:a,hasMorePages:t}}async appsForOrg(e,i=""){let a=an,t={query:i.split(" ").filter(r=>r).map(r=>`title:${r}`).join(" "),organizationId:e},o=await this.appManagementRequest({query:a,variables:t});if(!o.appsConnection)throw new _("Server failed to retrieve apps");return{apps:o.appsConnection.edges.map(r=>{let s=r.node;return{id:s.id,apiKey:s.key,title:s.activeRelease.version.name,organizationId:e}}),hasMorePages:o.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:e}){let i=nn,a={organizationId:ne(e)};return(await this.appManagementRequest({query:i,variables:a})).specifications.map(o=>({name:o.name,externalName:o.name,identifier:o.identifier,externalIdentifier:o.externalIdentifier,gated:!1,managementExperience:"cli",registrationLimit:o.uidStrategy.appModuleLimit,uidStrategy:si(o.uidStrategy.__typename),experience:ie(o.experience,o.identifier),validationSchema:o.validationSchema}))}async templateSpecifications({organizationId:e},i={}){let a,{templatesJsonPath:t}=Ve,o=process.env[t];if(o){if(!await se(o))throw new k("There is no file at the path specified for template specifications");let u=await de(o);a=JSON.parse(u)}else try{a=await(await ue(Sn)).json()}catch{throw new k(["Failed to fetch extension templates from",{link:{url:Sn}},{char:"."},"This likely means a problem with your internet connection."])}let l=0,r=i.requestedTemplate?a.filter(u=>u.identifier===i.requestedTemplate):void 0,s=r&&r.length>0?r:a,v=(await di(s,async u=>this.organizationBetaFlags(e,u),async u=>this.organizationExpFlags(e,u))).map(u=>({...u,sortPriority:l++})),c=[];for(let u of a)u.group&&!c.includes(u.group)&&c.push(u.group);return{templates:v,groupOrder:c}}async createApp(e,i){let t=(await this.apiVersions(e.id)).publicApiVersions.filter(c=>c!=="unstable").sort().at(-1)??"unstable",o=ei(i,e.id,t),l=en,r=await this.appManagementRequest({query:l,variables:o});if(!r.appCreate.app||r.appCreate.userErrors?.length>0){let c=r.appCreate.userErrors.map(u=>u.message).join(", ");throw new k(c)}let s=_n([]),v=r.appCreate.app;return{...v,title:i.name,apiKey:v.key,apiSecretKeys:[],grantedScopes:i?.scopesArray??[],organizationId:e.id,newApp:!0,flags:s,developerPlatformClient:this}}async devStoresForOrg(e,i){let a=await this.businessPlatformOrganizationsRequest({query:He,organizationId:String(p(e)),variables:{searchTerm:i}}),t=a.organization;if(!t)throw new k("No organization found");let o=t.accessibleShops?.edges.map(r=>r.node)??[],l=bn(t.currentUser?.organizationPermissions??[]);return{stores:gn(o,l),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async devStoreCapReached(e){return(await this.businessPlatformOrganizationsRequest({query:je,organizationId:String(p(e)),variables:{}})).organization?.devStoreCapReached??!1}async appExtensionRegistrations(e,i){let a=i??await this.activeAppVersion(e),t=[],o=[],l=[];return a.appModuleVersions.forEach(r=>{let s={id:r.registrationId,uuid:r.registrationUuid,title:r.handle,type:r.type,activeVersion:r.config?{config:JSON.stringify(r.config),...r.target&&{context:r.target}}:void 0};r.specification?.experience==="configuration"?t.push(s):r.specification?.options?.managementExperience==="dashboard"?l.push(s):o.push(s)}),{app:{dashboardManagedExtensionRegistrations:l,configurationRegistrations:t,extensionRegistrations:o}}}async appVersions({id:e,organizationId:i,title:a}){let t=Xe,o={appId:e},l=await this.appManagementRequest({query:t,variables:o});return l.app?{app:{id:l.app.id,organizationId:i,title:a,appVersions:{nodes:l.app.versions?.edges.map(r=>{let s=r.node;return{createdAt:s.createdAt,createdBy:{displayName:s.createdBy},versionTag:s.metadata.versionTag,status:s.id===l.app.activeRelease.version.id?"active":"inactive",versionId:s.id,message:s.metadata.message}})??[],pageInfo:{totalResults:l.app.versionsCount}}}}:{app:null}}async appInstallCount({id:e}){let i=Ze,a={appId:e};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:e,organizationId:i},a){let t=mn,o={appId:e,versionTag:a},r=(await this.appManagementRequest({query:t,variables:o}).catch(s=>{throw Yn.safeParse(s).success?new D(a):s})).versionByTag;if(!r)throw new D(a);return{id:parseInt(r.id,10),uuid:r.id,versionTag:r.metadata.versionTag,location:[await x({organizationId:i,id:e}),"versions",p(r.id)].join("/"),message:r.metadata.message??"",appModuleVersions:r.appModules.map(hn)}}async appVersionsDiff(e,{versionId:i}){let a={versionId:i},[t,o]=await Promise.all([this.activeAppVersionRawResult(e.apiKey),this.appManagementRequest({query:Ye,variables:a})]),l=t.app.activeRelease.version.appModules,r=o.version.appModules,{added:s,removed:v,updated:c}=oi({currentModules:l,selectedVersionModules:r});function u(N){return{uuid:N.uuid,handle:N.handle,specification:{identifier:N.specification.identifier,experience:ie(N.specification.experience,N.specification.identifier),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:s.map(u),updated:c.map(u),removed:v.map(u)}}}}async activeAppVersion(e){let i=await this.activeAppVersionRawResult(e.apiKey);return{appModuleVersions:i.app.activeRelease.version.appModules.map(hn),...i.app.activeRelease}}async generateSignedUploadUrl({apiKey:e,organizationId:i}){let a={sourceExtension:"BR",organizationId:ne(i)},t=await this.appManagementRequest({query:Qe,variables:a,cacheOptions:{cacheTTL:{minutes:59},cacheExtraKey:`${e}-${Qn}`}});return{assetUrl:t.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:t.appRequestSourceUploadUrl.userErrors}}async deploy({appManifest:e,appId:i,organizationId:a,versionTag:t,message:o,commitReference:l,bundleUrl:r,skipPublish:s}){let u={appId:i,version:r?{sourceUrl:r}:{source:e},metadata:{versionTag:t,message:o,sourceControlUrl:l}},N=await this.appManagementRequest({query:Je,variables:u,requestOptions:{requestMode:"slow-request"}}),{version:f}=N.appVersionCreate,A=N.appVersionCreate.userErrors.map(Fn)??[];if(!f)return{appDeploy:{userErrors:A}};let S={appDeploy:{appVersion:{uuid:f.id,id:parseInt(f.id,10),versionTag:f.metadata.versionTag,location:await ti(a,i,f.id),appModuleVersions:f.appModules.map(te=>({uuid:te.uuid,registrationUuid:te.uuid,validationErrors:[]})),message:f.metadata.message},userErrors:A}};if(s)return S;let An={appId:i,versionId:f.id},C=await this.appManagementRequest({query:Z,variables:An});return C.appReleaseCreate.userErrors&&(S.appDeploy.userErrors=(S.appDeploy.userErrors??[]).concat(C.appReleaseCreate.userErrors.map(Fn))),!C.appReleaseCreate.release&&S.appDeploy.userErrors.length===0&&S.appDeploy.userErrors.push({message:"The API did not return a release for the created app version.",category:"",details:[]}),S}async release({app:{id:e,organizationId:i},version:{versionId:a}}){let t={appId:e,versionId:a},o=await this.appManagementRequest({query:Z,variables:t});if(o.appReleaseCreate.release&&!o.appReleaseCreate.userErrors?.length)return{appRelease:{appVersion:{versionTag:o.appReleaseCreate.release.version.metadata.versionTag,message:o.appReleaseCreate.release.version.metadata.message,location:[await x({organizationId:i,id:e}),"versions",p(o.appReleaseCreate.release.version.id).toString()].join("/")}}};if(!o.appReleaseCreate.userErrors?.length)throw new k("The Developer Dashboard did not confirm the app version release.");return{appRelease:{userErrors:o.appReleaseCreate.userErrors?.map(l=>({field:l.field,message:l.message,category:l.category,details:[],on:l.on}))??[]}}}async storeByDomain(e,i,a){let o=(await Promise.all(a.map(s=>this.businessPlatformOrganizationsRequest({query:$e,organizationId:String(p(e)),variables:{domain:i,filters:li(s)}})))).map(s=>s.organization).filter(s=>s!=null);if(o.length===0)throw new k("No organization found");let l=o.flatMap(s=>{let v=s.accessibleShops?.edges.map(u=>u.node)??[],c=bn(s.currentUser?.organizationPermissions??[]);return gn(v,c)}),r=b(i);return l.find(s=>s.shopDomain===r)}async ensureUserAccessToStore(e,i){if(!i.provisionable)return;let t={input:{shopifyShopId:ii(i.shopId)}},l=(await w({query:Ke,token:await this.businessPlatformToken(),organizationId:String(p(e)),variables:t,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!l.success){let r=l.userErrors?.map(s=>s.message).join(", ")??"";throw new _(`Failed to provision user access to store: ${r}`)}}async sendSampleWebhook(e,i){let a=dn,t={address:e.address,apiKey:e.api_key,apiVersion:e.api_version,deliveryMethod:e.delivery_method,sharedSecret:e.shared_secret,topic:e.topic},o=await this.webhooksRequest({organizationId:i,query:a,variables:t}),l={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},r=o.cliTesting;return r&&(l={samplePayload:r.samplePayload??"{}",headers:r.headers??"{}",success:r.success,userErrors:r.errors.map(s=>({message:s,fields:[]}))}),{sendSampleWebhook:l}}async apiVersions(e){return{publicApiVersions:(await this.webhooksRequest({organizationId:e,query:sn,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:e},i){let a=on,t={apiVersion:e};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:t})).availableTopics??[]}}async updateURLs(e){return H("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async targetSchemaDefinition(e,i,a){try{let{app:t}=await this.activeAppVersionRawResult(i),o=String(p(t.id));return(await this.functionsRequest({organizationId:a,query:rn,appId:o,variables:{handle:e.handle,version:e.version}}))?.target?.api?.schema?.definition??null}catch(t){throw new k(`Failed to fetch schema definition: ${t}`)}}async apiSchemaDefinition(e,i,a){try{let{app:t}=await this.activeAppVersionRawResult(i),o=String(p(t.id));return(await this.functionsRequest({organizationId:a,query:ln,appId:o,variables:e}))?.api?.schema?.definition??null}catch(t){throw new k(`Failed to fetch schema definition: ${t}`)}}toExtensionGraphQLType(e){return e.toLowerCase()}async appDeepLink({id:e,organizationId:i}){return x({id:e,organizationId:i})}async devSessionCreate({appId:e,assetsUrl:i,shopFqdn:a,websocketUrl:t,unsafeValidation:o}){let l=String(p(e));return this.appDevRequest({query:Oe,shopFqdn:a,variables:{appId:l,assetsUrl:i??"",websocketUrl:t,unsafeValidation:o??!1},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:e,assetsUrl:i,shopFqdn:a,manifest:t,inheritedModuleUids:o,unsafeValidation:l}){let s={appId:String(p(e)),assetsUrl:i,manifest:JSON.stringify(t),inheritedModuleUids:o,unsafeValidation:l??!1};return this.appDevRequest({query:Be,shopFqdn:a,variables:s})}async devSessionDelete({appId:e,shopFqdn:i}){let a=String(p(e));return this.appDevRequest({query:Le,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(e){let i=`https://${await P()}/dashboard/${e.id}/stores`;return[`Looks like you don't have any dev stores associated with ${e.businessName}'s Dev Dashboard.`,{link:{url:i,label:"Create a store in Dev Dashboard"}}]}async activeAppVersionRawResult(e){return this.appManagementRequest({query:We,variables:{apiKey:e}})}async organizationBetaFlags(e,i){let a={organizationId:yn(e)},t=await Ne({query:ze(i),token:await this.businessPlatformToken(),organizationId:e,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),o={};return i.forEach(l=>{o[l]=!!t.organization[`flag_${l}`]}),o}async organizationExpFlags(e,i){let a={organizationId:yn(e),flagHandles:i},t=await w({query:Ce,token:await this.businessPlatformToken(),organizationId:e,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),o={},l=t.organization?.enabledFlags??[];return i.forEach((r,s)=>{o[r]=!!l[s]}),o}async appManagementRequest(e){return xe({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(e){return kn({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(e){return L({...e,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(e){return w({...e,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(e){return vn({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(e){return fn({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(e="default"){return Vn(this,e)}},Xn="https://shopify.dev/apps/default-app-home",Zn="https://shopify.dev/apps/default-app-home/api/auth";function ei(n,e,i){let{isLaunchable:a,scopesArray:t,name:o}=n;return{initialVersion:{source:{source:{name:o,modules:[{type:Q,config:{app_url:a?"https://example.com":Xn,embedded:!0}},{type:Y,config:{name:o}},{type:ee,config:{api_version:i}},{type:X,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":Zn],...t&&{scopes:t.map(v=>v.trim()).join(",")}}}]}}.source},organizationId:ne(e)}}function ni(n){let e=n.startsWith("gid://")?p(n):Number(n);if(Number.isNaN(e))throw new Error(`Invalid organization ID: ${n}`);return`gid://organization/Organization/${e}`}function yn(n){return K(ni(n))}function ne(n){return`gid://shopify/Organization/${n.startsWith("gid://")?p(n):Number(n)}`}function ii(n){return K(`gid://organization/ShopifyShop/${n}`)}function ai(n){let e=Fe(n);if(e===void 0)throw new Error(`Invalid encoded GID: ${n}`);return e}function p(n){if(n.startsWith("gid://")){let e=j(n);if(e===void 0)throw new Error(`Invalid GID: ${n}`);return Number(e)}return Number(n)}async function x({id:n,organizationId:e}){let i=p(e).toString();return`https://${await P()}/dashboard/${i}/apps/${p(n)}`}async function ti(n,e,i){return`${await x({organizationId:n,id:e})}/versions/${p(i)}`}function oi({currentModules:n,selectedVersionModules:e}){let i=n.map(s=>s.userIdentifier),a=e.map(s=>s.userIdentifier),t=e.filter(s=>!i.includes(s.userIdentifier)),o=n.filter(s=>!a.includes(s.userIdentifier)),l=o.map(s=>s.userIdentifier),r=n.filter(s=>!l.includes(s.userIdentifier));return{added:t,removed:o,updated:r}}async function di(n,e,i,a=oe){let t=E(n.flatMap(s=>s.organizationBetaFlags??[])),o=E(n.flatMap(s=>s.organizationExpFlags??[])),[l,r]=await Promise.all([t.length>0?e(t):Promise.resolve({}),o.length>0?i(o):Promise.resolve({})]);return n.filter(s=>{let v=!s.organizationBetaFlags||s.organizationBetaFlags.every(S=>l[S]),c=!s.organizationExpFlags||s.organizationExpFlags.every(S=>r[S]),u=!s.minimumCliVersion||$(a,`>=${s.minimumCliVersion}`),N=!s.deprecatedFromCliVersion||$(a,`<${s.deprecatedFromCliVersion}`),f=u&&N,A=fe(a)&&s.deprecatedFromCliVersion===void 0;return v&&c&&(f||A)})}function ie(n,e){if(e===De)return"configuration";switch(n){case"extension":case"configuration":case"deprecated":return n;default:return H(`Unknown specification experience value "${n}", defaulting to "extension"`),"extension"}}function si(n){switch(n){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function gn(n,e){return n.map(i=>{let{externalId:a,primaryDomain:t,name:o,url:l,storeType:r}=i,s=l??t;if(!s)throw new _("The selected store does not have a valid URL");return{shopId:a?ai(a):void 0,link:t,shopDomain:b(s),shopName:o,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:e,storeType:r}})}function hn(n){return{registrationId:n.userIdentifier===n.uuid?"":n.userIdentifier,registrationUuid:n.uuid,handle:n.handle,type:n.specification.externalIdentifier,config:n.config,target:n.target??"",specification:{...n.specification,identifier:n.specification.identifier,options:{managementExperience:n.specification.managementExperience},experience:ie(n.specification.experience,n.specification.externalIdentifier)}}}var ri=async({organizationId:n,jwtToken:e,cursor:i,filters:a})=>{let t=await we(n,i,a),o=G(e);return M(t,{method:"GET",headers:o})};function Fn(n){let e=[],i=n.on[0]?.user_identifier;return i&&e.push({extension_id:i}),{...n,details:e}}function li(n){return[{field:"STORE_TYPE",operator:"EQUALS",value:n.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function bn(n){return n.includes("ondemand_access_to_stores")}var z;(function(n){n.AppManagement="app-management",n.Partners="partners"})(z||(z={}));function Ue(){return q.getInstance()}var Dn;Dn||(Dn={});var mi={};function _n(n=[]){let e=[],i=n.map(a=>mi[a]);return e.filter(a=>!i.includes(a))}var ae=new WeakMap;function Vn(n,e="default"){return{type:"token_refresh",handler:async()=>{let i=ae.get(n);if(i)await i;else try{i=n.unsafeRefreshToken(),ae.set(n,i),await i}finally{ae.delete(n)}let a=await n.session();return{token:e==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{D as a,R as b,wn as c,Ri as d,Me as e,xi as f,Q as g,Pi as h,Y as i,ji as j,En as k,Mn as l,X as m,Zi as n,ee as o,Za as p,ni as q,z as r,Ue as s,Vn as t,J as u,F as v,gi as w,hi as x,Fi as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="5.1.0";export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-HVUMVDUG.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
|