shopify 4.9.5 → 5.0.1
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-RSUIYNLC.js +1 -0
- package/dist/analytics-V2SDYXQJ.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/assets/hydrogen/vite/package.json +3 -4
- package/dist/assets/hydrogen/vite/vite.config.js +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-2AW3KBTP.js +1 -0
- package/dist/{chunk-S6A7TMR4.js → chunk-2CJQQQW4.js} +1 -1
- package/dist/{chunk-7LB6DPB6.js → chunk-2M4BKFYF.js} +1 -1
- package/dist/chunk-2M535QQJ.js +6 -0
- package/dist/chunk-2NZ7GDDR.js +2 -0
- package/dist/{chunk-QUO4RD3W.js → chunk-2QQ7EBJD.js} +1 -1
- package/dist/chunk-2RFCYZMG.js +47 -0
- package/dist/chunk-2S5NPJEJ.js +5 -0
- package/dist/chunk-2TPLPZA2.js +3 -0
- package/dist/{chunk-ANG44FIF.js → chunk-2YGPWG3I.js} +1 -1
- package/dist/chunk-32O27NE3.js +1 -0
- package/dist/chunk-335BUVBP.js +1 -0
- package/dist/{chunk-MZL6VM3W.js → chunk-364BVGRY.js} +1 -1
- package/dist/{chunk-4VS7YD53.js → chunk-36TZ447N.js} +1 -1
- package/dist/chunk-37P5YOP2.js +7 -0
- package/dist/chunk-3G2PEYPI.js +2 -0
- package/dist/{chunk-2II4W4ZF.js → chunk-3JACWBUC.js} +1 -1
- package/dist/chunk-43HKFLOU.js +3 -0
- package/dist/chunk-46JYM3GH.js +1 -0
- package/dist/chunk-4EDE3UH7.js +18 -0
- package/dist/{chunk-ND6O6KT6.js → chunk-4GQEXVDT.js} +1 -1
- package/dist/{chunk-5XTJ4OL4.js → chunk-4IUXLUFD.js} +1 -1
- package/dist/chunk-4QZ6OBXL.js +4 -0
- package/dist/{chunk-XVFQ6CNO.js → chunk-4SDCXKYR.js} +9 -6
- package/dist/chunk-56GKTWFF.js +5 -0
- package/dist/chunk-5AQ5JT2V.js +7 -0
- package/dist/{chunk-SUTVPAJF.js → chunk-5AWELO3D.js} +1 -1
- package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
- package/dist/chunk-5D4FNAAD.js +3 -0
- package/dist/chunk-5TWYJQQO.js +1 -0
- package/dist/{chunk-3XAD2E55.js → chunk-5XOEMYEQ.js} +1 -1
- package/dist/chunk-5YUDEPEY.js +1 -0
- package/dist/chunk-5YXYYQBX.js +1 -0
- package/dist/chunk-63UKZLPC.js +1 -0
- package/dist/chunk-6JZC6UKY.js +20 -0
- package/dist/chunk-6PUU6ZNQ.js +1 -0
- package/dist/chunk-6Y6A2QGK.js +3 -0
- package/dist/chunk-75LAVRRL.js +274 -0
- package/dist/chunk-7AWAOPLA.js +1 -0
- package/dist/chunk-7GHSE7SG.js +1 -0
- package/dist/{chunk-CEQ5S3HH.js → chunk-7NYCJG2U.js} +1 -1
- package/dist/chunk-7U2MTK6I.js +1 -0
- package/dist/{chunk-NHE46R6C.js → chunk-7XAEI4XT.js} +1 -1
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-A7LBGXWG.js +1 -0
- package/dist/{chunk-SEXH4EP5.js → chunk-ACA2BGAD.js} +1 -1
- package/dist/chunk-ADVLRSSO.js +1 -0
- package/dist/chunk-AIEVQSI3.js +1 -0
- package/dist/chunk-AOBE6HN6.js +31 -0
- package/dist/chunk-AQ34X5B3.js +2 -0
- package/dist/chunk-B2VE7WOX.js +1 -0
- package/dist/chunk-B4ISKIXN.js +5 -0
- package/dist/chunk-BAHIL37I.js +1 -0
- package/dist/chunk-BB7GAZP6.js +1 -0
- package/dist/{chunk-AJMJQA4J.js → chunk-BN7ZXAZJ.js} +1 -1
- package/dist/chunk-BNTOGZLY.js +1 -0
- package/dist/chunk-BU3JQM3W.js +1 -0
- package/dist/chunk-C3LL5CZA.js +1 -0
- package/dist/{chunk-PIGERIRY.js → chunk-C4EKNOLY.js} +1 -1
- package/dist/{chunk-YN4FSUFF.js → chunk-CFUZ6574.js} +1 -1
- package/dist/{chunk-7DSH4CRU.js → chunk-CKVVJ4XO.js} +1 -1
- package/dist/chunk-CNPBDSDL.js +1 -0
- package/dist/{chunk-BAHM64B4.js → chunk-CWR3IFXD.js} +1 -1
- package/dist/{chunk-T3UCIWRH.js → chunk-CX3ANDPI.js} +1 -1
- package/dist/chunk-CXPYOLGM.js +4 -0
- package/dist/{chunk-MTBABHUB.js → chunk-D4LFWIFE.js} +1 -1
- package/dist/chunk-DM7BTMFP.js +2 -0
- package/dist/{chunk-WGO2GC6I.js → chunk-DSKAIC7O.js} +1 -1
- package/dist/{chunk-WKVFVT3H.js → chunk-DTRENW4Q.js} +1 -1
- package/dist/{chunk-G362JEAV.js → chunk-DVW7NDVD.js} +1 -1
- package/dist/chunk-E3CTHNQS.js +1 -0
- package/dist/chunk-EA5XVQJT.js +1 -0
- package/dist/{chunk-K6FH5JSY.js → chunk-EH22T4FI.js} +2 -2
- package/dist/{chunk-5NCWBBRW.js → chunk-ETXBF6Q7.js} +1 -1
- package/dist/{chunk-5GFVMGAZ.js → chunk-EXTVC33U.js} +1 -1
- package/dist/chunk-F3OM2YO6.js +1 -0
- package/dist/{chunk-MWWULCLD.js → chunk-FHNJLON5.js} +1 -1
- package/dist/chunk-FK5OFLSJ.js +1 -0
- package/dist/chunk-FNWXMCSD.js +97 -0
- package/dist/chunk-FPOZMNT2.js +2 -0
- package/dist/chunk-FS5PZCZ3.js +1 -0
- package/dist/chunk-FTHVOIK7.js +4 -0
- package/dist/chunk-FVRI7ZKE.js +103 -0
- package/dist/chunk-FZCGRIOM.js +1 -0
- package/dist/chunk-GCKGQFV7.js +1 -0
- package/dist/chunk-GGJUPL4W.js +6 -0
- package/dist/{chunk-RW3P3UMU.js → chunk-GHU6YEXH.js} +2 -2
- package/dist/chunk-GNPIKPHB.js +1 -0
- package/dist/{chunk-PT3OZEBI.js → chunk-GSGCSBRN.js} +1 -1
- package/dist/chunk-H57KYDEI.js +16 -0
- package/dist/chunk-HF4NDEX3.js +1 -0
- package/dist/chunk-HNU6R7RT.js +7 -0
- package/dist/{chunk-65GNYRYR.js → chunk-HP2ZAAY7.js} +2 -2
- package/dist/chunk-HPT3UXZ5.js +4 -0
- package/dist/chunk-HT66BOEC.js +8 -0
- package/dist/chunk-HXNGLDMU.js +1 -0
- package/dist/chunk-IAL6IQYW.js +16 -0
- package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
- package/dist/chunk-IULZYDCI.js +9 -0
- package/dist/chunk-IWTNUJGY.js +2 -0
- package/dist/chunk-IWTOC6DG.js +1 -0
- package/dist/chunk-IY5EI5V2.js +1 -0
- package/dist/{chunk-AODTY2BL.js → chunk-J3UXIC23.js} +4 -4
- package/dist/{chunk-EZG5EB7D.js → chunk-J5DUFSR4.js} +1 -1
- package/dist/chunk-J7BTC45S.js +1 -0
- package/dist/chunk-JMVK2BIB.js +3 -0
- package/dist/chunk-JUTULEWW.js +5 -0
- package/dist/{chunk-DO5YFMTJ.js → chunk-K3YALQBQ.js} +1 -1
- package/dist/{chunk-XPDHT3Z4.js → chunk-KGASGUDQ.js} +1 -1
- package/dist/{chunk-JPFHPVIO.js → chunk-KLYGMYXV.js} +1 -1
- package/dist/chunk-KNQXCU3Y.js +6 -0
- package/dist/{chunk-4BXQTW5G.js → chunk-KOTZSPZA.js} +1 -1
- package/dist/chunk-KT5QQOES.js +3 -0
- package/dist/chunk-KVF55INC.js +5 -0
- package/dist/chunk-L6VONMA2.js +5 -0
- package/dist/chunk-LENSEW2F.js +2 -0
- package/dist/{chunk-35NTERVR.js → chunk-LGXNXAQA.js} +2 -2
- package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LR4J4KYJ.js +5 -0
- package/dist/chunk-LWMKZJ4M.js +1 -0
- package/dist/chunk-M2KX3PXA.js +1 -0
- package/dist/{chunk-VSFZEGIK.js → chunk-M73IECPW.js} +1 -1
- package/dist/{chunk-Z4DESIR5.js → chunk-M7NLCGCP.js} +1 -1
- package/dist/chunk-MHWETFNT.js +1 -0
- package/dist/chunk-MMUGP3WP.js +7 -0
- package/dist/{chunk-VG5ZDVDQ.js → chunk-MNWT2SQO.js} +86 -200
- package/dist/chunk-MS7DTL4U.js +213 -0
- package/dist/chunk-MU2X7NGF.js +11 -0
- package/dist/chunk-MXXMIPUN.js +8 -0
- package/dist/{chunk-XTOOTN4P.js → chunk-MZCIRMZJ.js} +1 -1
- package/dist/{chunk-LLNUIGHP.js → chunk-MZWPIFAM.js} +4 -4
- package/dist/{chunk-HB4YI2PF.js → chunk-NCPZVARH.js} +118 -118
- package/dist/{chunk-LCMDVUVO.js → chunk-NJVNGEOU.js} +30 -30
- package/dist/chunk-NMECLRGK.js +11 -0
- package/dist/{chunk-VNG2I7NM.js → chunk-NMLLRFZF.js} +1 -1
- package/dist/chunk-NPB753M3.js +1 -0
- package/dist/chunk-NUCDRKDW.js +5 -0
- package/dist/chunk-OH7BQZQ7.js +2 -0
- package/dist/chunk-OLKLHVHA.js +22 -0
- package/dist/chunk-OPVXPDOQ.js +1 -0
- package/dist/chunk-OQUXGAF2.js +1 -0
- package/dist/chunk-OUMERKRE.js +10 -0
- package/dist/{chunk-PFXDXD5O.js → chunk-OYGIQDME.js} +1 -1
- package/dist/{chunk-4IAGBAQD.js → chunk-P5W5RVE6.js} +1 -1
- package/dist/chunk-PNZURX3S.js +1 -0
- package/dist/chunk-PRKJVU4Y.js +1 -0
- package/dist/{chunk-2VGPNRHH.js → chunk-PVASYKSJ.js} +2 -2
- package/dist/chunk-PXFPVGWV.js +1 -0
- package/dist/chunk-Q2ORJEB2.js +25 -0
- package/dist/chunk-QBE6XVU3.js +1 -0
- package/dist/chunk-QFWWCZOI.js +1 -0
- package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
- package/dist/{chunk-Y5VFOLNQ.js → chunk-QGWC23HQ.js} +1 -1
- package/dist/chunk-QVVQUJQL.js +2 -0
- package/dist/{chunk-762IKULK.js → chunk-QX3T6G5X.js} +1 -1
- package/dist/chunk-QYFU363G.js +17 -0
- package/dist/chunk-RDXLDCMI.js +3 -0
- package/dist/chunk-REDUS6EW.js +1 -0
- package/dist/{chunk-KOS53Z7E.js → chunk-RFZNFTVM.js} +1 -1
- package/dist/chunk-RIG66DIQ.js +18 -0
- package/dist/chunk-RNUEPPVN.js +1 -0
- package/dist/chunk-RWTAPWLJ.js +3 -0
- package/dist/chunk-T5YVYVSW.js +1 -0
- package/dist/{chunk-VTOPYXHO.js → chunk-TTBNFGCW.js} +2 -2
- package/dist/chunk-UDPYSL3M.js +4 -0
- package/dist/{chunk-EAVD3OH2.js → chunk-ULMNNGGX.js} +1 -1
- package/dist/chunk-URCH4ITT.js +1 -0
- package/dist/chunk-UU2R56LN.js +12 -0
- package/dist/{chunk-YIZAQABE.js → chunk-V2FCZC7U.js} +1 -1
- package/dist/chunk-V654BMS7.js +376 -0
- package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
- package/dist/{chunk-5O7JTVO2.js → chunk-V7H7ITCF.js} +1 -1
- package/dist/{chunk-EO422KZZ.js → chunk-VG2AESTZ.js} +1 -1
- package/dist/chunk-VXD26GIG.js +1 -0
- package/dist/chunk-VXL5FBE7.js +3 -0
- package/dist/{chunk-RUDHGUIM.js → chunk-W7S6SYBM.js} +1 -1
- package/dist/chunk-WAY723TL.js +16 -0
- package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
- package/dist/chunk-WFOU5M4H.js +16 -0
- package/dist/chunk-WGOSE3RL.js +4 -0
- package/dist/chunk-WQ6W725N.js +1 -0
- package/dist/{chunk-7BWSN3SG.js → chunk-WQOPLNDH.js} +1 -1
- package/dist/chunk-X4A5D3PZ.js +8 -0
- package/dist/chunk-X7DCL5LT.js +1 -0
- package/dist/{chunk-HY6EXJBZ.js → chunk-XDXHSGDL.js} +1 -1
- package/dist/chunk-XKKKMV46.js +6 -0
- package/dist/chunk-XRVJJG6W.js +26 -0
- package/dist/chunk-XV6XCOTG.js +319 -0
- package/dist/chunk-XYFYQWKW.js +1 -0
- package/dist/{chunk-BD2L6YE5.js → chunk-XZLM4HLO.js} +1 -1
- package/dist/{chunk-YLCYRG2T.js → chunk-YCUEDZDA.js} +1 -1
- package/dist/{chunk-MF7IHOM5.js → chunk-YFRI75U4.js} +1 -1
- package/dist/chunk-YQ63ZFYT.js +1 -0
- package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
- package/dist/chunk-YXIFSIRX.js +1 -0
- package/dist/{chunk-QBIYAMSH.js → chunk-ZBVHPC6W.js} +1 -1
- package/dist/chunk-ZDQO6CNY.js +1 -0
- package/dist/{chunk-LG6DGIFX.js → chunk-ZHHTQRWU.js} +1 -1
- package/dist/chunk-ZTZGDZCE.js +7 -0
- package/dist/{chunk-MQ4WV4B6.js → chunk-ZVEBXHEY.js} +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +34 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +53 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +6 -6
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.d.ts +64 -0
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/fetch-result.js +22 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
- package/dist/cli/services/commands/doc/fetch.js +2 -15
- package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/search-result.js +14 -0
- package/dist/cli/services/commands/doc/search.d.ts +9 -1
- package/dist/cli/services/commands/doc/search.js +27 -2
- package/dist/cli/services/commands/doc/types.d.ts +107 -0
- package/dist/cli/services/commands/doc/types.js +47 -0
- package/dist/cli/services/commands/help/types.d.ts +6 -6
- package/dist/command-event-context-LFUZ7UCA.js +1 -0
- package/dist/command-json-schema-6EGXCM4B.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-E7ELDWBA.js +1 -0
- package/dist/custom-oclif-loader-FKFZJPHF.js +1 -0
- package/dist/deprecations-RNGBHZYB.js +1 -0
- package/dist/dist-VHIZZDYK.js +1 -0
- package/dist/dist-WXI5YQYP.js +1 -0
- package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
- package/dist/environments-WZJ6MRTH.js +1 -0
- package/dist/error-IFB626JA.js +1 -0
- package/dist/error-handler-OVJYVIOZ.js +1 -0
- package/dist/fs-7UOUHJDO.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +13 -13
- package/dist/is-global-XW3CVHLK.js +1 -0
- package/dist/json-error-C2U7ZLCG.js +1 -0
- package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
- package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
- package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
- package/dist/{local-ZZGRGYUP.js → local-KA3IWOZ6.js} +1 -1
- package/dist/{metadata-YQNVKC2R.js → metadata-6JI7HF5B.js} +1 -1
- package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
- package/dist/node-package-manager-X3QIEMMX.js +1 -0
- package/dist/notifications-system-OXGLT2R4.js +1 -0
- package/dist/os-NORIEVMI.js +1 -0
- package/dist/out-B2GISN65.js +1 -0
- package/dist/output-K3JTLRJD.js +1 -0
- package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
- package/dist/system-LTHR2T7L.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-MYUBVKCK.js +1 -0
- package/dist/upgrade-MFTWBXL3.js +1 -0
- package/dist/version-BNGPPAUU.js +1 -0
- package/dist/version-RCGFWSB4.js +1 -0
- package/dist/workerd-ISSXMKIH.js +18 -0
- package/oclif.manifest.json +1669 -429
- package/package.json +8 -8
- package/dist/analytics-PBZEKUGU.js +0 -1
- package/dist/analytics-WVGBNFGK.js +0 -1
- package/dist/chunk-2EC5SUGK.js +0 -19
- package/dist/chunk-2QENUJVG.js +0 -1
- package/dist/chunk-2RONPKOD.js +0 -1
- package/dist/chunk-2WDJXERZ.js +0 -25
- package/dist/chunk-32NWVYUC.js +0 -1
- package/dist/chunk-32RRWGNS.js +0 -1
- package/dist/chunk-32VQQ6EU.js +0 -1
- package/dist/chunk-34RFTE5T.js +0 -4
- package/dist/chunk-35VQQKVX.js +0 -1
- package/dist/chunk-3N6NKC2U.js +0 -1
- package/dist/chunk-3Q5BAPQK.js +0 -7
- package/dist/chunk-42DMJGOW.js +0 -2
- package/dist/chunk-4CTTWXUX.js +0 -32
- package/dist/chunk-4HBKQUKY.js +0 -1
- package/dist/chunk-4MQXMIWQ.js +0 -7
- package/dist/chunk-5APLAJCB.js +0 -3
- package/dist/chunk-5AQNISGC.js +0 -1
- package/dist/chunk-5OM72O4N.js +0 -1
- package/dist/chunk-5SLKHURV.js +0 -1
- package/dist/chunk-5VRB3FBD.js +0 -6
- package/dist/chunk-62GA7XR3.js +0 -18
- package/dist/chunk-62LMVFR7.js +0 -1
- package/dist/chunk-6IDEDOXW.js +0 -2
- package/dist/chunk-72CBJYAG.js +0 -16
- package/dist/chunk-7E4MJCVE.js +0 -10
- package/dist/chunk-7HZU7CYS.js +0 -1
- package/dist/chunk-7Q4EKY3E.js +0 -3
- package/dist/chunk-7YXHILW4.js +0 -383
- package/dist/chunk-7Z6IX7MU.js +0 -1
- package/dist/chunk-A4XREDFZ.js +0 -1
- package/dist/chunk-AHNLGCHF.js +0 -5
- package/dist/chunk-ARRRFY6S.js +0 -4
- package/dist/chunk-BAP2CHI2.js +0 -1
- package/dist/chunk-BQWK222Q.js +0 -1
- package/dist/chunk-C3PXIZY3.js +0 -8
- package/dist/chunk-C6HGU77I.js +0 -1
- package/dist/chunk-CBFAU5AF.js +0 -5
- package/dist/chunk-COP2Q2YT.js +0 -1
- package/dist/chunk-CSWDRG3E.js +0 -1
- package/dist/chunk-CVBWEUWX.js +0 -1
- package/dist/chunk-D3NVUE65.js +0 -1
- package/dist/chunk-DCKRQZLE.js +0 -20
- package/dist/chunk-DYH3ZXJS.js +0 -15
- package/dist/chunk-EBX6DYDX.js +0 -2
- package/dist/chunk-EDRCFY3K.js +0 -16
- package/dist/chunk-EEAY7HFW.js +0 -317
- package/dist/chunk-EJMLNBZA.js +0 -275
- package/dist/chunk-EO3S2TFI.js +0 -2
- package/dist/chunk-EOIGDOUD.js +0 -7
- package/dist/chunk-EYKXHMEJ.js +0 -6
- package/dist/chunk-FHV2H3Z2.js +0 -12
- package/dist/chunk-FOAV642V.js +0 -1
- package/dist/chunk-FVTP7EO4.js +0 -46
- package/dist/chunk-FYIC4JHB.js +0 -26
- package/dist/chunk-GF36WNMH.js +0 -5
- package/dist/chunk-GJ3QUZO6.js +0 -1
- package/dist/chunk-GJZVUEMP.js +0 -11
- package/dist/chunk-GP6O7YRO.js +0 -20
- package/dist/chunk-GW424AJO.js +0 -7
- package/dist/chunk-GXSF6NCR.js +0 -1
- package/dist/chunk-GYVQIRBD.js +0 -1
- package/dist/chunk-H3ZPYOQV.js +0 -1
- package/dist/chunk-H7YSZKZ2.js +0 -1
- package/dist/chunk-HILYTMVA.js +0 -1
- package/dist/chunk-HMWQOQAQ.js +0 -2
- package/dist/chunk-HNSRF4SQ.js +0 -1
- package/dist/chunk-HTODXNY6.js +0 -3
- package/dist/chunk-IUYVJJKE.js +0 -9
- package/dist/chunk-JM2CQP64.js +0 -97
- package/dist/chunk-K4AF7A25.js +0 -1
- package/dist/chunk-KDV4WR5A.js +0 -4
- package/dist/chunk-KF7NL5YM.js +0 -8
- package/dist/chunk-KMJTO7CU.js +0 -103
- package/dist/chunk-KN3MUEWA.js +0 -4
- package/dist/chunk-KYB4JX76.js +0 -5
- package/dist/chunk-LJAU6YHF.js +0 -10
- package/dist/chunk-LMQOFVRC.js +0 -17
- package/dist/chunk-LQSD25YS.js +0 -3
- package/dist/chunk-M2HQFHNO.js +0 -1
- package/dist/chunk-M5WBYWSQ.js +0 -7
- package/dist/chunk-N47RQHEI.js +0 -2
- package/dist/chunk-NRG2WPSM.js +0 -1
- package/dist/chunk-O2CP7DQE.js +0 -1
- package/dist/chunk-O6FXUKI2.js +0 -2
- package/dist/chunk-OHJUEUSA.js +0 -1
- package/dist/chunk-OOKTWSGP.js +0 -4
- package/dist/chunk-OONMCK7X.js +0 -1
- package/dist/chunk-OWK2RI4O.js +0 -6
- package/dist/chunk-P2UEQJJ4.js +0 -5
- package/dist/chunk-QBJ74XPX.js +0 -18
- package/dist/chunk-QGFJOTOH.js +0 -4
- package/dist/chunk-QLHPTMIH.js +0 -1
- package/dist/chunk-RIO5HKD5.js +0 -1
- package/dist/chunk-S7EKUSO6.js +0 -3
- package/dist/chunk-SJ2ROSXG.js +0 -1
- package/dist/chunk-SNTRSP5K.js +0 -359
- package/dist/chunk-SYCN2GT2.js +0 -3
- package/dist/chunk-TBNEN73P.js +0 -1
- package/dist/chunk-TVI7TQ4C.js +0 -16
- package/dist/chunk-TYMYIUIQ.js +0 -1
- package/dist/chunk-UEQT7TA4.js +0 -1
- package/dist/chunk-UUM367NR.js +0 -5
- package/dist/chunk-V5FZRNXI.js +0 -1
- package/dist/chunk-VE35YELD.js +0 -1
- package/dist/chunk-WEICJ4GW.js +0 -1
- package/dist/chunk-WJJXJNNP.js +0 -3
- package/dist/chunk-XAQUXFN5.js +0 -1
- package/dist/chunk-XE6EUHSS.js +0 -2
- package/dist/chunk-XFEJS652.js +0 -16
- package/dist/chunk-XI4QEULN.js +0 -1
- package/dist/chunk-XP63T4KZ.js +0 -5
- package/dist/chunk-XRCAUZAZ.js +0 -8
- package/dist/chunk-XSRZWJIJ.js +0 -1
- package/dist/chunk-YFJELEVH.js +0 -1
- package/dist/chunk-YNJIDLI3.js +0 -7
- package/dist/chunk-YRX4E67D.js +0 -6
- package/dist/chunk-Z2NL6XQK.js +0 -6
- package/dist/chunk-Z6Z5DPKS.js +0 -1
- package/dist/chunk-ZOE6WXW6.js +0 -1
- package/dist/cli/commands/app/app-logs/sources.js +0 -1
- package/dist/command-json-schema-3RP5P43D.js +0 -1
- package/dist/conf-store-XORTWCKZ.js +0 -1
- package/dist/custom-oclif-loader-ZRYPPYIP.js +0 -1
- package/dist/deprecations-AZDMCRNN.js +0 -1
- package/dist/dist-DTBXLVHF.js +0 -1
- package/dist/dist-SOYIDACZ.js +0 -1
- package/dist/environments-L42SEHB4.js +0 -1
- package/dist/error-H6B5BHYC.js +0 -1
- package/dist/error-handler-JB752NKM.js +0 -1
- package/dist/fs-XHZY6MNM.js +0 -1
- package/dist/is-global-2NBDZWLC.js +0 -1
- package/dist/json-error-OHV2KQFY.js +0 -1
- package/dist/node-package-manager-LN2Y7FQ2.js +0 -1
- package/dist/notifications-system-HWJ3F44U.js +0 -1
- package/dist/os-MHOCCDIB.js +0 -1
- package/dist/out-53ABAVL7.js +0 -1
- package/dist/output-GILH4S6M.js +0 -1
- package/dist/system-6WYK24ET.js +0 -1
- package/dist/ui-RP6SVJUK.js +0 -1
- package/dist/upgrade-5G7FBJJV.js +0 -1
- package/dist/version-TOBC7X2C.js +0 -1
- package/dist/version-UIRCT6RC.js +0 -1
- package/dist/workerd-ARH2OCYL.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b
|
|
1
|
+
import{b}from"./chunk-OLKLHVHA.js";import{b as E}from"./chunk-5AWELO3D.js";import{R as F,S as N}from"./chunk-V654BMS7.js";import{S as C,Sa as w,la as O,yb as k}from"./chunk-RIG66DIQ.js";import{i as n}from"./chunk-B4OMIONW.js";import{k as R}from"./chunk-GSGCSBRN.js";import{b as U}from"./chunk-YTUUU33R.js";import{c as u,e as P,f as x,g,m as T,p as y}from"./chunk-IWTNUJGY.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as L}from"./chunk-OLKLHVHA.js";import{I as g,t as f,w as p,x as d,y as h,z as S}from"./chunk-NCPZVARH.js";import{j as r}from"./chunk-J3UXIC23.js";import{b as O,c as b,f as F}from"./chunk-5AWELO3D.js";import{E as w,K as y}from"./chunk-V654BMS7.js";import{a as m}from"./chunk-BN7ZXAZJ.js";import{Ab as I,wb as A}from"./chunk-RIG66DIQ.js";import{b as n}from"./chunk-FZCGRIOM.js";import{b as j}from"./chunk-YTUUU33R.js";import{e as C,g as i}from"./chunk-VKWPEFWQ.js";i();i();var a=m({name:"AuthLoginResult",schema:n.object({status:n.literal("success"),alias:n.string()}).strict()});i();var c="NEW_LOGIN";function _(s,e){let t=[],o=s[e];if(o)for(let[l,x]of Object.entries(o))t.push({label:x.identity.alias??l,value:l});return t}async function q(){let s=await g({},{forceNewSession:!0}),e=await d(s.userId);if(!e){let t=await y({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await h(s.userId,t),t}return e}async function E(){let s=await p(),e=await f(),t=[];return s&&t.push(..._(s,e)),t.length>0&&t.push({label:"Log in with a different account",value:c}),t}async function N(s){if(s){let o=await S(s);if(o)return r(o),s}let e=await E(),t=c;return e.length>0&&(t=await w({message:"Which account would you like to use?",choices:e})),t===c?q():(r(t),e.find(o=>o.value===t)?.label??t)}var v=C(j(),1);var u=class s extends L{static descriptionWithMarkdown="Logs you in to your Shopify account.";static description=this.descriptionForHelp();static flags={...O,...b,alias:F(v.Flags.string({description:"Alias of an existing session you want to use.",env:"SHOPIFY_FLAG_AUTH_ALIAS"}))};static get jsonOutputSchema(){return a}async run(){let{flags:e}=await this.parse(s),t=await N(e.alias);e.json?A(a.encode({status:"success",alias:t})):I(`Current account: ${t}.`)}};export{u as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as L,b as g,d as P,g as w}from"./chunk-
|
|
1
|
+
import{a as L,b as g,d as P,g as w}from"./chunk-NJVNGEOU.js";import{a as A}from"./chunk-KGASGUDQ.js";import{t as G}from"./chunk-5XOEMYEQ.js";import{a as F}from"./chunk-NPB753M3.js";import{a as S}from"./chunk-D4LFWIFE.js";import{p as l,u as d}from"./chunk-NCPZVARH.js";import{b as v,e as b}from"./chunk-5AWELO3D.js";import{O as u,a as c}from"./chunk-V654BMS7.js";import{Cb as y,qb as f,sb as h,yb as i}from"./chunk-RIG66DIQ.js";import{b as q}from"./chunk-YTUUU33R.js";import{e as Q,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();import{randomBytes as x}from"crypto";function K(){return x(32).toString("hex")}function C(e){let r=new URL(`http://localhost:${e.port}/graphiql`);return r.searchParams.set("key",e.key),e.query&&r.searchParams.set("query",e.query),e.variables&&r.searchParams.set("variables",e.variables),e.apiVersion&&r.searchParams.set("api_version",e.apiVersion),r.toString()}async function I(e){let r=await A(e.port),t=g({stdout:e.stdout??process.stdout,port:r,storeFqdn:e.storeFqdn,tokenProvider:e.tokenProvider,key:e.key,appContext:e.appContext,protectMutations:e.protectMutations}),a=C({port:r,key:e.key,query:e.query,variables:e.variables,apiVersion:e.apiVersion});try{i(h`GraphiQL is running at ${f.link(a)}`),e.additionalReadyMessages?.forEach(s=>i(s)),i("Press Ctrl+C to stop."),await u(a)||y("Browser did not open automatically. Open the URL above manually."),await T(e.abortSignal)}finally{t.close()}}async function T(e){let r=new c,t=()=>r.abort();process.once("SIGINT",t);try{await new Promise(a=>{if(r.signal.aborted||e?.aborted){a();return}r.signal.addEventListener("abort",()=>a(),{once:!0}),e?.addEventListener("abort",()=>r.abort(),{once:!0})})}finally{process.removeListener("SIGINT",t)}}async function k(e){let r=e.remoteApp.apiSecretKeys[0]?.secret??"",t=L(void 0,r,e.store),a=w({apiKey:e.remoteApp.apiKey,apiSecret:r,storeFqdn:e.store}),m=await l(),s=P(e.store,e.remoteApp.apiKey,m);await I({port:e.port,storeFqdn:e.store,tokenProvider:a,key:t,appContext:{appName:e.remoteApp.title,appUrl:s,apiSecret:r},variables:e.variables,apiVersion:e.apiVersion,abortSignal:e.abortSignal})}var n=Q(q(),1),p=class e extends F{static summary="Open a local GraphiQL UI for your app and store.";static descriptionWithMarkdown=`Opens an authenticated Admin API GraphiQL UI for your app and selected store.
|
|
2
2
|
|
|
3
3
|
The app must be installed on the store.`;static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --store shop.myshopify.com","<%= config.bin %> <%= command.id %> --store shop.myshopify.com --port 9123"];static flags={...v,...S,store:n.Flags.string({char:"s",description:"The myshopify.com domain of the store to open GraphiQL against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async r=>d(r)}),port:b({description:"Local port for the GraphiQL server.",env:"SHOPIFY_FLAG_PORT"}),variables:n.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES"}),version:n.Flags.string({description:"The API version to use in GraphiQL. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})};async run(){let{flags:r}=await this.parse(e),{appContextResult:t,store:a}=await G(r);return await k({remoteApp:t.remoteApp,store:a.shopDomain,port:r.port,variables:r.variables,apiVersion:r.version}),{app:t.app}}};export{K as a,I as b,p as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{a as hD}from"./chunk-5HBIIYSK.js";import{b as pD,e as X,g as BD,h as M}from"./chunk-B4OMIONW.js";import{a as fD,c as g,d as dD,e as J,g as i}from"./chunk-VKWPEFWQ.js";var pu=g((It,du)=>{i();du.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var yu=g((Qt,Tu)=>{i();var GD=pD(),qD=function(){return GD.Date.now()};Tu.exports=qD});var Su=g((ur,vu)=>{i();var HD=/\s/;function VD(u){for(var D=u.length;D--&&HD.test(u.charAt(D)););return D}vu.exports=VD});var Nu=g((er,$u)=>{i();var UD=Su(),KD=/^\s+/;function zD(u){return u&&u.slice(0,UD(u)+1).replace(KD,"")}$u.exports=zD});var _u=g((rr,Lu)=>{i();var YD=Nu(),Ru=X(),JD=BD(),Wu=NaN,XD=/^[-+]0x[0-9a-f]+$/i,QD=/^0b[01]+$/i,ZD=/^0o[0-7]+$/i,ue=parseInt;function De(u){if(typeof u=="number")return u;if(JD(u))return Wu;if(Ru(u)){var D=typeof u.valueOf=="function"?u.valueOf():u;u=Ru(D)?D+"":D}if(typeof u!="string")return u===0?u:+u;u=YD(u);var e=QD.test(u);return e||ZD.test(u)?ue(u.slice(2),e?2:8):XD.test(u)?Wu:+u}Lu.exports=De});var ku=g((nr,Iu)=>{i();var ee=X(),eu=yu(),Ou=_u(),te="Expected a function",re=Math.max,Fe=Math.min;function ne(u,D,e){var t,r,F,o,n,s,C=0,b=!1,c=!1,p=!0;if(typeof u!="function")throw new TypeError(te);D=Ou(D)||0,ee(e)&&(b=!!e.leading,c="maxWait"in e,F=c?re(Ou(e.maxWait)||0,D):F,p="trailing"in e?!!e.trailing:p);function l(d){var x=t,R=r;return t=r=void 0,C=d,o=u.apply(R,x),o}function B(d){return C=d,n=setTimeout(h,D),b?l(d):o}function f(d){var x=d-s,R=d-C,Eu=D-x;return c?Fe(Eu,F-R):Eu}function m(d){var x=d-s,R=d-C;return s===void 0||x>=D||x<0||c&&R>=F}function h(){var d=eu();if(m(d))return k(d);n=setTimeout(h,f(d))}function k(d){return n=void 0,p&&t?l(d):(t=r=void 0,o)}function Cu(){n!==void 0&&clearTimeout(n),C=0,t=s=r=n=void 0}function lD(){return n===void 0?o:k(eu())}function Y(){var d=eu(),x=m(d);if(t=arguments,r=this,s=d,x){if(n===void 0)return B(s);if(c)return clearTimeout(n),n=setTimeout(h,D),l(s)}return n===void 0&&(n=setTimeout(h,D)),o}return Y.cancel=Cu,Y.flush=lD,Y}Iu.exports=ne});var Ce=g((ir,Mu)=>{i();var oe=ku(),ie=X(),se="Expected a function";function ae(u,D,e){var t=!0,r=!0;if(typeof u!="function")throw new TypeError(se);return ie(e)&&(t="leading"in e?!!e.leading:t,r="trailing"in e?!!e.trailing:r),oe(u,D,{leading:t,maxWait:D,trailing:r})}Mu.exports=ae});var Qu=g((Mr,Fu)=>{"use strict";i();var Xu=(u,D)=>{for(let e of Reflect.ownKeys(D))Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(D,e));return u};Fu.exports=Xu;Fu.exports.default=Xu});var uD=g((Pr,K)=>{"use strict";i();var ze=Qu(),U=new WeakMap,Zu=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let e,t=0,r=u.displayName||u.name||"<anonymous>",F=function(...o){if(U.set(F,++t),t===1)e=u.apply(this,o),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return e};return ze(F,u),U.set(F,t),F};K.exports=Zu;K.exports.default=Zu;K.exports.callCount=u=>{if(!U.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return U.get(u)}});var nD=g((nF,it)=>{it.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var st=g((oF,su)=>{"use strict";i();var oD=nD();su.exports=oD;su.exports.default=oD});var sD=g((sF,iD)=>{"use strict";i();var at=/[|\\{}()[\]^$+*?.-]/g;iD.exports=u=>{if(typeof u!="string")throw new TypeError("Expected a string");return u.replace(at,"\\$&")}});var dt=g((CF,ED)=>{"use strict";i();var Ct=sD(),Et=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",CD=[].concat(fD("module").builtinModules,"bootstrap_node","node").map(u=>new RegExp(`(?:\\((?:node:)?${u}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${u}(?:\\.js)?:\\d+:\\d+$)`));CD.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var au=class u{constructor(D){D={ignoredPackages:[],...D},"internals"in D||(D.internals=u.nodeInternals()),"cwd"in D||(D.cwd=Et),this._cwd=D.cwd.replace(/\\/g,"/"),this._internals=[].concat(D.internals,ct(D.ignoredPackages)),this._wrapCallSite=D.wrapCallSite||!1}static nodeInternals(){return[...CD]}clean(D,e=0){e=" ".repeat(e),Array.isArray(D)||(D=D.split(`
|
|
2
|
+
`)),!/^\s*at /.test(D[0])&&/^\s*at /.test(D[1])&&(D=D.slice(1));let t=!1,r=null,F=[];return D.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(s=>s.test(o)))return;let n=/^\s*at /.test(o);t?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),n&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(n?(r&&(F.push(r),r=null),F.push(o)):(t=!0,r=o))}),F.map(o=>`${e}${o}
|
|
3
|
+
`).join("")}captureString(D,e=this.captureString){typeof D=="function"&&(e=D,D=1/0);let{stackTraceLimit:t}=Error;D&&(Error.stackTraceLimit=D);let r={};Error.captureStackTrace(r,e);let{stack:F}=r;return Error.stackTraceLimit=t,this.clean(F)}capture(D,e=this.capture){typeof D=="function"&&(e=D,D=1/0);let{prepareStackTrace:t,stackTraceLimit:r}=Error;Error.prepareStackTrace=(n,s)=>this._wrapCallSite?s.map(this._wrapCallSite):s,D&&(Error.stackTraceLimit=D);let F={};Error.captureStackTrace(F,e);let{stack:o}=F;return Object.assign(Error,{prepareStackTrace:t,stackTraceLimit:r}),o}at(D=this.at){let[e]=this.capture(1,D);if(!e)return{};let t={line:e.getLineNumber(),column:e.getColumnNumber()};aD(t,e.getFileName(),this._cwd),e.isConstructor()&&Object.defineProperty(t,"constructor",{value:!0,configurable:!0}),e.isEval()&&(t.evalOrigin=e.getEvalOrigin()),e.isNative()&&(t.native=!0);let r;try{r=e.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(t.type=r);let F=e.getFunctionName();F&&(t.function=F);let o=e.getMethodName();return o&&F!==o&&(t.method=o),t}parseLine(D){let e=D&&D.match(lt);if(!e)return null;let t=e[1]==="new",r=e[2],F=e[3],o=e[4],n=Number(e[5]),s=Number(e[6]),C=e[7],b=e[8],c=e[9],p=e[10]==="native",l=e[11]===")",B,f={};if(b&&(f.line=Number(b)),c&&(f.column=Number(c)),l&&C){let m=0;for(let h=C.length-1;h>0;h--)if(C.charAt(h)===")")m++;else if(C.charAt(h)==="("&&C.charAt(h-1)===" "&&(m--,m===-1&&C.charAt(h-1)===" ")){let k=C.slice(0,h-1);C=C.slice(h+1),r+=` (${k}`;break}}if(r){let m=r.match(ft);m&&(r=m[1],B=m[2])}return aD(f,C,this._cwd),t&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),F&&(f.evalOrigin=F,f.evalLine=n,f.evalColumn=s,f.evalFile=o&&o.replace(/\\/g,"/")),p&&(f.native=!0),r&&(f.function=r),B&&r!==B&&(f.method=B),f}};function aD(u,D,e){D&&(D=D.replace(/\\/g,"/"),D.startsWith(`${e}/`)&&(D=D.slice(e.length+1)),u.file=D)}function ct(u){if(u.length===0)return[];let D=u.map(e=>Ct(e));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${D.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var lt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),ft=/^(.*?) \[as (.*?)\]$/;ED.exports=au});i();i();i();i();var j=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],P=[12288,12288,65281,65376,65504,65510],Q=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Z=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],W=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];i();var G=(u,D)=>{let e=0,t=Math.floor(u.length/2)-1;for(;e<=t;){let r=Math.floor((e+t)/2),F=r*2;if(D<u[F])t=r-1;else if(D>u[F+1])e=r+1;else return!0}return!1};var gD=j[0],mD=j.at(-1),AD=P[0],bD=P.at(-1),Tt=Q[0],yt=Q.at(-1),vt=Z[0],St=Z.at(-1),xD=W[0],wD=W.at(-1),cu=19968,[TD,yD]=vD(W);function vD(u){let D=u[0],e=u[1];for(let t=0;t<u.length;t+=2){let r=u[t],F=u[t+1];if(cu>=r&&cu<=F)return[r,F];F-r>e-D&&(D=r,e=F)}return[D,e]}var lu=u=>u<gD||u>mD?!1:G(j,u),L=u=>u<AD||u>bD?!1:G(P,u);var _=u=>u>=TD&&u<=yD?!0:u<xD||u>wD?!1:G(W,u);function SD(u){if(!Number.isSafeInteger(u))throw new TypeError(`Expected a code point, got \`${typeof u}\`.`)}function fu(u,{ambiguousAsWide:D=!1}={}){return SD(u),L(u)||_(u)||D&&lu(u)?2:1}var Bu=J(pu(),1),$D=new Intl.Segmenter,ND=/^\p{Default_Ignorable_Code_Point}$/u;function w(u,D={}){if(typeof u!="string"||u.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=D;if(t||(u=M(u)),u.length===0)return 0;let r=0,F={ambiguousAsWide:!e};for(let{segment:o}of $D.segment(u)){let n=o.codePointAt(0);if(!(n<=31||n>=127&&n<=159)&&!(n>=8203&&n<=8207||n===65279)&&!(n>=768&&n<=879||n>=6832&&n<=6911||n>=7616&&n<=7679||n>=8400&&n<=8447||n>=65056&&n<=65071)&&!(n>=55296&&n<=57343)&&!(n>=65024&&n<=65039)&&!ND.test(o)){if((0,Bu.default)().test(o)){r+=2;continue}r+=fu(n,F)}}return r}i();i();var hu=(u=0)=>D=>`\x1B[${D+u}m`,gu=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,mu=(u=0)=>(D,e,t)=>`\x1B[${38+u};2;${D};${e};${t}m`,E={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},qt=Object.keys(E.modifier),RD=Object.keys(E.color),WD=Object.keys(E.bgColor),Ht=[...RD,...WD];function LD(){let u=new Map;for(let[D,e]of Object.entries(E)){for(let[t,r]of Object.entries(e))E[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[t]=E[t],u.set(r[0],r[1]);Object.defineProperty(E,D,{value:e,enumerable:!1})}return Object.defineProperty(E,"codes",{value:u,enumerable:!1}),E.color.close="\x1B[39m",E.bgColor.close="\x1B[49m",E.color.ansi=hu(),E.color.ansi256=gu(),E.color.ansi16m=mu(),E.bgColor.ansi=hu(10),E.bgColor.ansi256=gu(10),E.bgColor.ansi16m=mu(10),Object.defineProperties(E,{rgbToAnsi256:{value(D,e,t){return D===e&&e===t?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(D){let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!e)return[0,0,0];let[t]=e;t.length===3&&(t=[...t].map(F=>F+F).join(""));let r=Number.parseInt(t,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>E.rgbToAnsi256(...E.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value(D){if(D<8)return 30+D;if(D<16)return 90+(D-8);let e,t,r;if(D>=232)e=((D-232)*10+8)/255,t=e,r=e;else{D-=16;let n=D%36;e=Math.floor(D/36)/5,t=Math.floor(n/6)/5,r=n%6/5}let F=Math.max(e,t,r)*2;if(F===0)return 30;let o=30+(Math.round(r)<<2|Math.round(t)<<1|Math.round(e));return F===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(D,e,t)=>E.ansi256ToAnsi(E.rgbToAnsi256(D,e,t)),enumerable:!1},hexToAnsi:{value:D=>E.ansi256ToAnsi(E.hexToAnsi256(D)),enumerable:!1}}),E}var _D=LD(),A=_D;var H=new Set(["\x1B","\x9B"]),OD=39,Du="\x07",xu="[",ID="]",wu="m",q=`${ID}8;;`,Au=u=>`${H.values().next().value}${xu}${u}${wu}`,bu=u=>`${H.values().next().value}${q}${u}${Du}`,kD=u=>u.split(" ").map(D=>w(D)),uu=(u,D,e)=>{let t=[...D],r=!1,F=!1,o=w(M(u.at(-1)));for(let[n,s]of t.entries()){let C=w(s);if(o+C<=e?u[u.length-1]+=s:(u.push(s),o=0),H.has(s)&&(r=!0,F=t.slice(n+1,n+1+q.length).join("")===q),r){F?s===Du&&(r=!1,F=!1):s===wu&&(r=!1);continue}o+=C,o===e&&n<t.length-1&&(u.push(""),o=0)}!o&&u.at(-1).length>0&&u.length>1&&(u[u.length-2]+=u.pop())},MD=u=>{let D=u.split(" "),e=D.length;for(;e>0&&!(w(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},jD=(u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let t="",r,F,o=kD(u),n=[""];for(let[c,p]of u.split(" ").entries()){e.trim!==!1&&(n[n.length-1]=n.at(-1).trimStart());let l=w(n.at(-1));if(c!==0&&(l>=D&&(e.wordWrap===!1||e.trim===!1)&&(n.push(""),l=0),(l>0||e.trim===!1)&&(n[n.length-1]+=" ",l++)),e.hard&&o[c]>D){let B=D-l,f=1+Math.floor((o[c]-B-1)/D);Math.floor((o[c]-1)/D)<f&&n.push(""),uu(n,p,D);continue}if(l+o[c]>D&&l>0&&o[c]>0){if(e.wordWrap===!1&&l<D){uu(n,p,D);continue}n.push("")}if(l+o[c]>D&&e.wordWrap===!1){uu(n,p,D);continue}n[n.length-1]+=p}e.trim!==!1&&(n=n.map(c=>MD(c)));let s=n.join(`
|
|
4
|
+
`),C=[...s],b=0;for(let[c,p]of C.entries()){if(t+=p,H.has(p)){let{groups:B}=new RegExp(`(?:\\${xu}(?<code>\\d+)m|\\${q}(?<uri>.*)${Du})`).exec(s.slice(b))||{groups:{}};if(B.code!==void 0){let f=Number.parseFloat(B.code);r=f===OD?void 0:f}else B.uri!==void 0&&(F=B.uri.length===0?void 0:B.uri)}let l=A.codes.get(Number(r));C[c+1]===`
|
|
5
|
+
`?(F&&(t+=bu("")),r&&l&&(t+=Au(l))):p===`
|
|
6
|
+
`&&(r&&l&&(t+=Au(r)),F&&(t+=bu(F))),b+=p.length}return t};function PD(u,D,e){return String(u).normalize().replaceAll(`\r
|
|
7
|
+
`,`
|
|
8
|
+
`).split(`
|
|
9
|
+
`).map(t=>jD(t,D,e)).join(`
|
|
10
|
+
`)}var zu={};dD(zu,{ConEmu:()=>Ku,beep:()=>Pe,beginSynchronizedOutput:()=>Hu,clearScreen:()=>Le,clearTerminal:()=>Ie,clearViewport:()=>_e,cursorBackward:()=>he,cursorDown:()=>pe,cursorForward:()=>Be,cursorGetPosition:()=>Ae,cursorHide:()=>we,cursorLeft:()=>Gu,cursorMove:()=>de,cursorNextLine:()=>be,cursorPrevLine:()=>xe,cursorRestorePosition:()=>me,cursorSavePosition:()=>ge,cursorShow:()=>Te,cursorTo:()=>fe,cursorUp:()=>Pu,endSynchronizedOutput:()=>Vu,enterAlternativeScreen:()=>ke,eraseDown:()=>$e,eraseEndLine:()=>ve,eraseLine:()=>qu,eraseLines:()=>ye,eraseScreen:()=>V,eraseStartLine:()=>Se,eraseUp:()=>Ne,exitAlternativeScreen:()=>Me,iTerm:()=>Uu,image:()=>qe,link:()=>Ge,scrollDown:()=>We,scrollUp:()=>Re,setCwd:()=>He,synchronizedOutput:()=>je});i();import v from"node:process";import Ee from"node:os";i();var y=globalThis.window?.document!==void 0,ar=globalThis.process?.versions?.node!==void 0,Cr=globalThis.process?.versions?.bun!==void 0,Er=globalThis.Deno?.version?.deno!==void 0,cr=globalThis.process?.versions?.electron!==void 0,lr=globalThis.navigator?.userAgent?.includes("jsdom")===!0,fr=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,dr=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,pr=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Br=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,O=globalThis.navigator?.userAgentData?.platform,hr=O==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",gr=O==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",mr=O==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Ar=O==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),br=O==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var a="\x1B[",S="\x1B]",T="\x07",I=";",ju=!y&&v.env.TERM_PROGRAM==="Apple_Terminal",ce=!y&&v.platform==="win32",le=!y&&(v.env.TERM?.startsWith("screen")||v.env.TERM?.startsWith("tmux")||v.env.TMUX!==void 0),tu=y?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:v.cwd,$=u=>le?"\x1BPtmux;"+u.replaceAll("\x1B","\x1B\x1B")+"\x1B\\":u,fe=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");return typeof D!="number"?a+(u+1)+"G":a+(D+1)+I+(u+1)+"H"},de=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");let e="";return u<0?e+=a+-u+"D":u>0&&(e+=a+u+"C"),D<0?e+=a+-D+"A":D>0&&(e+=a+D+"B"),e},Pu=(u=1)=>a+u+"A",pe=(u=1)=>a+u+"B",Be=(u=1)=>a+u+"C",he=(u=1)=>a+u+"D",Gu=a+"G",ge=ju?"\x1B7":a+"s",me=ju?"\x1B8":a+"u",Ae=a+"6n",be=a+"E",xe=a+"F",we=a+"?25l",Te=a+"?25h",ye=u=>{let D="";for(let e=0;e<u;e++)D+=qu+(e<u-1?Pu():"");return u&&(D+=Gu),D},ve=a+"K",Se=a+"1K",qu=a+"2K",$e=a+"J",Ne=a+"1J",V=a+"2J",Re=a+"S",We=a+"T",Le="\x1Bc",_e=`${V}${a}H`,Oe=()=>{if(y||!ce)return!1;let u=Ee.release().split("."),D=Number(u[0]),e=Number(u[2]??0);return D<10||D===10&&e<10586},Ie=Oe()?`${V}${a}0f`:`${V}${a}3J${a}H`,ke=a+"?1049h",Me=a+"?1049l",Hu=a+"?2026h",Vu=a+"?2026l",je=u=>Hu+u+Vu,Pe=T,Ge=(u,D)=>{let e=$(`${S}8${I}${I}${D}${T}`),t=$(`${S}8${I}${I}${T}`);return e+u+t},qe=(u,D={})=>{let e=`${S}1337;File=inline=1`;D.width&&(e+=`;width=${D.width}`),D.height&&(e+=`;height=${D.height}`),D.preserveAspectRatio===!1&&(e+=";preserveAspectRatio=0");let t=Buffer.from(u);return $(e+`;size=${t.byteLength}:`+t.toString("base64")+T)},Uu={setCwd:(u=tu())=>$(`${S}50;CurrentDir=${u}${T}`),annotation(u,D={}){let e=`${S}1337;`,t=D.x!==void 0,r=D.y!==void 0;if((t||r)&&!(t&&r&&D.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return u=u.replaceAll("|",""),e+=D.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",D.length>0?e+=(t?[u,D.length,D.x,D.y]:[D.length,u]).join("|"):e+=u,$(e+T)}},Ku={setCwd:(u=tu())=>$(`${S}9;9;${u}${T}`)},He=(u=tu())=>Uu.setCwd(u)+Ku.setCwd(u);i();i();var Ve=u=>{let D=new Set;do for(let e of Reflect.ownKeys(u))D.add([u,e]);while((u=Reflect.getPrototypeOf(u))&&u!==Object.prototype);return D};function Ue(u,{include:D,exclude:e}={}){let t=r=>{let F=o=>typeof o=="string"?r===o:o.test(r);return D?D.some(F):e?!e.some(F):!0};for(let[r,F]of Ve(u.constructor.prototype)){if(F==="constructor"||!t(F))continue;let o=Reflect.getOwnPropertyDescriptor(r,F);o&&typeof o.value=="function"&&(u[F]=u[F].bind(u))}return u}i();import{PassThrough as Yu}from"node:stream";var Ju=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],ru={},Ke=u=>{let D=new Yu,e=new Yu;D.write=r=>{u("stdout",r)},e.write=r=>{u("stderr",r)};let t=new console.Console(D,e);for(let r of Ju)ru[r]=console[r],console[r]=t[r];return()=>{for(let r of Ju)console[r]=ru[r];ru={}}},Or=Ke;i();import rD from"node:process";i();var DD=J(uD(),1),eD=J(hD(),1);import Ye from"node:process";var Je=(0,DD.default)(()=>{(0,eD.default)(()=>{Ye.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),tD=Je;var z=!1,N={};N.show=(u=rD.stderr)=>{u.isTTY&&(z=!1,u.write("\x1B[?25h"))};N.hide=(u=rD.stderr)=>{u.isTTY&&(tD(),z=!0,u.write("\x1B[?25l"))};N.toggle=(u,D)=>{u!==void 0&&(z=u),z?N.show(D):N.hide(D)};var zr=N;i();function Xe(u,D=1,e={}){let{indent:t=" ",includeEmptyLines:r=!1}=e;if(typeof u!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof u}\``);if(typeof D!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof D}\``);if(D<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${D}\``);if(typeof t!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t}\``);if(D===0)return u;let F=r?/^/gm:/^(?!\s*$)/gm;return u.replace(F,t.repeat(D))}i();function nu(u){return Number.isInteger(u)?L(u)||_(u):!1}i();var Qe=new Set([27,155]),Ze="0".codePointAt(0),ut="9".codePointAt(0),Dt=19,iu=new Set,ou=new Map;for(let[u,D]of A.codes)iu.add(A.color.ansi(D)),ou.set(A.color.ansi(u),A.color.ansi(D));function et(u){if(iu.has(u))return u;if(ou.has(u))return ou.get(u);u=u.slice(2),u.includes(";")&&(u=u[0]+"0");let D=A.codes.get(Number.parseInt(u,10));return D?A.color.ansi(D):A.reset.open}function tt(u){for(let D=0;D<u.length;D++){let e=u.codePointAt(D);if(e>=Ze&&e<=ut)return D}return-1}function rt(u,D){u=u.slice(D,D+Dt);let e=tt(u);if(e!==-1){let t=u.indexOf("m",e);return t===-1&&(t=u.length),u.slice(0,t+1)}}function Ft(u,D=Number.POSITIVE_INFINITY){let e=[],t=0,r=0;for(;t<u.length;){let F=u.codePointAt(t);if(Qe.has(F)){let s=rt(u,t);if(s){e.push({type:"ansi",code:s,endCode:et(s)}),t+=s.length;continue}}let o=nu(F),n=String.fromCodePoint(F);if(e.push({type:"character",value:n,isFullWidth:o}),t+=n.length,r+=o?2:n.length,r>=D)break}return e}function FD(u){let D=[];for(let e of u)e.code===A.reset.open?D=[]:iu.has(e.code)?D=D.filter(t=>t.endCode!==e.code):(D=D.filter(t=>t.endCode!==e.endCode),D.push(e));return D}function nt(u){return FD(u).map(({endCode:t})=>t).reverse().join("")}function ot(u,D,e){let t=Ft(u,e),r=[],F=0,o="",n=!1;for(let s of t){if(e!==void 0&&F>=e)break;s.type==="ansi"?(r.push(s),n&&(o+=s.code)):(!n&&F>=D&&(n=!0,r=FD(r),o=r.map(({code:C})=>C).join("")),n&&(o+=s.value),F+=s.isFullWidth?2:s.value.length)}return o+=nt(r),o}i();i();var pt=(u,D=2)=>u.replace(/^\t+/gm,e=>" ".repeat(e.length*D)),cD=pt;var Bt=(u,D)=>{let e=[],t=u-D,r=u+D;for(let F=t;F<=r;F++)e.push(F);return e},ht=(u,D,e={})=>{var t;if(typeof u!="string")throw new TypeError("Source code is missing.");if(!D||D<1)throw new TypeError("Line number must start from `1`.");let r=cD(u).split(/\r?\n/);if(!(D>r.length))return Bt(D,(t=e.around)!==null&&t!==void 0?t:3).filter(F=>r[F-1]!==void 0).map(F=>({line:F,value:r[F-1]}))},dF=ht;export{zu as a,Ue as b,Or as c,fu as d,w as e,A as f,PD as g,nu as h,ot as i,Xe as j,st as k,zr as l,dt as m,dF as n,ku as o,Ce as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./chunk-56GKTWFF.js";import{a as p,b as m}from"./chunk-LENSEW2F.js";import{d as r,j as c}from"./chunk-FNWXMCSD.js";import{a as s}from"./chunk-NPB753M3.js";import{Ma as a}from"./chunk-XV6XCOTG.js";import{c as n}from"./chunk-5AWELO3D.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class u extends s{static summary="Reverses app subscription migrations that are still scheduled.";static descriptionWithMarkdown="Reverses scheduled app subscription migrations that have not migrated yet.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV header: `shop_id`.\n- Example row: `123456789`.\n\nThe CSV can contain only the `shop_id` header, or it can reuse the complete CSV supplied to `schedule`; schedule-only columns are ignored.\n\nUnscheduling is not a rollback after a subscription has migrated. The command validates the entire CSV before sending any mutation. Use `--force` to skip confirmation and immediately submit every valid row.\n\nOperations are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...r,...n};static get jsonOutputSchema(){return c}async run(){let{flags:t}=await this.parse(u),{app:h,remoteApp:l}=await a({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),f=await d({action:"unschedule",input:t.input??"-",clientId:l.apiKey,skipConfirmation:t.force,watch:t.watch,...t.watch&&!t.json?{onSubmissionAccepted:p}:{}}),i=m(f,{json:t.json,watch:t.watch});return i!==0&&(process.exitCode=i),{app:h}}};export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-BN7ZXAZJ.js";import{b as r}from"./chunk-FZCGRIOM.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var e=r.object({title:r.string().optional(),body:r.union([r.string(),r.array(r.array(r.string()))])}).strict(),o={message:r.string(),code:r.string().min(1).optional().describe("A stable error code, included only when known."),tryMessage:r.string().optional(),nextSteps:r.array(r.string()).optional(),customSections:r.array(e).optional(),details:r.unknown().optional().describe("Selected domain details, preserving native API payloads such as GraphQL errors, extensions, and data.")},s=r.object({type:r.literal("abort"),...o}).strict(),a=r.object({type:r.literal("bug"),...o,stack:r.string().optional()}).strict(),i=r.object({type:r.literal("external"),...o,command:r.string(),args:r.array(r.string())}).strict(),c=r.union([s,a,i]),m=r.object({error:c}).strict(),d=n({name:"JsonErrorDocument",schema:m,definitions:{JsonError:c,JsonErrorCustomSection:e,JsonAbortError:s,JsonBugError:a,JsonExternalError:i}});export{s as a,c as b,d as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as p,c as T,f as J}from"./chunk-XV6XCOTG.js";import{B as m,Q as C,T as S}from"./chunk-V654BMS7.js";import{a as g}from"./chunk-BN7ZXAZJ.js";import{i as F}from"./chunk-J7BTC45S.js";import{Cb as P,Sa as v,ma as x,wb as W}from"./chunk-RIG66DIQ.js";import{b as o}from"./chunk-FZCGRIOM.js";import{c as w}from"./chunk-IWTNUJGY.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var j=()=>o.unknown().refine(e=>e!==void 0,"The native value must be present."),E=g({name:"FunctionRunResult",schema:o.object({name:o.string(),size:o.number().int().nonnegative().describe("Module size in kilobytes, as reported by Function runner."),memory_usage:o.number().int().nonnegative().describe("Linear memory usage in kilobytes, as reported by Function runner."),instructions:o.number().int().nonnegative(),logs:o.string(),input:j().describe("Native Function input; query keys and values are preserved."),output:j().describe("Native Function output, including the runner-specific invalid-output representation."),success:o.boolean().describe("False for a completed Function execution that failed; the command exits nonzero.")}).passthrough().describe("The native JSON object produced by Function runner 7.x and 9.x. Extra upstream fields are preserved.")});s();import{Writable as _}from"stream";async function $(e){if(e.features.includes("function")&&e.isJavaScript){let t=await J(e);return p(t.functionRunner)}return p()}function q(e){return e.configuration.build?.path?w(e.directory,e.configuration.build.path):e.outputPath}var l="The profile won't contain names for your function.",R="JavaScript functions built with Javy don't include a WebAssembly function name section, regardless of the wasm_opt setting. Function names will appear as <unknown> in the profile.",z="The built WebAssembly module doesn't contain a function name section. The default wasm-opt step removes this section, and the function compiler can also omit it. To preserve function names, set wasm_opt = false under [extensions.build] in shopify.extension.toml, configure the compiler to emit function names, and rebuild the function.";async function B(e,t){try{if(!await v(t))return;let r=x(t);if(!WebAssembly.validate(r))return;let i=new WebAssembly.Module(r);return WebAssembly.Module.customSections(i,"name").length>0?void 0:e.isJavaScript?"javascript":"wasm"}catch{return}}function O(e){e==="javascript"?m({headline:l,body:R}):m({headline:l,body:["The built WebAssembly module doesn't contain a function name section. The default wasm-opt step removes this section, and the function compiler can also omit it. To preserve function names, set ",{userInput:"wasm_opt = false"}," under ",{userInput:"[extensions.build]"}," in shopify.extension.toml, configure the compiler to emit function names, and rebuild the function."]})}async function te(e){let{command:t,args:r,processOptions:i,warningType:a}=await k(e);return a&&O(a),S(t,r,{...i,stdout:e.stdout??"inherit",stderr:e.stderr??"inherit"})}async function k(e){let t=await $(e.functionExtension);await T(t);let r=q(e.functionExtension);return{command:t.path,args:["-f",r,...M(e)],processOptions:{cwd:e.functionExtension.directory,stdin:e.stdin,input:e.input},warningType:e.profile?await B(e.functionExtension,r):void 0}}function M(e){let t=[];return e.inputPath&&t.push("--input",e.inputPath),e.export&&t.push("--export",e.export),e.json&&t.push("--json"),e.profile&&t.push("--profile"),e.schemaPath&&e.queryPath&&(t.push("--schema-path",e.schemaPath),t.push("--query-path",e.queryPath)),t}async function ne(e){let t=e.json??!0,{command:r,args:i,processOptions:a,warningType:u}=await k({...e,json:t});!t&&u&&O(u);let h=u?[`${l} ${u==="javascript"?R:z}`]:[],f=[],y=d=>new _({write(A,I,N){f.push({stream:d,data:A}),N()}}),n=await C(r,i,{...a,stripFinalNewline:t,...t?{}:{stdout:y("stdout"),stderr:y("stderr")}});if(!t)return n.exitCode!==0?{state:"failed",message:`Function runner failed with exit code ${n.exitCode}.`,command:r,args:i,exitCode:n.exitCode,stderr:n.stderr,outputChunks:f}:{state:"completed-text",outputChunks:f};let b;try{b=JSON.parse(n.stdout)}catch(d){if(!(d instanceof SyntaxError))throw d;return{state:"failed",message:n.exitCode===0?"Function runner returned invalid JSON.":`Function runner failed with exit code ${n.exitCode}.`,command:r,args:i,exitCode:n.exitCode,stderr:n.stderr}}let c=E.schema.safeParse(b);return!c.success||n.exitCode!==0&&c.data.success?{state:"failed",message:c.success?`Function runner failed with exit code ${n.exitCode}.`:"Function runner returned an invalid result.",command:r,args:i,exitCode:n.exitCode,stderr:n.stderr}:{state:"completed",resultJson:n.stdout.trim(),exitCode:n.exitCode||+!c.data.success,diagnostics:n.stderr.trim()?[...h,n.stderr.trim()]:h}}s();function ae(e){if(e.state==="completed-text"||e.state==="failed"){for(let{stream:r,data:i}of e.outputChunks??[])process[r].write(i);if(e.state==="completed-text")return;let t=new F(e.message,e.command,e.args);throw t.details={exitCode:e.exitCode,stderr:e.stderr},t}for(let t of e.diagnostics)P(t);W(e.resultJson),e.exitCode!==0&&(process.exitCode=e.exitCode)}export{E as a,te as b,ne as c,ae as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as M,l as h,r as y}from"./chunk-FNWXMCSD.js";import{J as w,z as O}from"./chunk-V654BMS7.js";import{h as d}from"./chunk-J7BTC45S.js";import{sb as f,wb as S}from"./chunk-RIG66DIQ.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();function E(t){return t.map(L).join(" \xB7 ")}function x(t,r){if(r){S(M.encode({operations:t.map(h)}));return}O({headline:"Subscription migration operations.",body:t.map(L)})}function L(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}n();n();var C=1e3,F=new Set(["COMPLETED","FAILED","CANCELED"]);async function T({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=C,sleep:m=$,onUpdate:c}){let u=new Map,g=new Map,l=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let i=await s({clientId:t,operationId:o});if(!i)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:i}})),A=e.some(({operationId:o,operation:i})=>g.get(o)!==JSON.stringify(i));for(let{operationId:o,operation:i}of e)u.set(o,i),g.set(o,JSON.stringify(i));if(c&&(l||A)){let o=r.map(i=>u.get(i));await c(o)}l=!1,a=e.filter(({operation:o})=>!F.has(o.status)).map(({operationId:o})=>o),a.length>0&&await m(p)}return r.map(e=>u.get(e))}async function $(t){await new Promise(r=>setTimeout(r,t))}async function v({clientId:t,operationIds:r,waitForOperations:s=T}){return w({title:f`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:m=>p(f`${E(m)}`)}),renderOptions:{stdout:process.stderr}})}export{x as a,v as b};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{a as T}from"./chunk-J3JPJCWP.js";import{a as Se}from"./chunk-QYFU363G.js";import{c as Te}from"./chunk-OQUXGAF2.js";import{b as pe,c as fe,d as ue,e as ye,f as we,h as ge,i as ve,l as ke,m as Pe,o as be}from"./chunk-FVRI7ZKE.js";import{a as ie}from"./chunk-2CJQQQW4.js";import{c as ne,e as S,o as se,p as ae}from"./chunk-2RFCYZMG.js";import{c as le,d as ce,e as me}from"./chunk-AQ34X5B3.js";import{a as de}from"./chunk-2M4BKFYF.js";import{a as he}from"./chunk-63UKZLPC.js";import{k as b,l as re,n as g}from"./chunk-2NZ7GDDR.js";import{p as te,s as O,u as P,v as oe}from"./chunk-KT5QQOES.js";import{a as x,b as ee}from"./chunk-KGASGUDQ.js";import{o as z,s as B,t as Q,u as X,w as Z}from"./chunk-Q7BOSHWX.js";import{ta as $,xa as k}from"./chunk-NCPZVARH.js";import{b as K,e as V}from"./chunk-5AWELO3D.js";import{A as N,B as A,D as q,E as U,O as J,W as j,x as M,z as W}from"./chunk-V654BMS7.js";import{b as H}from"./chunk-335BUVBP.js";import{d as Y,e as G}from"./chunk-FHNJLON5.js";import{h as w}from"./chunk-J7BTC45S.js";import{Bb as u,qb as v,sb as E,yb as R}from"./chunk-RIG66DIQ.js";import{i as y}from"./chunk-B4OMIONW.js";import{b as Me}from"./chunk-YTUUU33R.js";import{e as Ge,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();var Ae={workPromise:Promise.resolve()};async function Ee(e,t,n,o,s){if(n.length===0)return Ae;u("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:l}=We(n,o),a=i.length===0&&r.length===0&&l.length===0;if(k(`theme-service:theme-reconciliation:manual:${a}`),a)return u("Local and remote checksums match - no need to reconcile theme assets"),Ae;let m=await Je({filesOnlyPresentLocally:i,filesOnlyPresentOnRemote:r,filesWithConflictingChecksums:l},s);return{workPromise:Ue(e,t,o,m)}}function We(e,t){let n=new Set,o=[],s=[];for(let r of e){n.add(r.key);let l=t.files.get(r.key);l?r.checksum!==l.checksum&&s.push(r):o.push(r)}let i=Array.from(t.files.values()).filter(r=>!n.has(r.key));return{filesOnlyPresentOnRemote:F(o,t),filesOnlyPresentLocally:F(i,t),filesWithConflictingChecksums:F(s,t)}}function F(e,t){return t.applyIgnoreFilters(e).filter(o=>o.key.endsWith(".json"))}async function C(e,t,n,o){if(e.length===0)return;if(o){Ne(e,n,o);return}W({body:{list:{title:t,items:e.map(i=>i.key)}}}),await U({message:"Reconciliation Strategy",choices:[{label:n.remote.label,value:_},{label:n.local.label,value:Re}]})===_?n.remote.callback(e):n.local.callback(e)}function Ne(e,t,n){switch(n){case"keep-remote":t.remote.callback(e);break;case"keep-local":t.local.callback(e);break;case"abort":break}}function qe(e){let t=[{title:"The files listed below are only present locally.",files:e.filesOnlyPresentLocally},{title:"The files listed below are only present on the remote theme.",files:e.filesOnlyPresentOnRemote},{title:"The files listed below differ between the local and remote versions.",files:e.filesWithConflictingChecksums}];throw new w("Theme JSON files need reconciliation.",t.filter(n=>n.files.length>0).map(n=>`${n.title}
|
|
2
|
+
${n.files.map(o=>`- ${o.key}`).join(`
|
|
3
|
+
`)}`).join(`
|
|
4
|
+
|
|
5
|
+
`))}async function Ue(e,t,n,o){let{localFilesToDelete:s,filesToDownload:i,remoteFilesToDelete:r}=o,l=s.map(h=>n.delete(h.key)),a=T(i,P,async h=>{let c=await b(e.id,h.map(f=>f.key),t);return Promise.all(c.map(f=>{if(f)return n.write(f)}))}),m=re(e.id,r.map(h=>h.key),t);await Promise.all([...l,...a,m])}async function Je(e,t){let{filesOnlyPresentLocally:n,filesOnlyPresentOnRemote:o,filesWithConflictingChecksums:s}=e,{reconciliationStrategy:i}=t,r=[],l=[],a=[],m={filesOnlyPresentLocally:t.noDelete?[]:n,filesOnlyPresentOnRemote:o,filesWithConflictingChecksums:s},h=Object.values(m).some(c=>c.length>0);return i==="abort"&&h&&qe(m),t.noDelete||await C(n,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:c=>{r.push(...c)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}},i),await C(o,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:c=>{l.push(...c)}},local:{label:"Delete files from the remote theme",callback:c=>{a.push(...c)}}},i),await C(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:c=>{l.push(...c)}},local:{label:"Keep the local version",callback:c=>{a.push(...c)}}},i),{localFilesToDelete:r,filesToDownload:l,remoteFilesToDelete:a}}p();var je=3e3,L=class extends Error{};function Fe(e,t,n,o,s,i){u("Listening for changes in the theme editor");let r=5,l=0,a="",m=n,h=async()=>{await new Promise(c=>setTimeout(c,je)),m=await Ke(e,t,m,o,s).then(c=>(l=0,a="",c)).catch(c=>{if(l++,c.message!==a&&(a=c.message,S("Error while polling for changes.",c)),l>=r){let f=new w("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");q(f),i(f)}return m})};setTimeout(async()=>{for(;;)await h()})}async function Ke(e,t,n,o,s){let i=new Set(o.unsyncedFileKeys),r=Oe(n,o,i),l=await g(e.id,t).then(h=>Oe(h,o,i)),a=ze(r,l),m=Ve(l,r);return await Xe(o,a),await Be(e,t,o,a),await Qe(o,m,s),l}function Ve(e,t){let n=new Map(e.map(s=>[s.key,s]));return t.filter(s=>n.get(s.key)===void 0)}function ze(e,t){let n=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let i=n.get(s.key);if(!i||i.checksum!==s.checksum)return!0})}async function Be(e,t,n,o){let s=o.filter(r=>n.files.get(r.key)?.checksum!==r.checksum),i=T(s,P,async r=>b(e.id,r.map(l=>l.key),t).then(l=>Promise.all(l.map(async a=>{a&&(await n.write(a),R(E`• ${O.format(new Date)} Synced ${v.raw("\xBB")} ${v.gray(`download ${a.key} from remote theme`)}`))}))));await Promise.all(i)}async function Qe(e,t,n){if(!n.noDelete)return Promise.all(t.map(o=>{if(e.files.get(o.key))return e.delete(o.key).then(()=>{R(E`• ${O.format(new Date)} Synced ${v.raw("\xBB")} ${v.gray(`remove ${o.key} from local theme`)}`)})}))}async function Xe(e,t){let n=new Map(e.files);await Promise.all(t.map(o=>e.read(o.key)));for(let o of t){let s=n.get(o.key)?.checksum,i=e.files.get(o.key)?.checksum;if(s!==i)throw new L(`Detected changes to the file '${o.key}' on both local and remote sources. Aborting...`)}}function Oe(e,t,n){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!n.has(s.key))}var Re="local",_="remote";async function Ce(e,t,n,o,s,i){u("Initiating theme asset reconciliation process"),await o.ready();let{workPromise:r}=await Ee(e,t,n,o,s);return{updatedRemoteChecksumsPromise:r.then(async()=>{let a=await g(e.id,t);return Fe(e,t,a,o,s,i),a}),workPromise:r}}import{createServer as Ze}from"node:http";function _e(e,t){let{promise:n,resolve:o,reject:s}=Promise.withResolvers(),i=ge(e,t),r=xe(e,t,s),l=Promise.all([i,r.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),a=tt(e,t,l);return{workPromise:l,serverStart:a.start,dispatchEvent:a.dispatch,renderDevSetupProgress:r.renderProgress,backgroundJobPromise:n,resolveBackgroundJob:o}}function xe(e,t,n){let o=a=>(S("Failed to perform the initial theme synchronization.",a),n(a),new Promise(()=>{})),i=g(e.id,t.session).then(a=>et(e,t,a,n)),r=i.then(async({updatedRemoteChecksumsPromise:a})=>{let m=await a;return Se(e,t.session,m,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:o})});return{workPromise:r.then(a=>a.workPromise).catch(o),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:m}=await i;await me([{title:"Performing file synchronization. This may take a while...",task:async()=>{await m}}])}let{renderThemeSyncProgress:a}=await r;await a()}}}function et(e,t,n,o){return t.options.themeEditorSync?Ce(e,t.session,n,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only,reconciliationStrategy:t.options.reconciliationStrategy},o):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(n),workPromise:Promise.resolve()})}function tt(e,t,n){let o=X(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`,"https://online-store-web.shopifyapps.com"];o.use(ye(t.options.host,t.options.port)),o.use(Q(async()=>(await n,B(r=>{r.node.req.headers.origin&&z(r,{origin:a=>s.includes(a),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&o.use(ve(e,t)),o.use(ue(e,t)),o.use(pe(e,t)),o.use(fe(e,t));let i=Ze(Z(o));return{dispatch:o.handler.bind(o),start:async()=>new Promise(r=>i.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(l=>{i.closeAllConnections(),i.close(l)})])}})))}}import ot from"readline";var rt="127.0.0.1",nt=9292,Le=!1;async function De(e){if(!await be(e.directory)&&!await le(e.force))return;e.password?.startsWith("shpat_")&&A({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
|
|
6
|
+
`,{list:{title:"Known limitations:",items:["Hot module reloading","Password protected storefronts"]}}],link:{label:"Theme Access app",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-access"}}),e.listing&&await ke(e.directory,e.listing);let[t,n]=await Promise.all([se(e.adminSession),ne(e.adminSession)]),o=n?await ie(e.storePassword,e.adminSession.storeFqdn,t):void 0,s=we(),i=Pe(e.directory,{filters:e,listing:e.listing,noDelete:e.noDelete,notify:e.notify}),r=e.host??rt,l;if(e.port){if(!await ee(e.port))throw new w(`Port ${e.port} is not available. Try a different port or remove the --port flag to use an available port.`);l=e.port}else l=await x(nt);let a={local:`http://${r}:${l}`,giftCard:`http://${r}:${l}/gift_cards/[store_id]/preview`,themeEditor:`https://${e.store}/admin/themes/${e.theme.id}/editor?hr=${l}`,preview:`https://${e.store}/?preview_theme_id=${e.theme.id}`},h={session:await ae(e.theme.id.toString(),e.adminSession,e.password,o,t),localThemeFileSystem:i,localThemeExtensionFileSystem:s,directory:e.directory,type:"theme",lastRequestedPath:"",options:{themeEditorSync:e["theme-editor-sync"],reconciliationStrategy:e.reconciliationStrategy,host:r,port:l,open:e.open,liveReload:e["live-reload"],standardEventsDevBundle:!0,standardEventsInspector:e["standard-events-inspector"],noDelete:e.noDelete,ignore:e.ignore,only:e.only,errorOverlay:e["error-overlay"]}},{serverStart:c,renderDevSetupProgress:f,backgroundJobPromise:He,resolveBackgroundJob:$e}=_e(e.theme,h),I=j();if(I){ot.emitKeypressEvents(process.stdin);let Ye=st(a,h,$e);process.stdin.on("keypress",Ye)}await Promise.all([He,f().then(c).then(()=>{I&&process.stdin.setRawMode(!0),lt(a),e.open&&Ie(a.local,"development server")})]),await it(e.commandConfig,e.adminSession),process.exit(0)}async function it(e,t){if(!Le){Le=!0;try{await Y(()=>({store_fqdn_hash:H(t.storeFqdn)})),await G(()=>({store_fqdn:t.storeFqdn})),await $({config:e,exitMode:"ok"})}catch{}}}function st(e,t,n){let o=M(Ie,100,{leading:!0,trailing:!1});return(s,i)=>{if(i.ctrl&&i.name==="c"){n();return}switch(i.name){case void 0:break;case"t":o(e.local,"localhost");break;case"p":o(e.preview,"theme preview");break;case"e":o(t.lastRequestedPath==="/"?e.themeEditor:`${e.themeEditor}&previewPath=${encodeURIComponent(t.lastRequestedPath)}`,"theme editor");break;case"g":o(e.giftCard,"gift card preview");break;default:break}}}function Ie(e,t){J(e).catch(at(t))}function at(e){return t=>{A({headline:`Failed to open ${e}.`,body:t.stack??t.message})}}function lt(e){N({body:[{list:{title:y.bold("Preview your theme ")+y.cyan("(t)"),items:[{link:{url:e.local}}]}}],nextSteps:[[{link:{label:`Share your theme preview ${y.cyan("(p)")}`,url:e.preview}},{subdued:e.preview}],[{link:{label:`Customize your theme at the theme editor ${y.cyan("(e)")}`,url:e.themeEditor}}],[{link:{label:`Preview your gift cards ${y.cyan("(g)")}`,url:e.giftCard}}]]})}var d=Ge(Me(),1);var D=class extends oe{static get requiresSyncAnalytics(){return!0}static summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";static descriptionWithMarkdown=`
|
|
7
|
+
Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
|
|
8
|
+
|
|
9
|
+
This command returns the following information:
|
|
10
|
+
|
|
11
|
+
- A link to your development theme at http://127.0.0.1:9292. This URL can hot reload local changes to CSS and sections, or refresh the entire page when a file changes, enabling you to preview changes in real time using the store's data.
|
|
12
|
+
|
|
13
|
+
You can specify a different network interface and port using \`--host\` and \`--port\`.
|
|
14
|
+
|
|
15
|
+
- A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
|
|
16
|
+
|
|
17
|
+
- A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.
|
|
18
|
+
|
|
19
|
+
If you already have a development theme for your current environment, then this command replaces the development theme with your local theme. You can override this using the \`--theme-editor-sync\` flag.
|
|
20
|
+
|
|
21
|
+
> Note: You can't preview checkout customizations using http://127.0.0.1:9292.
|
|
22
|
+
|
|
23
|
+
Development themes are deleted when you run \`shopify auth logout\`. If you need a preview link that can be used after you log out, then you should [share](https://shopify.dev/docs/api/shopify-cli/theme/theme-share) your theme or [push](https://shopify.dev/docs/api/shopify-cli/theme/theme-push) to an unpublished theme on your store.
|
|
24
|
+
|
|
25
|
+
You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).`;static description=this.descriptionForHelp();static flags={...K,...te,host:d.Flags.string({description:"Set which network interface the web server listens on. The default value is 127.0.0.1.",env:"SHOPIFY_FLAG_HOST"}),"live-reload":d.Flags.string({description:`The live reload mode switches the server behavior when a file is modified:
|
|
26
|
+
- hot-reload Hot reloads local changes to CSS and sections (default)
|
|
27
|
+
- full-page Always refreshes the entire page
|
|
28
|
+
- off Deactivate live reload`,default:"hot-reload",options:["hot-reload","full-page","off"],env:"SHOPIFY_FLAG_LIVE_RELOAD"}),"error-overlay":d.Flags.string({description:`Controls the visibility of the error overlay when an theme asset upload fails:
|
|
29
|
+
- silent Prevents the error overlay from appearing.
|
|
30
|
+
- default Displays the error overlay.
|
|
31
|
+
`,options:["silent","default"],default:"default",env:"SHOPIFY_FLAG_ERROR_OVERLAY"}),"theme-editor-sync":d.Flags.boolean({description:"Synchronize Theme Editor updates in the local theme files.",env:"SHOPIFY_FLAG_THEME_EDITOR_SYNC"}),"standard-events-inspector":d.Flags.boolean({description:"Inject the standard events inspector into storefront HTML.",env:"SHOPIFY_FLAG_STANDARD_EVENTS_INSPECTOR",default:!1}),"reconciliation-strategy":d.Flags.string({description:"How to resolve JSON conflicts when --theme-editor-sync is enabled. Use keep-local to keep local files, keep-remote to keep remote files, or abort to fail instead of prompting.",options:["keep-local","keep-remote","abort"],env:"SHOPIFY_FLAG_RECONCILIATION_STRATEGY",dependsOn:["theme-editor-sync"]}),port:V({description:"Local port to serve theme preview from.",env:"SHOPIFY_FLAG_PORT"}),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),listing:d.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"}),nodelete:d.Flags.boolean({char:"n",description:"Prevents files from being deleted in the remote theme when a file has been deleted locally. This applies to files that are deleted while the command is running, and files that have been deleted locally before the command is run.",env:"SHOPIFY_FLAG_NODELETE"}),only:d.Flags.string({char:"o",multiple:!0,description:"Hot reload only files that match the specified pattern.",env:"SHOPIFY_FLAG_ONLY"}),ignore:d.Flags.string({char:"x",multiple:!0,description:"Skip hot reloading any files that match the specified pattern.",env:"SHOPIFY_FLAG_IGNORE"}),force:d.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),notify:d.Flags.string({description:"The file path or URL. The file path is to a file that you want updated on idle. The URL path is where you want a webhook posted to report on file changes.",env:"SHOPIFY_FLAG_NOTIFY"}),open:d.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),"store-password":d.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),"allow-live":d.Flags.boolean({description:"Allow development on a live theme.",char:"a",env:"SHOPIFY_FLAG_ALLOW_LIVE",default:!1})};static multiEnvironmentsFlags=null;async command(t,n){let{ignore:o=[],only:s=[]}=t;k("theme-command:dev:single-env:authenticated");let i,r;if(t.theme){let a={filter:{theme:t.theme}};i=await he(n,a),r={...t,theme:i.id.toString(),store:n.storeFqdn}}else{i=await new de(n).findOrCreate();let a=t["theme-editor-sync"]&&i.createdAtRuntime;r={...t,theme:i.id.toString(),store:n.storeFqdn,"overwrite-json":a}}await ce(i,"start development mode",t["allow-live"])&&(await De({adminSession:n,commandConfig:this.config,directory:r.path,store:r.store,password:r.password,storePassword:r["store-password"],theme:i,listing:r.listing,host:r.host,port:r.port,"live-reload":r["live-reload"],"error-overlay":r["error-overlay"],force:r.force,open:r.open,"theme-editor-sync":r["theme-editor-sync"],"standard-events-inspector":r["standard-events-inspector"],reconciliationStrategy:r["reconciliation-strategy"],noDelete:r.nodelete,ignore:o,only:s,notify:r.notify}),await Te({path:r.path,password:r.password,store:r.store,force:r.force,verbose:r.verbose,noColor:r["no-color"],silent:!0}))}};export{D as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as y}from"./chunk-2NZ7GDDR.js";import{xa as i}from"./chunk-NCPZVARH.js";import{B as l,C as p,F as m,I as h,W as a}from"./chunk-V654BMS7.js";import{h as s}from"./chunk-J7BTC45S.js";import{i as d,j as f}from"./chunk-FZCGRIOM.js";import{b as c}from"./chunk-46JYM3GH.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();function w(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function x(e){return{list:{items:e.map(w)}}}async function M(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return f()==="json"?d({type:"diagnostic",level:"error",message:`${o?`Environment: ${o}
|
|
2
|
+
`:""}${r}`}):p({headline:o?`Environment: ${o}`:"",body:r}),!1;if(l({body:r}),c())throw new s("This command must run from a theme directory when user input is unavailable.","Run the command from a theme directory, or use `--force` to continue.");if(!a())return!0;let t=await m({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function k(e,r,o){if(e.role!==y||o)return!0;if(!a())throw new s(`Can't ${r} on the live theme when user input is unavailable.`,"Use `--allow-live` to confirm that you want to continue.");let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await m({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function D(e,r,o=!1){e.length>0&&await h(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{w as a,x as b,M as c,k as d,D as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as u}from"./chunk-OLKLHVHA.js";import{R as a}from"./chunk-NCPZVARH.js";import{b as i,c as n}from"./chunk-5AWELO3D.js";import{a as e}from"./chunk-BN7ZXAZJ.js";import{wb as c,zb as r}from"./chunk-RIG66DIQ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var m=e({name:"AuthLogoutResult",schema:t.object({status:t.literal("success")}).strict()}),o=class p extends u{static descriptionWithMarkdown="Logs you out of the Shopify account or Partner account and store.";static description=this.descriptionForHelp();static flags={...i,...n};static get jsonOutputSchema(){return m}async run(){let{flags:l}=await this.parse(p);await a(),l.json?c(m.encode({status:"success"})):r("Logged out from all the accounts")}};export{o as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{b as S}from"./chunk-7GHSE7SG.js";import{qb as o,sb as r,wb as p}from"./chunk-RIG66DIQ.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();function P(e){let t=Object.fromEntries(e.variables.map(({name:u,value:E})=>[u,E]));return r`
|
|
2
|
+
${o.green("SHOPIFY_API_KEY")}=${t.SHOPIFY_API_KEY??""}
|
|
3
|
+
${o.green("SHOPIFY_API_SECRET")}=${t.SHOPIFY_API_SECRET??""}
|
|
4
|
+
${o.green("SCOPES")}=${t.SCOPES??""}
|
|
5
|
+
`}function O(e,t){p(t==="json"?S.encode(e):P(e))}export{P as a,O as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-BN7ZXAZJ.js";import{b as e}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();var o=e.object({url:e.string().url().describe("The requested shopify.dev document URL."),content:e.string().describe("The document in Markdown, with the requested language filter applied.")}).strict(),c=e.object({path:e.string().regex(/^(?:\/|[A-Za-z]:[\\/]|\\\\)/).describe("The absolute native path of the written file."),format:e.literal("markdown").describe("The file contains the original Markdown document, not a JSON wrapper.")}).strict(),u=t({name:"DocFetchResult",schema:e.union([e.object({document:o}).strict(),c]),definitions:{Document:o,DocumentFile:c}}),r=e.object({score:e.number().finite().describe("The relevance score returned by shopify.dev."),content:e.string().describe("The matching documentation chunk."),url:e.string().url().describe("The URL of the matching document."),title:e.string().describe("The title of the matching document."),domain:e.string().nullable().describe("The documentation domain, or null when unavailable.")}).strict(),a=e.object({hasNextPage:e.boolean().nullable().describe("Whether more results are available, or null when unknown.")}).strict(),h=t({name:"DocSearchResult",schema:e.object({results:e.array(r).describe("The top matching chunks from one search request."),pageInfo:a}).strict(),definitions:{DocumentationSearchEntry:r,PageInfo:a}});export{u as a,r as b,h as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h,b as w}from"./chunk-MZWPIFAM.js";import{j as f}from"./chunk-NCPZVARH.js";import{U as d}from"./chunk-V654BMS7.js";import{h as i}from"./chunk-J7BTC45S.js";import{Fa as m,ma as p}from"./chunk-RIG66DIQ.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-FZCGRIOM.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();a();var j=Symbol("Let zodToJsonSchema decide on which parser to use");var T={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},N=e=>typeof e=="string"?{...T,name:e}:{...T,...e};a();var M=e=>{let t=N(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}};a();function k(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function m(e,t,r,n,i){e[t]=r,k(e,t,n,i)}a();var A=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};a();a();a();function f(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?A(t,e.currentPath):t.join("/")}}a();function $(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==p.ZodAny&&(r.items=o(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&m(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&m(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(m(r,"minItems",e.exactLength.value,e.exactLength.message,t),m(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}a();function w(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?m(r,"minimum",n.value,n.message,t):m(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),m(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?m(r,"maximum",n.value,n.message,t):m(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),m(r,"maximum",n.value,n.message,t));break;case"multipleOf":m(r,"multipleOf",n.value,n.message,t);break}return r}a();function E(){return{type:"boolean"}}a();function v(e,t){return o(e.type._def,t)}a();var z=(e,t)=>o(e.innerType._def,t);a();function _(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,s)=>_(e,t,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return se(e,t)}}var se=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let n of e.checks)switch(n.kind){case"min":m(r,"minimum",n.value,n.message,t);break;case"max":m(r,"maximum",n.value,n.message,t);break}return r};a();function R(e,t){return{...o(e.innerType._def,t),default:e.defaultValue()}}a();function L(e,t){return t.effectStrategy==="input"?o(e.schema._def,t):f(t)}a();function F(e){return{type:"string",enum:Array.from(e.values)}}a();var pe=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function I(e,t){let r=[o(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s),n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(s=>{if(pe(s))i.push(...s.allOf),s.unevaluatedProperties===void 0&&(n=void 0);else{let c=s;if("additionalProperties"in s&&s.additionalProperties===!1){let{additionalProperties:l,...u}=s;c=u}else n=void 0;i.push(c)}}),i.length?{allOf:i,...n}:void 0}a();function C(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}a();a();a();var S,g={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(S===void 0&&(S=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),S),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function P(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":m(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":m(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":y(r,"email",n.message,t);break;case"format:idn-email":y(r,"idn-email",n.message,t);break;case"pattern:zod":d(r,g.email,n.message,t);break}break;case"url":y(r,"uri",n.message,t);break;case"uuid":y(r,"uuid",n.message,t);break;case"regex":d(r,n.regex,n.message,t);break;case"cuid":d(r,g.cuid,n.message,t);break;case"cuid2":d(r,g.cuid2,n.message,t);break;case"startsWith":d(r,RegExp(`^${Z(n.value,t)}`),n.message,t);break;case"endsWith":d(r,RegExp(`${Z(n.value,t)}$`),n.message,t);break;case"datetime":y(r,"date-time",n.message,t);break;case"date":y(r,"date",n.message,t);break;case"time":y(r,"time",n.message,t);break;case"duration":y(r,"duration",n.message,t);break;case"length":m(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),m(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{d(r,RegExp(Z(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&y(r,"ipv4",n.message,t),n.version!=="v4"&&y(r,"ipv6",n.message,t);break}case"base64url":d(r,g.base64url,n.message,t);break;case"jwt":d(r,g.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&d(r,g.ipv4Cidr,n.message,t),n.version!=="v4"&&d(r,g.ipv6Cidr,n.message,t);break}case"emoji":d(r,g.emoji(),n.message,t);break;case"ulid":{d(r,g.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{y(r,"binary",n.message,t);break}case"contentEncoding:base64":{m(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{d(r,g.base64,n.message,t);break}}break}case"nanoid":d(r,g.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Z(e,t){return t.patternStrategy==="escape"?me(e):e}var ue=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function me(e){let t="";for(let r=0;r<e.length;r++)ue.has(e[r])||(t+="\\"),t+=e[r];return t}function y(e,t,r,n){e.format||e.anyOf?.some(i=>i.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):m(e,"format",t,r,n)}function d(e,t,r,n){e.pattern||e.allOf?.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:U(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):m(e,"pattern",U(t,n),r,n)}function U(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,i="",s=!1,c=!1,l=!1;for(let u=0;u<n.length;u++){if(s){i+=n[u],s=!1;continue}if(r.i){if(c){if(n[u].match(/[a-z]/)){l?(i+=n[u],i+=`${n[u-2]}-${n[u]}`.toUpperCase(),l=!1):n[u+1]==="-"&&n[u+2]?.match(/[a-z]/)?(i+=n[u],l=!0):i+=`${n[u]}${n[u].toUpperCase()}`;continue}}else if(n[u].match(/[a-z]/)){i+=`[${n[u]}${n[u].toUpperCase()}]`;continue}}if(r.m){if(n[u]==="^"){i+=`(^|(?<=[\r
|
|
2
2
|
]))`;continue}else if(n[u]==="$"){i+=`($|(?=[\r
|
|
3
3
|
]))`;continue}}if(r.s&&n[u]==="."){i+=c?`${n[u]}\r
|
|
4
4
|
`:`[${n[u]}\r
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-OLKLHVHA.js";import{sa as r}from"./chunk-NCPZVARH.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static hidden=!0;async run(){await r()}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-ZBVHPC6W.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"./chunk-2NZ7GDDR.js";import{N as l}from"./chunk-NCPZVARH.js";import{h}from"./chunk-J7BTC45S.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-3JACWBUC.js";import{b as a}from"./chunk-OLKLHVHA.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-2CJQQQW4.js";import{c as O,j as A,p as k}from"./chunk-2RFCYZMG.js";import{a as P}from"./chunk-QGWC23HQ.js";import{b as S,m as I}from"./chunk-2NZ7GDDR.js";import{j as T,k as q,l as L,p as R,v as b}from"./chunk-KT5QQOES.js";import{xa as E}from"./chunk-NCPZVARH.js";import{a as v}from"./chunk-MHWETFNT.js";import{b as g}from"./chunk-5AWELO3D.js";import{h as i}from"./chunk-J7BTC45S.js";import{Bb as c,qb as l,sb as m,yb as o}from"./chunk-RIG66DIQ.js";import{b as x}from"./chunk-46JYM3GH.js";import{b as G}from"./chunk-YTUUU33R.js";import{e as W,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var d=class extends P{context="REPL";constructor(t){super(t),this.themeId=T()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){q(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await I(t.id,n,this.adminSession)}};r();r();async function $(e){return await H(e)??await j(e)??await Y(e)??await z(e)??void 0}async function H(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await f({...e,snippet:t}),s=await n.text();return F(n.status,s)?Q(s):void 0}async function j(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await f({...e,snippet:t}),s=await n.text();F(n.status,s)&&e.replSession.push(JSON.parse(t))}async function Y(e){if(c(`Evaluating assignment context - ${e.snippet}`),oe(e.snippet))return e.snippet=`assign ${e.snippet}`,o(m`${l.gray(`> ${e.snippet}`)}`),j(e)}async function z(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(X(e.snippet)||(t=await(await f({...e,snippet:`{{ ${e.snippet} }}`})).text()),h(t)||(t=await(await f({...e,snippet:`{% ${e.snippet} %}`})).text()),h(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");B(e.snippet,n)}}function B(e,t){if(t.includes("Unknown tag")){o(m`${l.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=C(t);n&&o(m`${l.errorText(n)}`)}async function f(e){let t=K(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await A(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
|
|
2
2
|
${t}
|
|
3
3
|
`}});return Z(n)&&ne(),ee(n)&&se(),te(n)&&re(),n}function K(e){return`[${[...e.replSession.map(n=>JSON.stringify(n)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function Q(e){let t=C(e);if(t)return JSON.parse(t)?.find(s=>s.type==="display")?.value}function C(e){let t=e.split(`
|
|
4
4
|
`).slice(1,-1);if(t.length!==0)return t.join("")}function h(e){return e.includes("Liquid syntax error")}function X(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function Z(e){return e.status===401||e.status===403}function ee(e){return e.status===430||e.status===429}function te(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function ne(){throw new i("Session expired. Please initiate a new one.")}function se(){throw new i("Evaluations limit reached. Try again later.")}function re(){throw new i("Page not found. Please provide a valid --url value!")}function oe(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function F(e,t){return e===200&&!h(t)}r();function N(e){if(D(e)){o("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){M("null");return}let t=JSON.stringify(e,null,2);M(t)}function D(e){if(Array.isArray(e))return e.length>0?D(e[0]):!1;if(e&&typeof e=="object"){let n=e.error;return typeof n=="string"&&n.includes("json not allowed for this object")}return!1}function M(e){return o(m`${l.cyan(e)}`)}import{createInterface as ie}from"readline";var ae=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-ZHHTQRWU.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function r(d){await t.addPublicMetadata(()=>d)}export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"./chunk-NPB753M3.js";import{a as C}from"./chunk-D4LFWIFE.js";import{Ma as O,ja as N}from"./chunk-XV6XCOTG.js";import{b as R,c as k}from"./chunk-5AWELO3D.js";import{H as w}from"./chunk-V654BMS7.js";import{a as y}from"./chunk-BN7ZXAZJ.js";import{h as S}from"./chunk-J7BTC45S.js";import{Hb as b,ba as v,qb as x,sb as E,wb as I,yb as f}from"./chunk-RIG66DIQ.js";import{i as T}from"./chunk-B4OMIONW.js";import{b as o}from"./chunk-FZCGRIOM.js";import{i as L}from"./chunk-IWTNUJGY.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var B=o.object({createdAt:o.string(),createdBy:o.string(),versionTag:o.string().nullable().optional(),status:o.string(),versionId:o.string(),message:o.string()}),u=y({name:"AppVersionsListResult",schema:o.array(B),definitions:{AppVersion:B}});r();async function M(i,t){let n=await i.appVersions(t);if(!n.app)throw new S(`Shopify did not return app information for API key ${t.apiKey}.`);return{appVersions:n.app.appVersions.nodes.map(e=>({createdAt:v(new Date(e.createdAt)),createdBy:e.createdBy?.displayName??"",versionTag:e.versionTag,status:e.status,versionId:e.versionId,message:e.message??""})),totalResults:n.app.appVersions.pageInfo.totalResults}}r();var $=12;async function D({app:i,appVersions:t,totalResults:n,remoteApp:e,organization:p,developerPlatformClient:m},d){if(d==="json"){I(u.encode(t));return}if(N({org:p.businessName,appName:e.title,configFile:L(i.configPath)}),t.length===0){f("No app versions found for this app");return}let g=t.map(({versionId:s,...a})=>({...a,status:a.status==="active"?T.green(`\u2605 ${a.status}`):a.status})),l=(process.stdout.columns??75)-$,c=l;g.forEach(s=>{let a=s.message.length+(s.versionTag?.length??0)+b(s.status).length+s.createdAt.length+s.createdBy.length;if(a>l){let J=a-s.message.length,A=Math.max(l-J,10);A<c&&(c=A)}}),g.forEach(s=>{s.message.length>c&&(s.message=`${s.message.slice(0,c-3)}...`)}),w({rows:g,columns:{versionTag:{header:"VERSION"},status:{header:"STATUS"},message:{header:"MESSAGE"},createdAt:{header:"DATE CREATED"},createdBy:{header:"CREATED BY"}}});let F=x.link(m.webUiName,[await m.appDeepLink(e),"versions"].join("/"));f(E`\nView all ${String(n)} app versions in the ${F}`)}var h=class i extends j{static summary="List deployed versions of your app.";static descriptionWithMarkdown="Lists the deployed app versions. An app version is a snapshot of your app extensions.";static get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...R,...C,...k};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e,developerPlatformClient:p,organization:m}=await O({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),d=await M(p,e);return await D({app:n,remoteApp:e,organization:m,developerPlatformClient:p,...d},t.json?"json":"text"),{app:n}}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./chunk-
|
|
1
|
+
import{j as a}from"./chunk-NCPZVARH.js";import{h as s}from"./chunk-J7BTC45S.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=T(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function l(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function d(t,e){if(!c(t,e))throw new s(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",f(e));let r=e;return l(t)&&(r=n.LOCALHOST),[t.trim(),r]}function f(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new s(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function A(t,e,r){if(r.length===0)throw new s(`No topics found for '${e}'`);let o=h(t.trim(),r);if(o===void 0)throw new s(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return o}function h(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function T(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(l(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}i();async function O(t,e,r){let{sendSampleWebhook:o}=await t.sendSampleWebhook(e,r);return o}i();async function H(t,e,r){let o={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},u=await a(t,o);return u.status>=200&&u.status<300}i();async function m(t,e){let{publicApiVersions:r}=await t.apiVersions(e),o=r.indexOf("unstable");return o===-1?r.sort().reverse():(r.splice(o,1),r.sort().reverse(),r.push("unstable")),r}export{m as a,O as b,H as c,n as d,c as e,d as f,g,A as h,T as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-OPVXPDOQ.js";import{b as e}from"./chunk-OLKLHVHA.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static description="View the UI kit components prompts";static hidden=!0;async run(){await i()}};export{t as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{c as y,d as N,e as x,f as oe}from"./chunk-6Y6A2QGK.js";import{a as te,c as re}from"./chunk-XDXHSGDL.js";import{a as q,c as V,e as O,f as U,h as W,i as G,m as _,p as Q,q as X,r as z,s as H,u as ee}from"./chunk-5XOEMYEQ.js";import{a as Z}from"./chunk-NPB753M3.js";import{a as K,b as Y}from"./chunk-D4LFWIFE.js";import{b as ue}from"./chunk-NCPZVARH.js";import{b as F,c as J}from"./chunk-5AWELO3D.js";import{A as w,B,C,J as j,a as $,z as T}from"./chunk-V654BMS7.js";import{h,k as I}from"./chunk-J7BTC45S.js";import{Cb as P,Sa as M,la as L,qb as p,sb as d,ta as S,wb as g}from"./chunk-RIG66DIQ.js";import{e as R}from"./chunk-IWTNUJGY.js";import{e as le,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function pe(o,e){if(o)return o.join(`
|
|
2
|
+
`);if(e){if(!await M(e))throw new h(d`Variable file not found at ${p.path(e)}. Please check the path and try again.`);return L(e,{encoding:"utf8"})}else return}async function ne(o){let{remoteApp:e,store:a,query:n,variables:s,variableFile:t,watch:r=!1,version:i}=o,{adminSession:l,version:u}=await j({title:d`Authenticating`,task:async()=>{let E=await te(e,a.shopDomain),k=await U({adminSession:E,userSpecifiedVersion:i,minimumDefaultVersion:q});return{adminSession:E,version:k}},renderOptions:{stdout:process.stderr}}),c=await pe(s,t);return de(n,c),re(n,a),{adminSession:l,version:u,query:n,variablesJsonl:c,watch:r}}async function ae(o){let{adminSession:e,version:a,query:n,variablesJsonl:s,watch:t}=o,r=O(n)?await G({adminSession:e,query:n,variablesJsonl:s,version:a}):await W({adminSession:e,query:n,version:a});if(r?.userErrors?.length||!r?.bulkOperation)return{store:e.storeFqdn,apiVersion:a,query:n,operation:r?.bulkOperation??null,userErrors:r?.userErrors??[],watchAborted:!1};let i=new $,l=t?await X(e,r.bulkOperation.id,i.signal,()=>i.abort()):await Q(e,r.bulkOperation.id),u=t&&!i.signal.aborted&&l.status==="COMPLETED"&&l.url?await z(l.url):void 0;return{store:e.storeFqdn,apiVersion:a,query:n,operation:l,userErrors:[],watchAborted:i.signal.aborted,results:u}}function de(o,e){if(O(o)&&!e)throw new h(d`Bulk mutations require variables. Provide a JSONL file with ${p.yellow("--variable-file")} or individual JSON objects with ${p.yellow("--variables")}.`);if(!O(o)&&e)throw new h(d`The ${p.yellow("--variables")} and ${p.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}f();f();var m=le(ue(),1);function ie(o,e){let a=(0,m.parse)(e),n=new Map(a.definitions.filter(r=>r.kind===m.Kind.FRAGMENT_DEFINITION).map(r=>[r.name.value,r])),s=(0,m.getOperationAST)(a),t=s?.operation==="mutation"?A(s.selectionSet,n).flatMap(r=>r.selectionSet?A(r.selectionSet,n).filter(i=>i.name.value==="userErrors").map(i=>[r.alias?.value??r.name.value,i.alias?.value??i.name.value]):[]):[];return o.trim().split(`
|
|
3
|
+
`).filter(r=>r.trim().length>0).some(r=>{let i;try{i=JSON.parse(r)}catch(l){if(l instanceof SyntaxError)return!1;throw l}return Array.isArray(i.errors)&&i.errors.length>0?!0:t.some(([l,u])=>{let c=i.data?.[l]?.[u];return Array.isArray(c)&&c.length>0})})}function A(o,e,a=[]){return o.selections.flatMap(n=>{if(n.kind===m.Kind.FIELD)return[n];if(n.kind===m.Kind.INLINE_FRAGMENT)return A(n.selectionSet,e,a);let s=n.name.value,t=e.get(s);return t&&!a.includes(s)?A(t.selectionSet,e,[...a,s]):[]})}async function se(o,e){let{format:a,watch:n,outputFile:s}=e,{operation:t,userErrors:r,watchAborted:i,results:l}=o;if(!t&&r.length===0){let u={headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."};throw a==="json"?P(`${u.headline} ${u.body}`):B(u),new I("Bulk operation response returned null with no error message.")}if(a==="json"){if(r.length||t&&["FAILED","CANCELED","EXPIRED"].includes(t.status)){let b=new h("Bulk operation failed.");throw b.details={...N(o),operation:t?x(t):null,userErrors:r},b}if(!t)throw new I("Bulk operation response returned no operation.");let u=t.type==="MUTATION"&&l!==void 0&&ie(l,o.query),c=u?"partial":"success";i&&(c="cancelled"),u&&(process.exitCode=1);let E=n&&!i&&t.type==="QUERY"&&t.status==="COMPLETED"&&String(t.objectCount)==="0"&&!t.url,k=l??(E?"":void 0);if(s&&k===void 0&&!i)throw new h("No results are available to write to the output file.");if(s&&k!==void 0){let b=R(s);await S(b,k),g(y.encode({path:b,format:"jsonl"}))}else g(y.encode({...N(o),status:c,...i?{reason:"watch-aborted"}:{},operation:x(t),...l===void 0?{}:{resultsJsonl:l}}));return}if(r.length){C({headline:"Error creating bulk operation.",body:{list:{items:r.map(u=>u.field?`${u.field.join(".")}: ${u.message}`:u.message)}}});return}t&&(i?T({headline:`Bulk operation ${t.id} is still running in the background.`,body:v(t.id)}):n||["FAILED","CANCELED","EXPIRED"].includes(t.status)?await ce(t,l,s):w({headline:"Bulk operation is running.",body:v(t.id),customSections:[{body:[{list:{items:[d`ID: ${p.cyan(t.id)}`.value]}}]}]}))}async function ce(o,e,a){let n=_(o).value,t=[{body:[{list:{items:[d`ID: ${p.cyan(o.id)}`.value,d`Status: ${p.yellow(o.status)}`.value,d`Created at: ${p.gray(String(o.createdAt))}`.value,...o.completedAt?[d`Completed at: ${p.gray(String(o.completedAt))}`.value]:[]]}}]}];switch(o.status){case"CREATED":w({headline:"Bulk operation started.",body:v(o.id),customSections:t});break;case"RUNNING":w({headline:"Bulk operation is running.",body:v(o.id),customSections:t});break;case"COMPLETED":if(e===void 0)w({headline:n,customSections:t});else{let r=H(e);a?await S(a,e):g(e),r?B({headline:"Bulk operation completed with errors.",body:a?`Results written to ${a}. Check file for error details.`:"Check results for error details.",customSections:t}):w({headline:n,body:a?[`Results written to ${a}`]:void 0,customSections:t})}break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":C({headline:n,customSections:t});break}}function v(o){return[`Monitor its progress with:
|
|
4
|
+
`,{command:`shopify app bulk status --id=${V(o)}`}]}var D=class o extends Z{static summary="Execute bulk operations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use [`bulk status`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.\n\n With `--watch`, completed results are written as JSONL to stdout or `--output-file`. With `--json`, stdout contains one result object with operation details and downloaded JSONL in `resultsJsonl`. With `--json --output-file`, stdout contains only an absolute file receipt with `path` and `format`.";static description=this.descriptionForHelp();static flags={...F,...J,...K,...Y};static get jsonOutputSchema(){return y}async run(){let{flags:e}=await this.parse(o),{query:a,appContextResult:n,store:s}=await ee(e),t=e.json?"json":"text",r=await ne({remoteApp:n.remoteApp,store:s,query:a,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,...e.version&&{version:e.version}});oe("Starting bulk operation.",{organization:n.organization,remoteApp:n.remoteApp,storeFqdn:s.shopDomain,version:r.version},t);let i=await ae(r);return await se(i,{format:t,watch:e.watch??!1,outputFile:e["output-file"]}),{app:n.app}}};export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r}from"./chunk-
|
|
1
|
+
import{u as r}from"./chunk-NCPZVARH.js";import{b as o}from"./chunk-YTUUU33R.js";import{e as t,p as n}from"./chunk-IWTNUJGY.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{da as j,la as W,ma as J,na as N,oa as q,pa as L,qa as B,ra as R,sa as K,ta as I,ua as Q,va as S,wa as Y,xa as O,ya as Z}from"./chunk-XV6XCOTG.js";import{E as f,t as A,w as z}from"./chunk-WFOU5M4H.js";import{d as X}from"./chunk-HP2ZAAY7.js";import{A as $,E as h}from"./chunk-V654BMS7.js";import{h as E,j as H}from"./chunk-J7BTC45S.js";import{Sa as k,X as p,_ as w,pa as V,sb as G,va as U,xa as P}from"./chunk-RIG66DIQ.js";import{c as y,i as F}from"./chunk-IWTNUJGY.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();function ee(e){if(e.reason==="no-extensions")throw new E("No extensions to migrate");$({headline:["Imported the following extensions from the dashboard:"],body:e.extensions.map(({extension:t,directory:n})=>G`• "${t.title}" at: ${y("extensions",F(n))}`.value).join(`
|
|
2
|
+
`)})}s();s();function te(e){switch(e){case g.Offsite:return N;case g.CreditCard:return S;case g.CustomCreditCard:return I;case g.CustomOnsite:return R;case g.Redeemable:return L;case g.CardPresent:return O}}var g;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(g||(g={}));function ne(e,t){let n=e.activeVersion?.context??e.draftVersion?.context??te(e.type);switch(n){case N:return x(e,t,q);case S:return x(e,t,Y);case I:return x(e,t,Q);case R:return x(e,t,K);case L:return x(e,t,B);case O:return x(e,t,Z);default:throw new Error(`Unsupported extension: ${n}`)}}function x(e,t,n){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let a=JSON.parse(o),c=n(a,t);c&&delete c.api_version;let l=e.activeVersion?.context??e.draftVersion?.context??te(e.type);return{api_version:a.api_version,extensions:[{name:e.title,type:"payments_extension",handle:p(e.title.substring(0,f)),...c,targeting:[{target:`${l}`}]}]}}s();s();var ue=new Map(J.map(e=>[e[1],e[0]])),me=(e,t)=>{let n=ue.get(e.uiType);if(!n)throw new E(`Field type ${e.uiType} is not supported`);let i={key:e.name,description:e.description??void 0,type:n};return t==="flow_action_definition"&&(i.name=e.label,i.required=e.required),i},de=(e,t)=>{let o={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},ie=(e,t)=>t?t.map(i=>i.uiType==="commerce-object-id"||i.uiType==="marketing-activity-id"||W.includes(i.uiType)?de(i,e):me(i,e)):[];function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let n=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,i;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(t);i={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:p(e.title.substring(0,f)),url:o.url}]}}else{let o=JSON.parse(t),a=ie(e.type,o.fields??[]);i={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:p(e.title.substring(0,f)),description:o.description,runtime_url:o.url??n,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(a?.length??0)>0?{fields:a}:void 0}}return i}s();s();var re=e=>{let t=e.split("#");if(t.length!==2||t.some(c=>c===""||c===void 0))throw new Error("Invalid context");let n="admin",i=_e(t[0]??""),o=ge(t[1]??""),a="link";return o==="selection"?[n,`${i}-index`,`${o}-action`,a].join("."):[n,`${i}-${o}`,"action",a].join(".")},ge=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},_e=e=>e.toLocaleLowerCase()==="variants"?"product-variant":w(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function se(e,t,n){let i=e.activeVersion?.config??e.draftVersion?.config;if(!i)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let a=JSON.parse(i);if(n.embedded)try{let l=new URL(a.url),_=l.pathname.startsWith("/")?l.pathname.substring(1):l.pathname,r=new URL(`app://${_}`);r.search=l.search,r.hash=l.hash,a.url=r.toString()}catch{}return{extensions:[{type:"admin_link",name:a.text,handle:p(e.title.substring(0,f)),targeting:[{url:a.url,target:re(o)}]}]}}s();var ye={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},Ee={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function xe(e){let t=new URL(e);return t.pathname+t.search+t.hash}function ae(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let n=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:p(e.title.substring(0,f)),title:n.title,description:n.description,api_path:xe(n.app_api_url),tactic:n.tactic,marketing_channel:ye[n.platform]??"",referring_domain:Ee[n.platform]??"",is_automation:n.is_automation,use_external_editor:n.use_external_editor,preview_data:n.preview_data,fields:n.fields.map(({id:o,...a})=>a)}]}}s();function ce(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let n=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:p(e.title.substring(0,f)),pattern:n.pattern}]}}var M=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:ne},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:oe},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:ae},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:ce},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:se}];function le(e){return M.filter(t=>t.extensionTypes.some(n=>e.some(i=>i.type.toLowerCase()===n.toLowerCase())))}async function Et(e){if(e.length===1&&e[0])return e[0];let t=e.map(o=>({label:o.label,value:o.value})),n=await h({message:"Extension type to migrate",choices:t}),i=e.find(o=>o.value===n);if(i===void 0)throw new E("Invalid migration choice");return i}s();var St=M.flatMap(e=>e.extensionTypes),m;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(m||(m={}));async function he({name:e,app:t}){let n=w(e),i=y(t.directory,z.extensions.directoryName,n);if(await k(i)){let o=[{label:"Overwrite local TOML with remote configuration",value:m.Write},{label:"Keep local TOML",value:m.Skip},{label:"Cancel",value:m.Cancel}],a=await h({message:`Directory "${n}" already exists. What would you like to do?`,choices:o});return{directory:i,action:a}}return await U(i),await V(y(i,A.lockFile)),{directory:i,action:m.Write}}var C=class extends H{pendingImports;selectedExtensions;constructor(t,n){super(),this.pendingImports=t,this.selectedExtensions=n}completedImports(){return pe(this.pendingImports,this.selectedExtensions)}},b=class extends Error{originalError;pendingImports;selectedExtensions;constructor(t,n,i){super(t instanceof Error?t.message:"Dashboard extension import failed"),this.originalError=t,this.pendingImports=n,this.selectedExtensions=i}completedImports(){return pe(this.pendingImports,this.selectedExtensions)}};async function pe(e,t){let n=await Promise.allSettled(e);return{extensions:n.flatMap(i=>i.status==="fulfilled"?[i.value]:[]),failures:n.flatMap((i,o)=>i.status==="rejected"&&!(i.reason instanceof C)?[{extension:t[o],error:i.reason}]:[])}}async function Ce(e){let{app:t,extensionTypes:n,extensions:i,buildExtensionConfig:o,all:a}=e,c=i.filter(r=>n.includes(r.type.toLowerCase()));if(c=we(t,c),c.length===0)return{status:"skipped",reason:"no-extensions",extensions:[],extensionUuids:{}};if(!a){let r=c.map(u=>({label:u.title,value:u.uuid}));c.length>1&&r.push({label:"All",value:"All"});let d=await h({message:"Extensions to migrate",choices:r});d!=="All"&&(c=[c.find(u=>u?.uuid===d)])}let l={},_=c.map(async r=>{let{directory:d,action:u}=await he({app:t,name:r.title});if(u===m.Cancel)throw new C(_,c);let T=p(r.title.substring(0,f));l[T]=r.uuid;let v=y(d,"shopify.extension.toml");if(u===m.Write){let D=o(r,i,t.configuration);await new X(v,D).replace(D);let fe=y(d,A.lockFile);await P(fe)}return{extension:r,directory:d,configurationPath:u===m.Write||await k(v)?v:null,changed:u===m.Write}});try{return{status:"success",reason:null,extensions:await Promise.all(_),extensionUuids:l}}catch(r){throw r instanceof C?r:new b(r,_,c)}}function we(e,t){let n=e.dotenv?.variables??{},i=e.allExtensions.map(o=>n[o.idEnvironmentVariableName]);return t.filter(o=>!i.includes(o.uuid))}async function Ot(e){let t=le(e.extensions);await Promise.all(t.map(async n=>{let i=await Ce({...e,extensionTypes:n.extensionTypes,buildExtensionConfig:n.buildExtensionConfig,all:!0}).catch(o=>{throw o instanceof b?o.originalError:o});ee(i),await j({app:e.app,appApiKey:e.remoteApp.apiKey,extensionUuids:i.extensionUuids,command:"import-extensions"})}))}s();async function Ft({developerPlatformClient:e,apiKey:t,organizationId:n,extensionTypes:i,onlyDashboardManaged:o=!1}){let a=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:n}),{dashboardManagedExtensionRegistrations:c,extensionRegistrations:l}=a.app;return(o?c:l.concat(c)).filter(r=>{let d=i.includes(r.type.toLowerCase()),u=r.activeVersion&&r.activeVersion.config,T=r.draftVersion&&r.draftVersion.config;return d&&(u??T)})}export{ee as a,le as b,Et as c,St as d,C as e,b as f,Ce as g,we as h,Ot as i,Ft as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as i,h as t}from"./chunk-J7BTC45S.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();var o=e=>new a(e),s=e=>new u(e),a=class{value;constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},u=class{error;constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof i)throw this.error;if(this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
|