shopify 5.0.1 → 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-F3OM2YO6.js → chunk-25MYHE4W.js} +1 -1
- package/dist/{chunk-HP2ZAAY7.js → chunk-27JT4NA4.js} +1 -1
- package/dist/chunk-2BYW3BYX.js +1 -0
- package/dist/chunk-2KFYIYLI.js +1 -0
- package/dist/{chunk-V654BMS7.js → chunk-2KUM2RU4.js} +60 -60
- package/dist/chunk-2PD7TNFS.js +275 -0
- package/dist/{chunk-3JACWBUC.js → chunk-3C72S6LO.js} +1 -1
- package/dist/chunk-3FZ4LE6A.js +10 -0
- package/dist/{chunk-ZBVHPC6W.js → chunk-3GD5ESWN.js} +1 -1
- package/dist/chunk-3KGN6N7E.js +1 -0
- package/dist/{chunk-X4A5D3PZ.js → chunk-3MZ7ELHS.js} +2 -2
- package/dist/{chunk-VXL5FBE7.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-C4EKNOLY.js → chunk-5C6CXU74.js} +1 -1
- package/dist/{chunk-56GKTWFF.js → chunk-5HOZDOJ7.js} +1 -1
- package/dist/{chunk-CX3ANDPI.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-QGWC23HQ.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-TTBNFGCW.js → chunk-7BPT5V24.js} +2 -2
- package/dist/{chunk-V7H7ITCF.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-63UKZLPC.js → chunk-7N7KRZOM.js} +1 -1
- package/dist/{chunk-NJVNGEOU.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-D4LFWIFE.js → chunk-ASKBYEO7.js} +1 -1
- package/dist/{chunk-LENSEW2F.js → chunk-AVJJGQOP.js} +1 -1
- package/dist/{chunk-QVVQUJQL.js → chunk-AY3AAV77.js} +1 -1
- package/dist/{chunk-DSKAIC7O.js → chunk-BFAOTQGH.js} +1 -1
- package/dist/{chunk-KGASGUDQ.js → chunk-BPKQA2EO.js} +1 -1
- package/dist/{chunk-KLYGMYXV.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-QBE6XVU3.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-WQOPLNDH.js → chunk-D7IMC2G4.js} +1 -1
- package/dist/{chunk-LGXNXAQA.js → chunk-DC7ITY6T.js} +1 -1
- package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
- package/dist/{chunk-4EDE3UH7.js → chunk-DDZYIC76.js} +2 -2
- package/dist/chunk-DGIIUQH3.js +1 -0
- package/dist/{chunk-5AWELO3D.js → chunk-DMOLPSXF.js} +1 -1
- package/dist/{chunk-GSGCSBRN.js → chunk-DOLVBTCB.js} +1 -1
- package/dist/{chunk-MXXMIPUN.js → chunk-DTKGI43P.js} +2 -2
- package/dist/{chunk-37P5YOP2.js → chunk-DVD7I2TX.js} +2 -2
- package/dist/chunk-DVFVO6ZE.js +2 -0
- package/dist/{chunk-7U2MTK6I.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-J5DUFSR4.js → chunk-F6IQWX2F.js} +1 -1
- package/dist/{chunk-XZLM4HLO.js → chunk-FAVPTYIR.js} +1 -1
- package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
- package/dist/{chunk-DVW7NDVD.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-AIEVQSI3.js → chunk-FU7PYW7H.js} +1 -1
- package/dist/{chunk-5YUDEPEY.js → chunk-FYQE5E6U.js} +1 -1
- package/dist/chunk-G3EWGBXR.js +1 -0
- package/dist/chunk-G3RNO2TC.js +1 -0
- package/dist/{chunk-7NYCJG2U.js → chunk-GGCP2TIK.js} +1 -1
- package/dist/chunk-GSFWBFFH.js +1 -0
- package/dist/{chunk-NUCDRKDW.js → chunk-H2KGP2FM.js} +2 -2
- package/dist/{chunk-PVASYKSJ.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-LR4J4KYJ.js → chunk-HSTZV6H7.js} +2 -2
- package/dist/{chunk-ZHHTQRWU.js → chunk-HVUMVDUG.js} +1 -1
- package/dist/{chunk-IY5EI5V2.js → chunk-HYCNYUHW.js} +1 -1
- package/dist/{chunk-FHNJLON5.js → chunk-I3WRA2LH.js} +1 -1
- package/dist/{chunk-MS7DTL4U.js → chunk-IRLYC626.js} +2 -2
- package/dist/chunk-IWNFPBH2.js +33 -0
- package/dist/{chunk-EA5XVQJT.js → chunk-JALDNBTU.js} +1 -1
- package/dist/{chunk-ZTZGDZCE.js → chunk-JC37YZ4I.js} +1 -1
- package/dist/{chunk-DM7BTMFP.js → chunk-JG4FAT2T.js} +1 -1
- package/dist/chunk-JGLLABZR.js +8 -0
- package/dist/chunk-JIY6XWSC.js +1 -0
- package/dist/{chunk-VG2AESTZ.js → chunk-JIYCZXK5.js} +1 -1
- package/dist/chunk-JMSAHCBU.js +35 -0
- package/dist/{chunk-CWR3IFXD.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-M73IECPW.js → chunk-KFO2JNF5.js} +1 -1
- package/dist/chunk-KFR7HWCG.js +9 -0
- package/dist/{chunk-QYFU363G.js → chunk-KHZF73BL.js} +1 -1
- package/dist/{chunk-HT66BOEC.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-75LAVRRL.js → chunk-MU7IVBGI.js} +2 -2
- package/dist/{chunk-36TZ447N.js → chunk-MYMBHVC4.js} +1 -1
- package/dist/chunk-MZDBH4XV.js +4 -0
- package/dist/{chunk-3G2PEYPI.js → chunk-NUBJ2HK7.js} +1 -1
- package/dist/{chunk-K3YALQBQ.js → chunk-NY5N4ANL.js} +1 -1
- package/dist/{chunk-364BVGRY.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-EXTVC33U.js → chunk-ONZULPQH.js} +68 -66
- package/dist/chunk-ORMXPSJM.js +1 -0
- package/dist/chunk-ORYEDUKM.js +5 -0
- package/dist/{chunk-MZCIRMZJ.js → chunk-OTMYJWIP.js} +1 -1
- package/dist/chunk-OVJVFB5E.js +20 -0
- package/dist/chunk-OWQEFORZ.js +1 -0
- package/dist/{chunk-43HKFLOU.js → chunk-OXPEBT4I.js} +2 -2
- package/dist/chunk-OXZR2MB4.js +6 -0
- package/dist/chunk-OY5M52EF.js +6 -0
- package/dist/{chunk-FK5OFLSJ.js → chunk-PJZZZNWR.js} +1 -1
- package/dist/chunk-Q2LQJYRK.js +16 -0
- package/dist/chunk-QBRRFFMZ.js +1 -0
- package/dist/{chunk-KNQXCU3Y.js → chunk-QCLE5REL.js} +2 -2
- package/dist/chunk-QGQWVA7N.js +1 -0
- package/dist/chunk-QKPAB245.js +1 -0
- package/dist/chunk-QUPZOBTB.js +1 -0
- package/dist/chunk-R4E2E4NN.js +1 -0
- package/dist/{chunk-2M4BKFYF.js → chunk-R6US7F33.js} +1 -1
- package/dist/chunk-RKNVTEO3.js +5 -0
- package/dist/{chunk-2QQ7EBJD.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-YFRI75U4.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-MMUGP3WP.js → chunk-SURFUFAZ.js} +1 -1
- package/dist/{chunk-KOTZSPZA.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-V2FCZC7U.js → chunk-TP7CTMMT.js} +1 -1
- package/dist/chunk-TSPJAMYB.js +1 -0
- package/dist/chunk-TSVEV2UD.js +26 -0
- package/dist/chunk-TTAT62N3.js +25 -0
- package/dist/{chunk-ZVEBXHEY.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-2YGPWG3I.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-EH22T4FI.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-ETXBF6Q7.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-CXPYOLGM.js → chunk-WZBZ7FWP.js} +2 -2
- package/dist/chunk-XEZPN5TR.js +22 -0
- package/dist/{chunk-AQ34X5B3.js → chunk-XLMKHTJ5.js} +1 -1
- package/dist/chunk-XRNBCV2B.js +1 -0
- package/dist/{chunk-B4ISKIXN.js → chunk-XWLNCBAG.js} +1 -1
- package/dist/chunk-YF4AXKM4.js +1 -0
- package/dist/chunk-YKDRUAY3.js +857 -0
- package/dist/{chunk-FPOZMNT2.js → chunk-YNFQBYSL.js} +1 -1
- package/dist/{chunk-2CJQQQW4.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-5XOEMYEQ.js → chunk-Z5QEXS6F.js} +1 -1
- package/dist/chunk-Z5WFRYVQ.js +6 -0
- package/dist/{chunk-P5W5RVE6.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-KA3IWOZ6.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-RSUIYNLC.js +0 -1
- package/dist/analytics-V2SDYXQJ.js +0 -1
- package/dist/chunk-2AW3KBTP.js +0 -1
- package/dist/chunk-2M535QQJ.js +0 -6
- package/dist/chunk-2NZ7GDDR.js +0 -2
- package/dist/chunk-2RFCYZMG.js +0 -47
- package/dist/chunk-2S5NPJEJ.js +0 -5
- package/dist/chunk-2TPLPZA2.js +0 -3
- package/dist/chunk-32O27NE3.js +0 -1
- package/dist/chunk-335BUVBP.js +0 -1
- package/dist/chunk-46JYM3GH.js +0 -1
- package/dist/chunk-4GQEXVDT.js +0 -1
- package/dist/chunk-4IUXLUFD.js +0 -6
- package/dist/chunk-4QZ6OBXL.js +0 -4
- package/dist/chunk-4SDCXKYR.js +0 -31
- package/dist/chunk-5AQ5JT2V.js +0 -7
- package/dist/chunk-5D4FNAAD.js +0 -3
- package/dist/chunk-5TWYJQQO.js +0 -1
- package/dist/chunk-5YXYYQBX.js +0 -1
- package/dist/chunk-6JZC6UKY.js +0 -20
- package/dist/chunk-6Y6A2QGK.js +0 -3
- package/dist/chunk-7AWAOPLA.js +0 -1
- package/dist/chunk-7XAEI4XT.js +0 -3
- package/dist/chunk-A7LBGXWG.js +0 -1
- package/dist/chunk-ADVLRSSO.js +0 -1
- package/dist/chunk-AOBE6HN6.js +0 -31
- package/dist/chunk-B2VE7WOX.js +0 -1
- package/dist/chunk-BB7GAZP6.js +0 -1
- package/dist/chunk-BNTOGZLY.js +0 -1
- package/dist/chunk-BOAGJ6P5.js +0 -1
- package/dist/chunk-BU3JQM3W.js +0 -1
- package/dist/chunk-C3LL5CZA.js +0 -1
- package/dist/chunk-CFUZ6574.js +0 -15
- package/dist/chunk-CKVVJ4XO.js +0 -1
- package/dist/chunk-CNPBDSDL.js +0 -1
- package/dist/chunk-DTRENW4Q.js +0 -272
- package/dist/chunk-E3CTHNQS.js +0 -1
- package/dist/chunk-FFSDGRAN.js +0 -1
- package/dist/chunk-FNWXMCSD.js +0 -97
- package/dist/chunk-FS5PZCZ3.js +0 -1
- package/dist/chunk-FTHVOIK7.js +0 -4
- package/dist/chunk-FVRI7ZKE.js +0 -103
- package/dist/chunk-FZCGRIOM.js +0 -1
- package/dist/chunk-GCKGQFV7.js +0 -1
- package/dist/chunk-GGJUPL4W.js +0 -6
- package/dist/chunk-GHU6YEXH.js +0 -15
- package/dist/chunk-GNPIKPHB.js +0 -1
- package/dist/chunk-H57KYDEI.js +0 -16
- package/dist/chunk-HB3MJYBK.js +0 -1
- package/dist/chunk-HNU6R7RT.js +0 -7
- package/dist/chunk-HPT3UXZ5.js +0 -4
- package/dist/chunk-HXNGLDMU.js +0 -1
- package/dist/chunk-IAL6IQYW.js +0 -16
- package/dist/chunk-IULZYDCI.js +0 -9
- package/dist/chunk-IWTOC6DG.js +0 -1
- package/dist/chunk-J3JPJCWP.js +0 -1
- package/dist/chunk-J3UXIC23.js +0 -10
- package/dist/chunk-J7BTC45S.js +0 -1
- package/dist/chunk-JMVK2BIB.js +0 -3
- package/dist/chunk-JUTULEWW.js +0 -5
- package/dist/chunk-KT5QQOES.js +0 -3
- package/dist/chunk-KVF55INC.js +0 -5
- package/dist/chunk-L6VONMA2.js +0 -5
- package/dist/chunk-LWMKZJ4M.js +0 -1
- package/dist/chunk-M2KX3PXA.js +0 -1
- package/dist/chunk-M7NLCGCP.js +0 -6
- package/dist/chunk-MHWETFNT.js +0 -1
- package/dist/chunk-MNWT2SQO.js +0 -2265
- package/dist/chunk-MU2X7NGF.js +0 -11
- package/dist/chunk-MZWPIFAM.js +0 -70
- package/dist/chunk-NCPZVARH.js +0 -836
- package/dist/chunk-NMECLRGK.js +0 -11
- package/dist/chunk-NMLLRFZF.js +0 -1
- package/dist/chunk-NPB753M3.js +0 -1
- package/dist/chunk-OH7BQZQ7.js +0 -2
- package/dist/chunk-OLKLHVHA.js +0 -22
- package/dist/chunk-OPVXPDOQ.js +0 -1
- package/dist/chunk-OQUXGAF2.js +0 -1
- package/dist/chunk-OUMERKRE.js +0 -10
- package/dist/chunk-OYGIQDME.js +0 -1
- package/dist/chunk-PNZURX3S.js +0 -1
- package/dist/chunk-PRKJVU4Y.js +0 -1
- package/dist/chunk-PXFPVGWV.js +0 -1
- package/dist/chunk-Q2ORJEB2.js +0 -25
- package/dist/chunk-QFWWCZOI.js +0 -1
- package/dist/chunk-QFYLJVJW.js +0 -77
- package/dist/chunk-QX3T6G5X.js +0 -1
- package/dist/chunk-RDXLDCMI.js +0 -3
- package/dist/chunk-REDUS6EW.js +0 -1
- package/dist/chunk-RFZNFTVM.js +0 -1
- package/dist/chunk-RIG66DIQ.js +0 -18
- package/dist/chunk-RNUEPPVN.js +0 -1
- package/dist/chunk-RWTAPWLJ.js +0 -3
- package/dist/chunk-T5YVYVSW.js +0 -1
- package/dist/chunk-UDPYSL3M.js +0 -4
- package/dist/chunk-ULMNNGGX.js +0 -6
- package/dist/chunk-URCH4ITT.js +0 -1
- package/dist/chunk-UU2R56LN.js +0 -12
- package/dist/chunk-V75WUEFU.js +0 -1
- package/dist/chunk-VXD26GIG.js +0 -1
- package/dist/chunk-W7S6SYBM.js +0 -2
- package/dist/chunk-WAY723TL.js +0 -16
- package/dist/chunk-WFOU5M4H.js +0 -16
- package/dist/chunk-WGOSE3RL.js +0 -4
- package/dist/chunk-WQ6W725N.js +0 -1
- package/dist/chunk-X7DCL5LT.js +0 -1
- package/dist/chunk-XDXHSGDL.js +0 -1
- package/dist/chunk-XKKKMV46.js +0 -6
- package/dist/chunk-XRVJJG6W.js +0 -26
- package/dist/chunk-XV6XCOTG.js +0 -319
- package/dist/chunk-XYFYQWKW.js +0 -1
- package/dist/chunk-YCUEDZDA.js +0 -1
- package/dist/chunk-YQ63ZFYT.js +0 -1
- package/dist/chunk-YXIFSIRX.js +0 -1
- package/dist/chunk-ZDQO6CNY.js +0 -1
- package/dist/chunk-ZGASBRSQ.js +0 -5
- package/dist/command-json-schema-6EGXCM4B.js +0 -1
- package/dist/conf-store-E7ELDWBA.js +0 -1
- package/dist/custom-oclif-loader-FKFZJPHF.js +0 -1
- package/dist/deprecations-RNGBHZYB.js +0 -1
- package/dist/dist-VHIZZDYK.js +0 -1
- package/dist/dist-WXI5YQYP.js +0 -1
- package/dist/environment-O7ECODHU.js +0 -1
- package/dist/environments-WZJ6MRTH.js +0 -1
- package/dist/error-IFB626JA.js +0 -1
- package/dist/error-handler-OVJYVIOZ.js +0 -1
- package/dist/fs-7UOUHJDO.js +0 -1
- package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
- package/dist/is-global-XW3CVHLK.js +0 -1
- package/dist/json-error-C2U7ZLCG.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-6JI7HF5B.js +0 -1
- package/dist/node-package-manager-X3QIEMMX.js +0 -1
- package/dist/notifications-system-OXGLT2R4.js +0 -1
- package/dist/os-NORIEVMI.js +0 -1
- package/dist/output-K3JTLRJD.js +0 -1
- package/dist/system-LTHR2T7L.js +0 -1
- package/dist/ui-MYUBVKCK.js +0 -1
- package/dist/upgrade-MFTWBXL3.js +0 -1
- package/dist/version-BNGPPAUU.js +0 -1
- package/dist/version-RCGFWSB4.js +0 -1
- package/dist/workerd-ISSXMKIH.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 h,b as w}from"./chunk-VRIFLMA3.js";import{p as f}from"./chunk-YKDRUAY3.js";import{S as d}from"./chunk-2KUM2RU4.js";import{i}from"./chunk-TD6JBHUS.js";import{Fa as m,ma as p}from"./chunk-ZMOW2YZ4.js";import{c as u}from"./chunk-IWTNUJGY.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{b as D}from"./chunk-OVJVFB5E.js";import{a as ee}from"./chunk-KHZF73BL.js";import{k as K,l as Q,m as X,o as Z}from"./chunk-YTL45RXR.js";import{a as re}from"./chunk-Z6ZRS256.js";import{a as q,c as z}from"./chunk-XLMKHTJ5.js";import{a as W}from"./chunk-R6US7F33.js";import{a as V,b as Y}from"./chunk-YY6TFARF.js";import{a as G}from"./chunk-7N7KRZOM.js";import{b as F,c as N,d as A,f as U,j as I,n as H,p as B}from"./chunk-DVFVO6ZE.js";import{d as R,e as $,g as M,h as J}from"./chunk-7HECBXSP.js";import{r as g}from"./chunk-CZNUBAAG.js";import{da as me}from"./chunk-2PD7TNFS.js";import{Da as P,Ea as _,U as E}from"./chunk-YKDRUAY3.js";import{D as L,y as k,z as O}from"./chunk-2KUM2RU4.js";import{i as v}from"./chunk-TD6JBHUS.js";import{zb as y}from"./chunk-ZMOW2YZ4.js";import{b as t,j}from"./chunk-3PYDIBTX.js";import{e as x,g as C,p as f}from"./chunk-IWTNUJGY.js";import{e as ie,g as d}from"./chunk-VKWPEFWQ.js";d();import{resolve as ae}from"node:path";var he=t.object({id:t.number(),name:t.string(),role:t.string(),shop:t.string(),editor_url:t.string(),preview_url:t.string()}),T=t.object({environment:t.string().optional(),directory:t.string().optional(),sourcePaths:t.record(t.string()).optional(),changed:t.boolean().optional(),theme:he,published:t.boolean(),hasErrors:t.boolean(),errors:t.record(t.array(t.string()))}),te=t.object({status:t.enum(["success","partial"]),changed:t.boolean(),theme:R,issues:t.array(t.object({filePath:t.string().refine(C,"Expected an absolute filesystem path."),message:t.string()}).strict())}).strict(),oe=t.object({status:t.literal("skipped"),reason:t.literal("unsafe-directory")}).strict();function w(e){let{theme:o,hasErrors:r,errors:s}=e;return{status:r?"partial":"success",changed:e.changed??!0,theme:{...J(o),storeDomain:M(o.shop),editorUrl:o.editor_url||null,previewUrl:o.preview_url||null},issues:Object.entries(s).flatMap(([n,i])=>i.map(a=>({filePath:ae(e.directory??f(),e.sourcePaths?.[n]??n),message:a})))}}var S=$({name:"ThemePushJsonResult",schema:t.union([te,oe]),definitions:{ThemePushTheme:R},project:e=>oe.safeParse(e).success||te.safeParse(e).success?e:w(T.parse(e))});d();var b=ie(me(),1);function se(e,o){if(o==="json"){y(S.encode(w(e)));return}let{environment:r,theme:s,hasErrors:n,published:i}=e,a=r?[{subdued:`Environment: ${r}
|
|
2
|
+
|
|
3
|
+
`}]:[],m=n?O:k;if(i){m({body:[...a,n?`Your theme was published with errors and is now live at https://${s.shop}`:`Your theme is now live at https://${s.shop}`]});return}m({body:[...a,"The theme",...q(s),n?"was pushed with errors":"was pushed successfully."],nextSteps:[[{link:{label:"View your theme",url:s.preview_url}}],[{link:{label:"Customize your theme at the theme editor",url:s.editor_url}}]]})}async function ne(e,o=!1,r={}){if(!e.strict)return;let s=e.environment?.[0],n=o?"json":"silent",i=e.json?n:"text",{offenses:a}=await D(e.path??f(),i,void 0,s,r);if(e.json&&!o)for(let m of a)j({type:"diagnostic",level:{[b.Severity.ERROR]:"error",[b.Severity.WARNING]:"warning",[b.Severity.INFO]:"info"}[m.severity],code:m.check,message:`${s?`[${s}] `:""}${m.uri}: ${m.message}`});if(a.some(m=>m.severity===b.Severity.ERROR))throw _(new v(`${s?`[${s}] `:""}Theme check failed. Please fix the errors before pushing.`))}function _e(e){let o=e.map(r=>{if("error"in r)return r;let s=r.result??{status:"skipped",reason:"unsafe-directory"};return T.safeParse(s).data?.hasErrors&&(process.exitCode=1),{...r,result:s}});y(S.encode({environments:o}))}d();async function ue(e,o,r,s){let n=e.environment?.[0],i=o??await E(g({store:e.store}),e.password);P("theme-service:push:setup"),re({verbose:e.verbose,noColor:e.noColor});let a=e.force??!1,m=e.path?x(e.path):f();if(!await Z(m)&&!await z(a,void 0,n,r))return;e.listing&&await Q(m,e.listing);let l=await le(i,e,r);if(l)return P("theme-service:push:setup"),ce(l,i,{allowLive:e.allowLive??!1,environment:n,force:a,ignore:e.ignore??[],multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:m,publish:e.publish??!1,listing:e.listing},s)}async function ce(e,o,r,s){P("theme-service:push:file-system");let n=await H(e.id,o),i=X(r.path,{filters:r,listing:r.listing});P("theme-service:push:file-system");let a;if(r.listing){let c=r.listing;await i.ready(),a=Object.fromEntries(await Promise.all([...i.files.keys()].map(async p=>[p,await K(r.path,c,p)??p])))}let m=ee(e,o,n,i,r,s);await m.renderThemeSyncProgress();let{uploadResults:l}=m;r.publish&&await B(e.id,o);let h={};for(let[c,p]of l)p.success||(h[c]=p.errors?.asset?.length?p.errors.asset:["File upload failed"]);let u=T.parse({environment:r.environment,directory:r.path,...a&&{sourcePaths:a},changed:e.createdAtRuntime===!0||r.publish===!0||m.hasChanges,theme:{id:e.id,name:e.name,role:e.role,shop:o.storeFqdn,editor_url:Y(e,o),preview_url:V(e,o)},published:r.publish??!1,hasErrors:[...l.values()].some(c=>!c.success),errors:h});if(u.hasErrors&&!u.changed){let c=new v(`The theme '${e.name}' could not be pushed.`);throw c.details={themeId:String(e.id),issues:w(u).issues},c}return u}async function le(e,o,r){let{live:s,development:n,unpublished:i,theme:a,environment:m,developmentContext:l}=o;if(n)return new W(e).findOrCreate(l,F);if(i){let h=a??await U("Name of the new theme"),u=await I({name:h,role:A},e);return u?{...u,createdAtRuntime:!0}:void 0}else{let h=await G(e,{create:!0,header:"Select a theme to push to:",filter:{live:s,theme:a}});return await pe(h.role,o.allowLive,e.storeFqdn,m,r)?h:void 0}}async function pe(e,o,r,s,n){if(e===N){if(o)return!0;if(n)throw new v(`Can't push theme files to the live theme on ${r}. Use the --allow-live flag.`);let i={message:`Push theme files to the ${e} theme on ${r}?`,confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return L(i)}return!0}async function Qe(e,o,r,s){let n=o??await E(g({store:e.store}),e.password);await ne(e,!0);let i=await ue(e,n,r,s);i&&se(i,e.json?"json":"text")}export{T as a,w as b,S as c,se as d,ne as e,_e as f,ue as g,Qe as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as T,c as O,d as R}from"./chunk-FQLXQ7WN.js";import{$ as p,E as v,Q as n,S as P,W as b,a as A,ba as j,ca as k,ia as a,ja as u,ka as h}from"./chunk-A2NSORBM.js";import{b as w}from"./chunk-XEZPN5TR.js";import{b as g,c as I}from"./chunk-DMOLPSXF.js";import{a as f}from"./chunk-LG3KEHGD.js";import{zb as S}from"./chunk-ZMOW2YZ4.js";import{b as o}from"./chunk-3PYDIBTX.js";import{b as _}from"./chunk-AE3IQG7S.js";import{e as d}from"./chunk-IWTNUJGY.js";import{e as C,g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var F=o.object({path:a().describe("The absolute path of the file that the instructions were written to."),format:o.literal("markdown").describe("The file holds the instructions in Markdown, not a JSON result.")}).strict(),c=f({name:"AppSecurityInstructionsResult",schema:o.union([o.object({status:o.literal("success"),app:u,resultsDirectory:a().describe("The absolute path of the results directory that the instructions use. It may not exist yet: the instructions start by running check, which creates it."),instructions:h}).strict(),F]).describe("The instructions and the app they are for. With --write, only the file they were written to."),definitions:{AppSecurityApp:u,AppSecurityInstructions:h,AppSecurityInstructionsFile:F}});function x(r,t,e){if(e==="json"){S(c.encode(W(r,t)));return}R(r,t.delivery)}function W(r,{selection:t,delivery:e}){if(e.writePath)return{path:p(e.writePath),format:"markdown"};let{resultsDirectory:s}=v(t.appDirectory,n(t));return{status:"success",app:j(t),resultsDirectory:p(s),instructions:k(r,e)}}var l=C(_(),1);var m=class r extends w{static summary="Provide app security check instructions to a coding agent.";static descriptionWithMarkdown="Prints the complete workflow that a coding agent should follow to review app security check results.\n\nBy default, the instructions are printed to stdout. Use `--copy` to copy them to the clipboard or `--write` to write them to a file. Standalone instructions always start by running `shopify app security check`; only that invocation's generated review pack is trusted as workflow input.\n\nThe agent records its findings with `shopify app security record`. A suppression in those findings applies only to them, until the next `record`: `record` never changes `shopify.app-security.json`. To save a suppression that you approve to that file, the agent runs `shopify app security review --suppress`. Review and commit the file.";static jsonOutputSchema=c;static description=this.descriptionWithoutMarkdown();static flags={...g,...A,copy:l.Flags.boolean({description:"Copy the instructions to the clipboard instead of printing them. With --json, the result still includes them.",default:!1,exclusive:["write"],env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_COPY"}),write:l.Flags.string({description:"Write the instructions to a file instead of printing them. With --json, stdout contains only the absolute path and Markdown format of the written file.",exclusive:["copy"],parse:async t=>d(t),env:"SHOPIFY_FLAG_APP_SECURITY_INSTRUCTIONS_WRITE"}),...I};async run(){let{flags:t}=await this.parse(r),e=await P({path:t.path,config:t.config,clientId:t["client-id"],withoutAppConfig:t["without-app-config"],allowPrompts:!1}),s=T({appDirectory:e.appDirectory,resultsKey:n(e),commands:b(e,t.path)}),y={copy:t.copy,writePath:t.write};await O(s,y),x(s,{selection:e,delivery:y},t.json?"json":"text")}};export{m as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ti}from"./chunk-LQ7ENG4V.js";import{$ as ci,$a as Fi,A as kt,Aa as Ei,B as Cr,Ba as so,C as ei,Ca as ao,D as ti,Da as co,E as Or,Ea as Pi,F as oi,Fa as lo,G as Dr,Ga as mo,H as Zt,Ha as xi,I as eo,Ia as uo,J as ot,Ja as po,K as ri,Ka as We,L as w,La as fo,M as G,Ma as ho,N as ni,Na as Ci,O as ke,Oa as Oi,P as to,Pa as Di,Q as Et,Qa as yo,R as rt,Ra as Je,S as Oe,Sa as at,T as ii,Ta as Pt,U as _e,Ua as wo,V as De,Va as ct,W as si,Wa as vo,X as oo,Xa as Ii,Y as we,Ya as $i,Z as Rr,Za as ji,_ as ai,_a as bo,a as Bn,aa as Tr,ab as Ai,b as de,ba as Ir,bb as _i,c as j,ca as nt,d as B,da as it,e as Gn,ea as li,f as Er,fa as ro,g as Yn,ga as di,h as qn,ha as mi,i as Wn,ia as ui,ib as Ni,j as Jn,ja as pi,k as zn,ka as fi,l as R,la as qe,m as Ze,ma as hi,n as Qn,na as X,o as Ye,oa as st,p as Ce,pa as gi,q as et,qa as yi,r as Kn,ra as no,s as Xn,sa as io,t as Pr,ta as wi,u as tt,ua as ve,v as St,va as vi,w as Ae,wa as bi,x as Zn,xa as $r,y as Xt,ya as Si,z as xr,za as ki}from"./chunk-
|
|
1
|
+
import{b as Ti}from"./chunk-LQ7ENG4V.js";import{$ as ci,$a as Fi,A as kt,Aa as Ei,B as Cr,Ba as so,C as ei,Ca as ao,D as ti,Da as co,E as Or,Ea as Pi,F as oi,Fa as lo,G as Dr,Ga as mo,H as Zt,Ha as xi,I as eo,Ia as uo,J as ot,Ja as po,K as ri,Ka as We,L as w,La as fo,M as G,Ma as ho,N as ni,Na as Ci,O as ke,Oa as Oi,P as to,Pa as Di,Q as Et,Qa as yo,R as rt,Ra as Je,S as Oe,Sa as at,T as ii,Ta as Pt,U as _e,Ua as wo,V as De,Va as ct,W as si,Wa as vo,X as oo,Xa as Ii,Y as we,Ya as $i,Z as Rr,Za as ji,_ as ai,_a as bo,a as Bn,aa as Tr,ab as Ai,b as de,ba as Ir,bb as _i,c as j,ca as nt,d as B,da as it,e as Gn,ea as li,f as Er,fa as ro,g as Yn,ga as di,h as qn,ha as mi,i as Wn,ia as ui,ib as Ni,j as Jn,ja as pi,k as zn,ka as fi,l as R,la as qe,m as Ze,ma as hi,n as Qn,na as X,o as Ye,oa as st,p as Ce,pa as gi,q as et,qa as yi,r as Kn,ra as no,s as Xn,sa as io,t as Pr,ta as wi,u as tt,ua as ve,v as St,va as vi,w as Ae,wa as bi,x as Zn,xa as $r,y as Xt,ya as Si,z as xr,za as ki}from"./chunk-IRLYC626.js";import{a as An}from"./chunk-JLGA3B7P.js";import{b as Vn}from"./chunk-FAVPTYIR.js";import{b as _n,c as Nn,d as Kt,h as Hn,j as Ln,k as Mn,l as Un}from"./chunk-VJG7VXFU.js";import{a as Pa}from"./chunk-UWHAOGO4.js";import{a as So}from"./chunk-FKIVKNOV.js";import{a as go,b as Ri}from"./chunk-DC7ITY6T.js";import{La as Ea,m as Cn,p as Se,qa as ge}from"./chunk-YKDRUAY3.js";import{B as $n,l as Dn,m as Pe,p as Yt,s as Rn,u as Tn,x as In}from"./chunk-4WBWZIN5.js";import{c as $}from"./chunk-DMOLPSXF.js";import{B as Wt,C as $e,D as Te,G as ne,L as Jt,R as kr,a as Gt,x as W,y as H,z as te}from"./chunk-2KUM2RU4.js";import{a as xn}from"./chunk-25MYHE4W.js";import{c as En}from"./chunk-QBRRFFMZ.js";import{a as Y}from"./chunk-LG3KEHGD.js";import{i as g,l as zt}from"./chunk-TD6JBHUS.js";import{Ab as Qt,Ba as vr,Bb as A,Cb as jn,Da as Bt,Db as Fe,Eb as Fn,Fa as Sn,Fb as V,Ga as kn,Gb as ye,Ja as br,Kb as Ge,Na as Sr,Sa as K,U as Mt,Va as vt,_ as vn,la as ue,ma as bn,oa as Ut,ob as On,pa as wr,qb as qt,ta as oe,tb as xe,va as Vt,vb as ee,xa as Ee,xb as je}from"./chunk-ZMOW2YZ4.js";import{i as M}from"./chunk-B4OMIONW.js";import{b as u,j as Be,k as Pn}from"./chunk-3PYDIBTX.js";import{s as bt}from"./chunk-DOLVBTCB.js";import{b as me}from"./chunk-AE3IQG7S.js";import{a as yn}from"./chunk-JD5P5RAJ.js";import{c as O,e as P,f as le,h as yr,i as Xe,j as wn}from"./chunk-IWTNUJGY.js";import{a as ka}from"./chunk-O472FAYX.js";import{e as re,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();var jr=Y({name:"HydrogenBuildResult",definitions:{AbsolutePath:B},schema:u.object({directory:B,clientDirectory:B,serverDirectory:B,serverPath:B}).strict()});var Do=re(me(),1);c();c();var ko=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function xa(e){let t="No lockfile found",o="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",r=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new g(t,o,r);te({headline:t,body:o,nextSteps:r})}function Ca(e,t){let o=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),r="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
|
|
2
2
|
`,{list:{items:o}}],i=["Delete any unneeded lockfiles","Commit the change to your repository"];if(t)throw new g(r,n,i);te({headline:r,body:n,nextSteps:i})}function Oa(e){let t="Lockfile ignored by Git",o="Your project\u2019s lockfile isn\u2019t being tracked by Git. If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying.",r=[`In your project\u2019s .gitignore file, delete any references to ${e}`,"Commit the change to your repository"];te({headline:t,body:o,nextSteps:r})}async function Hi(e,t=!1){if(Ye&&!process.env.SHOPIFY_UNIT_TEST)return;let o=[];for(let i of ko){let s=[i.lockfile,...i.alternativeLockfiles||[]];for(let a of s)if(await K(P(e,a))){o.push({packageManager:i,foundLockfile:a});break}}if(o.length===0)return xa(t);if(o.length>1)return Ca(o,t);let r=o[0].foundLockfile;(await _n(e,[r]).catch(()=>[])).length>0&&Oa(r)}c();var Da=["^cdn/","^_t/"];function Eo(e){let t=new Set;return Object.values(e.routes).filter(o=>Da.some(r=>new RegExp(r).test(o.path??""))).forEach(o=>{o.path&&t.add(o.path)}),[...t]}var Ra=["","cart","products/:productHandle","collections","collections/:collectionHandle","sitemap.xml","robots.txt","pages/:pageHandle","policies/:policyHandle","search","account","account/login","account/orders/:orderId","account/authorize"];function Po(e,t=Ra){let o=Object.values(e.routes),r=new Set(t);for(let n of t)for(let i of o)if(!n&&!i.path)r.delete(n);else if(n&&i.path){let s={path:i.path,parentId:i.parentId};for(;s.parentId&&s.parentId!=="root";){let m=o.find(l=>l.id===s.parentId);if(!m)break;s.path=m.path==null?s.path:`${m.path}/${s.path}`,s.parentId=m.parentId}let a=":?[^\\/\\?]+\\?",d=`^(${a}\\/)?`+n.replaceAll(".","\\.").replace(/\//g,`\\/(${a}\\/)?`).replace(/:[^/)?]+/g,"(:[^\\/]+|\\*)")+`(\\/${a})?$`;new RegExp(d).test(s.path)&&r.delete(n)}return[...r]}var Ne=100;function Li(e){e.length?te({headline:"Standard Shopify routes missing",body:`Your Hydrogen project is missing ${e.length} standard Shopify route${e.length>1?"s":""}.
|
|
3
3
|
Including these routes improves compatibility with Shopify\u2019s platform:
|
|
4
4
|
|
|
@@ -247,7 +247,7 @@ Skip the flag or provide the name of a template or a URL to a git repository.`,{
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
`;async function la(e){let{hydrogenStorefronts:t}=await nt(Pl,e);return t.map(o=>({...o,parsedId:it(o.id)}))}var tr=class e extends R{static get jsonOutputSchema(){return Tr}static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await Cl(t,t.json)}};async function xl({path:e=process.cwd()}){let{session:t}=await ve(e),o=await la(t);return{shop:t.storeFqdn,storefronts:o}}async function Cl(e,t){let o=await xl(e);return j(Tr,ci(o),t)||await Ol(o,e.path),o}async function Ol({shop:e,storefronts:t},o){t.length>0?(ye(),A(Tl({storefronts:t,shop:e}).toString()),t.forEach(({currentProductionDeployment:r,id:n,productionUrl:i,title:s})=>{ye(),A(ee`${M.whiteBright(s)} ${M.dim(`(id: ${it(n)})`)}`.value),i&&A(ee` ${M.whiteBright(i)}`.value),r&&A(ee` ${M.dim(Rl(r))}`.value)})):W({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${e})`,`Create a new Hydrogen storefront: Run \`${await X(o)} link\` or visit ${$s({storeFqdn:e})}`]})}var Dl=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Rl(e){let t="";if(!e)return t;if(t+=Dl.format(new Date(e.createdAt)),e.commitMessage){let o=e.commitMessage.split(/\n/)[0];t+=`, ${o}`}return t}var Tl=({storefronts:e,shop:t})=>Mt(e,o=>`Showing ${o.length} Hydrogen storefronts for the store ${t}`,o=>`Showing 1 Hydrogen storefront for the store ${t}`);c();c();var nn=Y({name:"HydrogenLoginResult",schema:u.object({storeDomain:Wn,name:u.string().nullable(),email:u.string().email().nullable()}).strict()}),sn=Y({name:"HydrogenLogoutResult",schema:u.object({status:u.literal("success"),loggedOut:u.literal(!0)}).strict()});var or=class e extends R{static get jsonOutputSchema(){return nn}static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.shop};async run(){let{flags:t}=await this.parse(e);await Il(t,t.json)}};async function Il({path:e=process.cwd(),shop:t},o){ye(),gi(!0);let{config:r}=await ve(e,t??!0),{shop:n,shopName:i,email:s}=r,a={storeDomain:zn(n),name:i||null,email:s||null};return j(nn,a,o)||vi(r),a}c();var rr=class e extends R{static get jsonOutputSchema(){return sn}static descriptionWithMarkdown="Log out from the current shop.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await $l(t,t.json)}};async function $l({path:e=process.cwd()},t){ye(),await wi(e);let o={status:"success",loggedOut:!0};return j(sn,o,t)||H({body:"You are logged out from Shopify."}),o}c();var an=re(me(),1);c();async function da(e){let{startWorkerdServer:t}=await import("./workerd-ISSXMKIH.js");return t(e)}var nr=class e extends R{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...w.path,...w.port,...w.env,...w.envBranch,...w.envFile,...w.inspectorPort,...w.debug,...w.verbose,build:an.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:an.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ke(w.entry,{entry:{dependsOn:["build"]}}),...ke(w.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd(),{close:r}=await jl({...G(t),directory:o});He(async()=>{await r()})}};async function jl({port:e,directory:t,env:o,envBranch:r,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:d=!1,codegen:m=!1,codegenConfigPath:l,entry:f,envFile:p}){process.env.NODE_ENV||(process.env.NODE_ENV=d?"development":"production"),s&&no(),io()||st();let{root:y,buildPath:h,buildPathWorkerFile:b,buildPathClient:v}=Oe(t),S=await rt(y);if(S)throw new g(De);let k,x=Ot(),T=a?await ze({...{directory:y,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:m,codegenConfigPath:l},watch:d,async onServerBuildFinish(){x.state==="pending"?x.resolve():A("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await k?.reload()}}):x.resolve();S||(b=(await we(y).catch(()=>null))?.serverOutFile??O(h,"server","index.js"));let{shop:_,storefront:E}=await ro(y),D=!!_&&!!E?.id,{allVariables:q,logInjectedVariables:I}=await vo({root:y,fetchRemote:D,envBranch:r,envHandle:o,envFile:p});e||(e=await pt(ot));let N=await pt(e+100);return await x.promise,I(),k=await da({root:y,appPort:e,assetsPort:N,env:q,buildPathClient:v,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:d}),k.showBanner({mode:"preview",headlinePrefix:d?"Watching for changes. ":""}),{async close(){await Promise.allSettled([k.close(),T?.close()])}}}c();c();var cn=Y({name:"HydrogenSetupResult",schema:u.object({status:u.literal("success"),changed:u.boolean(),directory:B,name:u.string(),i18n:u.enum(["subfolders","domains","subdomains"]).nullable(),routes:u.array(Qo),routeGroups:u.record(u.array(u.string())),shortcut:u.boolean()}).strict()}),ln=Y({name:"HydrogenSetupCssResult",definitions:{AbsolutePath:B},schema:u.object({status:u.enum(["success","cancelled"]),changed:u.boolean(),directory:B,strategy:u.enum(["tailwind","vanilla-extract","css-modules","postcss"]),filePaths:u.array(B),dependenciesInstalled:u.boolean(),needsNpmReinstall:u.boolean()}).strict()}),dn=Y({name:"HydrogenSetupMarketsResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,strategy:u.enum(["subfolders","domains","subdomains"]),serverPath:B.nullable()}).strict()}),mn=Y({name:"HydrogenSetupViteResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,viteConfigPath:B,serverPath:B,dependenciesInstalled:u.literal(!0),needsMdxSetup:u.boolean()}).strict()});var ir=class e extends R{static get jsonOutputSchema(){return cn}static descriptionWithMarkdown="Scaffold routes and core functionality.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...w.markets,...w.shortcut,...ke(w.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd();await Al({...G(t),directory:o},t.json)}};async function Fl(e){let t=new Gt,{rootDirectory:o,appDirectory:r}=await _e(e.directory),n=Xe(o),i=X(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],d=e.markets?e.markets:await eo({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),m=d==="none"?void 0:d,{setupRoutes:l}=so(t),f={},p=[],y=await Kn(".."),[h,b]=await Promise.all([K(O(o,"tsconfig.json")),vt("*.d.ts",{cwd:y})]);s=s.then(()=>Promise.all([...b.map(C=>Ut(O(y,C),P(o,C))),ao({rootDirectory:o,appDirectory:r,typescript:h})])).then(async()=>{let C=await l(o,h?"ts":"js",{i18nStrategy:m,overwriteFileDeps:!0});f=C.routeGroups,p=C.routes}),m&&(s=s.then(()=>Zt(m,{rootDirectory:o})));let v=await Promise.resolve(i),{createShortcut:S,showShortcutBanner:k}=await co(t,v,e.shortcut);if(!m&&!S)return await s,{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:!1,cliCommand:v,showSummary:!1};let x=!1;return S&&(s=s.then(async()=>{await S()&&(x=!0,v=qe)}),k()),await ne(a),{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:x,cliCommand:v,showSummary:!0}}async function Al(e,t){let o=await Fl(e);return!j(cn,{status:"success",changed:!0,directory:P(o.directory),name:o.name,i18n:o.i18n??null,routes:o.generatedRoutes.map(({sourceRoute:r,destinationRoute:n,operation:i,skipReason:s})=>({sourceRoute:r,destinationRoute:n,operation:i,...s?{skipReason:s}:{}})),routeGroups:o.routes,shortcut:o.shortcut},t)&&o.showSummary&&await fo(o,{cliCommand:o.cliCommand,depsInstalled:!0,packageManager:"npm",i18n:o.i18n,routes:o.routes}),o}c();var ma=re(me(),1);var sr=class e extends R{static get jsonOutputSchema(){return ln}static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...ke(w.installDeps,{"install-deps":{default:!0}})};static args={strategy:ma.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${Pr.join()}`,options:Pr})};async run(){let{flags:t,args:o}=await this.parse(e),r=t.path?P(t.path):process.cwd();await Nl({...G(t),strategy:o.strategy,directory:r},t.json)}};async function _l({strategy:e,directory:t,force:o=!1,installDeps:r=!0}){let n=await we(t).catch(()=>null);if(!n)throw new g("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await ti(),a={directory:i.rootDirectory,strategy:s,files:[],dependenciesInstalled:!1,needsNpmReinstall:!1};if(s==="css-modules"||s==="postcss")return{...a,status:"built-in"};let d=await ei(s,i,o);if(!d)return{...a,status:"cancelled"};let{workPromise:m,generatedAssets:l,needsInstallDeps:f}=d,p=[{title:"Updating files",task:async()=>{await m}}],y=!1;if(r&&f){let h=Pe(i.rootDirectory);p.push({title:"Installing new dependencies",task:async()=>{let b=await h;y=b==="npm"||b==="unknown",await Yt({directory:i.rootDirectory,packageManager:b,args:[]})}})}return await ne(p),{...a,status:"configured",files:l,dependenciesInstalled:!!(r&&f),needsNpmReinstall:!!(f&&y&&s==="tailwind")}}async function Nl(e,t){let o=await _l(e);return j(ln,{status:o.status==="cancelled"?"cancelled":"success",changed:o.status==="configured",directory:P(o.directory),strategy:o.strategy,filePaths:o.files.map(r=>P(o.directory,r)),dependenciesInstalled:o.dependenciesInstalled,needsNpmReinstall:o.needsNpmReinstall},t)||Hl(o),o}function Hl(e){let{strategy:t,files:o}=e;if(e.status!=="cancelled"){if(e.status==="built-in"){H({headline:`Vite works out of the box with ${kt[t]}.`,body:`See the Vite documentation for more information:
|
|
250
|
+
`;async function la(e){let{hydrogenStorefronts:t}=await nt(Pl,e);return t.map(o=>({...o,parsedId:it(o.id)}))}var tr=class e extends R{static get jsonOutputSchema(){return Tr}static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await Cl(t,t.json)}};async function xl({path:e=process.cwd()}){let{session:t}=await ve(e),o=await la(t);return{shop:t.storeFqdn,storefronts:o}}async function Cl(e,t){let o=await xl(e);return j(Tr,ci(o),t)||await Ol(o,e.path),o}async function Ol({shop:e,storefronts:t},o){t.length>0?(ye(),A(Tl({storefronts:t,shop:e}).toString()),t.forEach(({currentProductionDeployment:r,id:n,productionUrl:i,title:s})=>{ye(),A(ee`${M.whiteBright(s)} ${M.dim(`(id: ${it(n)})`)}`.value),i&&A(ee` ${M.whiteBright(i)}`.value),r&&A(ee` ${M.dim(Rl(r))}`.value)})):W({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${e})`,`Create a new Hydrogen storefront: Run \`${await X(o)} link\` or visit ${$s({storeFqdn:e})}`]})}var Dl=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Rl(e){let t="";if(!e)return t;if(t+=Dl.format(new Date(e.createdAt)),e.commitMessage){let o=e.commitMessage.split(/\n/)[0];t+=`, ${o}`}return t}var Tl=({storefronts:e,shop:t})=>Mt(e,o=>`Showing ${o.length} Hydrogen storefronts for the store ${t}`,o=>`Showing 1 Hydrogen storefront for the store ${t}`);c();c();var nn=Y({name:"HydrogenLoginResult",schema:u.object({storeDomain:Wn,name:u.string().nullable(),email:u.string().email().nullable()}).strict()}),sn=Y({name:"HydrogenLogoutResult",schema:u.object({status:u.literal("success"),loggedOut:u.literal(!0)}).strict()});var or=class e extends R{static get jsonOutputSchema(){return nn}static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.shop};async run(){let{flags:t}=await this.parse(e);await Il(t,t.json)}};async function Il({path:e=process.cwd(),shop:t},o){ye(),gi(!0);let{config:r}=await ve(e,t??!0),{shop:n,shopName:i,email:s}=r,a={storeDomain:zn(n),name:i||null,email:s||null};return j(nn,a,o)||vi(r),a}c();var rr=class e extends R{static get jsonOutputSchema(){return sn}static descriptionWithMarkdown="Log out from the current shop.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await $l(t,t.json)}};async function $l({path:e=process.cwd()},t){ye(),await wi(e);let o={status:"success",loggedOut:!0};return j(sn,o,t)||H({body:"You are logged out from Shopify."}),o}c();var an=re(me(),1);c();async function da(e){let{startWorkerdServer:t}=await import("./workerd-5UPTEWNI.js");return t(e)}var nr=class e extends R{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...w.path,...w.port,...w.env,...w.envBranch,...w.envFile,...w.inspectorPort,...w.debug,...w.verbose,build:an.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:an.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ke(w.entry,{entry:{dependsOn:["build"]}}),...ke(w.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd(),{close:r}=await jl({...G(t),directory:o});He(async()=>{await r()})}};async function jl({port:e,directory:t,env:o,envBranch:r,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:d=!1,codegen:m=!1,codegenConfigPath:l,entry:f,envFile:p}){process.env.NODE_ENV||(process.env.NODE_ENV=d?"development":"production"),s&&no(),io()||st();let{root:y,buildPath:h,buildPathWorkerFile:b,buildPathClient:v}=Oe(t),S=await rt(y);if(S)throw new g(De);let k,x=Ot(),T=a?await ze({...{directory:y,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:m,codegenConfigPath:l},watch:d,async onServerBuildFinish(){x.state==="pending"?x.resolve():A("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await k?.reload()}}):x.resolve();S||(b=(await we(y).catch(()=>null))?.serverOutFile??O(h,"server","index.js"));let{shop:_,storefront:E}=await ro(y),D=!!_&&!!E?.id,{allVariables:q,logInjectedVariables:I}=await vo({root:y,fetchRemote:D,envBranch:r,envHandle:o,envFile:p});e||(e=await pt(ot));let N=await pt(e+100);return await x.promise,I(),k=await da({root:y,appPort:e,assetsPort:N,env:q,buildPathClient:v,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:d}),k.showBanner({mode:"preview",headlinePrefix:d?"Watching for changes. ":""}),{async close(){await Promise.allSettled([k.close(),T?.close()])}}}c();c();var cn=Y({name:"HydrogenSetupResult",schema:u.object({status:u.literal("success"),changed:u.boolean(),directory:B,name:u.string(),i18n:u.enum(["subfolders","domains","subdomains"]).nullable(),routes:u.array(Qo),routeGroups:u.record(u.array(u.string())),shortcut:u.boolean()}).strict()}),ln=Y({name:"HydrogenSetupCssResult",definitions:{AbsolutePath:B},schema:u.object({status:u.enum(["success","cancelled"]),changed:u.boolean(),directory:B,strategy:u.enum(["tailwind","vanilla-extract","css-modules","postcss"]),filePaths:u.array(B),dependenciesInstalled:u.boolean(),needsNpmReinstall:u.boolean()}).strict()}),dn=Y({name:"HydrogenSetupMarketsResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,strategy:u.enum(["subfolders","domains","subdomains"]),serverPath:B.nullable()}).strict()}),mn=Y({name:"HydrogenSetupViteResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,viteConfigPath:B,serverPath:B,dependenciesInstalled:u.literal(!0),needsMdxSetup:u.boolean()}).strict()});var ir=class e extends R{static get jsonOutputSchema(){return cn}static descriptionWithMarkdown="Scaffold routes and core functionality.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...w.markets,...w.shortcut,...ke(w.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd();await Al({...G(t),directory:o},t.json)}};async function Fl(e){let t=new Gt,{rootDirectory:o,appDirectory:r}=await _e(e.directory),n=Xe(o),i=X(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],d=e.markets?e.markets:await eo({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),m=d==="none"?void 0:d,{setupRoutes:l}=so(t),f={},p=[],y=await Kn(".."),[h,b]=await Promise.all([K(O(o,"tsconfig.json")),vt("*.d.ts",{cwd:y})]);s=s.then(()=>Promise.all([...b.map(C=>Ut(O(y,C),P(o,C))),ao({rootDirectory:o,appDirectory:r,typescript:h})])).then(async()=>{let C=await l(o,h?"ts":"js",{i18nStrategy:m,overwriteFileDeps:!0});f=C.routeGroups,p=C.routes}),m&&(s=s.then(()=>Zt(m,{rootDirectory:o})));let v=await Promise.resolve(i),{createShortcut:S,showShortcutBanner:k}=await co(t,v,e.shortcut);if(!m&&!S)return await s,{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:!1,cliCommand:v,showSummary:!1};let x=!1;return S&&(s=s.then(async()=>{await S()&&(x=!0,v=qe)}),k()),await ne(a),{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:x,cliCommand:v,showSummary:!0}}async function Al(e,t){let o=await Fl(e);return!j(cn,{status:"success",changed:!0,directory:P(o.directory),name:o.name,i18n:o.i18n??null,routes:o.generatedRoutes.map(({sourceRoute:r,destinationRoute:n,operation:i,skipReason:s})=>({sourceRoute:r,destinationRoute:n,operation:i,...s?{skipReason:s}:{}})),routeGroups:o.routes,shortcut:o.shortcut},t)&&o.showSummary&&await fo(o,{cliCommand:o.cliCommand,depsInstalled:!0,packageManager:"npm",i18n:o.i18n,routes:o.routes}),o}c();var ma=re(me(),1);var sr=class e extends R{static get jsonOutputSchema(){return ln}static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...ke(w.installDeps,{"install-deps":{default:!0}})};static args={strategy:ma.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${Pr.join()}`,options:Pr})};async run(){let{flags:t,args:o}=await this.parse(e),r=t.path?P(t.path):process.cwd();await Nl({...G(t),strategy:o.strategy,directory:r},t.json)}};async function _l({strategy:e,directory:t,force:o=!1,installDeps:r=!0}){let n=await we(t).catch(()=>null);if(!n)throw new g("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await ti(),a={directory:i.rootDirectory,strategy:s,files:[],dependenciesInstalled:!1,needsNpmReinstall:!1};if(s==="css-modules"||s==="postcss")return{...a,status:"built-in"};let d=await ei(s,i,o);if(!d)return{...a,status:"cancelled"};let{workPromise:m,generatedAssets:l,needsInstallDeps:f}=d,p=[{title:"Updating files",task:async()=>{await m}}],y=!1;if(r&&f){let h=Pe(i.rootDirectory);p.push({title:"Installing new dependencies",task:async()=>{let b=await h;y=b==="npm"||b==="unknown",await Yt({directory:i.rootDirectory,packageManager:b,args:[]})}})}return await ne(p),{...a,status:"configured",files:l,dependenciesInstalled:!!(r&&f),needsNpmReinstall:!!(f&&y&&s==="tailwind")}}async function Nl(e,t){let o=await _l(e);return j(ln,{status:o.status==="cancelled"?"cancelled":"success",changed:o.status==="configured",directory:P(o.directory),strategy:o.strategy,filePaths:o.files.map(r=>P(o.directory,r)),dependenciesInstalled:o.dependenciesInstalled,needsNpmReinstall:o.needsNpmReinstall},t)||Hl(o),o}function Hl(e){let{strategy:t,files:o}=e;if(e.status!=="cancelled"){if(e.status==="built-in"){H({headline:`Vite works out of the box with ${kt[t]}.`,body:`See the Vite documentation for more information:
|
|
251
251
|
${Cr[t]}`});return}H({headline:`${kt[t]} setup complete.`,body:(o.length>0?`You can now modify CSS configuration in the following files:
|
|
252
252
|
`+o.map(r=>` - ${r}`).join(`
|
|
253
253
|
`)+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-XEZPN5TR.js";import{x as t}from"./chunk-2KUM2RU4.js";import{k as r}from"./chunk-DOLVBTCB.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static description="Run CLI doctor-release tests";static hidden=!0;async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as ie,b as le,c as pe,d as de,f as Ee,g as Re}from"./chunk-FKKJQGYX.js";import{a as _e,b as Te,c as $e,d as O}from"./chunk-FQLXQ7WN.js";import{a as Ce}from"./chunk-4FWPOGPQ.js";import{b as Fe,c as De}from"./chunk-G3RNO2TC.js";import{$ as v,A as D,E as ue,F as he,N as j,O as fe,P as k,Q as ge,S as me,T as ye,U as be,V as we,W as Se,X as ke,Y as ve,Z as f,a as ne,aa as Ae,ba as _,c as se,ca as xe,da as T,e as oe,ea as $,fa as Ie,ga as Pe,i as re,ia as w,ja as C,ka as E,la as A,ma as x,na as R,pa as je,qa as G,t as ce,y as ae}from"./chunk-A2NSORBM.js";import{b as Z}from"./chunk-XEZPN5TR.js";import{b as ee,c as te}from"./chunk-DMOLPSXF.js";import{A as z,C as Q,U as S,x as F,y as q,z as h}from"./chunk-2KUM2RU4.js";import{a as J}from"./chunk-LG3KEHGD.js";import{i as X}from"./chunk-TD6JBHUS.js";import{na as V,zb as b}from"./chunk-ZMOW2YZ4.js";import{b as c}from"./chunk-3PYDIBTX.js";import{b as ze}from"./chunk-AE3IQG7S.js";import{f as g,p as K}from"./chunk-IWTNUJGY.js";import{e as qe,g as l}from"./chunk-VKWPEFWQ.js";l();l();var Qe={resolveSelection:me,execute:pe,listFiles:de,writeArtifacts:he,canPrompt:S,recordMetadata:Ce,readSuppressions:Fe};async function N(e,t=Qe){let i=await ye(e.includeDirs),n=await t.resolveSelection({path:e.directory,config:e.configName,clientId:e.clientId,withoutAppConfig:e.withoutAppConfig,allowPrompts:!e.listFiles&&t.canPrompt(),validateClientIdFlag:!0});if(n.kind==="declined")return{kind:"cancelled"};let{appDirectory:s}=n,r={include_dirs:[...e.includeDirs],excludes:[...e.excludePatterns],no_git_ignore:e.noGitIgnore},o=Se(n,e.directory,r);(n.kind==="no-config"?!e.withoutAppConfig:n.appConfigFilePicked===!0)&&e.onSelectionPrompted?.(o);let a=n.kind==="config"?n.appConfigDirectories??[]:[],{scanDirectories:I,requestedScanDirectories:Je}=be(s,i,a),P={selection:n,resultsKey:ge(n),commands:o,scope:r,scanDirectories:I},B={appDirectory:s,scanDirectories:I.map(({directory:u})=>u),requestedScanDirectories:Je,appConfigDirectories:I.filter(({origin:u})=>u==="app_config_directory").map(({directory:u})=>u),appConfigFilePath:n.kind==="config"?n.appConfigFilePath:void 0,clientId:k(n),includeDirs:e.includeDirs,excludePatterns:e.excludePatterns,noGitIgnore:e.noGitIgnore};if(e.listFiles){let u=await t.listFiles(B);return{kind:"listed",...P,...u}}let M=await t.readSuppressions(s),{execution:y,codeExcerptsOmitted:Y}=Xe(await t.execute(B));await t.recordMetadata({num_security_findings:y.scan.issues.length});let Ke=await t.writeArtifacts(s,P.resultsKey,{deterministicFindings:y.deterministicFindings,agentChecks:y.agentChecks}),{checks:H,suppressions:Ve}=ce({deterministic:y.deterministicFindings,agent:null,suppressions:{entries:M,missingPaths:await De(s,M)}});return{kind:"scanned",...P,execution:y,artifacts:Ke,checks:H,suppressions:Ve,blocking:{level:e.blocking,blockedChecks:le(H,e.blocking)},...Y?{codeExcerptsOmitted:Y}:{}}}function Xe(e){if(j(e.deterministicFindings)<=D)return{execution:e,codeExcerptsOmitted:!1};let t=oe(e.deterministicFindings);if(j(t)>D)throw new X("The deterministic findings are larger than 5 MB, so the results were not changed.","Use --exclude or scan fewer directories, then run the command again.");return{execution:{...e,deterministicFindings:t,scan:{...e.scan,issues:e.scan.issues.map(({code_excerpt:i,evidence:n,...s})=>({...s,...n===void 0?{}:{evidence:n.map(({code_excerpt:r,...o})=>o)}}))}},codeExcerptsOmitted:!0}}l();l();var Ge=c.object({status:c.literal("success"),app:C,scope:A,scanDirectories:c.array(x).describe("The directories that a scan would walk."),files:c.array(c.object({path:w().describe("The absolute path of the file.")}).strict()).describe("The files that a scan would gather, ordered by their paths relative to the app directory, as listed without --json.")}).strict().describe("With --list-files, the files that a scan would gather. Nothing is scanned or written."),m=J({name:"AppSecurityCheckResult",schema:c.union([c.object({status:c.literal("success"),valid:c.boolean().describe("Whether --blocking passed: no check of the scan has an active finding and a severity at or above the level. Findings that shopify.app-security.json suppresses don't count. blocking.blockedCheckCount counts the checks that fail, and --blocking none always passes. Run review --json for the findings."),app:C,resultsDirectory:w().describe("The absolute path of the results directory that holds the files the scan wrote."),deterministicFindingsPath:w().describe("The absolute path of deterministic-findings.json, which the scan replaced."),agentChecksPath:w().describe("The absolute path of agent-checks.json, which the scan replaced."),scope:A,scanDirectories:c.array(x).describe("The directories that the scan walked."),agentCheckCount:c.number().int().nonnegative().describe("The number of checks in agent-checks.json for a coding agent to investigate."),blocking:R,suppressions:G,instructions:E.optional().describe("The coding-agent instructions for this scan, with --print-instructions or when chosen at the prompt. Left out otherwise.")}).strict(),Ge,c.object({status:c.literal("cancelled")}).strict().describe("Asked whether to scan without app configuration, the user declined. Nothing was scanned or written.")]).describe("The scan and the files it wrote. With --list-files, the files that a scan would gather."),definitions:{AppSecurityApp:C,AppSecurityScope:A,AppSecurityScanDirectory:x,AppSecurityBlocking:R,AppSecuritySuppressions:G,AppSecuritySuppressionEntry:je,AppSecurityInstructions:E,AppSecurityCheckFileList:Ge}});l();var Ze={high:"High",medium:"Medium",low:"Low"},L=3,U=8;function et(e){let t=re(e.scan.issues,e.checks),i={activeIssues:t,groups:ae(t),suppressed:Ee(e.checks,e.suppressions),unappliedEntries:Re(e.suppressions,{review:f(e.commands.review)})},{groups:n}=i;return{type:tt(e,t),options:{headline:it(e,i),body:nt(e),reference:[{subdued:`Engine: ${e.engine.name} ${e.engine.version}`},{subdued:`Ruleset: ${e.engine.ruleset}`},...n.some(s=>s.issues.length>1)&&!e.verbose?[{subdued:"Use --verbose for every occurrence and fix. deterministic-findings.json retains all file and line details."}]:[]],customSections:ct(e,i)}}}function Oe(e){let{type:t,options:i}=et(e);if(t==="success"){q(i);return}if(t==="warning"){h(i);return}z(i)}function Ne(e){return e.scan.scan.coverage_gaps.length>0}function tt(e,t){return t.some(i=>i.severity==="high")?"error":t.length>0||Ne(e)?"warning":"success"}function it(e,{activeIssues:t,groups:i,suppressed:n}){let s=t.length;return i.length<s?`${i.length} security issue ${i.length===1?"group":"groups"} found (${s} occurrences).`:s>0?`${s} security ${s===1?"issue":"issues"} found.`:Ne(e)?"Scan completed with coverage gaps.":n?"No active security issues found.":"No security issues found."}function nt(e){let t=e.scan,i=[{userInput:t.app.name},{char:"."},`${t.scan.files_scanned} files scanned in ${dt(e.elapsedMilliseconds)}.`],n=t.scan.checks_executed.filter(s=>s.status==="not_applicable").length;return n>0&&i.push({info:`
|
|
2
|
+
${n} check${n===1?"":"s"} not applicable.`}),i.push({info:`
|
|
3
|
+
${e.agentCheckCount} check${e.agentCheckCount===1?"":"s"} ready for your coding agent.`}),i}function st(e){return[["Have your coding agent run the agent checks, following",{command:f(e.commands.instructions)},{char:"."}],["Record the agent results with",{command:f(e.commands.record)}],["Review the results with",{command:f(e.commands.review)}]]}function ot(e){let t=k(e)??"not linked";return e.kind==="config"&&e.clientIdOverride?`${t} (from --client-id)`:t}function rt(e){let{selection:t}=e;return{title:"Selection",body:{tabularData:[["App directory",t.appDirectory],["Config file",fe(t)??"none"],["Client ID",ot(t)],["Scan directories",e.scanDirectories.map(({directory:i})=>g(t.appDirectory,i)||".").join(", ")]],firstColumnSubdued:!0}}}function ct(e,{groups:t,suppressed:i,unappliedEntries:n}){let s=[rt(e)];for(let o of["high","medium","low"]){let d=t.filter(a=>a.severity===o);d.length!==0&&s.push({title:Ze[o],body:{list:{items:d.flatMap(a=>[lt(a),...e.verbose?a.issues.map(at):[]])}}})}if(i&&s.push({title:"Suppressed findings",body:i.counts},...i.sections),n&&s.push(...n.sections),e.scan.scan.coverage_gaps.length>0){let o=e.scan.scan.coverage_gaps,d=o.slice(0,U).map(a=>a.message);o.length>U&&d.push({info:`${o.length-U} more coverage gaps`}),s.push({title:"Coverage gaps",body:{list:{items:d}}})}let{appDirectory:r}=e.selection;return s.push({title:"Artifacts",body:{list:{items:[["Deterministic findings:",{filePath:g(r,e.deterministicFindingsPath)}],["Agent security check instructions:",{filePath:g(r,e.agentChecksPath)}]]}}}),s.push({title:"Next steps",body:{list:{items:st(e),ordered:!0}}}),e.verbose&&s.push({title:"Scan details",body:{tabularData:[["Framework",e.scan.detection.framework],["Surface",e.scan.detection.surface],["Languages",e.scan.detection.languages.map(o=>`${o.name} (${o.support})`).join(", ")||"none"],["Capabilities",pt(e.scan.capabilities)],["Rules run",String(e.scan.scan.rules_run)],["Not run",String(e.scan.scan.rules_skipped)]],firstColumnSubdued:!0}}),s}function at(e){let t=e.location.line?`${e.location.file}:${e.location.line}`:e.location.file,i=[{bold:e.title},Le(e.id),{filePath:t}];return i.push({subdued:e.message},{subdued:`Fix: ${e.fix.description}`}),e.fix.guide&&(e.fix.guide.startsWith("https://")||e.fix.guide.startsWith("http://")?i.push({link:{label:"Guide",url:e.fix.guide}}):i.push({subdued:`Guide: ${e.fix.guide}`})),e.snippet&&i.push({subdued:`Code: ${e.snippet}`}),i}function lt(e){let t=e.issues[0],i=e.issues.length,n=e.files.length,s=e.files.slice(0,L).map(r=>{let o=e.issues.find(a=>a.location.file===r);return{filePath:o.location.line?`${r}:${o.location.line}`:r}});return[{bold:t.title},Le(t.id),`${i} ${i===1?"occurrence":"occurrences"} across ${n} ${n===1?"file":"files"}`,...s,...n>L?[{subdued:`+${n-L} more files`}]:[]]}function Le(e){let t=se(e);return t?{link:{label:e,url:t}}:{subdued:e}}function pt(e){let t=Object.entries(e).filter(([,i])=>i).map(([i])=>i);return t.length>0?t.join(", "):"none detected"}function dt(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}var ut={canPrompt:S,selectInstructionsDestination:e=>Q(e)};function ht(e,t){return{message:`${e} recommended agent ${e===1?"check":"checks"} available to complete your scan. How do you want to pass that prompt to your agent?`,choices:t==="json"?[{label:"Include instructions in the JSON output and copy them to the clipboard",value:"copy"},{label:"Include instructions in the JSON output",value:"print"},{label:"Nothing",value:"nothing"}]:[{label:"Copy instructions to the clipboard",value:"copy"},{label:"Print instructions to the terminal",value:"print"},{label:"Nothing",value:"nothing"}],defaultValue:"copy"}}function We(e){F({headline:"To skip these prompts next time, run:",body:[{command:f(e.scan)}]})}async function Be(e,t,i,n=ut){if(e.kind==="cancelled"){if(i==="json")b(m.encode({status:"cancelled"}));else{let{headline:s,nextStep:r}=we(t.directory);F({headline:s,body:r})}return}if(e.kind==="listed"){await Ue(e),i==="json"?b(m.encode(yt(e))):e.paths.length>0&&b(e.paths.join(`
|
|
4
|
+
`));return}await Ue(e.execution),e.codeExcerptsOmitted&&h({headline:"deterministic-findings.json was written without code excerpts, because with them it would be larger than 5 MB.",body:["Use",{command:"--exclude"},"or scan fewer directories to keep them."]}),i==="json"?await gt(e,t,n):await ft(e,t,n),e.blocking.blockedChecks>0&&(process.exitCode=1)}async function ft(e,t,i){Oe(bt(e,t.verbose));let n=await Ye(e,t,"text",i);if(n==="nothing")return;let s=He(e);n==="print"?O(s,{copy:!1}):await Me(s,"text")&&O(s,{copy:!0})}async function gt(e,t,i){let n=await Ye(e,t,"json",i),s=n==="nothing"?void 0:He(e),r=s!==void 0&&n==="copy"&&await Me(s,"json");b(m.encode(mt(e,s===void 0?void 0:xe(s,{copy:r}))))}async function Me(e,t){try{return await $e(e,{copy:!0}),!0}catch(i){if(!(i instanceof _e))throw i;return h({headline:i.message,body:t==="json"?"The result still includes them.":["Run the check again with",{command:"--print-instructions"},"to print them."]}),!1}}async function Ye(e,t,i,n){return t.skipInstructions?"nothing":t.printInstructions?"print":n.canPrompt()?n.selectInstructionsDestination(ht(e.execution.agentChecks.checks.length,i)):"nothing"}function He(e){return Te({appDirectory:e.selection.appDirectory,resultsKey:e.resultsKey,commands:e.commands,scanScope:e.scope})}function mt(e,t){let{appDirectory:i}=e.selection,{resultsDirectory:n}=ue(i,e.resultsKey);return{status:"success",valid:e.blocking.blockedChecks===0,app:_(e.selection),resultsDirectory:v(n),deterministicFindingsPath:v(e.artifacts.deterministicFindingsPath),agentChecksPath:v(e.artifacts.agentChecksPath),scope:T(e.scope),scanDirectories:e.scanDirectories.map(s=>$(i,s)),agentCheckCount:e.execution.agentChecks.checks.length,blocking:Ie(e.blocking),suppressions:Pe(i,e.suppressions,e.checks),...t===void 0?{}:{instructions:t}}}function yt(e){let{appDirectory:t}=e.selection;return{status:"success",app:_(e.selection),scope:T(e.scope),scanDirectories:e.scanDirectories.map(i=>$(t,i)),files:e.paths.map(i=>({path:Ae(t,i)}))}}function bt(e,t){let{execution:i,artifacts:n}=e;return{scan:i.scan,selection:e.selection,scanDirectories:e.scanDirectories,engine:i.engine,verbose:t,elapsedMilliseconds:i.elapsedMilliseconds,commands:e.commands,deterministicFindingsPath:n.deterministicFindingsPath,agentChecksPath:n.agentChecksPath,agentCheckCount:i.agentChecks.checks.length,checks:e.checks,suppressions:e.suppressions}}function wt(e){return e.replace(/[?*()[\]{}!#\\]/g,"\\$&")}async function Ue(e){if(e.ignoredScanDirectories.length===0&&e.otherAppDirectories.length===0)return;let t=await V(K()),i=n=>g(t,n)||".";for(let n of e.ignoredScanDirectories)h({headline:`${i(n)} is ignored by Git, so only the files Git tracks in it are scanned.`,body:["Use",{command:"--no-git-ignore"},"to scan everything in it."]});for(let n of e.otherAppDirectories){let s=i(n);h({headline:`${s} holds another app's configuration, so its files are scanned as part of this app.`,body:["Use",{command:`--exclude ${ve(wt(s),ke())}`},"to leave it out."]})}}var p=qe(ze(),1);var W=class e extends Z{static summary="Check an app for Shopify-specific security issues and write deterministic-findings.json and agent-checks.json.";static descriptionWithMarkdown="Runs an app security check locally and writes `deterministic-findings.json` and `agent-checks.json` to the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`; the other `app security` commands take the same selection flags and find the same directory. Every run replaces both files, so it's always safe to run the check again.\n\n`deterministic-findings.json` holds the deterministic scan results. `agent-checks.json` holds the checks for your coding agent to investigate; the agent's results are recorded with `shopify app security record`. Use `--config` to select a specific app configuration when the project has multiple `shopify.app*.toml` files; the check inspects only that configuration. Use `--client-id` to replace the configuration's client ID for this run. `--client-id` is checked against your Shopify account before anything is scanned, so it needs you to be logged in. When no app configuration exists, use `--without-app-config --client-id <client-id>` to scan `--path` anyway with config checks skipped; in an interactive terminal the command offers to do this.\n\nThe check scans the app directory and each `--include-dir`. Git ignore rules apply by default: a file or directory that Git ignores is skipped, using the rules of the repository that contains it, while files that Git tracks are always scanned. Use `--no-git-ignore` to turn Git ignore rules off for every scanned directory. When the check uses Git, it requires Git 2.38.0 or later.\n\nUse `--exclude` to skip more paths. Each value is a glob that is matched against the path relative to the working directory, so a path above it starts with `../`, and a name at any depth needs `**/`, for example `--exclude '**/generated'`. Repeat the flag to add globs. An exclusion can't remove the selected app configuration file. Quote each value so your shell doesn't expand `*`. The coding-agent instructions this check offers repeat the globs. Other `app security` commands don't take `--exclude` or `--no-git-ignore`, so pass the same flags each time you run the check.\n\nUse `--list-files` to check the scope before scanning: it prints the files the check would gather, one path per line and relative to the app directory, and then stops. It writes no results and never prompts. `--client-id` is still checked, but doesn't change the list. With `--json`, the result lists the files with absolute paths.\n\nIn interactive terminals, the command offers to copy the coding-agent instructions, print them, or choose nothing; copying is the default. In CI and other non-interactive environments, instructions aren't offered unless you pass `--print-instructions`, which prints them. You can also run `shopify app security instructions` to print, copy, or write them later. With `--json`, the command offers to include the instructions in the result, with or without copying them, and `--print-instructions` includes them.\n\nFindings that an entry of `shopify.app-security.json` in the app directory matches are suppressed: they don't count for `--blocking`, and the output lists each one with its kind and reason. An entry that matches no finding is stale, and an entry whose code matches more than one finding is ambiguous. Neither suppresses anything, and the output lists both, so you can remove or update them. When an edit to the flagged code, such as a rename, makes an entry stale, the output names the location of its likely finding: run `shopify app security review` to see that finding's number, and `shopify app security review --suppress` with it to re-attach the entry. It names none when the entry's code or the finding's line holds a redacted secret, because redaction hides the only text that tells two credentials apart, or when the entry's code holds a secret that the CLI would redact. Agent entries aren't evaluated, because the check reads no agent results. An invalid file makes the check fail with every problem. To add entries, run `shopify app security review --interactive` or `shopify app security review --suppress`, or ask your coding agent to run `shopify app security review --suppress` for a suppression that you approve, then review and commit the file. `shopify app security record` never changes the file: a suppression in the agent findings applies only to them.\n\nWith `--json`, the result describes the scan and the files it wrote, whether `--blocking` passed, and how the entries of `shopify.app-security.json` applied, but not the findings: run `shopify app security review --json` for those.\n\nFindings that an entry of `shopify.app-security.json` in the app directory suppresses don't count for `--blocking`. The results files still hold every finding. Suppressions apply to all app configurations and client-ID runs. An entry's `code` matches the code excerpt that the results file saves with the finding. A results file that would be larger than 5 MB with excerpts is saved without them; then an entry with `code` matches only the finding's message, so it can go stale and leave the finding active. The check reads `shopify.app-security.json` before it scans, so an invalid file stops the command before any results file is replaced.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static jsonOutputSchema=m;static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --include-dir ../backend","<%= config.bin %> <%= command.id %> --path extensions --config production --include-dir .","<%= config.bin %> <%= command.id %> --without-app-config --client-id <client-id>",'<%= config.bin %> <%= command.id %> --path app --include-dir . --exclude marketing --exclude "**/generated"',"<%= config.bin %> <%= command.id %> --no-git-ignore --exclude local-data","<%= config.bin %> <%= command.id %> --include-dir ../backend --list-files","<%= config.bin %> <%= command.id %> --blocking high"];static flags={...ee,...ne,"include-dir":p.Flags.string({description:"Also scan this directory, relative to the working directory. Repeat the flag to add directories. Use it for code that lives outside the app directory, such as a backend or a shared library.",multiple:!0}),exclude:p.Flags.string({description:"Skip paths that match this glob, relative to the working directory. Repeat the flag to add globs. The selected app configuration file can't be excluded.",multiple:!0}),"no-git-ignore":p.Flags.boolean({description:"Turn off Git ignore rules for every scanned directory, so files that Git ignores are scanned too. Files that Git tracks are always scanned.",env:"SHOPIFY_FLAG_NO_GIT_IGNORE"}),"list-files":p.Flags.boolean({description:"Print the files the check would gather, one path per line, and stop. Nothing is scanned, no results are written, and nothing is prompted for. With --json, the result lists them with absolute paths.",env:"SHOPIFY_FLAG_LIST_FILES",exclusive:["print-instructions","skip-instructions","blocking"]}),...ie,"print-instructions":p.Flags.boolean({description:"Print coding-agent instructions without prompting for how to deliver them. With --json, the instructions are included in the result.",default:!1,exclusive:["skip-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_PRINT_INSTRUCTIONS"}),yes:p.Flags.boolean({description:"Print coding-agent instructions without prompting.",hidden:!0,deprecated:{to:"--print-instructions"},exclusive:["skip-instructions","list-files"],env:"SHOPIFY_FLAG_YES"}),"skip-instructions":p.Flags.boolean({description:"Don't offer the coding-agent instructions after the scan. Use it when you want only the deterministic scan results.",default:!1,exclusive:["print-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_SKIP_INSTRUCTIONS"}),...te};async run(){let{flags:t}=await this.parse(e),i=await N({directory:t.path,configName:t.config,clientId:t["client-id"],withoutAppConfig:!!t["without-app-config"],blocking:t.blocking,includeDirs:t["include-dir"]??[],excludePatterns:t.exclude??[],noGitIgnore:!!t["no-git-ignore"],listFiles:!!t["list-files"],onSelectionPrompted:We});await Be(i,{directory:t.path,verbose:!!t.verbose,printInstructions:!!(t["print-instructions"]||t.yes),skipInstructions:t["skip-instructions"]},t.json?"json":"text")}};export{W as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-LG3KEHGD.js";import{l as m}from"./chunk-TD6JBHUS.js";import{zb as u}from"./chunk-ZMOW2YZ4.js";import{b as e}from"./chunk-3PYDIBTX.js";import{b as H}from"./chunk-AE3IQG7S.js";import{e as b,g as n}from"./chunk-VKWPEFWQ.js";n();var p=e.object({id:e.string(),summary:e.string().optional(),hidden:e.boolean().default(!1)}),l=e.object({name:e.string(),description:e.string().optional(),hidden:e.boolean().default(!1)}),g=e.object({name:e.string(),description:e.string().optional(),required:e.boolean().default(!1),hidden:e.boolean().default(!1),options:e.array(e.string()).optional(),default:e.unknown().optional()}),h=e.object({name:e.string(),type:e.enum(["boolean","option"]),char:e.string().optional(),summary:e.string().optional(),description:e.string().optional(),env:e.string().optional(),required:e.boolean().default(!1),hidden:e.boolean().default(!1),options:e.array(e.string()).optional(),default:e.unknown().optional(),multiple:e.boolean().optional(),allowNo:e.boolean().optional(),aliases:e.array(e.string()).optional(),dependsOn:e.array(e.string()).optional(),exclusive:e.array(e.string()).optional(),exactlyOne:e.array(e.string()).optional()}),f=p.extend({description:e.string().optional(),aliases:e.array(e.string()),usage:e.union([e.string(),e.array(e.string())]).optional(),examples:e.array(e.union([e.string(),e.object({description:e.string(),command:e.string()})])).optional(),strict:e.boolean().default(!0),args:e.record(g),flags:e.record(h)}),a={commands:e.array(p),topics:e.array(l)},s=c({name:"HelpResult",schema:e.discriminatedUnion("kind",[e.object({kind:e.literal("root"),...a}),e.object({kind:e.literal("topic"),topic:l,...a}),e.object({kind:e.literal("command"),command:f,...a})]),definitions:{HelpCommandSummary:p,HelpTopic:l,HelpArgument:g,HelpFlag:h,HelpCommand:f}});n();var y=b(H(),1);async function k(r,o,i=!1){let t=new d(r,{all:i});if(await t.showHelp(o),!t.result)throw new m("Oclif did not resolve a help subject.");return t.result}var d=class extends y.Help{result;async showCommandHelp(o){let i=t=>this.opts.all===!0||!t.hidden;this.result=s.validate({kind:"command",command:{...o,args:Object.fromEntries(Object.entries(o.args).filter(([,t])=>i(t))),flags:Object.fromEntries(Object.entries(o.flags).filter(([,t])=>i(t)))},...this.listings(o.id)})}async showRootHelp(){this.result=s.validate({kind:"root",...this.listings()})}async showTopicHelp(o){this.result=s.validate({kind:"topic",topic:o,...this.listings(o.name)})}listings(o){let i=t=>o===void 0?this.opts.all===!0||!t.includes(":"):t.startsWith(`${o}:`)&&t.split(":").length===o.split(":").length+1;return{commands:this.sortedCommands.filter(t=>t.id&&i(t.id)).map(t=>({id:t.id,summary:t.summary??t.description?.split(`
|
|
2
2
|
`)[0],hidden:t.hidden??!1})),topics:this.sortedTopics.filter(t=>i(t.name))}}};n();function T(r){u(s.encode(r))}export{s as a,k as b,T as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-3C72S6LO.js";import{a as e}from"./chunk-GSFWBFFH.js";import{a as o}from"./chunk-WNVOEE6T.js";import{b as i}from"./chunk-XEZPN5TR.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static description="View all the available UI kit components";static hiddenAliases=["kitchen-sink all"];static hidden=!0;async run(){await o(),await e(),await s()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-SHOMIS6Q.js";import{b as i}from"./chunk-XEZPN5TR.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static description="Generate a notifications.json file for the the CLI, appending a new notification to the current file.";static hidden=!0;async run(){await n()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,g as o}from"./chunk-VKWPEFWQ.js";var g=p((hi,he)=>{"use strict";o();var nt="2.0.0",it=Number.MAX_SAFE_INTEGER||9007199254740991,ot=16,ct=250,lt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];he.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ot,MAX_SAFE_BUILD_LENGTH:ct,MAX_SAFE_INTEGER:it,RELEASE_TYPES:lt,SEMVER_SPEC_VERSION:nt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=p((Ri,pe)=>{"use strict";o();var at=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};pe.exports=at});var P=p((q,Re)=>{"use strict";o();var{MAX_SAFE_COMPONENT_LENGTH:M,MAX_SAFE_BUILD_LENGTH:ut,MAX_LENGTH:ft}=g(),Et=v();q=Re.exports={};var ht=q.re=[],pt=q.safeRe=[],l=q.src=[],Rt=q.safeSrc=[],a=q.t={},$t=0,W="[a-zA-Z0-9-]",mt=[["\\s",1],["\\d",ft],[W,ut]],It=t=>{for(let[e,r]of mt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let s=It(e),n=$t++;Et(t,n,e),a[t]=n,l[n]=e,Rt[n]=s,ht[n]=new RegExp(e,r?"g":void 0),pt[n]=new RegExp(s,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${W}*`);R("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${W}+`);R("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);R("FULL",`^${l[a.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);R("LOOSE",`^${l[a.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);R("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${M}})(?:\\.(\\d{1,${M}}))?(?:\\.(\\d{1,${M}}))?`);R("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",l[a.COERCE],!0);R("COERCERTLFULL",l[a.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);q.tildeTrimReplace="$1~";R("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);q.caretTrimReplace="$1^";R("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var y=p((Ii,$e)=>{"use strict";o();var Lt=Object.freeze({loose:!0}),Nt=Object.freeze({}),Ot=t=>t?typeof t!="object"?Lt:t:Nt;$e.exports=Ot});var z=p((Ni,Le)=>{"use strict";o();var me=/^[0-9]+$/,Ie=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=me.test(t),s=me.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},dt=(t,e)=>Ie(e,t);Le.exports={compareIdentifiers:Ie,rcompareIdentifiers:dt}});var O=p((di,Oe)=>{"use strict";o();var F=v(),{MAX_LENGTH:Ne,MAX_SAFE_INTEGER:j}=g(),{safeRe:U,t:X}=P(),St=y(),{compareIdentifiers:K}=z(),Tt=(t,e)=>{let r=e.split(".");if(r.length>t.length)return!1;for(let s=0;s<r.length;s++)if(K(t[s],r[s])!==0)return!1;return!0},Z=class t{constructor(e,r){if(r=St(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ne)throw new TypeError(`version is longer than ${Ne} characters`);F("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?U[X.LOOSE]:U[X.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>j||this.major<0)throw new TypeError("Invalid major version");if(this.minor>j||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>j||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<j)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(F("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(F("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return K(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(F("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return K(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?U[X.PRERELEASELOOSE]:U[X.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];if(s===!1&&(i=[r]),Tt(this.prerelease,r)){let c=this.prerelease[r.split(".").length];isNaN(c)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=Z});var w=p((Ti,Se)=>{"use strict";o();var de=O(),At=(t,e,r=!1)=>{if(t instanceof de)return t;try{return new de(t,e)}catch(s){if(!r)return null;throw s}};Se.exports=At});var Ae=p((qi,Te)=>{"use strict";o();var qt=w(),wt=(t,e)=>{let r=qt(t,e);return r?r.version:null};Te.exports=wt});var we=p((gi,qe)=>{"use strict";o();var gt=w(),Pt=(t,e)=>{let r=gt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=Pt});var ve=p((vi,Pe)=>{"use strict";o();var ge=O(),vt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,n).version}catch{return null}};Pe.exports=vt});var De=p((Ci,Ce)=>{"use strict";o();var xe=w(),xt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,c=i?r:s,u=i?s:r,f=!!c.prerelease.length;if(!!u.prerelease.length&&!f){if(!u.patch&&!u.minor)return"major";if(u.compareMain(c)===0)return u.minor&&!u.patch?"minor":"patch"}let m=f?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Ce.exports=xt});var ye=p((Gi,Ge)=>{"use strict";o();var Ct=O(),Dt=(t,e)=>new Ct(t,e).major;Ge.exports=Dt});var je=p((Fi,Fe)=>{"use strict";o();var Gt=O(),yt=(t,e)=>new Gt(t,e).minor;Fe.exports=yt});var Xe=p((Ui,Ue)=>{"use strict";o();var Ft=O(),jt=(t,e)=>new Ft(t,e).patch;Ue.exports=jt});var _e=p((Vi,Ve)=>{"use strict";o();var Ut=w(),Xt=(t,e)=>{let r=Ut(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Xt});var T=p((bi,He)=>{"use strict";o();var be=O(),Vt=(t,e,r)=>new be(t,r).compare(new be(e,r));He.exports=Vt});var Be=p((ki,ke)=>{"use strict";o();var _t=T(),bt=(t,e,r)=>_t(e,t,r);ke.exports=bt});var Me=p((Yi,Ye)=>{"use strict";o();var Ht=T(),kt=(t,e)=>Ht(t,e,!0);Ye.exports=kt});var V=p((Wi,ze)=>{"use strict";o();var We=O(),Bt=(t,e,r)=>{let s=new We(t,r),n=new We(e,r);return s.compare(n)||s.compareBuild(n)};ze.exports=Bt});var Ze=p((Ki,Ke)=>{"use strict";o();var Yt=V(),Mt=(t,e)=>t.sort((r,s)=>Yt(r,s,e));Ke.exports=Mt});var Qe=p((Ji,Je)=>{"use strict";o();var Wt=V(),zt=(t,e)=>t.sort((r,s)=>Wt(s,r,e));Je.exports=zt});var x=p((eo,er)=>{"use strict";o();var Kt=T(),Zt=(t,e,r)=>Kt(t,e,r)>0;er.exports=Zt});var _=p((to,rr)=>{"use strict";o();var Jt=T(),Qt=(t,e,r)=>Jt(t,e,r)<0;rr.exports=Qt});var J=p((no,tr)=>{"use strict";o();var es=T(),rs=(t,e,r)=>es(t,e,r)===0;tr.exports=rs});var Q=p((oo,sr)=>{"use strict";o();var ts=T(),ss=(t,e,r)=>ts(t,e,r)!==0;sr.exports=ss});var b=p((lo,nr)=>{"use strict";o();var ns=T(),is=(t,e,r)=>ns(t,e,r)>=0;nr.exports=is});var H=p((uo,ir)=>{"use strict";o();var os=T(),cs=(t,e,r)=>os(t,e,r)<=0;ir.exports=cs});var ee=p((Eo,or)=>{"use strict";o();var ls=J(),as=Q(),us=x(),fs=b(),Es=_(),hs=H(),ps=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ls(t,r,s);case"!=":return as(t,r,s);case">":return us(t,r,s);case">=":return fs(t,r,s);case"<":return Es(t,r,s);case"<=":return hs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=ps});var lr=p((po,cr)=>{"use strict";o();var Rs=O(),$s=w(),{safeRe:k,t:B}=P(),ms=(t,e)=>{if(t instanceof Rs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[B.COERCEFULL]:k[B.COERCE]);else{let f=e.includePrerelease?k[B.COERCERTLFULL]:k[B.COERCERTL],$;for(;($=f.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||$.index+$[0].length!==r.index+r[0].length)&&(r=$),f.lastIndex=$.index+$[1].length+$[2].length;f.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return $s(`${s}.${n}.${i}${c}${u}`,e)};cr.exports=ms});var ur=p(($o,ar)=>{"use strict";o();var Is=w(),Ls=g(),Ns=O(),Os=(t,e,r)=>{if(!Ls.RELEASE_TYPES.includes(e))return null;let s=ds(t,r);return s&&Ss(s,e)},ds=(t,e)=>{let r=t instanceof Ns?t.version:t;return Is(r,e)},Ss=(t,e)=>{if(Ts(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},Ts=t=>t.startsWith("pre");ar.exports=Os});var Er=p((Io,fr)=>{"use strict";o();var re=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};fr.exports=re});var A=p((No,$r)=>{"use strict";o();var As=/\s+/g,te=class t{constructor(e,r){if(r=ws(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof se)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(As," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!pr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Fs(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(ys,"");let s=((this.options.includePrerelease&&Ds)|(this.options.loose&&Gs))+":"+e,n=hr.get(s);if(n)return n;let i=this.options.loose,c=i?S[d.HYPHENRANGELOOSE]:S[d.HYPHENRANGE];e=e.replace(c,Ms(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace(S[d.COMPARATORTRIM],vs),I("comparator trim",e),e=e.replace(S[d.TILDETRIM],xs),I("tilde trim",e),e=e.replace(S[d.CARETTRIM],Cs),I("caret trim",e);let u=e.split(" ").map(E=>js(E,this.options)).join(" ").split(/\s+/).map(E=>Ys(E,this.options));i&&(u=u.filter(E=>(I("loose invalid filter",E,this.options),!!E.match(S[d.COMPARATORLOOSE])))),I("range list",u);let f=new Map,$=u.map(E=>new se(E,this.options));for(let E of $){if(pr(E))return[E];f.set(E.value,E)}f.size>1&&f.has("")&&f.delete("");let m=[...f.values()];return hr.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Rr(s,r)&&e.set.some(n=>Rr(n,r)&&s.every(i=>n.every(c=>i.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new gs(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Ws(this.set[r],e,this.options))return!0;return!1}};$r.exports=te;var qs=Er(),hr=new qs,ws=y(),se=C(),I=v(),gs=O(),{safeRe:S,src:Ps,t:d,comparatorTrimReplace:vs,tildeTrimReplace:xs,caretTrimReplace:Cs}=P(),{FLAG_INCLUDE_PRERELEASE:Ds,FLAG_LOOSE:Gs}=g(),ys=new RegExp(Ps[d.BUILD],"g"),pr=t=>t.value==="<0.0.0-0",Fs=t=>t.value==="",Rr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},js=(t,e)=>(t=t.replace(S[d.BUILD],""),I("comp",t,e),t=_s(t,e),I("caret",t),t=Xs(t,e),I("tildes",t),t=Hs(t,e),I("xrange",t),t=Bs(t,e),I("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Us=(t,e,r)=>N(t)&&!N(e)||N(e)&&r&&!N(r),Xs=(t,e)=>t.trim().split(/\s+/).map(r=>Vs(r,e)).join(" "),Vs=(t,e)=>{let r=e.loose?S[d.TILDELOOSE]:S[d.TILDE];return t.replace(r,(s,n,i,c,u)=>{I("tilde",t,s,n,i,c,u);let f;return N(n)?f="":N(i)?f=`>=${n}.0.0 <${+n+1}.0.0-0`:N(c)?f=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:u?(I("replaceTilde pr",u),f=`>=${n}.${i}.${c}-${u} <${n}.${+i+1}.0-0`):f=`>=${n}.${i}.${c} <${n}.${+i+1}.0-0`,I("tilde return",f),f})},_s=(t,e)=>t.trim().split(/\s+/).map(r=>bs(r,e)).join(" "),bs=(t,e)=>{I("caret",t,e);let r=e.loose?S[d.CARETLOOSE]:S[d.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,c,u,f)=>{I("caret",t,n,i,c,u,f);let $;return N(i)?$="":N(c)?$=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(u)?i==="0"?$=`>=${i}.${c}.0${s} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.0${s} <${+i+1}.0.0-0`:f?(I("replaceCaret pr",f),i==="0"?c==="0"?$=`>=${i}.${c}.${u}-${f} <${i}.${c}.${+u+1}-0`:$=`>=${i}.${c}.${u}-${f} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.${u}-${f} <${+i+1}.0.0-0`):(I("no pr"),i==="0"?c==="0"?$=`>=${i}.${c}.${u} <${i}.${c}.${+u+1}-0`:$=`>=${i}.${c}.${u} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.${u} <${+i+1}.0.0-0`),I("caret return",$),$})},Hs=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>ks(r,e)).join(" ")),ks=(t,e)=>{t=t.trim();let r=e.loose?S[d.XRANGELOOSE]:S[d.XRANGE];return t.replace(r,(s,n,i,c,u,f)=>{if(I("xRange",t,s,n,i,c,u,f),Us(i,c,u))return t;let $=N(i),m=$||N(c),E=m||N(u),L=E;return n==="="&&L&&(n=""),f=e.includePrerelease?"-0":"",$?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&L?(m&&(c=0),u=0,n===">"?(n=">=",m?(i=+i+1,c=0,u=0):(c=+c+1,u=0)):n==="<="&&(n="<",m?i=+i+1:c=+c+1),n==="<"&&(f="-0"),s=`${n+i}.${c}.${u}${f}`):m?s=`>=${i}.0.0${f} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${c}.0${f} <${i}.${+c+1}.0-0`),I("xRange return",s),s})},Bs=(t,e)=>(I("replaceStars",t,e),t.trim().replace(S[d.STAR],"")),Ys=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?d.GTE0PRE:d.GTE0],"")),Ms=t=>(e,r,s,n,i,c,u,f,$,m,E,L)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N($)?f="":N(m)?f=`<${+$+1}.0.0-0`:N(E)?f=`<${$}.${+m+1}.0-0`:L?f=`<=${$}.${m}.${E}-${L}`:t?f=`<${$}.${m}.${+E+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Ws=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==se.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var C=p((So,dr)=>{"use strict";o();var D=Symbol("SemVer ANY"),oe=class t{static get ANY(){return D}constructor(e,r){if(r=mr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ie("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,ie("comp",this)}parse(e){let r=this.options.loose?Ir[Lr.COMPARATORLOOSE]:Ir[Lr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Nr(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(ie("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Nr(e,this.options)}catch{return!1}return ne(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Or(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Or(this.value,r).test(e.semver):(r=mr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ne(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ne(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};dr.exports=oe;var mr=y(),{safeRe:Ir,t:Lr}=P(),ne=ee(),ie=v(),Nr=O(),Or=A()});var G=p((Ao,Sr)=>{"use strict";o();var zs=A(),Ks=(t,e,r)=>{try{e=new zs(e,r)}catch{return!1}return e.test(t)};Sr.exports=Ks});var Ar=p((wo,Tr)=>{"use strict";o();var Zs=A(),Js=(t,e)=>new Zs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Tr.exports=Js});var wr=p((Po,qr)=>{"use strict";o();var Qs=O(),en=A(),rn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new en(e,r)}catch{return null}return t.forEach(c=>{i.test(c)&&(!s||n.compare(c)===-1)&&(s=c,n=new Qs(s,r))}),s};qr.exports=rn});var Pr=p((xo,gr)=>{"use strict";o();var tn=O(),sn=A(),nn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new sn(e,r)}catch{return null}return t.forEach(c=>{i.test(c)&&(!s||n.compare(c)===1)&&(s=c,n=new tn(s,r))}),s};gr.exports=nn});var Cr=p((Do,xr)=>{"use strict";o();var ce=O(),on=A(),vr=x(),cn=(t,e)=>{t=new on(t,e);let r=new ce("0.0.0");if(t.test(r)||(r=new ce("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(c=>{let u=new ce(c.semver.version);switch(c.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||vr(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),i&&(!r||vr(r,i))&&(r=i)}return r&&t.test(r)?r:null};xr.exports=cn});var Gr=p((yo,Dr)=>{"use strict";o();var ln=A(),an=(t,e)=>{try{return new ln(t,e).range||"*"}catch{return null}};Dr.exports=an});var Y=p((jo,Ur)=>{"use strict";o();var un=O(),jr=C(),{ANY:fn}=jr,En=A(),hn=G(),yr=x(),Fr=_(),pn=H(),Rn=b(),$n=(t,e,r,s)=>{t=new un(t,s),e=new En(e,s);let n,i,c,u,f;switch(r){case">":n=yr,i=pn,c=Fr,u=">",f=">=";break;case"<":n=Fr,i=Rn,c=yr,u="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hn(t,e,s))return!1;for(let $=0;$<e.set.length;++$){let m=e.set[$],E=null,L=null;if(m.forEach(h=>{h.semver===fn&&(h=new jr(">=0.0.0")),E=E||h,L=L||h,n(h.semver,E.semver,s)?E=h:c(h.semver,L.semver,s)&&(L=h)}),E.operator===u||E.operator===f||(!L.operator||L.operator===u)&&i(t,L.semver))return!1;if(L.operator===f&&c(t,L.semver))return!1}return!0};Ur.exports=$n});var Vr=p((Xo,Xr)=>{"use strict";o();var mn=Y(),In=(t,e,r)=>mn(t,e,">",r);Xr.exports=In});var br=p((_o,_r)=>{"use strict";o();var Ln=Y(),Nn=(t,e,r)=>Ln(t,e,"<",r);_r.exports=Nn});var Br=p((Ho,kr)=>{"use strict";o();var Hr=A(),On=(t,e,r)=>(t=new Hr(t,r),e=new Hr(e,r),t.intersects(e,r));kr.exports=On});var Mr=p((Bo,Yr)=>{"use strict";o();var dn=G(),Sn=T();Yr.exports=(t,e,r)=>{let s=[],n=null,i=null,c=t.sort((m,E)=>Sn(m,E,r));for(let m of c)dn(m,e,r)?(i=m,n||(n=m)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let u=[];for(let[m,E]of s)m===E?u.push(m):!E&&m===c[0]?u.push("*"):E?m===c[0]?u.push(`<=${E}`):u.push(`${m} - ${E}`):u.push(`>=${m}`);let f=u.join(" || "),$=typeof e.raw=="string"?e.raw:String(e);return f.length<$.length?f:e}});var Qr=p((Mo,Jr)=>{"use strict";o();var Wr=A(),ue=C(),{ANY:le}=ue,ae=G(),fe=T(),Tn=(t,e,r={})=>{if(t===e)return!0;t=new Wr(t,r),e=new Wr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let c=qn(n,i,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},An=[new ue(">=0.0.0-0")],zr=[new ue(">=0.0.0")],qn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=An:t=zr}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=zr}let s=new Set,n,i;for(let h of t)h.operator===">"||h.operator===">="?n=Kr(n,h,r):h.operator==="<"||h.operator==="<="?i=Zr(i,h,r):s.add(h.semver);if(s.size>1)return null;let c;if(n&&i){if(c=fe(n.semver,i.semver,r),c>0)return null;if(c===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!ae(h,String(n),r)||i&&!ae(h,String(i),r))return null;for(let st of e)if(!ae(h,String(st),r))return!1;return!0}let u,f,$,m,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",$=$||h.operator==="<"||h.operator==="<=",n){if(L&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===L.major&&h.semver.minor===L.minor&&h.semver.patch===L.patch&&(L=!1),h.operator===">"||h.operator===">="){if(u=Kr(n,h,r),u===h&&u!==n)return!1}else if(n.operator===">="&&!h.test(n.semver))return!1}if(i){if(E&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===E.major&&h.semver.minor===E.minor&&h.semver.patch===E.patch&&(E=!1),h.operator==="<"||h.operator==="<="){if(f=Zr(i,h,r),f===h&&f!==i)return!1}else if(i.operator==="<="&&!h.test(i.semver))return!1}if(!h.operator&&(i||n)&&c!==0)return!1}return!(n&&$&&!i&&c!==0||i&&m&&!n&&c!==0||L||E)},Kr=(t,e,r)=>{if(!t)return e;let s=fe(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Zr=(t,e,r)=>{if(!t)return e;let s=fe(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Jr.exports=Tn});var Ei=p((zo,tt)=>{"use strict";o();var Ee=P(),et=g(),wn=O(),rt=z(),gn=w(),Pn=Ae(),vn=we(),xn=ve(),Cn=De(),Dn=ye(),Gn=je(),yn=Xe(),Fn=_e(),jn=T(),Un=Be(),Xn=Me(),Vn=V(),_n=Ze(),bn=Qe(),Hn=x(),kn=_(),Bn=J(),Yn=Q(),Mn=b(),Wn=H(),zn=ee(),Kn=lr(),Zn=ur(),Jn=C(),Qn=A(),ei=G(),ri=Ar(),ti=wr(),si=Pr(),ni=Cr(),ii=Gr(),oi=Y(),ci=Vr(),li=br(),ai=Br(),ui=Mr(),fi=Qr();tt.exports={parse:gn,valid:Pn,clean:vn,inc:xn,diff:Cn,major:Dn,minor:Gn,patch:yn,prerelease:Fn,compare:jn,rcompare:Un,compareLoose:Xn,compareBuild:Vn,sort:_n,rsort:bn,gt:Hn,lt:kn,eq:Bn,neq:Yn,gte:Mn,lte:Wn,cmp:zn,coerce:Kn,truncate:Zn,Comparator:Jn,Range:Qn,satisfies:ei,toComparators:ri,maxSatisfying:ti,minSatisfying:si,minVersion:ni,validRange:ii,outside:oi,gtr:ci,ltr:li,intersects:ai,simplifyRange:ui,subset:fi,SemVer:wn,re:Ee.re,src:Ee.src,tokens:Ee.t,SEMVER_SPEC_VERSION:et.SEMVER_SPEC_VERSION,RELEASE_TYPES:et.RELEASE_TYPES,compareIdentifiers:rt.compareIdentifiers,rcompareIdentifiers:rt.rcompareIdentifiers}});export{Ei as a};
|
|
1
|
+
import{c as p,g as o}from"./chunk-VKWPEFWQ.js";var g=p((hi,he)=>{"use strict";o();var nt="2.0.0",it=Number.MAX_SAFE_INTEGER||9007199254740991,ot=16,ct=250,lt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];he.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ot,MAX_SAFE_BUILD_LENGTH:ct,MAX_SAFE_INTEGER:it,RELEASE_TYPES:lt,SEMVER_SPEC_VERSION:nt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=p((Ri,pe)=>{"use strict";o();var at=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};pe.exports=at});var P=p((q,Re)=>{"use strict";o();var{MAX_SAFE_COMPONENT_LENGTH:M,MAX_SAFE_BUILD_LENGTH:ut,MAX_LENGTH:ft}=g(),Et=v();q=Re.exports={};var ht=q.re=[],pt=q.safeRe=[],l=q.src=[],Rt=q.safeSrc=[],a=q.t={},$t=0,W="[a-zA-Z0-9-]",mt=[["\\s",1],["\\d",ft],[W,ut]],It=t=>{for(let[e,r]of mt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let s=It(e),n=$t++;Et(t,n,e),a[t]=n,l[n]=e,Rt[n]=s,ht[n]=new RegExp(e,r?"g":void 0),pt[n]=new RegExp(s,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${W}*`);R("MAINVERSION",`(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})\\.(${l[a.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})\\.(${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${l[a.NONNUMERICIDENTIFIER]}|${l[a.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${l[a.PRERELEASEIDENTIFIER]}(?:\\.${l[a.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${l[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[a.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${W}+`);R("BUILD",`(?:\\+(${l[a.BUILDIDENTIFIER]}(?:\\.${l[a.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${l[a.MAINVERSION]}${l[a.PRERELEASE]}?${l[a.BUILD]}?`);R("FULL",`^${l[a.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${l[a.MAINVERSIONLOOSE]}${l[a.PRERELEASELOOSE]}?${l[a.BUILD]}?`);R("LOOSE",`^${l[a.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${l[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${l[a.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:\\.(${l[a.XRANGEIDENTIFIER]})(?:${l[a.PRERELEASE]})?${l[a.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[a.XRANGEIDENTIFIERLOOSE]})(?:${l[a.PRERELEASELOOSE]})?${l[a.BUILD]}?)?)?`);R("XRANGE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${l[a.GTLT]}\\s*${l[a.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${M}})(?:\\.(\\d{1,${M}}))?(?:\\.(\\d{1,${M}}))?`);R("COERCE",`${l[a.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",l[a.COERCEPLAIN]+`(?:${l[a.PRERELEASE]})?(?:${l[a.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",l[a.COERCE],!0);R("COERCERTLFULL",l[a.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${l[a.LONETILDE]}\\s+`,!0);q.tildeTrimReplace="$1~";R("TILDE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${l[a.LONETILDE]}${l[a.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${l[a.LONECARET]}\\s+`,!0);q.caretTrimReplace="$1^";R("CARET",`^${l[a.LONECARET]}${l[a.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${l[a.LONECARET]}${l[a.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${l[a.GTLT]}\\s*(${l[a.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${l[a.GTLT]}\\s*(${l[a.LOOSEPLAIN]}|${l[a.XRANGEPLAIN]})`,!0);q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${l[a.XRANGEPLAIN]})\\s+-\\s+(${l[a.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${l[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[a.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var y=p((Ii,$e)=>{"use strict";o();var Lt=Object.freeze({loose:!0}),Nt=Object.freeze({}),Ot=t=>t?typeof t!="object"?Lt:t:Nt;$e.exports=Ot});var z=p((Ni,Le)=>{"use strict";o();var me=/^[0-9]+$/,Ie=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=me.test(t),s=me.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},dt=(t,e)=>Ie(e,t);Le.exports={compareIdentifiers:Ie,rcompareIdentifiers:dt}});var O=p((di,Oe)=>{"use strict";o();var F=v(),{MAX_LENGTH:Ne,MAX_SAFE_INTEGER:j}=g(),{safeRe:U,t:X}=P(),St=y(),{compareIdentifiers:K}=z(),Tt=(t,e)=>{let r=e.split(".");if(r.length>t.length)return!1;for(let s=0;s<r.length;s++)if(K(t[s],r[s])!==0)return!1;return!0},Z=class t{constructor(e,r){if(r=St(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ne)throw new TypeError(`version is longer than ${Ne} characters`);F("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?U[X.LOOSE]:U[X.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>j||this.major<0)throw new TypeError("Invalid major version");if(this.minor>j||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>j||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<j)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(F("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(F("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return K(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(F("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return K(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?U[X.PRERELEASELOOSE]:U[X.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];if(s===!1&&(i=[r]),Tt(this.prerelease,r)){let c=this.prerelease[r.split(".").length];isNaN(c)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=Z});var w=p((Ti,Se)=>{"use strict";o();var de=O(),At=(t,e,r=!1)=>{if(t instanceof de)return t;try{return new de(t,e)}catch(s){if(!r)return null;throw s}};Se.exports=At});var Ae=p((qi,Te)=>{"use strict";o();var qt=w(),wt=(t,e)=>{let r=qt(t,e);return r?r.version:null};Te.exports=wt});var we=p((gi,qe)=>{"use strict";o();var gt=w(),Pt=(t,e)=>{let r=gt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=Pt});var ve=p((vi,Pe)=>{"use strict";o();var ge=O(),vt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,n).version}catch{return null}};Pe.exports=vt});var De=p((Ci,Ce)=>{"use strict";o();var xe=w(),xt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,c=i?r:s,u=i?s:r,f=!!c.prerelease.length;if(!!u.prerelease.length&&!f){if(!u.patch&&!u.minor)return"major";if(u.compareMain(c)===0)return u.minor&&!u.patch?"minor":"patch"}let m=f?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Ce.exports=xt});var ye=p((Gi,Ge)=>{"use strict";o();var Ct=O(),Dt=(t,e)=>new Ct(t,e).major;Ge.exports=Dt});var je=p((Fi,Fe)=>{"use strict";o();var Gt=O(),yt=(t,e)=>new Gt(t,e).minor;Fe.exports=yt});var Xe=p((Ui,Ue)=>{"use strict";o();var Ft=O(),jt=(t,e)=>new Ft(t,e).patch;Ue.exports=jt});var _e=p((Vi,Ve)=>{"use strict";o();var Ut=w(),Xt=(t,e)=>{let r=Ut(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=Xt});var T=p((bi,He)=>{"use strict";o();var be=O(),Vt=(t,e,r)=>new be(t,r).compare(new be(e,r));He.exports=Vt});var Be=p((ki,ke)=>{"use strict";o();var _t=T(),bt=(t,e,r)=>_t(e,t,r);ke.exports=bt});var Me=p((Yi,Ye)=>{"use strict";o();var Ht=T(),kt=(t,e)=>Ht(t,e,!0);Ye.exports=kt});var V=p((Wi,ze)=>{"use strict";o();var We=O(),Bt=(t,e,r)=>{let s=new We(t,r),n=new We(e,r);return s.compare(n)||s.compareBuild(n)};ze.exports=Bt});var Ze=p((Ki,Ke)=>{"use strict";o();var Yt=V(),Mt=(t,e)=>t.sort((r,s)=>Yt(r,s,e));Ke.exports=Mt});var Qe=p((Ji,Je)=>{"use strict";o();var Wt=V(),zt=(t,e)=>t.sort((r,s)=>Wt(s,r,e));Je.exports=zt});var x=p((eo,er)=>{"use strict";o();var Kt=T(),Zt=(t,e,r)=>Kt(t,e,r)>0;er.exports=Zt});var _=p((to,rr)=>{"use strict";o();var Jt=T(),Qt=(t,e,r)=>Jt(t,e,r)<0;rr.exports=Qt});var J=p((no,tr)=>{"use strict";o();var es=T(),rs=(t,e,r)=>es(t,e,r)===0;tr.exports=rs});var Q=p((oo,sr)=>{"use strict";o();var ts=T(),ss=(t,e,r)=>ts(t,e,r)!==0;sr.exports=ss});var b=p((lo,nr)=>{"use strict";o();var ns=T(),is=(t,e,r)=>ns(t,e,r)>=0;nr.exports=is});var H=p((uo,ir)=>{"use strict";o();var os=T(),cs=(t,e,r)=>os(t,e,r)<=0;ir.exports=cs});var ee=p((Eo,or)=>{"use strict";o();var ls=J(),as=Q(),us=x(),fs=b(),Es=_(),hs=H(),ps=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ls(t,r,s);case"!=":return as(t,r,s);case">":return us(t,r,s);case">=":return fs(t,r,s);case"<":return Es(t,r,s);case"<=":return hs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=ps});var lr=p((po,cr)=>{"use strict";o();var Rs=O(),$s=w(),{safeRe:k,t:B}=P(),ms=(t,e)=>{if(t instanceof Rs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[B.COERCEFULL]:k[B.COERCE]);else{let f=e.includePrerelease?k[B.COERCERTLFULL]:k[B.COERCERTL],$;for(;($=f.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||$.index+$[0].length!==r.index+r[0].length)&&(r=$),f.lastIndex=$.index+$[1].length+$[2].length;f.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return $s(`${s}.${n}.${i}${c}${u}`,e)};cr.exports=ms});var ur=p(($o,ar)=>{"use strict";o();var Is=w(),Ls=g(),Ns=O(),Os=(t,e,r)=>{if(!Ls.RELEASE_TYPES.includes(e))return null;let s=ds(t,r);return s&&Ss(s,e)},ds=(t,e)=>{let r=t instanceof Ns?t.version:t;return Is(r,e)},Ss=(t,e)=>{if(Ts(e))return t.version;switch(t.prerelease=[],e){case"major":t.minor=0,t.patch=0;break;case"minor":t.patch=0;break}return t.format()},Ts=t=>t.startsWith("pre");ar.exports=Os});var Er=p((Io,fr)=>{"use strict";o();var re=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};fr.exports=re});var A=p((No,$r)=>{"use strict";o();var As=/\s+/g,te=class t{constructor(e,r){if(r=ws(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof se)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(As," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!pr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Fs(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(ys,"");let s=((this.options.includePrerelease&&Ds)|(this.options.loose&&Gs))+":"+e,n=hr.get(s);if(n)return n;let i=this.options.loose,c=i?S[d.HYPHENRANGELOOSE]:S[d.HYPHENRANGE];e=e.replace(c,Ms(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace(S[d.COMPARATORTRIM],vs),I("comparator trim",e),e=e.replace(S[d.TILDETRIM],xs),I("tilde trim",e),e=e.replace(S[d.CARETTRIM],Cs),I("caret trim",e);let u=e.split(" ").map(E=>js(E,this.options)).join(" ").split(/\s+/).map(E=>Ys(E,this.options));i&&(u=u.filter(E=>(I("loose invalid filter",E,this.options),!!E.match(S[d.COMPARATORLOOSE])))),I("range list",u);let f=new Map,$=u.map(E=>new se(E,this.options));for(let E of $){if(pr(E))return[E];f.set(E.value,E)}f.size>1&&f.has("")&&f.delete("");let m=[...f.values()];return hr.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Rr(s,r)&&e.set.some(n=>Rr(n,r)&&s.every(i=>n.every(c=>i.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new gs(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Ws(this.set[r],e,this.options))return!0;return!1}};$r.exports=te;var qs=Er(),hr=new qs,ws=y(),se=C(),I=v(),gs=O(),{safeRe:S,src:Ps,t:d,comparatorTrimReplace:vs,tildeTrimReplace:xs,caretTrimReplace:Cs}=P(),{FLAG_INCLUDE_PRERELEASE:Ds,FLAG_LOOSE:Gs}=g(),ys=new RegExp(Ps[d.BUILD],"g"),pr=t=>t.value==="<0.0.0-0",Fs=t=>t.value==="",Rr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},js=(t,e)=>(t=t.replace(S[d.BUILD],""),I("comp",t,e),t=_s(t,e),I("caret",t),t=Xs(t,e),I("tildes",t),t=Hs(t,e),I("xrange",t),t=Bs(t,e),I("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Us=(t,e,r)=>N(t)&&!N(e)||N(e)&&r&&!N(r),Xs=(t,e)=>t.trim().split(/\s+/).map(r=>Vs(r,e)).join(" "),Vs=(t,e)=>{let r=e.loose?S[d.TILDELOOSE]:S[d.TILDE];return t.replace(r,(s,n,i,c,u)=>{I("tilde",t,s,n,i,c,u);let f;return N(n)?f="":N(i)?f=`>=${n}.0.0 <${+n+1}.0.0-0`:N(c)?f=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:u?(I("replaceTilde pr",u),f=`>=${n}.${i}.${c}-${u} <${n}.${+i+1}.0-0`):f=`>=${n}.${i}.${c} <${n}.${+i+1}.0-0`,I("tilde return",f),f})},_s=(t,e)=>t.trim().split(/\s+/).map(r=>bs(r,e)).join(" "),bs=(t,e)=>{I("caret",t,e);let r=e.loose?S[d.CARETLOOSE]:S[d.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,c,u,f)=>{I("caret",t,n,i,c,u,f);let $;return N(i)?$="":N(c)?$=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(u)?i==="0"?$=`>=${i}.${c}.0${s} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.0${s} <${+i+1}.0.0-0`:f?(I("replaceCaret pr",f),i==="0"?c==="0"?$=`>=${i}.${c}.${u}-${f} <${i}.${c}.${+u+1}-0`:$=`>=${i}.${c}.${u}-${f} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.${u}-${f} <${+i+1}.0.0-0`):(I("no pr"),i==="0"?c==="0"?$=`>=${i}.${c}.${u} <${i}.${c}.${+u+1}-0`:$=`>=${i}.${c}.${u} <${i}.${+c+1}.0-0`:$=`>=${i}.${c}.${u} <${+i+1}.0.0-0`),I("caret return",$),$})},Hs=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>ks(r,e)).join(" ")),ks=(t,e)=>{t=t.trim();let r=e.loose?S[d.XRANGELOOSE]:S[d.XRANGE];return t.replace(r,(s,n,i,c,u,f)=>{if(I("xRange",t,s,n,i,c,u,f),Us(i,c,u))return t;let $=N(i),m=$||N(c),E=m||N(u),L=E;return n==="="&&L&&(n=""),f=e.includePrerelease?"-0":"",$?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&L?(m&&(c=0),u=0,n===">"?(n=">=",m?(i=+i+1,c=0,u=0):(c=+c+1,u=0)):n==="<="&&(n="<",m?i=+i+1:c=+c+1),n==="<"&&(f="-0"),s=`${n+i}.${c}.${u}${f}`):m?s=`>=${i}.0.0${f} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${c}.0${f} <${i}.${+c+1}.0-0`),I("xRange return",s),s})},Bs=(t,e)=>(I("replaceStars",t,e),t.trim().replace(S[d.STAR],"")),Ys=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace(S[e.includePrerelease?d.GTE0PRE:d.GTE0],"")),Ms=t=>(e,r,s,n,i,c,u,f,$,m,E,L)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N($)?f="":N(m)?f=`<${+$+1}.0.0-0`:N(E)?f=`<${$}.${+m+1}.0-0`:L?f=`<=${$}.${m}.${E}-${L}`:t?f=`<${$}.${m}.${+E+1}-0`:f=`<=${f}`,`${r} ${f}`.trim()),Ws=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==se.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var C=p((So,dr)=>{"use strict";o();var D=Symbol("SemVer ANY"),oe=class t{static get ANY(){return D}constructor(e,r){if(r=mr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ie("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,ie("comp",this)}parse(e){let r=this.options.loose?Ir[Lr.COMPARATORLOOSE]:Ir[Lr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Nr(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(ie("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Nr(e,this.options)}catch{return!1}return ne(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Or(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Or(this.value,r).test(e.semver):(r=mr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ne(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ne(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};dr.exports=oe;var mr=y(),{safeRe:Ir,t:Lr}=P(),ne=ee(),ie=v(),Nr=O(),Or=A()});var G=p((Ao,Sr)=>{"use strict";o();var zs=A(),Ks=(t,e,r)=>{try{e=new zs(e,r)}catch{return!1}return e.test(t)};Sr.exports=Ks});var Ar=p((wo,Tr)=>{"use strict";o();var Zs=A(),Js=(t,e)=>new Zs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Tr.exports=Js});var wr=p((Po,qr)=>{"use strict";o();var Qs=O(),en=A(),rn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new en(e,r)}catch{return null}return t.forEach(c=>{i.test(c)&&(!s||n.compare(c)===-1)&&(s=c,n=new Qs(s,r))}),s};qr.exports=rn});var Pr=p((xo,gr)=>{"use strict";o();var tn=O(),sn=A(),nn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new sn(e,r)}catch{return null}return t.forEach(c=>{i.test(c)&&(!s||n.compare(c)===1)&&(s=c,n=new tn(s,r))}),s};gr.exports=nn});var Cr=p((Do,xr)=>{"use strict";o();var ce=O(),on=A(),vr=x(),cn=(t,e)=>{t=new on(t,e);let r=new ce("0.0.0");if(t.test(r)||(r=new ce("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(c=>{let u=new ce(c.semver.version);switch(c.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||vr(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),i&&(!r||vr(r,i))&&(r=i)}return r&&t.test(r)?r:null};xr.exports=cn});var Gr=p((yo,Dr)=>{"use strict";o();var ln=A(),an=(t,e)=>{try{return new ln(t,e).range||"*"}catch{return null}};Dr.exports=an});var Y=p((jo,Ur)=>{"use strict";o();var un=O(),jr=C(),{ANY:fn}=jr,En=A(),hn=G(),yr=x(),Fr=_(),pn=H(),Rn=b(),$n=(t,e,r,s)=>{t=new un(t,s),e=new En(e,s);let n,i,c,u,f;switch(r){case">":n=yr,i=pn,c=Fr,u=">",f=">=";break;case"<":n=Fr,i=Rn,c=yr,u="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hn(t,e,s))return!1;for(let $=0;$<e.set.length;++$){let m=e.set[$],E=null,L=null;if(m.forEach(h=>{h.semver===fn&&(h=new jr(">=0.0.0")),E=E||h,L=L||h,n(h.semver,E.semver,s)?E=h:c(h.semver,L.semver,s)&&(L=h)}),E.operator===u||E.operator===f||(!L.operator||L.operator===u)&&i(t,L.semver))return!1;if(L.operator===f&&c(t,L.semver))return!1}return!0};Ur.exports=$n});var Vr=p((Xo,Xr)=>{"use strict";o();var mn=Y(),In=(t,e,r)=>mn(t,e,">",r);Xr.exports=In});var br=p((_o,_r)=>{"use strict";o();var Ln=Y(),Nn=(t,e,r)=>Ln(t,e,"<",r);_r.exports=Nn});var Br=p((Ho,kr)=>{"use strict";o();var Hr=A(),On=(t,e,r)=>(t=new Hr(t,r),e=new Hr(e,r),t.intersects(e,r));kr.exports=On});var Mr=p((Bo,Yr)=>{"use strict";o();var dn=G(),Sn=T();Yr.exports=(t,e,r)=>{let s=[],n=null,i=null,c=t.sort((m,E)=>Sn(m,E,r));for(let m of c)dn(m,e,r)?(i=m,n||(n=m)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let u=[];for(let[m,E]of s)m===E?u.push(m):!E&&m===c[0]?u.push("*"):E?m===c[0]?u.push(`<=${E}`):u.push(`${m} - ${E}`):u.push(`>=${m}`);let f=u.join(" || "),$=typeof e.raw=="string"?e.raw:String(e);return f.length<$.length?f:e}});var Qr=p((Mo,Jr)=>{"use strict";o();var Wr=A(),ue=C(),{ANY:le}=ue,ae=G(),fe=T(),Tn=(t,e,r={})=>{if(t===e)return!0;t=new Wr(t,r),e=new Wr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let c=qn(n,i,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},An=[new ue(">=0.0.0-0")],zr=[new ue(">=0.0.0")],qn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=An:t=zr}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=zr}let s=new Set,n,i;for(let h of t)h.operator===">"||h.operator===">="?n=Kr(n,h,r):h.operator==="<"||h.operator==="<="?i=Zr(i,h,r):s.add(h.semver);if(s.size>1)return null;let c;if(n&&i){if(c=fe(n.semver,i.semver,r),c>0)return null;if(c===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!ae(h,String(n),r)||i&&!ae(h,String(i),r))return null;for(let st of e)if(!ae(h,String(st),r))return!1;return!0}let u,f,$,m,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",$=$||h.operator==="<"||h.operator==="<=",n){if(L&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===L.major&&h.semver.minor===L.minor&&h.semver.patch===L.patch&&(L=!1),h.operator===">"||h.operator===">="){if(u=Kr(n,h,r),u===h&&u!==n)return!1}else if(n.operator===">="&&!h.test(n.semver))return!1}if(i){if(E&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===E.major&&h.semver.minor===E.minor&&h.semver.patch===E.patch&&(E=!1),h.operator==="<"||h.operator==="<="){if(f=Zr(i,h,r),f===h&&f!==i)return!1}else if(i.operator==="<="&&!h.test(i.semver))return!1}if(!h.operator&&(i||n)&&c!==0)return!1}return!(n&&$&&!i&&c!==0||i&&m&&!n&&c!==0||L||E)},Kr=(t,e,r)=>{if(!t)return e;let s=fe(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Zr=(t,e,r)=>{if(!t)return e;let s=fe(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Jr.exports=Tn});var Ei=p((zo,tt)=>{o();var Ee=P(),et=g(),wn=O(),rt=z(),gn=w(),Pn=Ae(),vn=we(),xn=ve(),Cn=De(),Dn=ye(),Gn=je(),yn=Xe(),Fn=_e(),jn=T(),Un=Be(),Xn=Me(),Vn=V(),_n=Ze(),bn=Qe(),Hn=x(),kn=_(),Bn=J(),Yn=Q(),Mn=b(),Wn=H(),zn=ee(),Kn=lr(),Zn=ur(),Jn=C(),Qn=A(),ei=G(),ri=Ar(),ti=wr(),si=Pr(),ni=Cr(),ii=Gr(),oi=Y(),ci=Vr(),li=br(),ai=Br(),ui=Mr(),fi=Qr();tt.exports={parse:gn,valid:Pn,clean:vn,inc:xn,diff:Cn,major:Dn,minor:Gn,patch:yn,prerelease:Fn,compare:jn,rcompare:Un,compareLoose:Xn,compareBuild:Vn,sort:_n,rsort:bn,gt:Hn,lt:kn,eq:Bn,neq:Yn,gte:Mn,lte:Wn,cmp:zn,coerce:Kn,truncate:Zn,Comparator:Jn,Range:Qn,satisfies:ei,toComparators:ri,maxSatisfying:ti,minSatisfying:si,minVersion:ni,validRange:ii,outside:oi,gtr:ci,ltr:li,intersects:ai,simplifyRange:ui,subset:fi,SemVer:wn,re:Ee.re,src:Ee.src,tokens:Ee.t,SEMVER_SPEC_VERSION:et.SEMVER_SPEC_VERSION,RELEASE_TYPES:et.RELEASE_TYPES,compareIdentifiers:rt.compareIdentifiers,rcompareIdentifiers:rt.rcompareIdentifiers}});export{Ei as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"./chunk-DVFVO6ZE.js";import{U as l}from"./chunk-YKDRUAY3.js";import{i as h}from"./chunk-TD6JBHUS.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();var i=["live","unpublished","development"];async function A(e,r){let t=await l(e,r);return d(t)}async function d(e,{allowEmpty:r=!1}={}){let t=e.storeFqdn,o=(await a(e)).filter(w);if(o.length===0&&!r)throw new h(`There are no themes in the ${t} store`);return o.sort(y)}function w(e){return i.includes(e.role)}function y(e,r){return i.indexOf(e.role)-i.indexOf(r.role)}u();function E(e,r,t,{allowEmpty:o=!1}={}){return T(e,r,t,o)??L(e,r,t,o)}function T(e,r,t,o){let n=t.role;if(!n)return;let s=`No themes on the store ${e} match the role "${n}"`;return p(r,f=>f.role===n).orThrow(s,o)}function L(e,r,t,o){return t.themeIdentifiers.flatMap(s=>{let f=`No themes on the store ${e} match the ID or name "${s}"`;return p(r,c=>`${c.id}`===s||c.name.toLowerCase()===s.toLowerCase()?!0:g(c.name.toLowerCase(),s.toLowerCase())).orThrow(f,o)})}function p(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:(o,n)=>{if(n)return[];throw new h(o)}}}var m=class{queryProps;constructor(r){this.queryProps=r}get role(){for(let r of i)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function g(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{i as a,A as b,d as c,E as d,m as e};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{V as g,W as X,a as J,ha as Q,ja as y,ka as ee,ra as te,sa as qe,va as U,x as P,xa as oe}from"./chunk-YKDRUAY3.js";import{b as ne}from"./chunk-ZDF5N422.js";import{C as ae,D as re,E as se,H as ce,I as le,S as pe,y as ie}from"./chunk-2KUM2RU4.js";import{f as Z}from"./chunk-2KFYIYLI.js";import{e as K}from"./chunk-QBRRFFMZ.js";import{a as q}from"./chunk-LG3KEHGD.js";import{i as c,l as ue}from"./chunk-TD6JBHUS.js";import{N as G,T,Va as Y,vb as z,zb as de}from"./chunk-ZMOW2YZ4.js";import{i as I}from"./chunk-B4OMIONW.js";import{b as t}from"./chunk-3PYDIBTX.js";import{c as B,i as A}from"./chunk-IWTNUJGY.js";import{e as je,g as r}from"./chunk-VKWPEFWQ.js";r();function Bt(e,{httpsOnly:n=!1,message:o="Invalid URL"}={}){return e.refine(i=>F(i,n),{message:o}).refine(i=>!i.includes(`
|
|
2
|
+
`),{message:o})}function Gt(e,{message:n="URL must be HTTPS URL or start with /"}={}){return e.refine(o=>o.startsWith("/")||F(o,!0),{message:n})}var me=/[\r\n\t]/;function fe(e){return F(e,!0)}function F(e,n){try{let o=new URL(e);return n?o.protocol==="https:":["http:","https:"].includes(o.protocol)}catch{return!1}}function Yt(e){return typeof e=="string"&&!e.startsWith("/")?`/${e}`:e}var Be=30;function Kt(e){return e.length<=Be}r();function $(e){let n=e.match(/\/(\d+)$/);return n?n[1]:void 0}function he(e){return $(Buffer.from(e,"base64").toString("utf8"))}function ge(e){return Buffer.from(e).toString("base64")}r();async function V(e){if(e.length===1)return e[0];let o=new Set(e.map(a=>a.businessName)).size<e.length,i=await se({message:"Which organization do you want to use?",choices:e.map(a=>({label:o?`${a.businessName} (${a.id})`:a.businessName,value:a.id}))});return e.find(a=>a.id===i)}r();var Ge=["ACTIVE","LOCKED"];r();r();r();var W={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},v=Object.keys(W);r();r();var N=t.object({id:t.string(),name:t.string(),subdomain:t.string(),country:t.string().optional(),type:t.string().optional(),authScopes:t.array(t.string()).optional(),plan:t.string().optional(),organizationId:t.string(),organizationName:t.string()}),C=t.object({id:t.string(),name:t.string()});var Se=N.pick({name:!0}).extend({domain:N.shape.subdomain,adminUrl:t.string().nullish(),plan:t.enum(v),featurePreview:t.string().optional(),country:N.shape.country,demoData:t.boolean()}),H=q({name:"CreateDevStoreResult",schema:t.object({store:Se,organization:C}),definitions:{CreatedDevStore:Se,StoreOrganization:C}});r();var ke={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppDevelopmentStore"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"country"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createAppDevelopmentStore"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopName"},value:{kind:"Variable",name:{kind:"Name",value:"shopName"}}},{kind:"Argument",name:{kind:"Name",value:"priceLookupKey"},value:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}}},{kind:"Argument",name:{kind:"Name",value:"prepopulateTestData"},value:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}}},{kind:"Argument",name:{kind:"Name",value:"developerPreviewHandle"},value:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}}},{kind:"Argument",name:{kind:"Name",value:"country"},value:{kind:"Variable",name:{kind:"Name",value:"country"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shopAdminUrl"}},{kind:"Field",name:{kind:"Name",value:"shopDomain"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var ve={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PollStoreCreation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}},type:{kind:"NonNullType",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:"storeCreation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopDomain"},value:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();function b(e={}){return{type:"token_refresh",handler:async()=>({token:await g([],{noPrompt:e.noPrompt,allowAutomationToken:!0})})}}function Ye(e){if(typeof e!="object"||e===null)return!1;let{statusCode:n,response:o}=e,i=n??o?.status;return i===401||i===403}var R=class extends c{constructor(n){let o=n.businessName??`organization ${n.id}`,i="in your organization's settings in the Shopify admin";X()?super(`This service account can't manage dev stores in ${o}.`,null,[`Give the service account Dev store management access ${i}.`,"Or use a token from a service account that has that access."]):Z()?super(`This automation token can't manage dev stores in ${o}.`,null,[`Create a service account with Dev store management access ${i}.`,"Set its token in the SHOPIFY_SERVICE_ACCOUNT_TOKEN environment variable."]):super(`You don't have permission to manage dev stores in ${o}.`,null,["Check that you're logged in to the right account.","Or ask an organization admin for access."])}};async function E(e,n){try{return await oe({...n,organizationId:e.id})}catch(o){throw Ye(o)?new R(e):o}}var Ke=2,Ze=300*1e3;function Je(e){switch(e){case"CALLING_CORE":return"Initiating store creation";case"AWAITING_CORE_STORE_READY":return"Waiting for store to be ready";case"FINALIZING":return"Finalizing store setup";case"COMPLETE":return"Store creation complete!";case"FAILED":return"Store creation failed.";case"TIMED_OUT":return"Store creation timed out.";case"USER_ERROR":return"Store creation encountered a user error.";default:return`Store creation status: ${e}`}}async function Xe(e){let{organization:n,name:o,plan:i}=e,a=await g([],{allowAutomationToken:!0}),s=b(),u=(await E(n,{query:ke,token:a,variables:{shopName:o,priceLookupKey:W[i],prepopulateTestData:e.withDemoData??!1,developerPreviewHandle:e.featurePreview,country:e.country},unauthorizedHandler:s})).createAppDevelopmentStore;if(!u)throw new c("Store creation failed: unexpected empty response.");let d=u.userErrors;if(d&&d.length>0){let p=d.map(k=>k.message).join(", ");throw new c(`Failed to create dev store: ${p}`)}let{shopDomain:m,shopAdminUrl:S}=u;if(!m)throw new c("Store creation succeeded but no shop domain was returned.");if(await ce({title:z`Waiting for store to be ready`,task:async p=>{let k=Date.now(),D=!1;for(;;){if(Date.now()-k>Ze)throw D?new c("Store creation timed out after 5 minutes."):new c("Store creation timed out after 5 minutes without reporting a status.",null,[`Check whether ${m} was created with \`shopify store list\` before trying again.`]);let f=(await E(n,{query:ve,token:a,variables:{shopDomain:m},unauthorizedHandler:s})).organization?.storeCreation?.status;if(f){if(D=!0,f==="COMPLETE")return;if(f==="FAILED"||f==="TIMED_OUT"||f==="USER_ERROR")throw new c(`Store creation failed with status: ${f}`)}p(z`${f?Je(f):"Waiting for store creation to start"}`),await pe(Ke)}},renderOptions:{stdout:process.stderr}}),e.json)de(H.encode({store:{name:o,domain:m,adminUrl:S,plan:i,...e.featurePreview?{featurePreview:e.featurePreview}:{},...e.country?{country:e.country}:{},demoData:e.withDemoData??!1},organization:{id:n.id,name:n.businessName}}));else if(e.summary!==!1){let p=[];x(p,"Domain",m),p.push(["Admin",S?{link:{label:S,url:S}}:"N/A"]),x(p,"Plan",i),x(p,"Feature preview",e.featurePreview),x(p,"Country",e.country),x(p,"Demo data",e.withDemoData?"enabled":"disabled"),ie({headline:`Dev store "${o}" created successfully.`,customSections:[{body:{tabularData:p,firstColumnSubdued:!0}}]})}return m}function x(e,n,o){o!=null&&o!==""&&e.push([n,o])}var Qe={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};function et(){return le({message:"Name for the new dev store"})}function tt(){return ae({message:"Which Shopify plan do you want to use?",choices:v.map(e=>({label:Qe[e],value:e}))})}function nt(){return re({message:"Populate the store with demo data?",confirmationMessage:"Yes, add demo data",cancellationMessage:"No, start with an empty store",defaultValue:!0})}r();r();r();var be={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindOrganization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},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:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var _e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListOrganizations"},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:"organizationsWithAccessToDestination"},arguments:[{kind:"Argument",name:{kind:"Name",value:"destination"},value:{kind:"EnumValue",value:"APPS_CLI"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"shopCount"}},{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"}}]}}]}}]};async function M(){return(await ye()).organizations}async function ot(e){return ye(e)}async function it(e,n,o){let i=n??await g([],{allowAutomationToken:!0}),s=(await U({query:be,token:i,variables:{organizationId:at(e)},unauthorizedHandler:o??b(),cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:K(i)}})).currentUserAccount?.organization;if(s)return{id:e,businessName:s.name}}function at(e){let n=e.startsWith("gid://")?$(e):e;if(n===void 0||!/^\d+$/.test(n))throw new c(`Invalid organization ID: ${e}`);return ge(`gid://organization/Organization/${n}`)}async function ye(e){let n=e??await g([],{allowAutomationToken:!0}),o=await U({query:_e,token:n,unauthorizedHandler:b()});return o.currentUserAccount?{organizations:o.currentUserAccount.organizationsWithAccessToDestination.nodes.map(a=>{let s=he(a.id);if(s===void 0)throw new c(`Failed to decode organization ID from: ${a.id}`);return{id:s,businessName:a.name,status:a.status,shopCount:a.shopCount??null,url:a.url}}),currentUserResolved:!0}:{organizations:[],currentUserResolved:!1}}r();async function rt(e){let n=await M();if(n.length===0)throw new c("No organizations found.","Make sure you have access to a Shopify organization.");if(e){let o=n.find(i=>i.id===e);if(!o)throw new c(`Organization with ID ${e} not found.`,`Available organizations: ${n.map(i=>`${i.businessName} (${i.id})`).join(", ")}`);return o}return V(n)}r();var _o={skipEsbuildReactDedeuplication:"SHOPIFY_CLI_SKIP_ESBUILD_REACT_DEDUPLICATION",disableGraphiQLExplorer:"SHOPIFY_CLI_DISABLE_GRAPHIQL",useDynamicConfigSpecifications:"SHOPIFY_CLI_DYNAMIC_CONFIG",enableAppLogPolling:"SHOPIFY_CLI_ENABLE_APP_LOG_POLLING",templatesJsonPath:"SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH",mkcertBinaryPath:"SHOPIFY_CLI_MKCERT_BINARY",disableMinificationOnDev:"SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV"},st={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},yo={production:".env"},No={reactTypes:"17.0.30"},Ne={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:st.web}},xo={graphiql:3457,localhost:3458},wo=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;r();var xe=50,we=250,ct=t.object({namespace:t.string(),key:t.string(),owner_type:t.string().optional()}),lt=t.object({sms_marketing:t.boolean().optional(),customer_privacy:t.boolean().optional()}),ut=t.object({sources:t.array(t.string()).optional()}),pt=t.object({network_access:t.boolean().optional(),block_progress:t.boolean().optional(),api_access:t.boolean().optional(),collect_buyer_consent:lt.optional(),iframe:ut.optional(),bundle_size_exception:t.boolean().optional()}),dt=t.object({runs_offline:t.boolean().optional()}),Po=t.object({type:t.string().optional(),extensions:t.array(t.any()).optional()}),mt=t.object({event:t.string(),blocking:t.boolean().default(!1),applies_to:t.array(t.string()).optional()}),ft=t.object({allow_direct_linking:t.boolean().optional(),intercepts:t.array(mt).optional()}),ht=t.object({module:t.string()}),gt=t.object({target:t.string(),module:t.string(),should_render:ht.optional(),tools:t.string().optional(),instructions:t.string().optional(),intents:t.array(t.object({type:t.string(),action:t.string(),schema:t.string(),name:t.string().optional(),description:t.string().optional()})).optional(),metafields:t.array(ct).optional(),default_placement:t.string().optional(),urls:t.object({edit:t.string().optional()}).optional(),capabilities:ft.optional(),preloads:t.object({chat:t.string().optional()}).optional(),assets:t.string().optional()}),Co=t.array(gt),De=t.string(),St=t.object({key:t.string().optional(),name:t.string().optional(),description:t.string().optional(),required:t.boolean().optional(),default_value:t.any().optional(),type:t.string(),validations:t.array(t.any()).optional(),marketingActivityCreateUrl:t.string().optional(),marketingActivityDeleteUrl:t.string().optional()}),Ae=t.object({fields:t.array(St).optional()}),Te=t.string().trim().nonempty("Handle can't be empty").max(xe,`Handle can't exceed ${xe} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"Handle can't start or end with a hyphen"),kt=t.string().trim().nonempty("UID can't be empty").max(we,`UID can't exceed ${we} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"UID can't start or end with a hyphen"),O=t.object({name:t.string().optional(),type:t.string().optional(),handle:Te.optional(),uid:kt.optional(),description:t.string().optional(),api_version:De.optional(),extension_points:t.any().optional(),capabilities:pt.optional(),supported_features:dt.optional(),settings:Ae.optional()}),Ro=O.extend({handle:Te}),Pe=O.omit({handle:!0}),Eo=t.object({api_version:De.optional(),description:t.string().optional(),extensions:t.array(t.any()),settings:Ae.optional()});r();r();r();r();var vt=/^(https:\/\/)/,bt=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,_t=/^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/,yt=/^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;function _(e){return typeof e=="string"&&e.endsWith("/")?e.replace(/\/+$/,""):e}var h=t.string({invalid_type_error:"Value must be string"}).refine(e=>e.startsWith("/")?!0:vt.test(e)||bt.test(e)||_t.test(e)||yt.test(e),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"});function L(e,n){return!n||!e.startsWith("/")?e:`${_(n)}${e}`}var Nt=(e,n,o,i)=>{if(o.startsWith("//"))throw new c(`${e} ${n} is invalid: a URL relative to the app URL must start with a single slash.`);if(me.test(o))throw new c(`${e} ${n} is invalid: a URL must not contain control characters such as newlines or tabs.`);let a=L(o,i);if(a.startsWith("/"))throw new c(`${e} ${n} is a relative URL, but no application_url is configured. Set application_url in your app configuration or use an absolute HTTPS URL.`);if(!fe(a))throw new c(`${e} ${n} must resolve to an HTTPS URL. Set application_url to an HTTPS URL or use an absolute HTTPS URL.`);return a};function j(e,n,o,i){let a=o;for(let s of n){let l=a[s];typeof l=="string"&&l.startsWith("/")&&(a[s]=Nt(e,s,l,i))}}r();import{isUtf8 as xt}from"node:buffer";import Ce from"fs";async function Re(e,n){let o=await Y(B(e,"locales/*.json"));if(!o||o.length===0)return{};let i=wt(o);if(i.length===0)throw new c(`Missing default language in ${n} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(i.length>1)throw new c(`Error loading ${n}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let a of o)if(Ce.statSync(a).size===0)throw new c(`Error loading ${n}`,`Locale file ${a} can't be empty`);return{default_locale:i[0],translations:Dt(o,n)}}function wt(e){return e.filter(o=>A(o).endsWith(".default.json")).map(o=>A(o).split(".")[0])}function Dt(e,n){let o={};for(let i of e){let a=At(A(i).split(".")[0],"Locale code is unset"),s=Ce.readFileSync(i);if(!xt(s))throw new c(`Error loading ${n}`,`Locale file ${i} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);o[a]=s.toString("base64")}return o}function At(e,n){if(e===void 0)throw new ue(n);return e}function Tt(e){return e.experience==="configuration"}var Ee;(function(e){e.ShouldRender="should_render",e.Main="main",e.Tools="tools",e.Instructions="instructions",e.Intents="intents"})(Ee||(Ee={}));function Oe(e){let o={...{externalIdentifier:`${e.identifier}_external`,additionalIdentifiers:[],externalName:T(e.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:e.identifier,schema:O,registrationLimit:Ne.extensions.defaultRegistrationLimit,transform:e.transformLocalToRemote,reverseTransform:e.transformRemoteToLocal,experience:e.experience??"extension",uidStrategy:e.uidStrategy??(e.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,clientSteps:e.clientSteps},...e};return{...o,contributeToAppConfigurationSchema:i=>{let a=Tt(o),s=o.schema._def.shape!==void 0,l=o.uidStrategy==="single";return a&&s&&l?i.merge(o.schema):i},parseConfigurationObject:i=>{let a=o.schema.safeParse(i);return a.success?{state:"ok",data:a.data,errors:void 0}:{state:"error",data:void 0,errors:a.error.errors}}}}function Le(e){let n=e.appModuleFeatures??(()=>[]);return Oe({identifier:e.identifier,schema:e.schema,appModuleFeatures:n,transformLocalToRemote:Pt(e.transformConfig),transformRemoteToLocal:Ct(e.schema,e.transformConfig),experience:"configuration",uidStrategy:e.uidStrategy??"single",expandConfig:e.expandConfig,getIdentity:e.getIdentity,getTarget:e.getTarget,clientSteps:e.clientSteps,getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,patchWithAppDevURLs:e.patchWithAppDevURLs})}function ri(e){let n=e.appRelativeUrlFields;return Oe({identifier:e.identifier,schema:t.any({}),appModuleFeatures:e.appModuleFeatures,experience:e.experience,clientSteps:e.clientSteps,uidStrategy:e.uidStrategy,transformRemoteToLocal:e.transformRemoteToLocal,devSessionWatchConfig:e.devSessionWatchConfig,appRelativeUrlFields:n,patchWithAppDevURLs:n?.length?(o,i)=>{j(T(e.identifier.replace(/_/g," ")),n,o,i.applicationUrl)}:void 0,deployConfig:async(o,i,a,s,l)=>{let u=Rt(o);if(n?.length){let d=l?.appConfiguration?.application_url,m=typeof d=="string"?d:void 0;j(T(e.identifier.replace(/_/g," ")),n,u,m)}if(e.appModuleFeatures().includes("localization")){let d=await Re(i,e.identifier);u={...u,localization:d}}return u}})}function Pt(e){return Object.keys(e).includes("forward")?e.forward:n=>Ue(n,e)}function Ct(e,n){return n?Object.keys(n).includes("reverse")?n.reverse:o=>Ue(o,n,!0):o=>Ie(e,o)}function Ue(e,n,o=!1){let i={};for(let[a,s]of Object.entries(n)){let l=o?a:s,u=o?s:a,d=y(e,l);d!==void 0&&ee(i,u,d)}return i}function Ie(e,n){return Object.keys(e._def.shape()).reduce((o,i)=>{let a=e._def.shape()[i];return a instanceof t.ZodOptional&&(a=a._def.innerType),a instanceof t.ZodObject?o[i]=Ie(a,n):(n[i]!==void 0&&(o[i]=n[i]),delete n[i]),o},{})}function Rt(e){let{type:n,handle:o,uid:i,path:a,extensions:s,...l}=e;return l}r();var Et="webhook_subscription",Ot=t.object({topic:t.string(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),api_version:t.string(),uri:t.preprocess(_,h,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional()});function Lt(e){let{api_version:n,topic:o,...i}=e;return{webhooks:{subscriptions:[{topics:[o],...i}]}}}var Ut={forward:(e,n)=>{let o=e,i;return"application_url"in n&&(i=n?.application_url),{...o,uri:L(o.uri,i)}},reverse:Lt},It=Le({identifier:Et,schema:Ot,transformConfig:Ut,uidStrategy:"dynamic"}),mi=It;r();r();var w;(function(e){e.CustomersRedact="customers/redact",e.CustomersDataRequest="customers/data_request",e.ShopRedact="shop/redact"})(w||(w={}));var ze=t.object({topics:t.array(t.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),uri:t.preprocess(e=>_(e),h,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:t.array(t.enum([w.CustomersRedact,w.CustomersDataRequest,w.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});r();function Fe(e,n){let o=zt(e);if(o)return n.addIssue(o),t.NEVER}function zt(e){let{subscriptions:n=[]}=e,o=new Set,i=[];if(!n.length)return;if(e.privacy_compliance&&e.subscriptions?.some(s=>s.compliance_topics))return{code:t.ZodIssueCode.custom,message:"The privacy_compliance section can't be used if there are subscriptions including compliance_topics"};let a=n.flatMap(s=>s.compliance_topics).filter(Boolean);if(G(a).length!==a.length)return{code:t.ZodIssueCode.custom,message:"You can\u2019t have multiple subscriptions with the same compliance topic",fatal:!0,path:["subscriptions"]};for(let[s,{uri:l,topics:u=[],compliance_topics:d=[],filter:m=""}]of n.entries()){let S=["subscriptions",s];if(!u.length&&!d.length)return{code:t.ZodIssueCode.custom,message:"Either topics or compliance_topics must be added to the webhook subscription",path:S};u.forEach(p=>{let k=`${p}::${l}::${m}`;if(o.has(k)){let D=m?I.dim(`
|
|
3
|
+
|
|
4
|
+
topic: ${p}
|
|
5
|
+
uri: ${l}
|
|
6
|
+
filter: ${m}`):I.dim(`
|
|
7
|
+
|
|
8
|
+
topic: ${p}
|
|
9
|
+
uri: ${l}`);i.push(D)}o.add(k)})}if(i.length>0){let s=i.join("");return{code:t.ZodIssueCode.custom,message:`Multiple subscriptions with the exact same topic, uri, and filter. To resolve, remove or edit the duplicates ${s}`,path:["subscriptions"]}}}r();function Di(e){let n=y(e,"webhooks");if(!n)return e;let{api_version:o}=n;return{api_version:o}}function Ai(e){let n={},o=y(e,"api_version");return n={...o?{webhooks:{api_version:o}}:{}},n}function Ve(e){if(e.length===0)return;let n=e.filter(s=>s.topics!==void 0).flatMap(({compliance_topics:s,topics:l,...u})=>We(l)?.map(m=>({topics:[m],...u}))??[]),o=e.filter(s=>s.topics===void 0||s.compliance_topics!==void 0).map(({compliance_topics:s,topics:l,...u})=>({compliance_topics:s,...u})),i=Vt(o,"compliance_topics"),a=Ft(i);return[...$e(a),...$e(n)]}function We(e){return e?.sort((n,o)=>n.localeCompare(o))}function $e(e){return e.sort((n,o)=>n.uri.localeCompare(o.uri))}function Ft(e){return e.forEach(n=>n.compliance_topics=We(n.compliance_topics)),e}function $t(e,n){return e.find(o=>o.uri===n.uri&&Q(o.include_fields??[],n.include_fields??[])&&o.filter===n.filter)}function Vt(e,n){return e.reduce((o,i)=>{let a=$t(o,i);return a?n&&i?.[n]?.length?a[n]?.push(...i[n]):(i.topics&&(a.topics??=[],a.topics.push(...i.topics)),i.compliance_topics&&(a.compliance_topics??=[],a.compliance_topics.push(...i.compliance_topics))):o.push(i),o},[])}var Wt=t.object({api_version:t.string({required_error:"String is required"}),privacy_compliance:t.object({customer_deletion_url:h.optional(),customer_data_request_url:h.optional(),shop_deletion_url:h.optional()}).optional(),subscriptions:t.array(ze).optional().transform(e=>Ve(e??[]))}),Ii=Pe.extend({webhooks:Wt.superRefine(Fe)});r();r();var He=(e,n,o)=>{let i=new URL(e);return n&&i.searchParams.append("cursor",n),o?.status&&i.searchParams.append("status",o.status),o?.source&&i.searchParams.append("source",o.source),i.toString()};var Me=je(qe()),Ht=new Me.default({minTime:150,maxConcurrent:10});async function Mt(e){let n="App Management",i=`https://${await P()}/app_management/unstable/graphql.json`;return{token:e,api:n,url:i,responseOptions:{onResponse:jt}}}var Bi=e=>J(e),Gi=async(e,n,o)=>{let a=`https://${await P()}/app_management/unstable/organizations/${e}/app_logs/poll`;return He(a,n,o)},Yi=async(e,n)=>`https://${await P()}/app_management/unstable/organizations/${encodeURIComponent(e)}/apps/${encodeURIComponent(n)}/channel_spec_export.json`;async function Ki(e){let n=e.cacheOptions?.cacheExtraKey??"",o=e.cacheOptions?{...e.cacheOptions,cacheExtraKey:n}:void 0;return Ht.schedule(async()=>te({...await Mt(e.token),query:e.query,variables:e.variables,cacheOptions:o,preferredBehaviour:e.requestOptions?.requestMode,unauthorizedHandler:e.unauthorizedHandler}))}function jt(e){if(!e.extensions)return;let n=[];for(let o of e.extensions.deprecations)o.supportedUntilDate&&n.push(new Date(o.supportedUntilDate));ne(n)}export{b as a,E as b,$ as c,he as d,ge as e,M as f,ot as g,it as h,V as i,rt as j,Ge as k,v as l,N as m,C as n,H as o,Xe as p,et as q,tt as r,nt as s,_o as t,st as u,yo as v,No as w,Ne as x,xo as y,wo as z,Bt as A,Gt as B,me as C,Yt as D,Be as E,Kt as F,_ as G,L as H,xe as I,ct as J,Po as K,Co as L,St as M,O as N,Ro as O,Pe as P,Eo as Q,Nt as R,Re as S,Tt as T,Ee as U,Oe as V,Le as W,ri as X,Ue as Y,Et as Z,mi as _,w as $,ze as aa,Di as ba,Ai as ca,Ve as da,Vt as ea,Ii as fa,Bi as ga,Gi as ha,Yi as ia,Ki as ja,jt as ka};
|