shopify 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-DWUYMFHO.js +1 -0
- package/dist/analytics-SOXP4UBD.js +1 -0
- package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
- package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
- package/dist/assets/hydrogen/starter/package.json +9 -10
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
- package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
- package/dist/assets/hydrogen/vite/package.json +1 -2
- package/dist/assets/hydrogen/vite/vite.config.js +4 -3
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-2EROVVCL.js +1 -0
- package/dist/{chunk-MEIEEENL.js → chunk-2MMGFZDP.js} +1 -1
- package/dist/{chunk-3YDYZ232.js → chunk-2NWWMNU5.js} +8 -8
- package/dist/{chunk-WHNWE7P2.js → chunk-3CYHS4W2.js} +1 -1
- package/dist/{chunk-DNXYKGV2.js → chunk-3FBSBMSQ.js} +1 -1
- package/dist/chunk-3OZ6ZZ4T.js +5 -0
- package/dist/{chunk-UTO4Z6P6.js → chunk-442S5SDM.js} +1 -1
- package/dist/{chunk-2RBIR3NM.js → chunk-45MEVWH5.js} +1 -1
- package/dist/{chunk-N5LVGFDS.js → chunk-47MGPVED.js} +1 -1
- package/dist/{chunk-UYSF234H.js → chunk-4N6YTHFD.js} +1 -1
- package/dist/chunk-4TST2MNC.js +1 -0
- package/dist/{chunk-NILXAUUT.js → chunk-5GVXMNC4.js} +1 -1
- package/dist/{chunk-PMS4MNHB.js → chunk-5JNEWYD5.js} +1 -1
- package/dist/{chunk-ATSMK66C.js → chunk-5QQN3SKH.js} +1 -1
- package/dist/{chunk-DCLUZFT7.js → chunk-5QWYIBE6.js} +1 -1
- package/dist/chunk-5W443CKL.js +836 -0
- package/dist/{chunk-JUYJZUYU.js → chunk-67KMRBSZ.js} +1 -1
- package/dist/{chunk-UC7KMA6W.js → chunk-6DIHOMCB.js} +1 -1
- package/dist/{chunk-NTRAWIEJ.js → chunk-6EZ7JWBK.js} +6 -6
- package/dist/{chunk-25HJX3L2.js → chunk-6RL7FUPD.js} +1 -1
- package/dist/chunk-6YPEONHB.js +46 -0
- package/dist/{chunk-JEZ3PGVC.js → chunk-733R5OKQ.js} +1 -1
- package/dist/chunk-73W5BGAZ.js +1 -0
- package/dist/{chunk-Q7C44DX5.js → chunk-75LJTY7F.js} +1 -1
- package/dist/{chunk-JCIN73BE.js → chunk-7EJ4UVYI.js} +1 -1
- package/dist/{chunk-BL46CZ2M.js → chunk-7LATYPLU.js} +1 -1
- package/dist/{chunk-TP7E54WN.js → chunk-7SVMAJTR.js} +1 -1
- package/dist/{chunk-7572RLUP.js → chunk-7UOPCYMV.js} +1 -1
- package/dist/chunk-APN3VWN4.js +3 -0
- package/dist/{chunk-FOFJBRSL.js → chunk-AT2GDXN7.js} +1 -1
- package/dist/{chunk-4QTEPWEJ.js → chunk-ATXODH6C.js} +4 -4
- package/dist/chunk-AY4GIVME.js +4 -0
- package/dist/{chunk-TY6BZTG3.js → chunk-B7BUEEBR.js} +1 -1
- package/dist/{chunk-G2LVUM7N.js → chunk-B7S23DLF.js} +1 -1
- package/dist/chunk-BCD4KTLJ.js +1 -0
- package/dist/{chunk-CEHXOWA6.js → chunk-BIMOHK2P.js} +1 -1
- package/dist/{chunk-UB26DGTR.js → chunk-C3CVLSLS.js} +1 -1
- package/dist/{chunk-G3RWLAOG.js → chunk-CD5O2BIT.js} +1 -1
- package/dist/chunk-CPE7XCC6.js +593 -0
- package/dist/{chunk-TRYWVIVJ.js → chunk-CZXGQ53M.js} +1 -1
- package/dist/chunk-D6YDSGR4.js +3 -0
- package/dist/{chunk-33OHQUHZ.js → chunk-DHBYYHBT.js} +1 -1
- package/dist/{chunk-OU4SKQTC.js → chunk-DLNBTHKL.js} +2 -2
- package/dist/chunk-DO2SHYFU.js +1 -0
- package/dist/{chunk-7FQFEB33.js → chunk-DONEJHDG.js} +33 -33
- package/dist/{chunk-JAWKLBOB.js → chunk-DQ4HA72R.js} +1 -1
- package/dist/{chunk-CV5EQGES.js → chunk-DZLA2RJP.js} +1 -1
- package/dist/{chunk-GJXINXSU.js → chunk-EKHWL542.js} +46 -46
- package/dist/{chunk-USLYL5AC.js → chunk-F5QG42MA.js} +1 -1
- package/dist/{chunk-2XZBQZ5R.js → chunk-FA4K3JRN.js} +1 -1
- package/dist/{chunk-3SPDFV5D.js → chunk-FPLUMESQ.js} +1 -1
- package/dist/chunk-FU232KQ7.js +1 -0
- package/dist/{chunk-S22NCNAJ.js → chunk-FZKKKGUJ.js} +1 -1
- package/dist/chunk-G24L7MB3.js +1 -0
- package/dist/{chunk-RKDZGK5K.js → chunk-G2I2ZUBV.js} +1 -1
- package/dist/{chunk-4FFPTEKD.js → chunk-G2S346IS.js} +1 -1
- package/dist/{chunk-HCTZN7L4.js → chunk-GBZL4TTY.js} +1 -1
- package/dist/{chunk-AO3RFGNV.js → chunk-GFCLUGAG.js} +1 -1
- package/dist/{chunk-MRS6LAY7.js → chunk-GKRCTMWY.js} +1 -1
- package/dist/{chunk-JJ6RM54S.js → chunk-GTUKM3ZW.js} +1 -1
- package/dist/{chunk-YL3TYQGT.js → chunk-GUO7S4NW.js} +1 -1
- package/dist/{chunk-ANBOLDON.js → chunk-GW3VY3FZ.js} +1 -1
- package/dist/{chunk-OXJBYKMX.js → chunk-H5C3QTOO.js} +1 -1
- package/dist/{chunk-T3ERXB7F.js → chunk-H6WN7GP4.js} +1 -1
- package/dist/{chunk-NWXDOCL5.js → chunk-HA6NISOZ.js} +1 -1
- package/dist/{chunk-L2PC4MUV.js → chunk-HCN6HXA5.js} +1 -1
- package/dist/chunk-HM5H7WBE.js +1 -0
- package/dist/chunk-HZMP62GK.js +21 -0
- package/dist/{chunk-57PPQKJT.js → chunk-HZSAUZBX.js} +1 -1
- package/dist/{chunk-ZGJ3DFTQ.js → chunk-HZYRCG4R.js} +1 -1
- package/dist/{chunk-6JKGUQRD.js → chunk-I73E3BD5.js} +1 -1
- package/dist/{chunk-Q73GEVSJ.js → chunk-IG6LPVS4.js} +1 -1
- package/dist/{chunk-T4NS63K4.js → chunk-IIOIDMG3.js} +1 -1
- package/dist/{chunk-FQ5ZZX2G.js → chunk-IPQH2RHD.js} +1 -1
- package/dist/chunk-IX4KP6E3.js +2 -0
- package/dist/{chunk-A5HKAMAC.js → chunk-J2WCMQZZ.js} +1 -1
- package/dist/chunk-J3HXFQ2L.js +1 -0
- package/dist/{chunk-QDVJJKLB.js → chunk-J5TNYNR5.js} +1 -1
- package/dist/{chunk-SSCYLDSX.js → chunk-J7UQBC45.js} +1 -1
- package/dist/{chunk-Q77MM2N2.js → chunk-JAW32T6G.js} +1 -1
- package/dist/{chunk-OZBY45KT.js → chunk-JOZXRV5K.js} +1 -1
- package/dist/{chunk-S5IFJ737.js → chunk-KKUDXLK2.js} +1 -1
- package/dist/{chunk-HDC5V7RY.js → chunk-KN3FTJDU.js} +1 -1
- package/dist/{chunk-AERKD4TO.js → chunk-KSZ5K6LJ.js} +1 -1
- package/dist/{chunk-G3JJLXPH.js → chunk-LCPD2BYX.js} +1 -1
- package/dist/chunk-LKZ7ARYS.js +18 -0
- package/dist/{chunk-ZUKLGZOU.js → chunk-LOHUNOQ7.js} +1 -1
- package/dist/{chunk-ZM75DSIW.js → chunk-LOQIRLTD.js} +1 -1
- package/dist/{chunk-FIYAECXH.js → chunk-MFLQRQQT.js} +1 -1
- package/dist/chunk-MQICT2LR.js +1 -0
- package/dist/{chunk-RSRYC5ZF.js → chunk-MZMYBFZQ.js} +1 -1
- package/dist/{chunk-2EHBJWC6.js → chunk-NADNFSKS.js} +1 -1
- package/dist/{chunk-N3YTDGFY.js → chunk-NWDP5IZ2.js} +1 -1
- package/dist/{chunk-WVRGCNBZ.js → chunk-NY5OGHM5.js} +1 -1
- package/dist/chunk-O6KTFMCD.js +1 -0
- package/dist/{chunk-YSIBRY6C.js → chunk-OAI7VSLW.js} +1 -1
- package/dist/{chunk-GWHV62YT.js → chunk-OORCODNK.js} +1 -1
- package/dist/{chunk-W7DDV2EY.js → chunk-OQORDQLH.js} +1 -1
- package/dist/{chunk-JAWOP4HJ.js → chunk-PETINPMX.js} +1 -1
- package/dist/{chunk-5XDQ76DQ.js → chunk-PJYNAUQB.js} +1 -1
- package/dist/{chunk-5H3VTG77.js → chunk-PMXCJIBP.js} +1 -1
- package/dist/{chunk-OU3M32A2.js → chunk-POAICASX.js} +1 -1
- package/dist/{chunk-6KETAPWL.js → chunk-PUAMSBXS.js} +1 -1
- package/dist/{chunk-M2YINBHF.js → chunk-PZYP3MCL.js} +1 -1
- package/dist/chunk-Q7BOSHWX.js +7 -0
- package/dist/{chunk-HIQHYPLU.js → chunk-QJ7TI6CK.js} +1 -1
- package/dist/{chunk-VJ6KDRZI.js → chunk-QMXKGSFH.js} +1 -1
- package/dist/{chunk-3AOQKI4B.js → chunk-QPN2M26G.js} +1 -1
- package/dist/{chunk-5FVB7JHP.js → chunk-QS3FMN67.js} +1 -1
- package/dist/{chunk-VRJTLVG3.js → chunk-RF6NUGCU.js} +1 -1
- package/dist/{chunk-PXHY753L.js → chunk-RYGZCBO4.js} +1 -1
- package/dist/{chunk-MMIHHCMW.js → chunk-SKLUHLS2.js} +1 -1
- package/dist/{chunk-2GU7OY3H.js → chunk-SP2WUATO.js} +1 -1
- package/dist/chunk-SWI3LCPE.js +7 -0
- package/dist/{chunk-J3HX6ZGD.js → chunk-SXTDVUT3.js} +1 -1
- package/dist/{chunk-4J32OHLY.js → chunk-T5GSCWN5.js} +1 -1
- package/dist/{chunk-J5BRKYGE.js → chunk-TC3JOEMA.js} +1 -1
- package/dist/{chunk-5FFHQTRC.js → chunk-TJGUNVRI.js} +1 -1
- package/dist/{chunk-EVZA2TCI.js → chunk-TKG42KLM.js} +1 -1
- package/dist/{chunk-DYNH5SKT.js → chunk-TQUSREKP.js} +1 -1
- package/dist/{chunk-PCCK4YTE.js → chunk-U73TPLFE.js} +1 -1
- package/dist/{chunk-HOSFU6UP.js → chunk-UKK5P74A.js} +3 -3
- package/dist/chunk-UMT7DWR4.js +1 -0
- package/dist/chunk-UUC5YKAS.js +2 -0
- package/dist/chunk-UYK6CXAU.js +1 -0
- package/dist/{chunk-JSOGPMWB.js → chunk-V3RZ3DTW.js} +1 -1
- package/dist/{chunk-5O43334U.js → chunk-V6ZSIUO3.js} +1 -1
- package/dist/{chunk-YPBCSDFQ.js → chunk-VFWWZMOQ.js} +1 -1
- package/dist/{chunk-MIDYZPO4.js → chunk-VOJWKGCW.js} +1 -1
- package/dist/{chunk-AU5EZQW7.js → chunk-VQW35HIQ.js} +1 -1
- package/dist/{chunk-PFGYC53K.js → chunk-WAGAC3YI.js} +1 -1
- package/dist/{chunk-TPCG6DCA.js → chunk-WKBVT5WG.js} +1 -1
- package/dist/{chunk-KRQGLK2Q.js → chunk-WLO5H255.js} +1 -1
- package/dist/{chunk-M7YFD4EV.js → chunk-WNWQSHEC.js} +5 -5
- package/dist/{chunk-VI34CKV6.js → chunk-WRRUFK4Y.js} +1 -1
- package/dist/{chunk-LCZDC6EE.js → chunk-WVHB2HCQ.js} +1 -1
- package/dist/{chunk-YIRFEW5M.js → chunk-WZVQHMGI.js} +1 -1
- package/dist/{chunk-G2OHWAY2.js → chunk-X4DIJTIK.js} +1 -1
- package/dist/{chunk-S6B2ADVR.js → chunk-XH6ZP7M5.js} +1 -1
- package/dist/{chunk-7D45IAMQ.js → chunk-XV3I45NA.js} +1 -1
- package/dist/{chunk-2K7FGAT6.js → chunk-Y3WIZSRU.js} +1 -1
- package/dist/{chunk-2GAFKG64.js → chunk-Y66GQ6V2.js} +1 -1
- package/dist/{chunk-N3CNWCC2.js → chunk-YGKQCEVG.js} +1 -1
- package/dist/{chunk-2TMQG2UT.js → chunk-YLGSM42I.js} +1 -1
- package/dist/{chunk-JK3NIHTX.js → chunk-YQH2JHFA.js} +1 -1
- package/dist/{chunk-E7DHELFH.js → chunk-YYL356OX.js} +1 -1
- package/dist/chunk-Z4LC3WE5.js +7 -0
- package/dist/{chunk-PNP5OKNZ.js → chunk-Z74QYLNC.js} +1 -1
- package/dist/{chunk-5BKCIDMS.js → chunk-ZAMDXIVC.js} +1 -1
- package/dist/{chunk-WA3YC5W4.js → chunk-ZEENHLSC.js} +2 -2
- package/dist/{chunk-6LWOWDF4.js → chunk-ZIREP3EZ.js} +1 -1
- package/dist/chunk-ZIXWWU2N.js +275 -0
- package/dist/{chunk-N3NE4MVN.js → chunk-ZQ5JVD5X.js} +1 -1
- package/dist/{chunk-YVQXEPHY.js → chunk-ZULTG2D2.js} +1 -1
- package/dist/{chunk-UU5P2IYU.js → chunk-ZZFZBFVM.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.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 -0
- 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/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.js +1 -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.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/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.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.d.ts +38 -0
- package/dist/cli/help.js +2 -0
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-UY3MDGGA.js → conf-store-C2LOYIOU.js} +1 -1
- package/dist/{deprecations-KNUMDRIU.js → deprecations-QOHE6JG6.js} +1 -1
- package/dist/dist-FF6C4ZHS.js +1 -0
- package/dist/dist-Q676YGVI.js +1 -0
- package/dist/environments-EGD263DV.js +1 -0
- package/dist/error-66U2HJ37.js +1 -0
- package/dist/error-handler-SW2ALZ5Z.js +1 -0
- package/dist/{fs-LJWVNO4H.js → fs-JPQRUGZI.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- 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 +23 -10
- package/dist/{is-global-W6ALVC5L.js → is-global-QWTDUPNR.js} +1 -1
- package/dist/lib-NOROGV6N.js +1 -0
- package/dist/lib-UCG2DNMS.js +1 -0
- package/dist/{local-GKEWZAIV.js → local-FRYN3NWL.js} +1 -1
- package/dist/local-storage-DFH3LT5G.js +1 -0
- package/dist/{metadata-UEUN64TK.js → metadata-KZVLHQII.js} +1 -1
- package/dist/{morph-CGOZEPPZ.js → morph-CG6HEMCQ.js} +4 -4
- package/dist/{node-package-manager-4ASQQIIF.js → node-package-manager-LVFBY4LY.js} +1 -1
- package/dist/notifications-system-DP443VTE.js +1 -0
- package/dist/{output-S6E37GJQ.js → output-NH4I5Y3C.js} +1 -1
- package/dist/{prettier-EGVCP5CY.js → prettier-6ZMB2MMO.js} +1 -1
- package/dist/system-GNOF6HMI.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-QOGKADWB.js +1 -0
- package/dist/upgrade-K4S6JW64.js +1 -0
- package/dist/version-FJFTTOZU.js +1 -0
- package/dist/version-ZI4GZX72.js +1 -0
- package/dist/{workerd-QOTT6UCO.js → workerd-U6WWWY73.js} +1 -1
- package/oclif.manifest.json +714 -122
- package/package.json +15 -8
- package/dist/analytics-JH64XI2J.js +0 -1
- package/dist/analytics-MEGKKFGF.js +0 -1
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
- package/dist/chunk-762JWOWJ.js +0 -5
- package/dist/chunk-7LV55VWE.js +0 -1
- package/dist/chunk-A27NZMWB.js +0 -1
- package/dist/chunk-AVD3INWF.js +0 -1
- package/dist/chunk-AWEB5AQM.js +0 -1
- package/dist/chunk-AXNAGI32.js +0 -1
- package/dist/chunk-BQWK3C47.js +0 -278
- package/dist/chunk-CFOXXOO2.js +0 -1
- package/dist/chunk-DTIWUT2T.js +0 -18
- package/dist/chunk-DZQYG32N.js +0 -2
- package/dist/chunk-EH7ZTFS4.js +0 -613
- package/dist/chunk-EKVTNWHM.js +0 -1
- package/dist/chunk-G4OQABDT.js +0 -836
- package/dist/chunk-I22ZTRKK.js +0 -3
- package/dist/chunk-I4R7TML2.js +0 -7
- package/dist/chunk-J3H4LPN6.js +0 -18
- package/dist/chunk-JLE4NBMT.js +0 -1
- package/dist/chunk-LXVORHCQ.js +0 -1
- package/dist/chunk-MINZGZ4N.js +0 -1
- package/dist/chunk-S7F5KFQP.js +0 -1
- package/dist/chunk-T4IV643Z.js +0 -9
- package/dist/chunk-TUNUEOHO.js +0 -3
- package/dist/chunk-VPPWSKOY.js +0 -1
- package/dist/chunk-XVUHUA36.js +0 -1
- package/dist/chunk-YMAWEIUR.js +0 -1
- package/dist/dist-C5IV2YDQ.js +0 -1
- package/dist/dist-VL4KZWV2.js +0 -1
- package/dist/environments-YPRVO2CF.js +0 -1
- package/dist/error-XRBQTNFM.js +0 -1
- package/dist/error-handler-NI7D6GSY.js +0 -1
- package/dist/lib-AIKYSHWL.js +0 -1
- package/dist/lib-Q4PWEMFD.js +0 -1
- package/dist/local-storage-ZOZMA22B.js +0 -1
- package/dist/notifications-system-HLXJCAMG.js +0 -1
- package/dist/system-YQZNGSWB.js +0 -1
- package/dist/ui-D2FFWRK7.js +0 -1
- package/dist/upgrade-TVTCFMXM.js +0 -1
- package/dist/version-J6MDN7BZ.js +0 -1
- package/dist/version-RIRW5EXQ.js +0 -1
- /package/dist/{chunk-YLQ3LNNY.js → chunk-VDN6MEYI.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as x,c as D,f as M}from"./chunk-
|
|
1
|
+
import{b as x,c as D,f as M}from"./chunk-YYL356OX.js";import{a as o}from"./chunk-FU232KQ7.js";import{c as w}from"./chunk-5C7HDTHJ.js";import{C as h,F as e,v as y,z as s}from"./chunk-6EZ7JWBK.js";import{Mb as _,ua as u}from"./chunk-DONEJHDG.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
|
|
2
2
|
`)}export{$ as a,j as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ri}from"./chunk-RJ5VF3QY.js";import{d as si,g as ni}from"./chunk-TPCG6DCA.js";import{a as mc}from"./chunk-CX5CC6P5.js";import{Ra as Jr,Sa as sr}from"./chunk-7FQFEB33.js";import{b as ti}from"./chunk-NNOSZ447.js";import{i as rr}from"./chunk-773TIA5M.js";import{c as g,e as Wr,g as u}from"./chunk-VKWPEFWQ.js";var Nt=g(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var bt=class{};q._CodeOrName=bt;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ve=class extends bt{constructor(e){if(super(),!q.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};q.Name=Ve;var se=class extends bt{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Ve&&(r[s.str]=(r[s.str]||0)+1),r),{})}};q._Code=se;q.nil=new se("");function bi(t,...e){let r=[t[0]],s=0;for(;s<e.length;)os(r,e[s]),r.push(t[++s]);return new se(r)}q._=bi;var is=new se("+");function Pi(t,...e){let r=[Pt(t[0])],s=0;for(;s<e.length;)r.push(is),os(r,e[s]),r.push(is,Pt(t[++s]));return Nc(r),new se(r)}q.str=Pi;function os(t,e){e instanceof se?t.push(...e._items):e instanceof Ve?t.push(e):t.push(Ic(e))}q.addCodeArg=os;function Nc(t){let e=1;for(;e<t.length-1;){if(t[e]===is){let r=Oc(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Oc(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ve||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ve))return`"${t}${e.slice(1)}`}function Tc(t,e){return e.emptyStr()?t:t.emptyStr()?e:Pi`${t}${e}`}q.strConcat=Tc;function Ic(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Pt(Array.isArray(t)?t.join(","):t)}function kc(t){return new se(Pt(t))}q.stringify=kc;function Pt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=Pt;function Rc(t){return typeof t=="string"&&q.IDENTIFIER.test(t)?new se(`.${t}`):bi`[${t}]`}q.getProperty=Rc;function jc(t){if(typeof t=="string"&&q.IDENTIFIER.test(t))return new se(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}q.getEsmExportName=jc;function qc(t){return new se(t.toString())}q.regexpCode=qc});var us=g(Q=>{"use strict";u();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var Z=Nt(),as=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ar;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ar||(Q.UsedValueState=ar={}));Q.varKinds={const:new Z.Name("const"),let:new Z.Name("let"),var:new Z.Name("var")};var cr=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Z.Name?e:this.name(e)}name(e){return new Z.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=cr;var ur=class extends Z.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,Z._)`.${new Z.Name(r)}[${s}]`}};Q.ValueScopeName=ur;var Ac=(0,Z._)`\n`,cs=class extends cr{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ac:Z.nil}}get(){return this._scope}name(e){return new ur(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(s=r.key)!==null&&s!==void 0?s:r.ref,a=this._values[i];if(a){let d=a.get(o);if(d)return d}else a=this._values[i]=new Map;a.set(o,n);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,n.setValue(r,{property:i,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Z._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=Z.nil;for(let o in e){let a=e[o];if(!a)continue;let c=s[o]=s[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,ar.Started);let d=r(l);if(d){let f=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,Z._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=n?.(l))i=(0,Z._)`${i}${d}${this.opts._n}`;else throw new as(l);c.set(l,ar.Completed)})}return i}};Q.ValueScope=cs});var b=g(P=>{"use strict";u();Object.defineProperty(P,"__esModule",{value:!0});P.or=P.and=P.not=P.CodeGen=P.operators=P.varKinds=P.ValueScopeName=P.ValueScope=P.Scope=P.Name=P.regexpCode=P.stringify=P.getProperty=P.nil=P.strConcat=P.str=P._=void 0;var T=Nt(),ue=us(),Ie=Nt();Object.defineProperty(P,"_",{enumerable:!0,get:function(){return Ie._}});Object.defineProperty(P,"str",{enumerable:!0,get:function(){return Ie.str}});Object.defineProperty(P,"strConcat",{enumerable:!0,get:function(){return Ie.strConcat}});Object.defineProperty(P,"nil",{enumerable:!0,get:function(){return Ie.nil}});Object.defineProperty(P,"getProperty",{enumerable:!0,get:function(){return Ie.getProperty}});Object.defineProperty(P,"stringify",{enumerable:!0,get:function(){return Ie.stringify}});Object.defineProperty(P,"regexpCode",{enumerable:!0,get:function(){return Ie.regexpCode}});Object.defineProperty(P,"Name",{enumerable:!0,get:function(){return Ie.Name}});var hr=us();Object.defineProperty(P,"Scope",{enumerable:!0,get:function(){return hr.Scope}});Object.defineProperty(P,"ValueScope",{enumerable:!0,get:function(){return hr.ValueScope}});Object.defineProperty(P,"ValueScopeName",{enumerable:!0,get:function(){return hr.ValueScopeName}});Object.defineProperty(P,"varKinds",{enumerable:!0,get:function(){return hr.varKinds}});P.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var be=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ls=class extends be{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ue.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=rt(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},lr=class extends be{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=rt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return fr(e,this.rhs)}},ds=class extends lr{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},fs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},hs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ps=class extends be{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ms=class extends be{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=rt(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},Ot=class extends be{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(Cc(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ke(e,r.names),{})}},Pe=class extends Ot{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ys=class extends Ot{},tt=class extends Pe{};tt.kind="else";var Ue=class t extends Pe{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new tt(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ni(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=rt(this.condition,e,r),this}get names(){let e=super.names;return fr(e,this.condition),this.else&&Ke(e,this.else.names),e}};Ue.kind="if";var Le=class extends Pe{};Le.kind="for";var _s=class extends Le{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=rt(this.iteration,e,r),this}get names(){return Ke(super.names,this.iteration.names)}},gs=class extends Le{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ue.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=fr(super.names,this.from);return fr(e,this.to)}},dr=class extends Le{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=rt(this.iterable,e,r),this}get names(){return Ke(super.names,this.iterable.names)}},Tt=class extends Pe{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tt.kind="func";var It=class extends Ot{render(e){return"return "+super.render(e)}};It.kind="return";var $s=class extends Pe{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ke(e,this.catch.names),this.finally&&Ke(e,this.finally.names),e}},kt=class extends Pe{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};kt.kind="catch";var Rt=class extends Pe{render(e){return"finally"+super.render(e)}};Rt.kind="finally";var vs=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1
|
+
import{a as ri}from"./chunk-RJ5VF3QY.js";import{d as si,g as ni}from"./chunk-WKBVT5WG.js";import{Ra as Jr,Sa as sr}from"./chunk-DONEJHDG.js";import{b as ti}from"./chunk-NNOSZ447.js";import{i as rr}from"./chunk-773TIA5M.js";import{a as mc}from"./chunk-CX5CC6P5.js";import{c as g,e as Wr,g as u}from"./chunk-VKWPEFWQ.js";var Nt=g(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var bt=class{};q._CodeOrName=bt;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ve=class extends bt{constructor(e){if(super(),!q.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};q.Name=Ve;var se=class extends bt{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Ve&&(r[s.str]=(r[s.str]||0)+1),r),{})}};q._Code=se;q.nil=new se("");function bi(t,...e){let r=[t[0]],s=0;for(;s<e.length;)os(r,e[s]),r.push(t[++s]);return new se(r)}q._=bi;var is=new se("+");function Pi(t,...e){let r=[Pt(t[0])],s=0;for(;s<e.length;)r.push(is),os(r,e[s]),r.push(is,Pt(t[++s]));return Nc(r),new se(r)}q.str=Pi;function os(t,e){e instanceof se?t.push(...e._items):e instanceof Ve?t.push(e):t.push(Ic(e))}q.addCodeArg=os;function Nc(t){let e=1;for(;e<t.length-1;){if(t[e]===is){let r=Oc(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Oc(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ve||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ve))return`"${t}${e.slice(1)}`}function Tc(t,e){return e.emptyStr()?t:t.emptyStr()?e:Pi`${t}${e}`}q.strConcat=Tc;function Ic(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Pt(Array.isArray(t)?t.join(","):t)}function kc(t){return new se(Pt(t))}q.stringify=kc;function Pt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=Pt;function Rc(t){return typeof t=="string"&&q.IDENTIFIER.test(t)?new se(`.${t}`):bi`[${t}]`}q.getProperty=Rc;function jc(t){if(typeof t=="string"&&q.IDENTIFIER.test(t))return new se(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}q.getEsmExportName=jc;function qc(t){return new se(t.toString())}q.regexpCode=qc});var us=g(Q=>{"use strict";u();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var Z=Nt(),as=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ar;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ar||(Q.UsedValueState=ar={}));Q.varKinds={const:new Z.Name("const"),let:new Z.Name("let"),var:new Z.Name("var")};var cr=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Z.Name?e:this.name(e)}name(e){return new Z.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=cr;var ur=class extends Z.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,Z._)`.${new Z.Name(r)}[${s}]`}};Q.ValueScopeName=ur;var Ac=(0,Z._)`\n`,cs=class extends cr{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ac:Z.nil}}get(){return this._scope}name(e){return new ur(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(s=r.key)!==null&&s!==void 0?s:r.ref,a=this._values[i];if(a){let d=a.get(o);if(d)return d}else a=this._values[i]=new Map;a.set(o,n);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,n.setValue(r,{property:i,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Z._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=Z.nil;for(let o in e){let a=e[o];if(!a)continue;let c=s[o]=s[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,ar.Started);let d=r(l);if(d){let f=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,Z._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=n?.(l))i=(0,Z._)`${i}${d}${this.opts._n}`;else throw new as(l);c.set(l,ar.Completed)})}return i}};Q.ValueScope=cs});var b=g(P=>{"use strict";u();Object.defineProperty(P,"__esModule",{value:!0});P.or=P.and=P.not=P.CodeGen=P.operators=P.varKinds=P.ValueScopeName=P.ValueScope=P.Scope=P.Name=P.regexpCode=P.stringify=P.getProperty=P.nil=P.strConcat=P.str=P._=void 0;var T=Nt(),ue=us(),Ie=Nt();Object.defineProperty(P,"_",{enumerable:!0,get:function(){return Ie._}});Object.defineProperty(P,"str",{enumerable:!0,get:function(){return Ie.str}});Object.defineProperty(P,"strConcat",{enumerable:!0,get:function(){return Ie.strConcat}});Object.defineProperty(P,"nil",{enumerable:!0,get:function(){return Ie.nil}});Object.defineProperty(P,"getProperty",{enumerable:!0,get:function(){return Ie.getProperty}});Object.defineProperty(P,"stringify",{enumerable:!0,get:function(){return Ie.stringify}});Object.defineProperty(P,"regexpCode",{enumerable:!0,get:function(){return Ie.regexpCode}});Object.defineProperty(P,"Name",{enumerable:!0,get:function(){return Ie.Name}});var hr=us();Object.defineProperty(P,"Scope",{enumerable:!0,get:function(){return hr.Scope}});Object.defineProperty(P,"ValueScope",{enumerable:!0,get:function(){return hr.ValueScope}});Object.defineProperty(P,"ValueScopeName",{enumerable:!0,get:function(){return hr.ValueScopeName}});Object.defineProperty(P,"varKinds",{enumerable:!0,get:function(){return hr.varKinds}});P.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var be=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ls=class extends be{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ue.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=rt(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},lr=class extends be{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=rt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return fr(e,this.rhs)}},ds=class extends lr{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},fs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},hs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ps=class extends be{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ms=class extends be{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=rt(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},Ot=class extends be{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(Cc(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ke(e,r.names),{})}},Pe=class extends Ot{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ys=class extends Ot{},tt=class extends Pe{};tt.kind="else";var Ue=class t extends Pe{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new tt(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ni(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=rt(this.condition,e,r),this}get names(){let e=super.names;return fr(e,this.condition),this.else&&Ke(e,this.else.names),e}};Ue.kind="if";var Le=class extends Pe{};Le.kind="for";var _s=class extends Le{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=rt(this.iteration,e,r),this}get names(){return Ke(super.names,this.iteration.names)}},gs=class extends Le{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ue.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=fr(super.names,this.from);return fr(e,this.to)}},dr=class extends Le{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=rt(this.iterable,e,r),this}get names(){return Ke(super.names,this.iterable.names)}},Tt=class extends Pe{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tt.kind="func";var It=class extends Ot{render(e){return"return "+super.render(e)}};It.kind="return";var $s=class extends Pe{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ke(e,this.catch.names),this.finally&&Ke(e,this.finally.names),e}},kt=class extends Pe{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};kt.kind="catch";var Rt=class extends Pe{render(e){return"finally"+super.render(e)}};Rt.kind="finally";var vs=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
2
|
`:""},this._extScope=e,this._scope=new ue.Scope({parent:e}),this._nodes=[new ys]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let i=this._scope.toName(r);return s!==void 0&&n&&(this._constants[i.str]=s),this._leafNode(new ls(e,i,s)),i}const(e,r,s){return this._def(ue.varKinds.const,e,r,s)}let(e,r,s){return this._def(ue.varKinds.let,e,r,s)}var(e,r,s){return this._def(ue.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new lr(e,r,s))}add(e,r){return this._leafNode(new ds(e,P.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==T.nil&&this._leafNode(new ms(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,T.addCodeArg)(r,n));return r.push("}"),new T._Code(r)}if(e,r,s){if(this._blockNode(new Ue(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ue(e))}else(){return this._elseNode(new tt)}endIf(){return this._endBlockNode(Ue,tt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new _s(e),r)}forRange(e,r,s,n,i=this.opts.es5?ue.varKinds.var:ue.varKinds.let){let o=this._scope.toName(e);return this._for(new gs(i,o,r,s),()=>n(o))}forOf(e,r,s,n=ue.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let o=r instanceof T.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,T._)`${o}.length`,a=>{this.var(i,(0,T._)`${o}[${a}]`),s(i)})}return this._for(new dr("of",n,i,r),()=>s(i))}forIn(e,r,s,n=this.opts.es5?ue.varKinds.var:ue.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,T._)`Object.keys(${r})`,s);let i=this._scope.toName(e);return this._for(new dr("in",n,i,r),()=>s(i))}endFor(){return this._endBlockNode(Le)}label(e){return this._leafNode(new fs(e))}break(e){return this._leafNode(new hs(e))}return(e){let r=new It;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(It)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new $s;if(this._blockNode(n),this.code(e),r){let i=this.name("e");this._currNode=n.catch=new kt(i),r(i)}return s&&(this._currNode=n.finally=new Rt,this.code(s)),this._endBlockNode(kt,Rt)}throw(e){return this._leafNode(new ps(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=T.nil,s,n){return this._blockNode(new Tt(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Tt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Ue))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};P.CodeGen=vs;function Ke(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function fr(t,e){return e instanceof T._CodeOrName?Ke(t,e.names):t}function rt(t,e,r){if(t instanceof T.Name)return s(t);if(!n(t))return t;return new T._Code(t._items.reduce((i,o)=>(o instanceof T.Name&&(o=s(o)),o instanceof T._Code?i.push(...o._items):i.push(o),i),[]));function s(i){let o=r[i.str];return o===void 0||e[i.str]!==1?i:(delete e[i.str],o)}function n(i){return i instanceof T._Code&&i._items.some(o=>o instanceof T.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function Cc(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Ni(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,T._)`!${ws(t)}`}P.not=Ni;var Mc=Oi(P.operators.AND);function Dc(...t){return t.reduce(Mc)}P.and=Dc;var xc=Oi(P.operators.OR);function zc(...t){return t.reduce(xc)}P.or=zc;function Oi(t){return(e,r)=>e===T.nil?r:r===T.nil?e:(0,T._)`${ws(e)} ${t} ${ws(r)}`}function ws(t){return t instanceof T.Name?t:(0,T._)`(${t})`}});var k=g(N=>{"use strict";u();Object.defineProperty(N,"__esModule",{value:!0});N.checkStrictMode=N.getErrorPath=N.Type=N.useFunc=N.setEvaluated=N.evaluatedPropsToName=N.mergeEvaluated=N.eachItem=N.unescapeJsonPointer=N.escapeJsonPointer=N.escapeFragment=N.unescapeFragment=N.schemaRefOrVal=N.schemaHasRulesButRef=N.schemaHasRules=N.checkUnknownRules=N.alwaysValidSchema=N.toHash=void 0;var C=b(),Fc=Nt();function Vc(t){let e={};for(let r of t)e[r]=!0;return e}N.toHash=Vc;function Uc(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ki(t,e),!Ri(e,t.self.RULES.all))}N.alwaysValidSchema=Uc;function ki(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let i in e)n[i]||Ai(t,`unknown keyword: "${i}"`)}N.checkUnknownRules=ki;function Ri(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}N.schemaHasRules=Ri;function Lc(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}N.schemaHasRulesButRef=Lc;function Kc({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,C._)`${r}`}return(0,C._)`${t}${e}${(0,C.getProperty)(s)}`}N.schemaRefOrVal=Kc;function Gc(t){return ji(decodeURIComponent(t))}N.unescapeFragment=Gc;function Hc(t){return encodeURIComponent(Ss(t))}N.escapeFragment=Hc;function Ss(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}N.escapeJsonPointer=Ss;function ji(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}N.unescapeJsonPointer=ji;function Wc(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}N.eachItem=Wc;function Ti({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,i,o,a)=>{let c=o===void 0?i:o instanceof C.Name?(i instanceof C.Name?t(n,i,o):e(n,i,o),o):i instanceof C.Name?(e(n,o,i),i):r(i,o);return a===C.Name&&!(c instanceof C.Name)?s(n,c):c}}N.mergeEvaluated={props:Ti({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,C._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,C._)`${r} || {}`).code((0,C._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,C._)`${r} || {}`),bs(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:qi}),items:Ti({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,C._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,C._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function qi(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,C._)`{}`);return e!==void 0&&bs(t,r,e),r}N.evaluatedPropsToName=qi;function bs(t,e,r){Object.keys(r).forEach(s=>t.assign((0,C._)`${e}${(0,C.getProperty)(s)}`,!0))}N.setEvaluated=bs;var Ii={};function Jc(t,e){return t.scopeValue("func",{ref:e,code:Ii[e.code]||(Ii[e.code]=new Fc._Code(e.code))})}N.useFunc=Jc;var Es;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Es||(N.Type=Es={}));function Yc(t,e,r){if(t instanceof C.Name){let s=e===Es.Num;return r?s?(0,C._)`"[" + ${t} + "]"`:(0,C._)`"['" + ${t} + "']"`:s?(0,C._)`"/" + ${t}`:(0,C._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,C.getProperty)(t).toString():"/"+Ss(t)}N.getErrorPath=Yc;function Ai(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}N.checkStrictMode=Ai});var Ne=g(Ps=>{"use strict";u();Object.defineProperty(Ps,"__esModule",{value:!0});var H=b(),Bc={data:new H.Name("data"),valCxt:new H.Name("valCxt"),instancePath:new H.Name("instancePath"),parentData:new H.Name("parentData"),parentDataProperty:new H.Name("parentDataProperty"),rootData:new H.Name("rootData"),dynamicAnchors:new H.Name("dynamicAnchors"),vErrors:new H.Name("vErrors"),errors:new H.Name("errors"),this:new H.Name("this"),self:new H.Name("self"),scope:new H.Name("scope"),json:new H.Name("json"),jsonPos:new H.Name("jsonPos"),jsonLen:new H.Name("jsonLen"),jsonPart:new H.Name("jsonPart")};Ps.default=Bc});var jt=g(W=>{"use strict";u();Object.defineProperty(W,"__esModule",{value:!0});W.extendErrors=W.resetErrorsCount=W.reportExtraError=W.reportError=W.keyword$DataError=W.keywordError=void 0;var R=b(),pr=k(),Y=Ne();W.keywordError={message:({keyword:t})=>(0,R.str)`must pass "${t}" keyword validation`};W.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,R.str)`"${t}" keyword must be ${e} ($data)`:(0,R.str)`"${t}" keyword is invalid ($data)`};function Xc(t,e=W.keywordError,r,s){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,c=Di(t,e,r);s??(o||a)?Ci(i,c):Mi(n,(0,R._)`[${c}]`)}W.reportError=Xc;function Zc(t,e=W.keywordError,r){let{it:s}=t,{gen:n,compositeRule:i,allErrors:o}=s,a=Di(t,e,r);Ci(n,a),i||o||Mi(s,Y.default.vErrors)}W.reportExtraError=Zc;function Qc(t,e){t.assign(Y.default.errors,e),t.if((0,R._)`${Y.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,R._)`${Y.default.vErrors}.length`,e),()=>t.assign(Y.default.vErrors,null)))}W.resetErrorsCount=Qc;function eu({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",n,Y.default.errors,a=>{t.const(o,(0,R._)`${Y.default.vErrors}[${a}]`),t.if((0,R._)`${o}.instancePath === undefined`,()=>t.assign((0,R._)`${o}.instancePath`,(0,R.strConcat)(Y.default.instancePath,i.errorPath))),t.assign((0,R._)`${o}.schemaPath`,(0,R.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,R._)`${o}.schema`,r),t.assign((0,R._)`${o}.data`,s))})}W.extendErrors=eu;function Ci(t,e){let r=t.const("err",e);t.if((0,R._)`${Y.default.vErrors} === null`,()=>t.assign(Y.default.vErrors,(0,R._)`[${r}]`),(0,R._)`${Y.default.vErrors}.push(${r})`),t.code((0,R._)`${Y.default.errors}++`)}function Mi(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,R._)`new ${t.ValidationError}(${e})`):(r.assign((0,R._)`${s}.errors`,e),r.return(!1))}var Ge={keyword:new R.Name("keyword"),schemaPath:new R.Name("schemaPath"),params:new R.Name("params"),propertyName:new R.Name("propertyName"),message:new R.Name("message"),schema:new R.Name("schema"),parentSchema:new R.Name("parentSchema")};function Di(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,R._)`{}`:tu(t,e,r)}function tu(t,e,r={}){let{gen:s,it:n}=t,i=[ru(n,r),su(t,r)];return nu(t,e,i),s.object(...i)}function ru({errorPath:t},{instancePath:e}){let r=e?(0,R.str)`${t}${(0,pr.getErrorPath)(e,pr.Type.Str)}`:t;return[Y.default.instancePath,(0,R.strConcat)(Y.default.instancePath,r)]}function su({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,R.str)`${e}/${t}`;return r&&(n=(0,R.str)`${n}${(0,pr.getErrorPath)(r,pr.Type.Str)}`),[Ge.schemaPath,n]}function nu(t,{params:e,message:r},s){let{keyword:n,data:i,schemaValue:o,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=a;s.push([Ge.keyword,n],[Ge.params,typeof e=="function"?e(t):e||(0,R._)`{}`]),c.messages&&s.push([Ge.message,typeof r=="function"?r(t):r]),c.verbose&&s.push([Ge.schema,o],[Ge.parentSchema,(0,R._)`${d}${f}`],[Y.default.data,i]),l&&s.push([Ge.propertyName,l])}});var zi=g(st=>{"use strict";u();Object.defineProperty(st,"__esModule",{value:!0});st.boolOrEmptySchema=st.topBoolOrEmptySchema=void 0;var iu=jt(),ou=b(),au=Ne(),cu={message:"boolean schema is false"};function uu(t){let{gen:e,schema:r,validateName:s}=t;r===!1?xi(t,!1):typeof r=="object"&&r.$async===!0?e.return(au.default.data):(e.assign((0,ou._)`${s}.errors`,null),e.return(!0))}st.topBoolOrEmptySchema=uu;function lu(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),xi(t)):r.var(e,!0)}st.boolOrEmptySchema=lu;function xi(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iu.reportError)(n,cu,void 0,e)}});var Ns=g(nt=>{"use strict";u();Object.defineProperty(nt,"__esModule",{value:!0});nt.getRules=nt.isJSONType=void 0;var du=["string","number","integer","boolean","null","object","array"],fu=new Set(du);function hu(t){return typeof t=="string"&&fu.has(t)}nt.isJSONType=hu;function pu(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}nt.getRules=pu});var Os=g(ke=>{"use strict";u();Object.defineProperty(ke,"__esModule",{value:!0});ke.shouldUseRule=ke.shouldUseGroup=ke.schemaHasRulesForType=void 0;function mu({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&Fi(t,s)}ke.schemaHasRulesForType=mu;function Fi(t,e){return e.rules.some(r=>Vi(t,r))}ke.shouldUseGroup=Fi;function Vi(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}ke.shouldUseRule=Vi});var qt=g(J=>{"use strict";u();Object.defineProperty(J,"__esModule",{value:!0});J.reportTypeError=J.checkDataTypes=J.checkDataType=J.coerceAndCheckDataType=J.getJSONTypes=J.getSchemaTypes=J.DataType=void 0;var yu=Ns(),_u=Os(),gu=jt(),S=b(),Ui=k(),it;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(it||(J.DataType=it={}));function $u(t){let e=Li(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}J.getSchemaTypes=$u;function Li(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(yu.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}J.getJSONTypes=Li;function vu(t,e){let{gen:r,data:s,opts:n}=t,i=wu(e,n.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,_u.schemaHasRulesForType)(t,e[0]));if(o){let a=Is(e,s,n.strictNumbers,it.Wrong);r.if(a,()=>{i.length?Eu(t,e,i):ks(t)})}return o}J.coerceAndCheckDataType=vu;var Ki=new Set(["string","number","integer","boolean","null"]);function wu(t,e){return e?t.filter(r=>Ki.has(r)||e==="array"&&r==="array"):[]}function Eu(t,e,r){let{gen:s,data:n,opts:i}=t,o=s.let("dataType",(0,S._)`typeof ${n}`),a=s.let("coerced",(0,S._)`undefined`);i.coerceTypes==="array"&&s.if((0,S._)`${o} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,S._)`${n}[0]`).assign(o,(0,S._)`typeof ${n}`).if(Is(e,n,i.strictNumbers),()=>s.assign(a,n))),s.if((0,S._)`${a} !== undefined`);for(let l of r)(Ki.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);s.else(),ks(t),s.endIf(),s.if((0,S._)`${a} !== undefined`,()=>{s.assign(n,a),Su(t,a)});function c(l){switch(l){case"string":s.elseIf((0,S._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,S._)`"" + ${n}`).elseIf((0,S._)`${n} === null`).assign(a,(0,S._)`""`);return;case"number":s.elseIf((0,S._)`${o} == "boolean" || ${n} === null
|
|
3
3
|
|| (${o} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,S._)`+${n}`);return;case"integer":s.elseIf((0,S._)`${o} === "boolean" || ${n} === null
|
|
4
4
|
|| (${o} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,S._)`+${n}`);return;case"boolean":s.elseIf((0,S._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,S._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":s.elseIf((0,S._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(a,null);return;case"array":s.elseIf((0,S._)`${o} === "string" || ${o} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as u,aa as l,ba as p}from"./chunk-
|
|
1
|
+
import{Y as u,aa as l,ba as p}from"./chunk-442S5SDM.js";import{b as d,c as f}from"./chunk-H5C3QTOO.js";import{b as c}from"./chunk-UKK5P74A.js";import{C as m}from"./chunk-6EZ7JWBK.js";import{Lb as s}from"./chunk-DONEJHDG.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function g(t){let i;try{i=await p()}catch(a){if(t.json&&a instanceof l){s(JSON.stringify({organizations:[]},null,2));return}throw a}if(t.json){let a={organizations:i.map(r=>({id:r.id,gid:u(r.id),name:r.businessName}))};s(JSON.stringify(a,null,2));return}h(i)}function h(t){let i=t.map(a=>({id:a.id,name:a.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,o=class extends c{async run(){let{flags:i}=await this.parse(e);await g({json:i.json})}};e=o;o.summary="List Shopify organizations you have access to.";o.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";o.description=e.descriptionWithoutMarkdown();o.flags={...d,...f};var x=o;export{x as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b}from"./chunk-IX4KP6E3.js";import{a as F}from"./chunk-VOJWKGCW.js";import{j as h,l as u,o as T}from"./chunk-6YPEONHB.js";import{p as y,v as O}from"./chunk-D6YDSGR4.js";import{o as f,ua as v}from"./chunk-5W443CKL.js";import{b as I}from"./chunk-H5C3QTOO.js";import{v as _}from"./chunk-6EZ7JWBK.js";import{d as s}from"./chunk-WKBVT5WG.js";import{Mb as S,Ua as l,ma as c}from"./chunk-DONEJHDG.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function P({session:e,overridesContent:r,themeId:t}){v("theme-preview:create");let w=`${u(e)}/theme_preview.json?preview_theme_id=${t}`,o=await h(e,{headers:{"Content-Type":"application/json"}}),i=await f(w,{method:"POST",body:r,headers:o});if(!i.ok)throw new s(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let a=await J(i);return v("theme-preview:create"),a}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:d}){v("theme-preview:update");let o=`${u(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(d)}`,i=await h(e,{headers:{"Content-Type":"application/json"}}),a=await f(o,{method:"POST",body:r,headers:i});if(!a.ok)throw new s(`Theme preview request failed with status ${a.status}: ${a.statusText}`);let x=await J(a);return v("theme-preview:update"),x}async function J(e){let r=await e.json();if(r.error)throw new s(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new s(`Override file not found: ${e.overrideJson}`);let r=await c(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let a=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${e.overrideJson}`,a)}let d=await T(e.themeId,e.adminSession,e.password),w=JSON.stringify(t),o=e.previewIdentifier?await g({session:d,overridesContent:w,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:d,overridesContent:w,themeId:e.themeId});e.json?S(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):_({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var m=A(U(),1);var E,n=class extends O{async command(r,t){let d=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:d.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};E=n;n.summary="Applies JSON overrides to a theme and returns a preview URL.";n.descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";n.description=E.descriptionWithoutMarkdown();n.flags={...I,...y,theme:m.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:m.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":m.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:m.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:m.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};n.multiEnvironmentsFlags=null;var ee=n;export{ee as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as i}from"./chunk-
|
|
1
|
+
import{K as i}from"./chunk-6EZ7JWBK.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H,S as U}from"./chunk-
|
|
1
|
+
import{H,S as U}from"./chunk-ATXODH6C.js";import{a as G}from"./chunk-VJEKDBGZ.js";import{f as T}from"./chunk-442S5SDM.js";import{b as D,l as O,s as k}from"./chunk-6EZ7JWBK.js";import{d as N}from"./chunk-WKBVT5WG.js";import{Ca as P,Pb as u,Ta as A,Ua as I,bb as _,na as R,wa as w}from"./chunk-DONEJHDG.js";import{f as S}from"./chunk-KKUDXLK2.js";import{d as x,e as E,g as F,i as C}from"./chunk-773TIA5M.js";import{e as q,g as m}from"./chunk-VKWPEFWQ.js";m();function b(){return process.hrtime()}function M(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}m();m();var $=q(G(),1),K=200,Q=6e4,L=200,Y=500,v=class{constructor(t,s,i=K){this.currentEvents=[],this.extensionPaths=[],this.ignored={},this.extensionWatchedFiles=new Map,this.emitEvents=()=>{let e=this.currentEvents;this.currentEvents=[];let n=`\u{1F509} ${e.length} EVENTS EMITTED in files: ${e.map(o=>o.path).join(`
|
|
2
2
|
`)}`;u(n,this.options.stdout),this.onChangeCallback?.(e)},this.handleFileEvent=(e,n)=>{let o=b(),d=E(n),h=n===this.app.configPath,l=n.endsWith(".extension.toml");if(u(`\u{1F300}: ${e} ${n.replace(this.app.directory,"")}
|
|
3
3
|
`),h)this.handleEventForExtension(e,n,this.app.directory,o,!1);else{let a=this.extensionWatchedFiles.get(d),p=a===void 0||a.size===0;if(p&&e==="add"&&!l){let c=this.discoverFileOwners(d);c.size>0&&(this.extensionWatchedFiles.set(d,c),a=c,p=!1)}if(p&&!l&&!h){u(`\u{1F300}: File ${n} is not watched by any extension`,this.options.stdout);return}for(let c of a??[]){let g=this.app.realExtensions.find(X=>X.handle===c),y=g?E(g.directory):this.app.directory;this.handleEventForExtension(e,n,y,o,!1,c)}p&&this.handleEventForExtension(e,n,this.app.directory,o,!0)}this.debouncedEmit()},this.close=()=>{this.watcher&&(u("Closing file watcher",this.options.stdout),this.watcher.close().then(()=>u("File watching closed",this.options.stdout)).catch(e=>u(`File watching failed to close: ${e.message}`,this.options.stderr)))},this.app=t,this.options=s,this.debouncedEmit=k(this.emitEvents.bind(this),i,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let s=[...this.app.configuration.extension_directories??["extensions"]].map(o=>x(this.app.directory,o));await Promise.all(s.map(async o=>{try{await w(o.replace(/\/\*+$/,""))}catch{}}));let i=[this.app.configPath,...s],e=this.getAllWatchedFiles();i.push(...e),this.close();let{default:n}=await import("./chokidar-VDIVGBZH.js");this.watcher=n.watch(i,{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),u(`File watcher started with ${i.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(s=>E(s.directory)).filter(s=>s!==this.app.directory),this.extensionPaths.forEach(s=>{var i;(i=this.ignored)[s]??(i[s]=this.createIgnoreInstance(s))})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(i=>({extension:i,watchedFiles:i.watchedFiles()})),s=new Set;for(let{extension:i,watchedFiles:e}of t)for(let n of e){let o=E(n);s.add(o);let d=this.extensionWatchedFiles.get(o)??new Set;d.add(i.handle),this.extensionWatchedFiles.set(o,d)}return Array.from(s)}pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(s=>s.path===t.path&&s.type===t.type&&s.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(E(t.path))?.has(t.extensionHandle))return!1;let i=(t.extensionHandle?this.app.realExtensions.find(n=>n.handle===t.extensionHandle):void 0)?.watchedFiles(),e=this.ignored[t.extensionPath];if(i)return!i.some(o=>_(t.path,o));if(e){let n=F(t.extensionPath,t.path);return e.ignores(n)}return!1}discoverFileOwners(t){let s=new Set;for(let i of this.app.realExtensions){let e=E(i.directory);e!==this.app.directory&&t.startsWith(`${e}/`)&&this.pathMatchesWatchPatterns(t,i)&&s.add(i.handle)}return s}pathMatchesWatchPatterns(t,s){let{paths:i,ignore:e}=s.watchPatterns(),n=F(E(s.directory),t);return e.some(o=>_(n,o))?!1:i.some(o=>_(n,o))}handleEventForExtension(t,s,i,e,n,o){let d=s.endsWith(".extension.toml"),h=s===this.app.configPath;switch(t){case"change":if(n)break;d||h?this.pushEvent({type:"extensions_config_updated",path:s,extensionPath:i,extensionHandle:o,startTime:e}):this.pushEvent({type:"file_updated",path:s,extensionPath:i,extensionHandle:o,startTime:e});break;case"add":if(!d){this.pushEvent({type:"file_created",path:s,extensionPath:i,extensionHandle:o,startTime:e});break}let l=0,a=C(s),p=setInterval(()=>{I(x(a,T.lockFile))?(u(`Waiting for extension to complete creation: ${s}
|
|
4
4
|
`),l+=L):(clearInterval(p),this.extensionPaths.push(a),this.pushEvent({type:"extension_folder_created",path:a,extensionPath:i,startTime:e}),this.debouncedEmit()),l>=Q&&(clearInterval(p),this.options.stderr.write(`Error loading new extension at path: ${s}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-
|
|
1
|
+
import{A as e,B as r,F as o,G as s,k as n,z as h}from"./chunk-6EZ7JWBK.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-25HJX3L2.js";import{a as oe}from"./chunk-OZBY45KT.js";import{a as se}from"./chunk-EKVTNWHM.js";import{a as z}from"./chunk-5BKCIDMS.js";import{F as X,Fa as re,_ as ee,ba as te,m as W}from"./chunk-4QTEPWEJ.js";import{ea as Z}from"./chunk-UTO4Z6P6.js";import{z as G}from"./chunk-G4OQABDT.js";import{b as Y,c as K}from"./chunk-OXJBYKMX.js";import{i as H,u as Q}from"./chunk-NTRAWIEJ.js";import{d as _}from"./chunk-TPCG6DCA.js";import{r as _e}from"./chunk-T6CC5WUU.js";import{Lb as M,Mb as S,da as $,eb as F,fb as f,gb as o}from"./chunk-7FQFEB33.js";import{j as V}from"./chunk-773TIA5M.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
|
|
1
|
+
import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-6RL7FUPD.js";import{a as oe}from"./chunk-JOZXRV5K.js";import{a as se}from"./chunk-HM5H7WBE.js";import{a as z}from"./chunk-ZAMDXIVC.js";import{F as X,Fa as re,_ as ee,ba as te,m as W}from"./chunk-ATXODH6C.js";import{ea as Z}from"./chunk-442S5SDM.js";import{z as G}from"./chunk-5W443CKL.js";import{b as Y,c as K}from"./chunk-H5C3QTOO.js";import{i as H,u as Q}from"./chunk-6EZ7JWBK.js";import{d as _}from"./chunk-WKBVT5WG.js";import{Lb as M,Mb as S,da as $,eb as F,fb as f,gb as o}from"./chunk-DONEJHDG.js";import{j as V}from"./chunk-773TIA5M.js";import{r as _e}from"./chunk-T6CC5WUU.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
|
|
2
2
|
`),await Se({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Le(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=V(s.configPath);t.format==="text"&&Pe(n.title,l.shopDomain,t.storeFqdns,p,a.businessName);let u=new Map;return u.set(l.shopId,l.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let d=await Z(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Pe(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?W(i):void 0;Q({headline:i?`Using ${p} for default values:`:"Using these settings:",body:ee({appName:t,org:l,devStores:a,messages:[te]})})}var O=N(_e(),1);var J,I=class extends se{async run(){let{flags:s}=await this.parse(J);await X(s.path);let n=await re({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await oe({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),l={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(l),{app:n.app}}};J=I;I.summary="Stream detailed logs for your Shopify app.";I.descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";I.description=J.descriptionWithoutMarkdown();I.flags={...Y,...z,...K,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async t=>G(t)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};var _t=I;export{_t as a};
|