shopify 5.0.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-QFDTQYPM.js +1 -0
- package/dist/analytics-XADBBHOH.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-24Q6X53V.js +1 -0
- package/dist/{chunk-LEHBZKK3.js → chunk-25MYHE4W.js} +1 -1
- package/dist/{chunk-TODZ3TJR.js → chunk-27JT4NA4.js} +1 -1
- package/dist/chunk-2BYW3BYX.js +1 -0
- package/dist/chunk-2KFYIYLI.js +1 -0
- package/dist/{chunk-D2KIGKBI.js → chunk-2KUM2RU4.js} +60 -60
- package/dist/chunk-2PD7TNFS.js +275 -0
- package/dist/{chunk-64G5TGFF.js → chunk-3C72S6LO.js} +1 -1
- package/dist/chunk-3FZ4LE6A.js +10 -0
- package/dist/{chunk-3MYDSQHF.js → chunk-3GD5ESWN.js} +1 -1
- package/dist/chunk-3KGN6N7E.js +1 -0
- package/dist/{chunk-KNWT7JLL.js → chunk-3MZ7ELHS.js} +2 -2
- package/dist/{chunk-PF53E2DC.js → chunk-3PS52ZT4.js} +1 -1
- package/dist/chunk-3PYDIBTX.js +1 -0
- package/dist/chunk-3Z75BVGJ.js +1 -0
- package/dist/chunk-4FWPOGPQ.js +1 -0
- package/dist/chunk-4IP37MBX.js +1 -0
- package/dist/chunk-4NFX7YCT.js +1 -0
- package/dist/chunk-4TCXPHKN.js +1 -0
- package/dist/chunk-4WBWZIN5.js +6 -0
- package/dist/chunk-5534MHZW.js +97 -0
- package/dist/{chunk-UKWIWCOH.js → chunk-5C6CXU74.js} +1 -1
- package/dist/{chunk-QEKGGTMN.js → chunk-5HOZDOJ7.js} +1 -1
- package/dist/{chunk-ER6C5WS3.js → chunk-5PSQFQL6.js} +1 -1
- package/dist/chunk-5T3ZT6CC.js +1 -0
- package/dist/chunk-62NW4EPI.js +17 -0
- package/dist/chunk-65NCQJYR.js +1 -0
- package/dist/{chunk-IHXGZW42.js → chunk-6BYHL3DS.js} +1 -1
- package/dist/chunk-6I7DT7QR.js +3 -0
- package/dist/chunk-6IMTMS2S.js +3 -0
- package/dist/chunk-7A77JCED.js +11 -0
- package/dist/chunk-7ART2IKU.js +1 -0
- package/dist/{chunk-I4CEH7AK.js → chunk-7BPT5V24.js} +2 -2
- package/dist/{chunk-Z2WAW6MM.js → chunk-7CT3NIXI.js} +1 -1
- package/dist/chunk-7DBKSSDK.js +1 -0
- package/dist/chunk-7HECBXSP.js +1 -0
- package/dist/chunk-7KID5BIR.js +4 -0
- package/dist/{chunk-2L6AN3QA.js → chunk-7N7KRZOM.js} +1 -1
- package/dist/{chunk-W37IFK3P.js → chunk-7NRHZG5Y.js} +102 -102
- package/dist/chunk-7PHDEILV.js +1 -0
- package/dist/chunk-A2NSORBM.js +2296 -0
- package/dist/chunk-A54TADAZ.js +1 -0
- package/dist/{chunk-YTUUU33R.js → chunk-AE3IQG7S.js} +1 -1
- package/dist/chunk-AGTUAQHX.js +4 -0
- package/dist/chunk-AHYI27QL.js +11 -0
- package/dist/chunk-ALINJ6J2.js +1 -0
- package/dist/chunk-AMVWKHNY.js +1 -0
- package/dist/{chunk-NVKJ7ZLP.js → chunk-ASKBYEO7.js} +1 -1
- package/dist/{chunk-62EOM3Y2.js → chunk-AVJJGQOP.js} +1 -1
- package/dist/{chunk-NXAEBGMO.js → chunk-AY3AAV77.js} +1 -1
- package/dist/{chunk-F3CK3EJJ.js → chunk-BFAOTQGH.js} +1 -1
- package/dist/{chunk-H6GNKWYM.js → chunk-BPKQA2EO.js} +1 -1
- package/dist/{chunk-WESTVWWD.js → chunk-C2HJEGTS.js} +1 -1
- package/dist/chunk-C72QNK6O.js +4 -0
- package/dist/chunk-CDSDQTNB.js +16 -0
- package/dist/chunk-CEQGOCKX.js +1 -0
- package/dist/{chunk-WCC52MR2.js → chunk-CIGWIKOW.js} +1 -1
- package/dist/chunk-CQAD5WML.js +1 -0
- package/dist/chunk-CRQQCT7F.js +1 -0
- package/dist/chunk-CZNUBAAG.js +3 -0
- package/dist/{chunk-ISKQQXLZ.js → chunk-D7IMC2G4.js} +1 -1
- package/dist/{chunk-6ES4KRFW.js → chunk-DC7ITY6T.js} +1 -1
- package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
- package/dist/{chunk-SLY27GDC.js → chunk-DDZYIC76.js} +2 -2
- package/dist/chunk-DGIIUQH3.js +1 -0
- package/dist/{chunk-3KM5ZOW2.js → chunk-DMOLPSXF.js} +1 -1
- package/dist/{chunk-LHXFTFFM.js → chunk-DOLVBTCB.js} +1 -1
- package/dist/{chunk-WBVS5NBV.js → chunk-DTKGI43P.js} +2 -2
- package/dist/{chunk-2WJOTJOD.js → chunk-DVD7I2TX.js} +2 -2
- package/dist/chunk-DVFVO6ZE.js +2 -0
- package/dist/{chunk-3XRI3D44.js → chunk-DXEMSLI6.js} +1 -1
- package/dist/chunk-EDWIWZWM.js +15 -0
- package/dist/chunk-ELR6AZT4.js +9 -0
- package/dist/chunk-EVQPYZ7F.js +5 -0
- package/dist/chunk-F5QKMDP3.js +1 -0
- package/dist/{chunk-URXM5A2K.js → chunk-F6IQWX2F.js} +1 -1
- package/dist/{chunk-SACNUF4I.js → chunk-FAVPTYIR.js} +1 -1
- package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
- package/dist/{chunk-Q4JYAUVL.js → chunk-FHKK3QU7.js} +1 -1
- package/dist/chunk-FKKJQGYX.js +7 -0
- package/dist/chunk-FQLXQ7WN.js +16 -0
- package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
- package/dist/{chunk-J5ERDFIC.js → chunk-FU7PYW7H.js} +1 -1
- package/dist/{chunk-ESFCYB46.js → chunk-FYQE5E6U.js} +1 -1
- package/dist/chunk-G3EWGBXR.js +1 -0
- package/dist/chunk-G3RNO2TC.js +1 -0
- package/dist/{chunk-35XFNKNB.js → chunk-GGCP2TIK.js} +1 -1
- package/dist/chunk-GSFWBFFH.js +1 -0
- package/dist/{chunk-ZRI3SSLG.js → chunk-H2KGP2FM.js} +2 -2
- package/dist/{chunk-GW7YIJPJ.js → chunk-H4K3F7PP.js} +1 -1
- package/dist/chunk-HGZ2HRPO.js +13 -0
- package/dist/chunk-HMPRWNGG.js +203 -0
- package/dist/chunk-HP4QYSBQ.js +1 -0
- package/dist/{chunk-RPCIFYCY.js → chunk-HSTZV6H7.js} +2 -2
- package/dist/{chunk-N57Y7THE.js → chunk-HVUMVDUG.js} +1 -1
- package/dist/{chunk-XWSWXQCC.js → chunk-HYCNYUHW.js} +1 -1
- package/dist/{chunk-CXI3RHPW.js → chunk-I3WRA2LH.js} +1 -1
- package/dist/{chunk-UUAKOX7E.js → chunk-IRLYC626.js} +2 -2
- package/dist/chunk-IWNFPBH2.js +33 -0
- package/dist/{chunk-C3RFAKWR.js → chunk-JALDNBTU.js} +1 -1
- package/dist/{chunk-QDCLL5OI.js → chunk-JC37YZ4I.js} +1 -1
- package/dist/{chunk-QF5WKTPD.js → chunk-JG4FAT2T.js} +1 -1
- package/dist/chunk-JGLLABZR.js +8 -0
- package/dist/chunk-JIY6XWSC.js +1 -0
- package/dist/{chunk-3ODQKAEA.js → chunk-JIYCZXK5.js} +1 -1
- package/dist/chunk-JMSAHCBU.js +35 -0
- package/dist/{chunk-KZRLZWOU.js → chunk-JNSVKDBY.js} +1 -1
- package/dist/chunk-JQU2BJDH.js +3 -0
- package/dist/chunk-JVY6CCLE.js +3 -0
- package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
- package/dist/chunk-KCAWHJGF.js +1 -0
- package/dist/{chunk-YV2TP44L.js → chunk-KFO2JNF5.js} +1 -1
- package/dist/chunk-KFR7HWCG.js +9 -0
- package/dist/{chunk-MEYVUHQH.js → chunk-KHZF73BL.js} +1 -1
- package/dist/{chunk-LGXI7EGM.js → chunk-KM4LE7K4.js} +2 -2
- package/dist/{chunk-IILLQOUC.js → chunk-L2PUDV7Y.js} +1 -1
- package/dist/chunk-LFBFPK22.js +1 -0
- package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
- package/dist/chunk-LGDWE3H3.js +1 -0
- package/dist/chunk-LPPEAMI6.js +1 -0
- package/dist/chunk-LXIWMYM4.js +1 -0
- package/dist/chunk-MGWCXTGD.js +1 -0
- package/dist/chunk-MGX7UG44.js +1 -0
- package/dist/chunk-MKFRKNHF.js +3 -0
- package/dist/chunk-MTT6EAQO.js +1 -0
- package/dist/{chunk-SIL6HPMK.js → chunk-MU7IVBGI.js} +2 -2
- package/dist/{chunk-QEVTBD33.js → chunk-MYMBHVC4.js} +1 -1
- package/dist/chunk-MZDBH4XV.js +4 -0
- package/dist/{chunk-Q5IC3IYY.js → chunk-NUBJ2HK7.js} +1 -1
- package/dist/{chunk-3Z3MADXZ.js → chunk-NY5N4ANL.js} +1 -1
- package/dist/{chunk-WRZWHT6M.js → chunk-NYMKGE3J.js} +1 -1
- package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
- package/dist/chunk-O7HZ3EIP.js +1 -0
- package/dist/chunk-OJOF6IYG.js +9 -0
- package/dist/{chunk-UXVXVI6O.js → chunk-ONZULPQH.js} +68 -66
- package/dist/chunk-ORMXPSJM.js +1 -0
- package/dist/chunk-ORYEDUKM.js +5 -0
- package/dist/{chunk-T4XJKM6B.js → chunk-OTMYJWIP.js} +1 -1
- package/dist/chunk-OVJVFB5E.js +20 -0
- package/dist/chunk-OWQEFORZ.js +1 -0
- package/dist/{chunk-UBP3LQFY.js → chunk-OXPEBT4I.js} +2 -2
- package/dist/chunk-OXZR2MB4.js +6 -0
- package/dist/chunk-OY5M52EF.js +6 -0
- package/dist/{chunk-2A2JSAAA.js → chunk-PJZZZNWR.js} +1 -1
- package/dist/chunk-Q2LQJYRK.js +16 -0
- package/dist/chunk-QBRRFFMZ.js +1 -0
- package/dist/{chunk-AQKWPRZE.js → chunk-QCLE5REL.js} +2 -2
- package/dist/{chunk-43R5VGKT.js → chunk-QGQWVA7N.js} +1 -1
- package/dist/chunk-QKPAB245.js +1 -0
- package/dist/chunk-QUPZOBTB.js +1 -0
- package/dist/chunk-R4E2E4NN.js +1 -0
- package/dist/{chunk-CGVROSPS.js → chunk-R6US7F33.js} +1 -1
- package/dist/chunk-RKNVTEO3.js +5 -0
- package/dist/{chunk-7CCTPBCT.js → chunk-RLOEI6VE.js} +1 -1
- package/dist/chunk-RSZAAN37.js +1 -0
- package/dist/{chunk-WBJ6ZHYH.js → chunk-S3RROJGG.js} +37 -37
- package/dist/chunk-S4KNPCW3.js +81 -0
- package/dist/{chunk-26PWHH3B.js → chunk-SBN3ILXO.js} +1 -1
- package/dist/chunk-SCDGLREP.js +1 -0
- package/dist/chunk-SHOMIS6Q.js +2 -0
- package/dist/chunk-SN3PMWUF.js +6 -0
- package/dist/chunk-SODCXZ5U.js +1 -0
- package/dist/chunk-SPJM7RTD.js +1 -0
- package/dist/chunk-SQL67BKI.js +5 -0
- package/dist/{chunk-AQ6EVL73.js → chunk-SURFUFAZ.js} +1 -1
- package/dist/{chunk-SNH4XZ6E.js → chunk-SVQDMZJO.js} +1 -1
- package/dist/chunk-T4ZOTYOY.js +1 -0
- package/dist/chunk-T6C4WC3Z.js +2 -0
- package/dist/chunk-TD6JBHUS.js +1 -0
- package/dist/chunk-TIM4CIXZ.js +22 -0
- package/dist/{chunk-B2O3ANRZ.js → chunk-TP7CTMMT.js} +1 -1
- package/dist/chunk-TSPJAMYB.js +1 -0
- package/dist/chunk-TSVEV2UD.js +26 -0
- package/dist/{chunk-ZBL7XMJ6.js → chunk-TTAT62N3.js} +2 -2
- package/dist/{chunk-S5P7KWY4.js → chunk-TUSS6PXB.js} +1 -1
- package/dist/chunk-TXP6KFWO.js +5 -0
- package/dist/chunk-TZHVCMZN.js +6 -0
- package/dist/chunk-UC4TOM36.js +3 -0
- package/dist/{chunk-RPVZ2JON.js → chunk-UFY4L5KQ.js} +1 -1
- package/dist/chunk-UU6UQ2QY.js +1 -0
- package/dist/chunk-V4FC72R6.js +1 -0
- package/dist/chunk-VA2S7W7H.js +10 -0
- package/dist/chunk-VE3IIC7H.js +1 -0
- package/dist/{chunk-PTSCGSQV.js → chunk-VJG7VXFU.js} +2 -2
- package/dist/chunk-VQSRU5XL.js +4 -0
- package/dist/chunk-VRIFLMA3.js +70 -0
- package/dist/chunk-WBJFTCEJ.js +1 -0
- package/dist/chunk-WBPP6PO7.js +31 -0
- package/dist/chunk-WE5KY6T6.js +1 -0
- package/dist/chunk-WFPVT2IY.js +1 -0
- package/dist/{chunk-PLSS456F.js → chunk-WLYXBQ2M.js} +1 -1
- package/dist/chunk-WNVOEE6T.js +7 -0
- package/dist/chunk-WPDJVUTY.js +47 -0
- package/dist/chunk-WWCYEZUU.js +1 -0
- package/dist/chunk-WWVDZ3GC.js +3 -0
- package/dist/{chunk-4KECSZTL.js → chunk-WZBZ7FWP.js} +2 -2
- package/dist/chunk-XEZPN5TR.js +22 -0
- package/dist/{chunk-QW52RPAU.js → chunk-XLMKHTJ5.js} +1 -1
- package/dist/chunk-XRNBCV2B.js +1 -0
- package/dist/{chunk-67L7FIB6.js → chunk-XWLNCBAG.js} +1 -1
- package/dist/chunk-YF4AXKM4.js +1 -0
- package/dist/chunk-YKDRUAY3.js +857 -0
- package/dist/{chunk-YSWVYPWR.js → chunk-YNFQBYSL.js} +1 -1
- package/dist/{chunk-TFPW2VGN.js → chunk-YNZLLZU2.js} +1 -1
- package/dist/chunk-YOYPYB4H.js +1 -0
- package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
- package/dist/chunk-YTL45RXR.js +103 -0
- package/dist/chunk-YVPB7OT6.js +6 -0
- package/dist/chunk-YYWSHRO2.js +89 -0
- package/dist/{chunk-DZKFP6H2.js → chunk-Z5QEXS6F.js} +1 -1
- package/dist/chunk-Z5WFRYVQ.js +6 -0
- package/dist/{chunk-PWAT52M4.js → chunk-Z6ZRS256.js} +1 -1
- package/dist/chunk-ZMOW2YZ4.js +18 -0
- package/dist/chunk-ZMU4EYXT.js +1 -0
- package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
- package/dist/chunk-ZXZWMXXK.js +7 -0
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs-next.js +1 -0
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.d.ts +10 -10
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.d.ts +7 -7
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +21 -21
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +23 -23
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +90 -90
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.d.ts +7 -7
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.d.ts +24 -24
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.d.ts +7 -7
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli-version-check-V25AVSZ6.js +1 -0
- package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
- package/dist/command-json-schema-C5UZXP2W.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OCGEEV4U.js +1 -0
- package/dist/custom-oclif-loader-ZVUKMRGH.js +1 -0
- package/dist/data/filters.json +41 -2
- package/dist/data/local_block_entry.json +1 -1
- package/dist/data/manifest_theme.json +1 -0
- package/dist/data/objects.json +78 -36
- package/dist/data/section.json +1 -1
- package/dist/data/shopify_system_translations.json +240 -23
- package/dist/data/strict_settings.json +24 -0
- package/dist/data/tags.json +57 -24
- package/dist/data/theme_block.json +1 -1
- package/dist/deprecations-A5AXXKIK.js +1 -0
- package/dist/dist-NORLLIHQ.js +1 -0
- package/dist/dist-XBM4XZS4.js +1 -0
- package/dist/environment-5P7JJ3GI.js +1 -0
- package/dist/environments-Y5JEI3U3.js +1 -0
- package/dist/error-GI4DXVDU.js +1 -0
- package/dist/error-handler-BS2ZENQV.js +1 -0
- package/dist/fs-UOOLPOHJ.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +2 -2
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/http-2OXOS2AW.js +1 -0
- package/dist/http-proxy-node16-NZZ674YW.js +38 -0
- package/dist/index.js +12 -12
- package/dist/is-global-CI77T7NE.js +1 -0
- package/dist/json-error-6PBUR4LQ.js +1 -0
- package/dist/latest-version-75YEFEMK.js +9 -0
- package/dist/lib-4JVADMNT.js +1 -0
- package/dist/lib-L4STV5B2.js +1 -0
- package/dist/lib-LEEN55OD.js +1 -0
- package/dist/{local-OKPVB4NH.js → local-5NIWPWDS.js} +1 -1
- package/dist/metadata-IXPNNPNJ.js +1 -0
- package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
- package/dist/node-package-manager-ALFEGGD6.js +1 -0
- package/dist/notifications-system-FQW3GKH2.js +1 -0
- package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
- package/dist/os-6TNQTEUN.js +1 -0
- package/dist/output-LEOB5LAM.js +1 -0
- package/dist/{prettier-EGVCP5CY.js → prettier-VLTY4MIE.js} +1 -1
- package/dist/registry-auth-token-EDH77OOW.js +1 -0
- package/dist/registry-url-JMNV3LLX.js +1 -0
- package/dist/semver-HHZRKD6Y.js +1 -0
- package/dist/system-J4CTESP5.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-YDUI56E3.js +1 -0
- package/dist/upgrade-LBCZORG2.js +1 -0
- package/dist/version-2YL4YEQ2.js +1 -0
- package/dist/version-X2CPQVWQ.js +1 -0
- package/dist/workerd-5UPTEWNI.js +18 -0
- package/oclif.manifest.json +25622 -1132
- package/package.json +7 -7
- package/dist/analytics-NMMVOF4B.js +0 -1
- package/dist/analytics-UK77WNLG.js +0 -1
- package/dist/chunk-224UPIYS.js +0 -4
- package/dist/chunk-27NXPOAS.js +0 -1
- package/dist/chunk-2MT3LSMZ.js +0 -1
- package/dist/chunk-2T4HDR6R.js +0 -70
- package/dist/chunk-2ZBXHCQZ.js +0 -1
- package/dist/chunk-335BUVBP.js +0 -1
- package/dist/chunk-33ZE3DRQ.js +0 -16
- package/dist/chunk-34MOWGRL.js +0 -1
- package/dist/chunk-3JSKNXL7.js +0 -1
- package/dist/chunk-3MG4MTWQ.js +0 -1
- package/dist/chunk-4WYKPIN3.js +0 -1
- package/dist/chunk-5AEZJZNQ.js +0 -1
- package/dist/chunk-5ED7SOQZ.js +0 -20
- package/dist/chunk-5IDJALJH.js +0 -1
- package/dist/chunk-66TMIQMB.js +0 -1
- package/dist/chunk-74NRFUGQ.js +0 -1
- package/dist/chunk-7GUMJ5E4.js +0 -1
- package/dist/chunk-7NFTSBHQ.js +0 -10
- package/dist/chunk-ACZNWIRY.js +0 -1
- package/dist/chunk-AUE7LM32.js +0 -1
- package/dist/chunk-AXL2VIWA.js +0 -16
- package/dist/chunk-B3ZJGYZY.js +0 -3
- package/dist/chunk-BOAGJ6P5.js +0 -1
- package/dist/chunk-BWN2QG6D.js +0 -5
- package/dist/chunk-CCUQM4FX.js +0 -6
- package/dist/chunk-CLUUA3HX.js +0 -3
- package/dist/chunk-CYEEGTVZ.js +0 -11
- package/dist/chunk-DBDTE3EE.js +0 -5
- package/dist/chunk-DLVB3237.js +0 -31
- package/dist/chunk-DN6X7SHW.js +0 -2
- package/dist/chunk-E5COIKGY.js +0 -5
- package/dist/chunk-E6RONHMT.js +0 -1
- package/dist/chunk-EAZIQI2D.js +0 -1
- package/dist/chunk-EEY4FKAW.js +0 -1
- package/dist/chunk-EKFPTBXC.js +0 -1
- package/dist/chunk-FEBOZ2XX.js +0 -31
- package/dist/chunk-FFSDGRAN.js +0 -1
- package/dist/chunk-FZCGRIOM.js +0 -1
- package/dist/chunk-GNCVDN7U.js +0 -1
- package/dist/chunk-GQLNG537.js +0 -836
- package/dist/chunk-GVI3DWSB.js +0 -4
- package/dist/chunk-H6GYBLVQ.js +0 -2
- package/dist/chunk-HB3MJYBK.js +0 -1
- package/dist/chunk-HSKDFEXW.js +0 -1
- package/dist/chunk-HTRJU4R4.js +0 -1
- package/dist/chunk-HXZAY5OA.js +0 -1
- package/dist/chunk-I7PEEJVH.js +0 -1
- package/dist/chunk-IHMATNOR.js +0 -1
- package/dist/chunk-IJY3RJPJ.js +0 -47
- package/dist/chunk-J3JPJCWP.js +0 -1
- package/dist/chunk-J55GQLP4.js +0 -1
- package/dist/chunk-JLQRDFR5.js +0 -18
- package/dist/chunk-JPWRZ5SL.js +0 -16
- package/dist/chunk-K7ZSPQKL.js +0 -4
- package/dist/chunk-L5TSPCSY.js +0 -26
- package/dist/chunk-LUGMXSRI.js +0 -9
- package/dist/chunk-M2CWCOFU.js +0 -11
- package/dist/chunk-M5VIFG2V.js +0 -1
- package/dist/chunk-MADINS4Z.js +0 -1
- package/dist/chunk-MGHPF7HU.js +0 -6
- package/dist/chunk-MHR5OHT5.js +0 -10
- package/dist/chunk-MXEXP3HT.js +0 -15
- package/dist/chunk-OJULL7HT.js +0 -1
- package/dist/chunk-OMPQ7REW.js +0 -3
- package/dist/chunk-OR4IJ4BQ.js +0 -1
- package/dist/chunk-P2RMFHQP.js +0 -1
- package/dist/chunk-P4VZYOKO.js +0 -15
- package/dist/chunk-PDZBKVWL.js +0 -97
- package/dist/chunk-Q2KWXZQB.js +0 -12
- package/dist/chunk-QFSENE5T.js +0 -3
- package/dist/chunk-QFWWCZOI.js +0 -1
- package/dist/chunk-QFYLJVJW.js +0 -77
- package/dist/chunk-QQJNQNKP.js +0 -6
- package/dist/chunk-R4UVIYZP.js +0 -4
- package/dist/chunk-RLNIOJH3.js +0 -272
- package/dist/chunk-RW6G4ZPU.js +0 -1
- package/dist/chunk-S4LOWCGS.js +0 -1
- package/dist/chunk-SB27UOXX.js +0 -1
- package/dist/chunk-SHD4VV5V.js +0 -3
- package/dist/chunk-SK7EPN6C.js +0 -1
- package/dist/chunk-TAWCKJKP.js +0 -1
- package/dist/chunk-U2T5HPRD.js +0 -319
- package/dist/chunk-U6YOP562.js +0 -1
- package/dist/chunk-UPPO3BMT.js +0 -7
- package/dist/chunk-USXIXANP.js +0 -103
- package/dist/chunk-UV5GAGAD.js +0 -1
- package/dist/chunk-UY6W2EVZ.js +0 -1
- package/dist/chunk-UYELAINQ.js +0 -16
- package/dist/chunk-V75WUEFU.js +0 -1
- package/dist/chunk-VAVXDIUX.js +0 -6
- package/dist/chunk-VEUKT5EI.js +0 -6
- package/dist/chunk-VGSH52JM.js +0 -1
- package/dist/chunk-VHZ6RL67.js +0 -1
- package/dist/chunk-VQA3X7O3.js +0 -1
- package/dist/chunk-VZCMJRYV.js +0 -1
- package/dist/chunk-W56ZGEQQ.js +0 -2265
- package/dist/chunk-WSDKCQH6.js +0 -6
- package/dist/chunk-X2PFXSU4.js +0 -1
- package/dist/chunk-X5NIAZA4.js +0 -1
- package/dist/chunk-XBMD3FEZ.js +0 -3
- package/dist/chunk-XDVPIGXE.js +0 -2
- package/dist/chunk-XLIJYJ6Q.js +0 -1
- package/dist/chunk-XUHGWIWW.js +0 -4
- package/dist/chunk-Y55T4IIQ.js +0 -7
- package/dist/chunk-Y5CVX5LJ.js +0 -1
- package/dist/chunk-Y6J46XYF.js +0 -3
- package/dist/chunk-YKMINHYY.js +0 -3
- package/dist/chunk-ZDQO6CNY.js +0 -1
- package/dist/chunk-ZGASBRSQ.js +0 -5
- package/dist/chunk-ZGBTO46A.js +0 -1
- package/dist/chunk-ZJOX5HW4.js +0 -22
- package/dist/chunk-ZOOT3GBY.js +0 -5
- package/dist/command-json-schema-F5XF7XHL.js +0 -1
- package/dist/conf-store-5CBLWTOC.js +0 -1
- package/dist/custom-oclif-loader-UDVUFKMD.js +0 -1
- package/dist/deprecations-EOHPSTCS.js +0 -1
- package/dist/dist-RNV3GFZ7.js +0 -1
- package/dist/dist-ZFKWJVNB.js +0 -1
- package/dist/environment-O7ECODHU.js +0 -1
- package/dist/environments-4FLRZW4P.js +0 -1
- package/dist/error-JY2ADS6S.js +0 -1
- package/dist/error-handler-4GCXKC6I.js +0 -1
- package/dist/fs-XS5YF34R.js +0 -1
- package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
- package/dist/is-global-27MUENOK.js +0 -1
- package/dist/json-error-S5XFS3UX.js +0 -1
- package/dist/latest-version-LDWU5F7A.js +0 -49
- package/dist/lib-PJHT4MKY.js +0 -1
- package/dist/lib-VKSQ65BQ.js +0 -1
- package/dist/lib-YEZOHXF3.js +0 -1
- package/dist/metadata-2YJBAKR7.js +0 -1
- package/dist/node-package-manager-B3OW3PFQ.js +0 -1
- package/dist/notifications-system-BWTDYBG2.js +0 -1
- package/dist/os-F6QKJCFW.js +0 -1
- package/dist/output-BRIPK7UC.js +0 -1
- package/dist/system-466QKFDI.js +0 -1
- package/dist/ui-VJTNGCS6.js +0 -1
- package/dist/upgrade-VHVJLXKX.js +0 -1
- package/dist/version-FETZRLZO.js +0 -1
- package/dist/version-T4XXTJMB.js +0 -1
- package/dist/workerd-32DMKLMN.js +0 -18
- /package/dist/{chunk-YLQ3LNNY.js → chunk-2S3FHQFS.js} +0 -0
- /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as De,g as x}from"./chunk-VKWPEFWQ.js";x();x();x();x();var k={};De(k,{BRAND:()=>ft,DIRTY:()=>U,EMPTY_PATH:()=>Be,INVALID:()=>p,NEVER:()=>Gt,OK:()=>w,ParseStatus:()=>b,Schema:()=>g,ZodAny:()=>D,ZodArray:()=>V,ZodBigInt:()=>B,ZodBoolean:()=>W,ZodBranded:()=>he,ZodCatch:()=>re,ZodDate:()=>q,ZodDefault:()=>te,ZodDiscriminatedUnion:()=>ge,ZodEffects:()=>j,ZodEnum:()=>K,ZodError:()=>T,ZodFirstPartyTypeKind:()=>m,ZodFunction:()=>ve,ZodIntersection:()=>G,ZodIssueCode:()=>c,ZodLazy:()=>Q,ZodLiteral:()=>X,ZodMap:()=>de,ZodNaN:()=>le,ZodNativeEnum:()=>ee,ZodNever:()=>E,ZodNull:()=>Y,ZodNullable:()=>I,ZodNumber:()=>F,ZodObject:()=>O,ZodOptional:()=>S,ZodParsedType:()=>u,ZodPipeline:()=>pe,ZodPromise:()=>L,ZodReadonly:()=>se,ZodRecord:()=>_e,ZodSchema:()=>g,ZodSet:()=>ue,ZodString:()=>z,ZodSymbol:()=>oe,ZodTransformer:()=>j,ZodTuple:()=>N,ZodType:()=>g,ZodUndefined:()=>J,ZodUnion:()=>H,ZodUnknown:()=>M,ZodVoid:()=>ce,addIssueToContext:()=>d,any:()=>kt,array:()=>Ot,bigint:()=>yt,boolean:()=>Ve,coerce:()=>Ht,custom:()=>Ze,date:()=>gt,datetimeRegex:()=>Ne,defaultErrorMap:()=>Z,discriminatedUnion:()=>jt,effect:()=>Lt,enum:()=>Pt,function:()=>$t,getErrorMap:()=>ne,getParsedType:()=>R,instanceof:()=>pt,intersection:()=>Et,isAborted:()=>me,isAsync:()=>ae,isDirty:()=>ye,isValid:()=>P,late:()=>ht,lazy:()=>Mt,literal:()=>Vt,makeIssue:()=>fe,map:()=>It,nan:()=>mt,nativeEnum:()=>zt,never:()=>wt,null:()=>xt,nullable:()=>Ft,number:()=>Me,object:()=>Ct,objectUtil:()=>ke,oboolean:()=>Yt,onumber:()=>Jt,optional:()=>Ut,ostring:()=>qt,pipeline:()=>Wt,preprocess:()=>Bt,promise:()=>Dt,quotelessJson:()=>Le,record:()=>Nt,set:()=>Zt,setErrorMap:()=>Fe,strictObject:()=>St,string:()=>$e,symbol:()=>_t,transformer:()=>Lt,tuple:()=>Rt,undefined:()=>vt,union:()=>At,unknown:()=>bt,util:()=>v,void:()=>Tt});x();x();x();x();x();var v;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let a={};for(let i of n)a[i]=i;return a},r.getValidEnumValues=n=>{let a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(let o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(let i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var ke;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ke||(ke={}));var u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),R=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}};var c=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Le=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),T=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,l=0;for(;l<i.path.length;){let f=i.path[l],_=l===i.path.length-1;if(f==="_errors"){_&&o._errors.push(t(i)),l++;continue}Object.prototype.hasOwnProperty.call(o,f)||(f==="__proto__"?Object.defineProperty(o,f,{value:{_errors:[]},writable:!0,enumerable:!0,configurable:!0}):o[f]={_errors:[]}),o=o[f],_&&o._errors.push(t(i)),l++}}};return n(this),s}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,v.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t=Object.create(null),s=[];for(let n of this.issues)if(n.path.length>0){let a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};T.create=r=>new T(r);var Ue=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,v.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:v.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(r)}return{message:t}},Z=Ue;var Se=Z;function Fe(r){Se=r}function ne(){return Se}x();var fe=r=>{let{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="",l=s.filter(f=>!!f).slice().reverse();for(let f of l)o=f(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},Be=[];function d(r,e){let t=ne(),s=fe({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Z?void 0:Z].filter(n=>!!n)});r.common.issues.push(s)}var b=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let s=[];for(let n of t){if(n.status==="aborted")return p;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){let s=[];for(let n of t){let a=await n.key,i=await n.value;s.push({key:a,value:i})}return r.mergeObjectSync(e,s)}static mergeObjectSync(e,t){let s={};for(let n of t){let{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return p;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}},p=Object.freeze({status:"aborted"}),U=r=>({status:"dirty",value:r}),w=r=>({status:"valid",value:r}),me=r=>r.status==="aborted",ye=r=>r.status==="dirty",P=r=>r.status==="valid",ae=r=>typeof Promise<"u"&&r instanceof Promise;x();x();var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));var A=class{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ae=(r,e)=>{if(P(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new T(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{let{message:l}=r;return i.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??s??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:n}}var g=class{get description(){return this._def.description}_getType(e){return R(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ae(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){let s={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},n=this._parseSync({data:e,path:s.path,parent:s});return Ae(s,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return P(s)?{value:s.value}:{issues:t.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>P(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){let s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(ae(n)?n:Promise.resolve(n));return Ae(s,a)}refine(e,t){let s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{let i=e(n),o=()=>a.addIssue({code:c.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new j({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return S.create(this,this._def)}nullable(){return I.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return V.create(this)}promise(){return L.create(this,this._def)}or(e){return H.create([this,e],this._def)}and(e){return G.create(this,e,this._def)}transform(e){return new j({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new te({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new he({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new re({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pe.create(this,e)}readonly(){return se.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},We=/^c[^\s-]{8,}$/i,qe=/^[0-9a-z]+$/,Je=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ye=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,He=/^[a-z0-9_-]{21}$/i,Ge=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ke="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",be,et=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,st=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,at=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ee="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",it=new RegExp(`^${Ee}$`);function Re(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ot(r){return new RegExp(`^${Re(r)}$`)}function Ne(r){let e=`${Ee}T${Re(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ct(r,e){return!!((e==="v4"||!e)&&et.test(r)||(e==="v6"||!e)&&rt.test(r))}function dt(r,e){if(!Ge.test(r))return!1;try{let[t]=r.split(".");if(!t)return!1;let s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function ut(r,e){return!!((e==="v4"||!e)&&tt.test(r)||(e==="v6"||!e)&&st.test(r))}var z=class r extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),p}let s=new b,n;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){let i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?d(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&d(n,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")Xe.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"email",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")be||(be=new RegExp(Ke,"u")),be.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"emoji",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Ye.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"uuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")He.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"nanoid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")We.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")qe.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid2",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Je.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ulid",code:c.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),d(n,{validation:"url",code:c.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"regex",code:c.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ne(a).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?it.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?ot(a).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:c.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?Qe.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"duration",code:c.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?ct(e.data,a.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ip",code:c.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?dt(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"jwt",code:c.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?ut(e.data,a.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cidr",code:c.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?nt.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64",code:c.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?at.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64url",code:c.invalid_string,message:a.message}),s.dirty()):v.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:c.invalid_string,...h.errToObj(s)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};z.create=r=>new z({checks:[],typeName:m.ZodString,coerce:r?.coerce??!1,...y(r)});function lt(r,e){let t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=Number.parseInt(r.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}var F=class r extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){let a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),p}let s,n=new b;for(let a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?lt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),d(s,{code:c.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};F.create=r=>new F({checks:[],typeName:m.ZodNumber,coerce:r?.coerce||!1,...y(r)});var B=class r extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let s,n=new b;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),d(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};B.create=r=>new B({checks:[],typeName:m.ZodBigInt,coerce:r?.coerce??!1,...y(r)});var W=class extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let s=this._getOrReturnCtx(e);return d(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),p}return w(e.data)}};W.create=r=>new W({typeName:m.ZodBoolean,coerce:r?.coerce||!1,...y(r)});var q=class r extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),p}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_date}),p}let s=new b,n;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):v.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};q.create=r=>new q({checks:[],coerce:r?.coerce||!1,typeName:m.ZodDate,...y(r)});var oe=class extends g{_parse(e){if(this._getType(e)!==u.symbol){let s=this._getOrReturnCtx(e);return d(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),p}return w(e.data)}};oe.create=r=>new oe({typeName:m.ZodSymbol,...y(r)});var J=class extends g{_parse(e){if(this._getType(e)!==u.undefined){let s=this._getOrReturnCtx(e);return d(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),p}return w(e.data)}};J.create=r=>new J({typeName:m.ZodUndefined,...y(r)});var Y=class extends g{_parse(e){if(this._getType(e)!==u.null){let s=this._getOrReturnCtx(e);return d(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),p}return w(e.data)}};Y.create=r=>new Y({typeName:m.ZodNull,...y(r)});var D=class extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}};D.create=r=>new D({typeName:m.ZodAny,...y(r)});var M=class extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}};M.create=r=>new M({typeName:m.ZodUnknown,...y(r)});var E=class extends g{_parse(e){let t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),p}};E.create=r=>new E({typeName:m.ZodNever,...y(r)});var ce=class extends g{_parse(e){if(this._getType(e)!==u.undefined){let s=this._getOrReturnCtx(e);return d(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),p}return w(e.data)}};ce.create=r=>new ce({typeName:m.ZodVoid,...y(r)});var V=class r extends g{_parse(e){let{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),p;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(d(t,{code:i?c.too_big:c.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(d(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new A(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));let a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}};V.create=(r,e)=>new V({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function ie(r){if(r instanceof O){let e={};for(let t in r.shape){let s=r.shape[t];e[t]=S.create(ie(s))}return new O({...r._def,shape:()=>e})}else return r instanceof V?new V({...r._def,type:ie(r.element)}):r instanceof S?S.create(ie(r.unwrap())):r instanceof I?I.create(ie(r.unwrap())):r instanceof N?N.create(r.items.map(e=>ie(e))):r}var O=class r extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){let f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),p}let{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof E&&this._def.unknownKeys==="strip"))for(let f in n.data)i.includes(f)||o.push(f);let l=[];for(let f of i){let _=a[f],C=n.data[f];l.push({key:{status:"valid",value:f},value:_._parse(new A(n,C,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof E){let f=this._def.unknownKeys;if(f==="passthrough")for(let _ of o)l.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(f==="strict")o.length>0&&(d(n,{code:c.unrecognized_keys,keys:o}),s.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let _ of o){let C=n.data[_];l.push({key:{status:"valid",value:_},value:f._parse(new A(n,C,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let f=[];for(let _ of l){let C=await _.key,Ce=await _.value;f.push({key:C,value:Ce,alwaysSet:_.alwaysSet})}return f}).then(f=>b.mergeObjectSync(s,f)):b.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{let n=this._def.errorMap?.(t,s).message??s.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let s of v.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let s of v.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new r({...this._def,shape:()=>t})}deepPartial(){return ie(this)}partial(e){let t={};for(let s of v.objectKeys(this.shape)){let n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let s of v.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof S;)a=a._def.innerType;t[s]=a}return new r({...this._def,shape:()=>t})}keyof(){return Ie(v.objectKeys(this.shape))}};O.create=(r,e)=>new O({shape:()=>r,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});O.strictCreate=(r,e)=>new O({shape:()=>r,unknownKeys:"strict",catchall:E.create(),typeName:m.ZodObject,...y(e)});O.lazycreate=(r,e)=>new O({shape:r,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});var H=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(let o of a)if(o.result.status==="valid")return o.result;for(let o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let i=a.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(s.map(async a=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a,i=[];for(let l of s){let f={...t,common:{...t.common,issues:[]},parent:null},_=l._parseSync({data:t.data,path:t.path,parent:f});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(l=>new T(l));return d(t,{code:c.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}};H.create=(r,e)=>new H({options:r,typeName:m.ZodUnion,...y(e)});var $=r=>r instanceof Q?$(r.schema):r instanceof j?$(r.innerType()):r instanceof X?[r.value]:r instanceof K?r.options:r instanceof ee?v.objectValues(r.enum):r instanceof te?$(r._def.innerType):r instanceof J?[void 0]:r instanceof Y?[null]:r instanceof S?[void 0,...$(r.unwrap())]:r instanceof I?[null,...$(r.unwrap())]:r instanceof he||r instanceof se?$(r.unwrap()):r instanceof re?$(r._def.innerType):[],ge=class r extends g{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return d(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),p;let s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(d(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){let n=new Map;for(let a of t){let i=$(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new r({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(s)})}};function we(r,e){let t=R(r),s=R(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){let n=v.objectKeys(e),a=v.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};Object.prototype.hasOwnProperty.call(i,"__proto__")&&delete i.__proto__;for(let o of a){if(o==="__proto__")continue;let l=we(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<r.length;a++){let i=r[a],o=e[a],l=we(i,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var G=class extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(me(a)||me(i))return p;let o=we(a.value,i.value);return o.valid?((ye(a)||ye(i))&&t.dirty(),{status:t.value,value:o.data}):(d(s,{code:c.invalid_intersection_types}),p)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};G.create=(r,e,t)=>new G({left:r,right:e,typeName:m.ZodIntersection,...y(t)});var N=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return d(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),p;if(s.data.length<this._def.items.length)return d(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&s.data.length>this._def.items.length&&(d(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...s.data].map((i,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new A(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};N.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:r,typeName:m.ZodTuple,rest:null,...y(e)})};var _e=class r extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.object)return d(s,{code:c.invalid_type,expected:u.object,received:s.parsedType}),p;let n=[],a=this._def.keyType,i=this._def.valueType;for(let o in s.data)n.push({key:a._parse(new A(s,o,s.path,o)),value:i._parse(new A(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof g?new r({keyType:e,valueType:t,typeName:m.ZodRecord,...y(s)}):new r({keyType:z.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}},de=class extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return d(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),p;let n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,l],f)=>({key:n._parse(new A(s,o,s.path,[f,"key"])),value:a._parse(new A(s,l,s.path,[f,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of i){let f=await l.key,_=await l.value;if(f.status==="aborted"||_.status==="aborted")return p;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(f.value,_.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let l of i){let f=l.key,_=l.value;if(f.status==="aborted"||_.status==="aborted")return p;(f.status==="dirty"||_.status==="dirty")&&t.dirty(),o.set(f.value,_.value)}return{status:t.value,value:o}}}};de.create=(r,e,t)=>new de({valueType:e,keyType:r,typeName:m.ZodMap,...y(t)});var ue=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return d(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),p;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(d(s,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(d(s,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let a=this._def.valueType;function i(l){let f=new Set;for(let _ of l){if(_.status==="aborted")return p;_.status==="dirty"&&t.dirty(),f.add(_.value)}return{status:t.value,value:f}}let o=[...s.data.values()].map((l,f)=>a._parse(new A(s,l,s.path,f)));return s.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};ue.create=(r,e)=>new ue({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});var ve=class r extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return d(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),p;function s(o,l){return fe({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ne(),Z].filter(f=>!!f),issueData:{code:c.invalid_arguments,argumentsError:l}})}function n(o,l){return fe({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ne(),Z].filter(f=>!!f),issueData:{code:c.invalid_return_type,returnTypeError:l}})}let a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof L){let o=this;return w(async function(...l){let f=new T([]),_=await o._def.args.parseAsync(l,a).catch(xe=>{throw f.addIssue(s(l,xe)),f}),C=await Reflect.apply(i,this,_);return await o._def.returns._def.type.parseAsync(C,a).catch(xe=>{throw f.addIssue(n(C,xe)),f})})}else{let o=this;return w(function(...l){let f=o._def.args.safeParse(l,a);if(!f.success)throw new T([s(l,f.error)]);let _=Reflect.apply(i,this,f.data),C=o._def.returns.safeParse(_,a);if(!C.success)throw new T([n(_,C.error)]);return C.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:N.create(e).rest(M.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new r({args:e||N.create([]).rest(M.create()),returns:t||M.create(),typeName:m.ZodFunction,...y(s)})}},Q=class extends g{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Q.create=(r,e)=>new Q({getter:r,typeName:m.ZodLazy,...y(e)});var X=class extends g{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}};X.create=(r,e)=>new X({value:r,typeName:m.ZodLiteral,...y(e)});function Ie(r,e){return new K({values:r,typeName:m.ZodEnum,...y(e)})}var K=class r extends g{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),s=this._def.values;return d(t,{expected:v.joinValues(s),received:t.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),s=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:s}),p}return w(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};K.create=Ie;var ee=class extends g{_parse(e){let t=v.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){let n=v.objectValues(t);return d(s,{expected:v.joinValues(n),received:s.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=v.objectValues(t);return d(s,{received:s.data,code:c.invalid_enum_value,options:n}),p}return w(e.data)}get enum(){return this._def.values}};ee.create=(r,e)=>new ee({values:r,typeName:m.ZodNativeEnum,...y(e)});var L=class extends g{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),p;let s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return w(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};L.create=(r,e)=>new L({type:r,typeName:m.ZodPromise,...y(e)});var j=class extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{d(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;let l=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return l.status==="aborted"?p:l.status==="dirty"?U(l.value):t.value==="dirty"?U(l.value):l});{if(t.value==="aborted")return p;let o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?p:o.status==="dirty"?U(o.value):t.value==="dirty"?U(o.value):o}}if(n.type==="refinement"){let i=o=>{let l=n.refinement(o,a);if(s.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!P(i))return p;let o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>P(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):p);v.assertNever(n)}};j.create=(r,e,t)=>new j({schema:r,typeName:m.ZodEffects,effect:e,...y(t)});j.createWithPreprocess=(r,e,t)=>new j({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...y(t)});var S=class extends g{_parse(e){return this._getType(e)===u.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};S.create=(r,e)=>new S({innerType:r,typeName:m.ZodOptional,...y(e)});var I=class extends g{_parse(e){return this._getType(e)===u.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};I.create=(r,e)=>new I({innerType:r,typeName:m.ZodNullable,...y(e)});var te=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};te.create=(r,e)=>new te({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});var re=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return ae(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};re.create=(r,e)=>new re({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});var le=class extends g{_parse(e){if(this._getType(e)!==u.nan){let s=this._getOrReturnCtx(e);return d(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),p}return{status:"valid",value:e.data}}};le.create=r=>new le({typeName:m.ZodNaN,...y(r)});var ft=Symbol("zod_brand"),he=class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}},pe=class r extends g{_parse(e){let{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),U(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?p:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new r({in:e,out:t,typeName:m.ZodPipeline})}},se=class extends g{_parse(e){let t=this._def.innerType._parse(e),s=n=>(P(n)&&(n.value=Object.freeze(n.value)),n);return ae(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}};se.create=(r,e)=>new se({innerType:r,typeName:m.ZodReadonly,...y(e)});function je(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function Ze(r,e={},t){return r?D.create().superRefine((s,n)=>{let a=r(s);if(a instanceof Promise)return a.then(i=>{if(!i){let o=je(e,s),l=o.fatal??t??!0;n.addIssue({code:"custom",...o,fatal:l})}});if(!a){let i=je(e,s),o=i.fatal??t??!0;n.addIssue({code:"custom",...i,fatal:o})}}):D.create()}var ht={object:O.lazycreate},m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));var pt=(r,e={message:`Input not instance of ${r.name}`})=>Ze(t=>t instanceof r,e),$e=z.create,Me=F.create,mt=le.create,yt=B.create,Ve=W.create,gt=q.create,_t=oe.create,vt=J.create,xt=Y.create,kt=D.create,bt=M.create,wt=E.create,Tt=ce.create,Ot=V.create,Ct=O.create,St=O.strictCreate,At=H.create,jt=ge.create,Et=G.create,Rt=N.create,Nt=_e.create,It=de.create,Zt=ue.create,$t=ve.create,Mt=Q.create,Vt=X.create,Pt=K.create,zt=ee.create,Dt=L.create,Lt=j.create,Ut=S.create,Ft=I.create,Bt=j.createWithPreprocess,Wt=pe.create,qt=()=>$e().optional(),Jt=()=>Me().optional(),Yt=()=>Ve().optional(),Ht={string:(r=>z.create({...r,coerce:!0})),number:(r=>F.create({...r,coerce:!0})),boolean:(r=>W.create({...r,coerce:!0})),bigint:(r=>B.create({...r,coerce:!0})),date:(r=>q.create({...r,coerce:!0}))};var Gt=p;var Mr=k.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/),Te=k.string().datetime({precision:0}).regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/).describe("A UTC ISO 8601 instant with whole seconds and the Z timezone marker.");function Pe(r){return r.toISOString().replace(/\.\d{3}Z$/,"Z")}var Qt=k.object({type:k.literal("diagnostic"),timestamp:Te,level:k.enum(["debug","info","warning","error"]),message:k.string(),code:k.string().min(1).optional().describe("A stable diagnostic code, included only when known.")}).strict(),Xt=k.object({type:k.literal("progress"),timestamp:Te,status:k.enum(["started","updated","retrying","completed","failed"]),operation:k.string(),message:k.string().optional(),current:k.number().int().nonnegative().optional(),total:k.number().int().nonnegative().optional()}).strict(),Lr=k.discriminatedUnion("type",[Qt,Xt]);function ze(r={}){let e=r.sink??(()=>{}),t=r.clock??(()=>new Date);return{emit(s,n){let a=Pe(t()),i={...s,timestamp:a};n===void 0?e(i):e(i,n)}}}import{AsyncLocalStorage as Kt}from"node:async_hooks";function qr(r,e){return Oe().run({channel:ze(r),outputMode:r.outputMode??"text"},e)}function Jr(r,e){Oe().getStore()?.channel.emit(r,e)}function Yr(){return Oe().getStore()?.outputMode}function Oe(){let r=Symbol.for("command-event-storage"),e=globalThis;return e[r]??=new Kt,e[r]}export{m as a,k as b,Mr as c,Te as d,Pe as e,Qt as f,Xt as g,Lr as h,qr as i,Jr as j,Yr as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as d,v as z,w as y}from"./chunk-JGLLABZR.js";import{k as l}from"./chunk-OJOF6IYG.js";import{b as n}from"./chunk-XEZPN5TR.js";import{b as g,c as f,d as h}from"./chunk-DMOLPSXF.js";import{F as c}from"./chunk-2KUM2RU4.js";import{a as u}from"./chunk-LG3KEHGD.js";import{zb as p}from"./chunk-ZMOW2YZ4.js";import{b as o}from"./chunk-3PYDIBTX.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static jsonOutputSchema=r;static description=this.descriptionForHelp();static flags={...g,...f};async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-HVUMVDUG.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();async function l(e){await i.addPublicMetadata(()=>e)}t();function c(e,n){return`${e} ${e===1?n:`${n}s`}`}function f(e){return e.length===1?String(e[0]):`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function u(e){return`${c(e.withFindings,"check")} with findings`}function s(e,n){let d=e.passed-n;return[d>0?`${d} passed`:void 0,n>0?`${n} with no deterministic findings`:void 0,e.notApplicable>0?`${e.notApplicable} not applicable`:void 0,e.unresolved>0?`${e.unresolved} unresolved`:void 0].filter(a=>a!==void 0)}export{l as a,c as b,f as c,u as d,s as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./chunk-VKWPEFWQ.js";r();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as s}from"./chunk-Z5QEXS6F.js";import{d as p}from"./chunk-JGLLABZR.js";import{Z as i}from"./chunk-YKDRUAY3.js";import{i as a}from"./chunk-TD6JBHUS.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();async function x(t,e){return i(e,t.apiKey,await p(t))}function S(t){let{organization:e,remoteApp:m,storeFqdn:u,version:o}=t,r=[`Organization: ${e.businessName}`,`App: ${m.title}`,`Store: ${u}`];return o&&r.push(`API version: ${o}`),r}function y(t,e){if(s(t)&&e.storeType!=="APP_DEVELOPMENT")throw new a("Mutations can only be executed on dev stores.")}export{x as a,S as b,y as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk-ALINJ6J2.js";import{a as n}from"./chunk-ASKBYEO7.js";import{Q as g}from"./chunk-HMPRWNGG.js";import{J as s,K as c,L as f,Q as m,x as p}from"./chunk-YYWSHRO2.js";import{b as r,c as e}from"./chunk-DMOLPSXF.js";import{b as F}from"./chunk-AE3IQG7S.js";import{e as A,g as a}from"./chunk-VKWPEFWQ.js";a();var u=A(F(),1);var{config:U,...w}=n,o=class d extends l{static summary="Activate an app configuration.";static descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";static jsonOutputSchema=s;static description=this.descriptionForHelp();static usage="app config use [config] [flags]";static flags={...r,...e,...w};static args={config:u.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};async run(){let{flags:t,args:i}=await this.parse(d),h=p(t.path)?.configFile??null,{app:y}=await g({directory:t.path,userProvidedConfigName:i.config});await m(t.path);let C=await f({directory:t.path,configName:i.config,reset:t.reset,previousConfigFile:h});return await c(C,t.path,t.json?"json":"text"),{app:y}}};export{o as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as W,c as B,d as T}from"./chunk-T4ZOTYOY.js";import{l as S,n as O}from"./chunk-3FZ4LE6A.js";import{R as v,a as L}from"./chunk-2KUM2RU4.js";import{f as y}from"./chunk-I3WRA2LH.js";import{i as u,l as A}from"./chunk-TD6JBHUS.js";import{Eb as d,Sa as w,Ta as i,Va as D,_a as F,la as x,ob as V,ta as _,tb as c,vb as s}from"./chunk-ZMOW2YZ4.js";import{c as o,h as k}from"./chunk-IWTNUJGY.js";import{a as H}from"./chunk-O472FAYX.js";import{e as z,g as f}from"./chunk-VKWPEFWQ.js";f();f();function b(e,n){try{return JSON.parse(e)}catch(t){let a=t instanceof Error?t.message:String(t),r=n?` from ${n}`:"";throw new u(`Failed to parse JSON${r}.
|
|
2
|
+
${a}`)}}var l=z(H(),1),C="yarn.lock",$="package-lock.json",N="pnpm-lock.yaml",j="bun.lockb",J="bun.lock",I="pnpm-workspace.yaml",be=[C,N,$,j,J],Me={yarn:[C],npm:[$],pnpm:[N],bun:[j,J],homebrew:[],unknown:[]},R=["yarn","npm","pnpm","bun","homebrew","unknown"],M=class extends u{constructor(){super("Unknown package manager")}},h=class extends u{constructor(n){super(s`The directory ${c.path(n)} doesn't have a package.json.`)}},P=class extends A{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${c.path(n)}`)}};function U(e=process.env){let n=e.npm_config_user_agent;return["yarn","pnpm","bun","npm"].find(t=>n?.includes(t))??"unknown"}function Y(e){return i(o(e,j))||i(o(e,J))}function q(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function Q(e,n,...t){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...t]};case"pnpm":return{command:"pnpm",args:["exec",n,...t]};case"yarn":return{command:"yarn",args:["run",n,...t]};case"bun":return{command:"bun",args:["x",n,...t]}}}async function E(e){let n=e;for(d(s`Looking for a lockfile in ${c.path(n)}...`);;){if(i(o(n,C)))return"yarn";if(i(o(n,N))||i(o(n,I)))return"pnpm";if(Y(n))return"bun";if(i(o(n,$)))return"npm";let a=k(n);if(a===n)break;n=a}let t=U();return t!=="unknown"?t:"npm"}async function Pe(e,n,...t){let a=q(await E(e));return Q(a,n,...t)}async function Ce(e){let n=await D(o(e.directory,"**/package.json"),{ignore:[o(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),t=new L;try{await Promise.all(n.map(async a=>{let r=k(a);await X({directory:r,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:t.signal,args:[]})}))}catch(a){throw t.abort(),a}}async function X(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},t=["install"];e.args&&(t=t.concat(e.args)),await y("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,t,n)})}async function $e(e){return(await g(e)).name}async function Ne(e){return(await g(e)).version}async function Z(e){let n=await g(e),t=n.dependencies??{},a=n.devDependencies??{};return{...t,...a}}async function je(e){let n=o(e,"package.json"),t=await g(n),a=o(e,I);return!!t.workspaces||w(a)}async function Je(e,n,{cacheExpiryInHours:t=0,versionRange:a}={}){let r;try{let p=e==="@shopify/cli"?await W():void 0,K=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ce(e,a,p)),G=p?B(p,a):`npm-package-${e}${a?`@${a}`:""}`;r=await S(G,K,t*3600*1e3)}catch{return}if(r&&(!a||(0,l.satisfies)(r,a))&&new l.SemVer(n).compare(r)<0)return r}function _e(e,n){let t=`npm-package-${e}`,a=e==="@shopify/cli"?T():O(t)?.value;if(a&&new l.SemVer(n).compare(a)<0)return a}function De(e,n){return(0,l.satisfies)(e,n)}async function g(e){if(!await w(e))throw new h(k(e));return b(await x(e),e)}async function ee(e,n){d(s`Adding the following dependencies if needed:
|
|
3
|
+
${c.json(e)}
|
|
4
|
+
With options:
|
|
5
|
+
${c.json(n)}
|
|
6
|
+
`);let t=o(n.directory,"package.json");if(!await w(t))throw new h(n.directory);let a=Object.keys(await Z(t)),r=e.filter(p=>!a.includes(p.name));r.length!==0&&await ne(r,n)}async function ne(e,n){let t=e.map(a=>a.version?`${a.name}@${a.version}`:a.name);switch(n.stdout?.write(`Installing ${t.join(" ")} with ${n.packageManager}`),n.packageManager){case"npm":for(let a of t)await m(n,te(a,n.type));break;case"yarn":await m(n,ae(t,n.type,!!n.addToRootDirectory));break;case"pnpm":await m(n,re(t,n.type,!!n.addToRootDirectory));break;case"bun":await m(n,oe(t,n.type)),await m(n,["install"]);break;case"homebrew":throw new u("Homebrew can't be used to install project dependencies. Use npm, yarn, pnpm, or bun.");case"unknown":throw new M}}async function m(e,n){return y("cmd_all_timing_network_ms")(async()=>v(e.packageManager,n,{cwd:e.directory,stdout:e.stdout,stderr:e.stderr,signal:e.signal}))}async function Fe(e,n){await ee(e.map(t=>({name:t,version:void 0})),n)}function te(e,n){let a=["install",e,{dev:"--save-dev",peer:"--save-peer",prod:"--save-prod"}[n]];return e.match(/@\d/g)&&a.push("--save-exact"),a}function ae(e,n,t=!1){let a={dev:"--dev",peer:"--peer",prod:"--prod"};return["add",...t?["-W"]:[],...e,a[n]]}function re(e,n,t=!1){let a={dev:"--save-dev",peer:"--save-peer",prod:"--save-prod"};return["add",...t?["-w"]:[],...e,a[n]]}function oe(e,n){let a={dev:"--development",peer:"--optional"}[n];return["add",...e,...a?[a]:[]]}async function Le(e){let n=await F("package.json",{cwd:e,type:"file"});if(n){let t=b(await x(n),n);return{path:n,content:t}}else throw new P(e)}async function Se(e,n){let t=await E(e),a=await g(o(e,"package.json")),r=t==="yarn"?"resolutions":"overrides";a[r]={...a[r],...n},await se(e,a)}async function ce(e,n,t){return d(s`Getting the latest version of NPM package: ${c.raw(e)}`),y("cmd_all_timing_network_ms")(async()=>{let{default:a}=await import("./latest-version-75YEFEMK.js"),r={...n?{version:n}:{},...t?{registryUrl:t}:{}};return n||t?a(e,r):a(e)})}async function se(e,n){d(s`JSON-encoding and writing content to package.json at ${c.path(e)}...`);let t=o(e,"package.json");await _(t,JSON.stringify(n,null,2))}function Oe(e,n=process.env){if(e&&R.includes(e))return e;let t=U(n);if(t!=="unknown")return t;let a=V();return a!=="unknown"?a:"npm"}export{C as a,$ as b,N as c,j as d,I as e,be as f,Me as g,R as h,M as i,h as j,P as k,U as l,E as m,Pe as n,Ce as o,X as p,$e as q,Ne as r,Z as s,je as t,Je as u,_e as v,De as w,g as x,ee as y,ne as z,Fe as A,Le as B,Se as C,se as D,Oe as E};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import{a as I,b as M}from"./chunk-ZNEPRGFY.js";import{a as A}from"./chunk-ASKBYEO7.js";import{e as u}from"./chunk-HMPRWNGG.js";import{f as p}from"./chunk-YKDRUAY3.js";import{b as O,c as y,f as E}from"./chunk-DMOLPSXF.js";import{a as c}from"./chunk-LG3KEHGD.js";import{b as t}from"./chunk-3PYDIBTX.js";import{b as w}from"./chunk-AE3IQG7S.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();var k=["HONOR_BILLING_PRICE","PLAN_PRICE"],W=["OPT_OUT","WHEN_REQUIRED"],D=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=H(w(),1);var m={...O,...A,...y},K={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},B={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},et={...m,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...D]})()},it={...m,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:E(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...K},q={...m,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},nt={...q,...B};n();var l=t.string().regex(/^gid:\/\/shopify\/AppSubscriptionMigrationOperation\/[^/]+$/).describe("The Shopify AppSubscriptionMigrationOperation GID."),F=t.string().regex(/^gid:\/\/shopify\/Shop\/\d+$/).describe("The Shopify Shop GID."),o=t.object({gid:l,status:t.string().min(1).describe("Upstream status: RUNNING, COMPLETED, FAILED, or CANCELED."),total:t.number().int().nonnegative(),results:t.array(t.object({shopGid:F,code:t.string().min(1).describe("The upstream per-shop migration result code.")}).strict())}).strict(),g=t.object({message:t.string(),fieldPath:t.array(t.string()).nullable()}).strict(),C=t.discriminatedUnion("status",[t.object({status:t.literal("success"),operationGid:l,operation:o}).strict(),t.object({status:t.literal("failed"),operationGid:l,operation:o.nullable(),error:t.union([I.extend({details:t.object({userErrors:t.array(g)}).strict()}),M])}).strict()]),pt=c({name:"MigrationCancellationResult",schema:t.object({status:t.enum(["success","partial"]),operations:t.array(C)}).strict(),definitions:{MigrationCancellationOutcome:C,MigrationOperation:o,MigrationUserError:g}}),b=t.string().datetime().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/),Y=t.string().date(),N=t.object({amount:t.string().regex(/^-?\d+(?:\.\d+)?$/),currencyCode:t.string().regex(/^[A-Z]{3}$/)}).strict(),R=t.object({kind:t.string().describe("Known values: NONE, OPT_OUT, WHEN_REQUIRED."),optOutDeadline:b.nullable(),sentAt:b.nullable()}).strict(),P=t.object({shopGid:F,status:t.string().describe("Known values: UNSCHEDULED, SCHEDULED, MIGRATED."),manualSubscriptionName:t.string().nullable(),manualSubscriptionPrice:N.nullable(),manualSubscriptionInterval:t.string().describe("Known values: EVERY_30_DAYS, ANNUAL."),targetPlanHandle:t.string().nullable(),notification:R.nullable(),priceBehavior:t.string().nullable().describe("Known values: HONOR_BILLING_PRICE, PLAN_PRICE."),effectiveDate:t.union([Y,b]).nullable().describe("The upstream calendar date or whole-second UTC instant; date-only values retain their format."),lastFailureReason:t.string().nullable().describe("Known values: SUPERSEDED, SCHEDULING_FAILED.")}).strict().describe("All subscription projection fields are present; unavailable values are null."),ut=c({name:"MigrationListResult",schema:t.object({subscriptions:t.array(P).describe("The complete list across every fetched page.")}).strict(),definitions:{MigratableSubscription:P,MigratableSubscriptionPrice:N,MigratableSubscriptionNotification:R}}),T=t.object({batchIndex:t.number().int().nonnegative(),batchPayloadDigest:t.string().min(1),operation:o}).strict(),v=t.discriminatedUnion("type",[t.object({type:t.literal("submission"),batchIndex:t.number().int().nonnegative(),userErrors:t.array(g)}).strict(),t.object({type:t.literal("operations"),operationGids:t.array(l)}).strict()]);function x(){return{clientId:t.string().min(1).describe("The app client ID, not a Shopify GID."),action:t.enum(["schedule","unschedule"]),inputDigest:t.string().min(1),total:t.number().int().nonnegative(),operations:t.array(T)}}var lt=c({name:"MigrationSubmissionResult",schema:t.discriminatedUnion("status",[t.object({status:t.literal("success"),changed:t.boolean(),...x()}).strict(),t.object({status:t.literal("partial"),changed:t.boolean(),...x(),failure:v}).strict(),t.object({status:t.literal("cancelled"),changed:t.literal(!1),action:t.enum(["schedule","unschedule"]),reason:t.string()}).strict()]),definitions:{SubmittedMigrationOperation:T,MigrationOperation:o,MigrationSubmissionFailure:v,MigrationUserError:g}}),gt=c({name:"MigrationStatusResult",schema:t.object({operations:t.array(o)}).strict(),definitions:{MigrationOperation:o}});n();function J(e){return{gid:e.id,status:e.status,total:e.total,results:e.results.edges.map(({node:i})=>({shopGid:i.shopId,code:i.code}))}}function Q(e){return e.map(({message:i,field:a})=>({message:i,fieldPath:a}))}function bt(e){return{shopGid:e.shopId,status:e.status,manualSubscriptionName:e.manualSubscriptionName,manualSubscriptionPrice:e.manualSubscriptionPrice===null?null:{amount:e.manualSubscriptionPrice.amount,currencyCode:e.manualSubscriptionPrice.currencyCode},manualSubscriptionInterval:e.manualSubscriptionInterval,targetPlanHandle:e.targetPlanHandle,notification:e.notification===null?null:{kind:e.notification.kind,optOutDeadline:S(e.notification.optOutDeadline),sentAt:S(e.notification.sentAt)},priceBehavior:e.priceBehavior,effectiveDate:e.effectiveDate===null||/^\d{4}-\d{2}-\d{2}$/.test(e.effectiveDate)?e.effectiveDate:S(e.effectiveDate),lastFailureReason:e.lastFailureReason}}function S(e){return e===null?null:new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function St(e){if(e.status==="cancelled")return e;let i={changed:e.submission.operations.length>0,clientId:e.submission.clientId,action:e.submission.action,inputDigest:e.submission.inputDigest,total:e.submission.total,operations:e.submission.operations.map(({batchIndex:a,batchPayloadDigest:s,operation:f})=>({batchIndex:a,batchPayloadDigest:s,operation:J(f)}))};return e.status==="success"?{status:"success",...i}:{status:"partial",...i,failure:e.failure.type==="submission"?{type:e.failure.type,batchIndex:e.failure.batchIndex,userErrors:Q(e.failure.userErrors)}:{type:e.failure.type,operationGids:e.failure.operationIds}}}n();n();var _=p`
|
|
2
|
+
query MigratableAppSubscriptions(
|
|
3
|
+
$apiKey: String!
|
|
4
|
+
$first: Int!
|
|
5
|
+
$after: String
|
|
6
|
+
$status: AppSubscriptionMigrationStatus
|
|
7
|
+
) {
|
|
8
|
+
migratableAppSubscriptions(apiKey: $apiKey, first: $first, after: $after, status: $status) {
|
|
9
|
+
edges {
|
|
10
|
+
cursor
|
|
11
|
+
node {
|
|
12
|
+
shopId
|
|
13
|
+
status
|
|
14
|
+
manualSubscriptionName
|
|
15
|
+
manualSubscriptionPrice {
|
|
16
|
+
amount
|
|
17
|
+
currencyCode
|
|
18
|
+
}
|
|
19
|
+
manualSubscriptionInterval
|
|
20
|
+
targetPlanHandle
|
|
21
|
+
notification {
|
|
22
|
+
kind
|
|
23
|
+
optOutDeadline
|
|
24
|
+
sentAt
|
|
25
|
+
}
|
|
26
|
+
priceBehavior
|
|
27
|
+
effectiveDate
|
|
28
|
+
lastFailureReason
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
pageInfo {
|
|
32
|
+
hasNextPage
|
|
33
|
+
endCursor
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`,U=p`
|
|
38
|
+
mutation AppSubscriptionMigrationOperationCreate($input: AppSubscriptionMigrationOperationCreateInput!) {
|
|
39
|
+
appSubscriptionMigrationOperationCreate(input: $input) {
|
|
40
|
+
operation {
|
|
41
|
+
id
|
|
42
|
+
status
|
|
43
|
+
total
|
|
44
|
+
results(first: 250) {
|
|
45
|
+
edges {
|
|
46
|
+
node {
|
|
47
|
+
shopId
|
|
48
|
+
code
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
userErrors {
|
|
54
|
+
message
|
|
55
|
+
field
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`,G=p`
|
|
60
|
+
query AppSubscriptionMigrationOperation($apiKey: String!, $id: ID!) {
|
|
61
|
+
appSubscriptionMigrationOperation(apiKey: $apiKey, id: $id) {
|
|
62
|
+
id
|
|
63
|
+
status
|
|
64
|
+
total
|
|
65
|
+
results(first: 250) {
|
|
66
|
+
edges {
|
|
67
|
+
node {
|
|
68
|
+
shopId
|
|
69
|
+
code
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`,L=p`
|
|
76
|
+
mutation AppSubscriptionMigrationOperationCancel($input: AppSubscriptionMigrationOperationCancelInput!) {
|
|
77
|
+
appSubscriptionMigrationOperationCancel(input: $input) {
|
|
78
|
+
operation {
|
|
79
|
+
id
|
|
80
|
+
status
|
|
81
|
+
total
|
|
82
|
+
results(first: 250) {
|
|
83
|
+
edges {
|
|
84
|
+
node {
|
|
85
|
+
shopId
|
|
86
|
+
code
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
userErrors {
|
|
92
|
+
message
|
|
93
|
+
field
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`;function j(e){return e===null?null:{...e,results:{edges:e.results?.edges?.filter(i=>i!==null)??[]}}}function $(e){return{operation:j(e.operation),userErrors:e.userErrors??[]}}async function At({clientId:e,first:i,after:a,status:s}){let d=(await u.getInstance().request(_,{apiKey:e,first:i,after:a,status:s})).migratableAppSubscriptions;return d===null?null:{subscriptions:d.edges?.flatMap(h=>h===null?[]:[h.node])??[],pageInfo:d.pageInfo}}async function Dt({clientId:e,idempotencyKey:i,migrations:a}){let s=await u.getInstance().request(U,{input:{apiKey:e,idempotencyKey:i,migrations:a}});return $(s.appSubscriptionMigrationOperationCreate)}async function Ct({clientId:e,operationId:i}){let a=await u.getInstance().request(G,{apiKey:e,id:i});return j(a.appSubscriptionMigrationOperation)}async function Pt({clientId:e,operationId:i}){let a=await u.getInstance().request(L,{input:{apiKey:e,id:i}});return $(a.appSubscriptionMigrationOperationCancel)}export{k as a,W as b,et as c,it as d,q as e,nt as f,l as g,pt as h,ut as i,lt as j,gt as k,J as l,Q as m,bt as n,St as o,At as p,Dt as q,Ct as r,Pt as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-3C72S6LO.js";import{b as a}from"./chunk-XEZPN5TR.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as oe}from"./chunk-J5ERDFIC.js";import{a as ie,b as ne,q as re}from"./chunk-PDZBKVWL.js";import{$ as te,F as ee}from"./chunk-D2KIGKBI.js";import{a as q,d as X}from"./chunk-335BUVBP.js";import{h as A}from"./chunk-M5VIFG2V.js";import{Sa as Z,la as Y}from"./chunk-JLQRDFR5.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var Ce=/^gid:\/\/shopify\/Shop\/(\d+)$/,ve=/^\d+$/,se=250,De=new Set(ie),Re=new Set(ne);function le(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Be(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),ae(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),fe(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&ae(w)&&fe(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ue(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Ae(i,r),canonicalInput:a,inputDigest:ce(a)}}}function Be(i){let e=i?.trim();if(!e)return;let o=ve.test(e)?e:Ce.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function ae(i){return i!==void 0&&De.has(i)}function fe(i){return Re.has(i)}function ue(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Ae(i,e){let o=[];for(let t=0;t<e.length;t+=se){let n=e.slice(t,t+se),r=ue(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:ce(r)})}return o}function ce(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var de=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var _e=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Le(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Le=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var he=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},Te=13,$e=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:de(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
1
|
+
import{b as oe}from"./chunk-FU7PYW7H.js";import{a as ie,b as ne,q as re}from"./chunk-5534MHZW.js";import{D as ee,Z as te}from"./chunk-2KUM2RU4.js";import{a as q,d as X}from"./chunk-QBRRFFMZ.js";import{i as A}from"./chunk-TD6JBHUS.js";import{Sa as Z,la as Y}from"./chunk-ZMOW2YZ4.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();d();var Ce=/^gid:\/\/shopify\/Shop\/(\d+)$/,ve=/^\d+$/,se=250,De=new Set(ie),Re=new Set(ne);function le(i,e){let o=[],t=[],n=new Map;for(let s of e){let f=Be(s.shopId),l=!0;if(f){let L=n.get(f);L===void 0?n.set(f,s.sourceRow):(o.push({row:s.sourceRow,field:"shop_id",message:`Duplicate shop ID; first seen on row ${L}`}),l=!1)}else o.push({row:s.sourceRow,field:"shop_id",message:"Shop ID must be a positive numeric ID or gid://shopify/Shop/<id>"}),l=!1;if(i==="unschedule"){l&&f&&t.push({action:i,shopId:f});continue}let h=s.targetPlanHandle?.trim(),w=s.priceBehavior?.trim(),S=s.notification?.trim(),O=S?.length?S:"WHEN_REQUIRED";h||(o.push({row:s.sourceRow,field:"target_plan_handle",message:"Target plan handle is required"}),l=!1),ae(w)||(o.push({row:s.sourceRow,field:"price_behavior",message:"Price behavior must be HONOR_BILLING_PRICE or PLAN_PRICE"}),l=!1),fe(O)||(o.push({row:s.sourceRow,field:"notification",message:"Notification must be OPT_OUT or WHEN_REQUIRED"}),l=!1),l&&f&&h&&ae(w)&&fe(O)&&t.push({action:i,shopId:f,targetPlanHandle:h,priceBehavior:w,notification:O})}if(o.length>0)return{ok:!1,errors:o};let r=[...t].sort((s,f)=>s.shopId<f.shopId?-1:s.shopId>f.shopId?1:0),a=ue(i,r);return{ok:!0,plan:{action:i,rows:r,batches:Ae(i,r),canonicalInput:a,inputDigest:ce(a)}}}function Be(i){let e=i?.trim();if(!e)return;let o=ve.test(e)?e:Ce.exec(e)?.[1];if(o===void 0)return;let t=BigInt(o);return t>0?`gid://shopify/Shop/${t}`:void 0}function ae(i){return i!==void 0&&De.has(i)}function fe(i){return Re.has(i)}function ue(i,e){return JSON.stringify({version:1,action:i,rows:e})}function Ae(i,e){let o=[];for(let t=0;t<e.length;t+=se){let n=e.slice(t,t+se),r=ue(i,n);o.push({index:o.length,rows:n,canonicalPayload:r,payloadDigest:ce(r)})}return o}function ce(i){return q(i).toString("hex")}d();d();d();d();d();var c=class i extends Error{constructor(e,o,t,...n){Array.isArray(o)&&(o=o.join(" ").trim()),super(o),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let r of n)for(let a in r){let s=r[a];this[a]=Buffer.isBuffer(s)?s.toString(t.encoding):s==null?s:JSON.parse(JSON.stringify(s))}}};d();var M=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var z=function(i){let e=[];for(let o=0,t=i.length;o<t;o++){let n=i[o];if(n==null||n===!1)e[o]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[o]={name:`${n}`};else if(M(n)){if(typeof n.name!="string")throw new c("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${o}`,"when column is an object literal"]);e[o]=n}else throw new c("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(n)} at position ${o}`])}return e};d();d();var Q=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let o=this.length+e.length;if(o>=this.size&&(this.resize(),o>=this.size))throw Error("INVALID_BUFFER_STATE");let t=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{let o=this.length++;o===this.size&&this.resize();let t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,o)}}append(e){let o=this.length++;o===this.size&&this.resize(),this.buf[o]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let o=Buffer.allocUnsafe(this.size);this.buf.copy(o,0,0,e),this.buf=o}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},H=Q;var de=function(i){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((t,n)=>{let r=Buffer.from(String.fromCharCode(n),i.encoding);return n!==63&&r.length===1&&r[0]===63||t.push(r),t},[]),o=new Uint8Array(256);for(let t of e)o[t[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new H(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter?i.delimiter.map(t=>t.length):[],i.delimiter_auto?1:0,i.quote!==null?i.quote.length:0,...e.map(t=>t.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new H(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(t=>t.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:o}};d();d();var me=function(i){return i.replace(/([A-Z])/g,function(e,o){return"_"+o.toLowerCase()})};var T=function(i){let e={};for(let t in i)e[me(t)]=i[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new c("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new c("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new c("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){let n=Date.parse(t);return isNaN(n)?t:new Date(n)};else if(typeof e.cast_date!="function")throw new c("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=void 0,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=z(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new c("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new c("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new c("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!M(e.delimiter_auto))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!M(e.delimiter_auto.preferred))throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(t,n)=>(t.total-t.std)*(n.preferred[t.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new c("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let o=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(t){if(typeof t=="string"&&(t=Buffer.from(t,e.encoding)),!Buffer.isBuffer(t)||t.length===0)throw new c("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${o}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new c("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new c("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new c("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,n){if(typeof t!="string"&&!Buffer.isBuffer(t))throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new c("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${n},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=Buffer.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};d();var _e=function(i,e){e||({delimiter_auto:e}=T({delimiter_auto:!0})),typeof i=="string"&&(i=Buffer.from(i)),Buffer.isBuffer(i)&&(i=(n=>{let r=[],a=j({delimiter:[]}),s=h=>r.push(h),f=()=>{},l=a.parse(n,!0,s,f);if(l!==void 0)throw l;return r})(i));let o=Array(127).fill().map(()=>({lines:[]}));i.map(([n],r)=>{for(let a=0,s=n.length;a<s;a++){let f=n.charCodeAt(a);o[f].lines[r]===void 0&&(o[f].lines[r]=0),o[f].lines[r]++}}),o.map((n,r)=>{n.char_code=r,n.std=Le(n.lines),n.total=n.lines.reduce((a,s)=>a+s,0),n.preferred=!!e.preferred[r],n.score=e.score(n,e)});let t=o.reduce((n,r)=>n.score>r.score?n:r,{});return String.fromCharCode(t.char_code)},Le=function(i){let e=i.length;if(e===0)return 0;let o=i.reduce((t,n)=>t+n)/e;return Math.sqrt(i.map(t=>Math.pow(t-o,2)).reduce((t,n)=>t+n)/e)};var he=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},Te=13,$e=10,$={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},j=function(i={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},o=T(i);return{info:e,original_options:i,options:o,state:de(o),__needMoreData:function(t,n,r){if(r)return!1;let{encoding:a,escape:s,quote:f}=this.options,{quoting:l,needMoreDataSize:h,recordDelimiterMaxLength:w}=this.state,S=n-t-1,O=Math.max(h,w===0?Buffer.from(`\r
|
|
2
2
|
`,a).length:w,l?(s===null?0:s.length)+f.length:0,l?f.length+w:0);return S<O},parse:function(t,n,r,a){let{bom:s,comment_no_infix:f,delimiter_auto:l,encoding:h,from_line:w,ltrim:S,max_record_size:O,raw:L,relax_quotes:I,rtrim:E,skip_empty_lines:y,to:g,to_line:p}=this.options,{comment:x,escape:C,quote:N,record_delimiter:F}=this.options,{bomSkipped:Se,delimiterDiscovered:Ne,delimiterBufPrevious:V,rawBuffer:Ee,escapeIsQuote:xe}=this.state;if(!Ne&&l){let _;if(V===void 0?_=t:V!==void 0&&t===void 0?_=V:_=Buffer.concat([V,t]),t=void 0,n||_.length>l.size)this.options.delimiter=[Buffer.from(_e(_,this.options.delimiter_auto))],this.state.previousBuf=_,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=_;return}}let{previousBuf:P}=this.state,m;if(P===void 0)if(t===void 0){a();return}else m=t;else P!==void 0&&t===void 0?m=P:m=Buffer.concat([P,t]);if(Se===!1)if(s===!1)this.state.bomSkipped=!0;else if(m.length<3){if(n===!1){this.state.previousBuf=m;return}}else{for(let _ in $)if($[_].compare(m,0,$[_].length)===0){let D=$[_].length;this.state.bufBytesStart+=D,m=m.slice(D);let k=T({...this.original_options,encoding:_});for(let b in k)this.options[b]=k[b];({comment:x,escape:C,quote:N}=this.options);break}this.state.bomSkipped=!0}let U=m.length,u;for(u=0;u<U&&!this.__needMoreData(u,U,n);u++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),p!==-1&&this.info.lines>p){this.state.stop=!0,a();return}this.state.quoting===!1&&F.length===0&&this.__autoDiscoverRecordDelimiter(m,u)&&(F=this.options.record_delimiter);let _=m[u];if(L===!0&&Ee.append(_),(_===Te||_===$e)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(C!==null&&this.state.quoting===!0&&this.__isEscape(m,u,_)&&u+C.length<U)if(xe){if(this.__isQuote(m,u+C.length)){this.state.escaping=!0,u+=C.length-1;continue}}else{this.state.escaping=!0,u+=C.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(m,u))if(this.state.quoting===!0){let b=m[u+N.length],R=E&&this.__isCharTrimable(m,u+N.length),v=x!==null&&this.__compareBytes(x,m,u+N.length,b),B=this.__isDelimiter(m,u+N.length,b),J=F.length===0?this.__autoDiscoverRecordDelimiter(m,u+N.length):this.__isRecordDelimiter(b,m,u+N.length);if(C!==null&&this.__isEscape(m,u,_)&&this.__isQuote(m,u+C.length))u+=C.length-1;else if(!b||B||J||v||R){this.state.quoting=!1,this.state.wasQuoting=!0,u+=N.length-1;continue}else if(I===!1){let W=this.__error(new c("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(b)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(W!==void 0)return W}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),u+=N.length-1}else if(this.state.field.length!==0){if(I===!1){let b=this.__infoField(),R=Object.keys($).map(B=>$[B].equals(this.state.field.toString())?B:!1).filter(Boolean)[0],v=this.__error(new c("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(b.column)} at line ${b.lines}, value is ${JSON.stringify(this.state.field.toString(h))}`,R?`(${R} bom)`:void 0],this.options,b,{field:this.state.field}));if(v!==void 0)return v}}else{this.state.quoting=!0,u+=N.length-1;continue}if(this.state.quoting===!1){let b=this.__isRecordDelimiter(_,m,u);if(b!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=w){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),u+=b-1;continue}if(y===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,u+=b-1;continue}this.info.bytes=this.state.bufBytesStart+u;let B=this.__onField();if(B!==void 0)return B;this.info.bytes=this.state.bufBytesStart+u+b;let J=this.__onRecord(r);if(J!==void 0)return J;if(g!==-1&&this.info.records>=g){this.state.stop=!0,a();return}}this.state.commenting=!1,u+=b-1;continue}if(this.state.commenting)continue;if(x!==null&&(f===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(x,m,u,_)!==0){this.state.commenting=!0;continue}let R=this.__isDelimiter(m,u,_);if(R!==0){this.info.bytes=this.state.bufBytesStart+u;let v=this.__onField();if(v!==void 0)return v;u+=R-1;continue}}}if(this.state.commenting===!1&&O!==0&&this.state.record_length+this.state.field.length>O)return this.__error(new c("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${O}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let D=S===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(m,u),k=E===!1||this.state.wasQuoting===!1;if(D===!0&&k===!0)this.state.field.append(_);else{if(E===!0&&!this.__isCharTrimable(m,u))return this.__error(new c("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));D===!1&&(u+=this.__isCharTrimable(m,u)-1);continue}}if(n===!0)if(this.state.quoting===!0){let _=this.__error(new c("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(_!==void 0)return _}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+u;let _=this.__onField();if(_!==void 0)return _;let D=this.__onRecord(r);if(D!==void 0)return D}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=u,this.state.previousBuf=m.slice(u);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(t){let{columns:n,group_columns_by_name:r,encoding:a,info:s,from:f,relax_column_count:l,relax_column_count_less:h,relax_column_count_more:w,raw:S,skip_records_with_empty_values:O}=this.options,{enabled:L,record:I}=this.state;if(L===!1)return this.__resetRecord();let E=I.length;if(n===!0){if(O===!0&&he(I)){this.__resetRecord();return}return this.__firstLineToColumns(I)}if(n===!1&&this.info.records===0&&(this.state.expectedRecordLength=E),E!==this.state.expectedRecordLength){let y=n===!1?new c("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I}):new c("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${n.length},`,`got ${E} on line ${this.info.lines}`],this.options,this.__infoField(),{record:I});if(l===!0||h===!0&&E<this.state.expectedRecordLength||w===!0&&E>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=y;else{let g=this.__error(y);if(g)return g}}if(O===!0&&he(I)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,f===1||this.info.records>=f){let{objname:y}=this.options;if(n!==!1){let g={};for(let p=0,x=I.length;p<x;p++)n[p]===void 0||n[p].disabled||(r===!0&&Object.hasOwn(g,n[p].name)?Array.isArray(g[n[p].name])?g[n[p].name]=g[n[p].name].concat(I[p]):g[n[p].name]=[g[n[p].name],I[p]]:Object.defineProperty(g,n[p].name,{value:I[p],enumerable:!0,writable:!0,configurable:!0}));if(S===!0||s===!0){let p=Object.assign({record:g},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),x=this.__push(y===void 0?p:[g[y],p],t);if(x)return x}else{let p=this.__push(y===void 0?g:[g[y],g],t);if(p)return p}}else if(S===!0||s===!0){let g=Object.assign({record:I},S===!0?{raw:this.state.rawBuffer.toString(a)}:{},s===!0?{info:this.__infoRecord()}:{}),p=this.__push(y===void 0?g:[I[y],g],t);if(p)return p}else{let g=this.__push(y===void 0?I:[I[y],I],t);if(g)return g}}this.__resetRecord()},__firstLineToColumns:function(t){let{firstLineToHeaders:n}=this.state;try{let r=n===void 0?t:n.call(null,t);if(!Array.isArray(r))return this.__error(new c("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(r)}`],this.options,this.__infoField(),{headers:r}));let a=z(r);this.state.expectedRecordLength=a.length,this.options.columns=a,this.__resetRecord();return}catch(r){return r}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:t,encoding:n,rtrim:r,max_record_size:a}=this.options,{enabled:s,wasQuoting:f}=this.state;if(s===!1)return this.__resetField();let l=this.state.field.toString(n);if(r===!0&&f===!1&&(l=l.trimRight()),t===!0){let[h,w]=this.__cast(l);if(h!==void 0)return h;l=w}this.state.record.push(l),a!==0&&typeof l=="string"&&(this.state.record_length+=l.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(t,n){let{on_record:r}=this.options;if(r!==void 0){let a=this.__infoRecord();try{t=r.call(null,t,a)}catch(s){return s}if(t==null)return}this.info.bytes_records+=this.info.bytes,n(t)},__cast:function(t){let{columns:n,relax_column_count:r}=this.options;if(Array.isArray(n)===!0&&r&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let s=this.__infoField();return[void 0,this.state.castField.call(null,t,s)]}catch(s){return[s]}if(this.__isFloat(t))return[void 0,parseFloat(t)];if(this.options.cast_date!==!1){let s=this.__infoField();return[void 0,this.options.cast_date.call(null,t,s)]}return[void 0,t]},__compareBytes:function(t,n,r,a){if(t[0]!==a)return 0;let s=t.length;for(let f=1;f<s;f++)if(t[f]!==n[r+f])return 0;return s},__isCharTrimable:function(t,n){let{timchars:r,timcharFirstBytes:a}=this.state,s=t[n];if(s===void 0||a[s]===0)return 0;e:for(let f=0;f<r.length;f++){let l=r[f];for(let h=0;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}return 0},__isDelimiter:function(t,n,r){let{delimiter:a,ignore_last_delimiters:s}=this.options;if(s===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(s!==!1&&typeof s=="number"&&this.state.record.length===s-1)return 0;e:for(let f=0;f<a.length;f++){let l=a[f];if(l[0]===r){for(let h=1;h<l.length;h++)if(l[h]!==t[n+h])continue e;return l.length}}return 0},__isEscape:function(t,n,r){let{escape:a}=this.options;if(a===null)return!1;let s=a.length;if(a[0]===r){for(let f=0;f<s;f++)if(a[f]!==t[n+f])return!1;return!0}return!1},__isFloat:function(t){return t-parseFloat(t)+1>=0},__isQuote:function(t,n){let{quote:r}=this.options;if(r===null)return!1;let a=r.length;for(let s=0;s<a;s++)if(r[s]!==t[n+s])return!1;return!0},__isRecordDelimiter:function(t,n,r){let{record_delimiter:a}=this.options,s=a.length;e:for(let f=0;f<s;f++){let l=a[f],h=l.length;if(l[0]===t){for(let w=1;w<h;w++)if(l[w]!==n[r+w])continue e;return l.length}}return 0},__autoDiscoverRecordDelimiter:function(t,n){let{encoding:r}=this.options,a=[Buffer.from(`\r
|
|
3
3
|
`,r),Buffer.from(`
|
|
4
4
|
`,r),Buffer.from("\r",r)];e:for(let s=0;s<a.length;s++){let f=a[s].length;for(let l=0;l<f;l++)if(a[s][l]!==t[n+l])continue e;return this.options.record_delimiter.push(a[s]),this.state.recordDelimiterMaxLength=a[s].length,a[s].length}return 0},__error:function(t){let{encoding:n,raw:r,skip_records_with_error:a}=this.options,s=typeof t=="string"?new Error(t):t;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(s,r?this.state.rawBuffer.toString(n):void 0)}catch(f){return f}return}else return s},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:t,raw:n,encoding:r}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:t===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(r):void 0}},__infoField:function(){let{columns:t}=this.options,n=Array.isArray(t),r=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:r,column:n===!0?t.length>this.state.record.length?t[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var pe=function(i,e={}){typeof i=="string"&&(i=Buffer.from(i));let o=e&&e.objname?Object.create(null):[],t=j(e),n=s=>{t.options.objname===void 0?o.push(s):o[s[0]]=s[1]},r=()=>{},a=t.parse(i,!0,n,r);if(a!==void 0)throw a;return o};var Me=["shop_id","target_plan_handle","price_behavior","notification"],Ve={schedule:["shop_id","target_plan_handle","price_behavior"],unschedule:["shop_id"]};function ge(i,e){if(i.trim()==="")return{ok:!1,errors:[{message:"The CSV is empty"}]};let o=[],t;try{t=pe(i,{bom:!0,columns:r=>(o=r,r),info:!0,skip_empty_lines:!0,trim:!0})}catch(r){if(!(r instanceof c))throw r;return{ok:!1,errors:[{message:`Invalid CSV: ${r.message}`}]}}let n=Pe(o,e);return n.length>0?{ok:!1,errors:n}:t.length===0?{ok:!1,errors:[{message:"The CSV must contain at least one data row"}]}:{ok:!0,rows:t.map(({record:r,info:a})=>ke(r,a.lines,e))}}function Pe(i,e){let o=[],t=new Set(Me),n=new Set;for(let r of i)n.has(r)?o.push({field:r,message:`Duplicate CSV header: ${r}`}):n.add(r),t.has(r)||o.push({field:r,message:`Unknown CSV header: ${r}`});for(let r of Ve[e])i.includes(r)||o.push({field:r,message:`Missing required CSV header: ${r}`});return o}function ke(i,e,o){return o==="unschedule"?{sourceRow:e,shopId:i.shop_id}:{sourceRow:e,shopId:i.shop_id,...i.target_plan_handle===void 0?{}:{targetPlanHandle:i.target_plan_handle},...i.price_behavior===void 0?{}:{priceBehavior:i.price_behavior},...i.notification===void 0?{}:{notification:i.notification}}}d();var be={fileExists:Z,readFile:Y,readStdin:te};async function G(i,e=be){let o={...be,...e};if(i!=="-"){if(!await o.fileExists(i))throw new A(`CSV file not found: ${i}`);try{return await o.readFile(i)}catch(n){if(n instanceof A)throw n;let r=n instanceof Error?n.message:String(n);throw new A(`Couldn't read CSV file ${i}: ${r}`)}}let t=await o.readStdin();if(t===void 0||t==="")throw new A("Provide --input <path> or pipe CSV data to stdin.");return t}async function we(i,e,o){let t=o?await G(e,o):await G(e),n=ge(t,i);return n.ok?le(i,n.rows):n}d();d();var Je="shopify-subscription-migration:v1";function Ie(){return X()}function ye({appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t}){let n=JSON.stringify({namespace:Je,appIdentifier:i,action:e,invocationId:o,canonicalBatchPayload:t});return q(n).toString("hex")}var K=class extends Error{batchIndex;constructor(e){super(`Migration submission batch ${e} returned neither an operation nor user errors`),this.name="MigrationSubmissionProtocolError",this.batchIndex=e}};async function Oe({clientId:i,plan:e,invocationId:o=Ie(),createOperation:t=re}){let n={clientId:i,action:e.action,inputDigest:e.inputDigest,total:e.rows.length,operations:[]};for(let r of e.batches){let a=ye({appIdentifier:i,action:e.action,invocationId:o,canonicalBatchPayload:r.canonicalPayload}),s;try{s=await t({clientId:i,idempotencyKey:a,migrations:r.rows.map(qe)})}catch(f){if(n.operations.length===0)throw f;return{status:"failed",submission:n,failure:{type:"submission",batchIndex:r.index,userErrors:[{message:f instanceof Error?f.message:"Migration request failed.",field:null}]}}}if(s.operation&&n.operations.push({batchIndex:r.index,batchPayloadDigest:r.payloadDigest,operation:s.operation}),s.userErrors.length>0)return{status:"failed",submission:n,failure:{type:"submission",batchIndex:r.index,userErrors:s.userErrors}};if(!s.operation)throw new K(r.index)}return{status:"success",submission:n}}function qe(i){return i.action==="unschedule"?{shopId:i.shopId,action:{cancelMigration:!0}}:{shopId:i.shopId,action:{scheduleMigration:ze(i)}}}function ze({targetPlanHandle:i,priceBehavior:e,notification:o}){return{targetPlanHandle:i,priceBehavior:e,notification:o}}async function ii(i){let e=await we(i.action,i.input);if(!e.ok)throw new A(Fe(e.errors));if(!i.skipConfirmation&&!await ee({message:`${i.action==="schedule"?"Schedule":"Unschedule"} ${e.plan.rows.length} subscriptions?`}))return{status:"cancelled",changed:!1,action:i.action,reason:"Confirmation declined."};let o=await Oe({clientId:i.clientId,plan:e.plan});if(o.status==="failed"||!i.watch)return o;i.onSubmissionAccepted?.(o.submission);let t=await oe({clientId:i.clientId,operationIds:o.submission.operations.map(({operation:a})=>a.id)}),n=je(o.submission,t),r=n.operations.filter(({operation:a})=>a.status==="FAILED").map(({operation:a})=>a.id);return r.length===0?{status:"success",submission:n}:{status:"failed",submission:n,failure:{type:"operations",operationIds:r}}}function je(i,e){let o=new Map(e.map(t=>[t.id,t]));return{...i,operations:i.operations.map(t=>({...t,operation:o.get(t.operation.id)??t.operation}))}}function Fe(i){return i.map(e=>{let o=[e.row===void 0?void 0:`row ${e.row}`,e.field].filter(t=>t!==void 0).join(", ");return o?`${o}: ${e.message}`:e.message}).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-GSFWBFFH.js";import{b as e}from"./chunk-XEZPN5TR.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static description="View the UI kit components prompts";static hidden=!0;async run(){await i()}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as j}from"./chunk-HMPRWNGG.js";import{s as P}from"./chunk-YYWSHRO2.js";import{E as A}from"./chunk-2KUM2RU4.js";import{a as y}from"./chunk-LG3KEHGD.js";import{i as h}from"./chunk-TD6JBHUS.js";import{Bb as x,Sa as u,ta as b,vb as f,zb as p}from"./chunk-ZMOW2YZ4.js";import{b as r}from"./chunk-3PYDIBTX.js";import{a as I}from"./chunk-DOLVBTCB.js";import{b as q}from"./chunk-AE3IQG7S.js";import{c as l,e as v,p as F}from"./chunk-IWTNUJGY.js";import{e as O,g as c}from"./chunk-VKWPEFWQ.js";c();async function C(t){let{extension:e,developerPlatformClient:n,app:a,orgId:i}=t,o=a.configuration.client_id,{api_version:s,type:m,targeting:d}=e.configuration,G=await(!!d?.length?z({localIdentifier:e.localIdentifier,developerPlatformClient:n,apiKey:o,target:d[0].target,version:s,orgId:i}):R({localIdentifier:e.localIdentifier,developerPlatformClient:n,apiKey:o,type:m,version:s,orgId:i}));return{definition:P(G,s),path:l(e.directory,"schema.graphql"),localIdentifier:e.localIdentifier}}async function z({localIdentifier:t,developerPlatformClient:e,apiKey:n,target:a,version:i,orgId:o}){let s={handle:a,version:i},m=await e.targetSchemaDefinition(s,n,o);if(!m)throw new h(f`A schema could not be generated for ${t}`,f`Check that the Function targets and version are valid.`);return m}async function R({localIdentifier:t,developerPlatformClient:e,apiKey:n,version:a,type:i,orgId:o}){let s={version:a,type:i},m=await e.apiSchemaDefinition(s,n,o);if(!m)throw new h(f`A schema could not be generated for ${t}`,f`Check that the Function API type and version are valid.`);return m}c();c();var g=r.string().regex(/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/).describe("An absolute native filesystem path."),V=r.object({handle:r.string().nullable().describe("Null when the extension does not configure a handle."),name:r.string(),directory:g}).strict();var T=r.object({path:g,format:r.literal("graphql").describe("The file contains native GraphQL SDL with the API-version header.")}).strict(),D=r.object({schema:r.string().describe("Native GraphQL SDL with the API-version header, returned with --stdout --json.")}).strict(),S=y({name:"FunctionSchemaResult",schema:r.union([T,D]),definitions:{FunctionSchemaFile:T,FunctionSchemaContent:D}});c();import{resolve as _}from"node:path";async function L(t,e){let n=e.stdout?{schema:t.definition}:{path:_(t.path),format:"graphql"};if(e.stdout){p(e.json?S.encode(n):t.definition);return}await b(t.path,t.definition),e.json?p(S.encode(n)):x(`GraphQL Schema for ${t.localIdentifier} written to ${t.path}`)}c();var E=O(q(),1);var pt={path:E.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async t=>v(t),default:async()=>F(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function gt(t,e){let n=t.allExtensions.filter(i=>i.isFunctionExtension),a=n.find(i=>i.directory===e);if(a)return a;if(n.length===1&&n[0])return n[0];if(I())return await A({message:"Which function?",choices:n.map(o=>({label:o.handle,value:o}))});throw new h("Run this command from a function directory or use `--path` to specify a function directory.")}async function St(t,e,n,a,i){let o=l(t.directory,"schema.graphql");if(await u(o))return o;let{app:s,developerPlatformClient:m,organization:d}=await j({directory:e,clientId:n,forceRelink:a,userProvidedConfigName:i}),w=await C({app:s,developerPlatformClient:m,extension:t,orgId:d.id});return await L(w,{stdout:!1,json:!1}),await u(o)?o:void 0}export{C as a,g as b,V as c,S as d,L as e,pt as f,gt as g,St as h};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{a as T}from"./chunk-ASKBYEO7.js";import{X as B}from"./chunk-YYWSHRO2.js";import{c as W,ga as J,ja as Z}from"./chunk-OJOF6IYG.js";import{b as _}from"./chunk-XEZPN5TR.js";import{B as V,R as L,c as q,j as H,n as $,q as G,x as U}from"./chunk-YKDRUAY3.js";import{b as Y,c as z,d as K}from"./chunk-DMOLPSXF.js";import{F as M}from"./chunk-2KUM2RU4.js";import{f as D}from"./chunk-2KFYIYLI.js";import{a as P}from"./chunk-LG3KEHGD.js";import{i as N}from"./chunk-TD6JBHUS.js";import{Bb as b,Fb as j,Kb as Q,zb as C}from"./chunk-ZMOW2YZ4.js";import{b as r,e as A}from"./chunk-3PYDIBTX.js";import{b as fe}from"./chunk-AE3IQG7S.js";import{p as R}from"./chunk-IWTNUJGY.js";import{e as pe,g as m}from"./chunk-VKWPEFWQ.js";m();m();var u=pe(fe(),1),X={path:T.path,config:T.config,"client-id":T["client-id"],type:u.Flags.string({description:"Log type; repeat to select multiple. Defaults to all supported types.",options:["webhook","graphql","function","app-event","app-billing-event","rest","sidekick","ui-extension"],multiple:!0,multipleNonGreedy:!0,env:"SHOPIFY_FLAG_TYPE"}),store:u.Flags.string({description:"Exact store handle or myshopify.com domain/URL.",char:"s",env:"SHOPIFY_FLAG_STORE"}),status:u.Flags.string({description:"Recorded result status; not inferred from HTTP codes or response bodies.",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"}),topic:u.Flags.string({description:"Exact webhook topic; excludes non-webhook records.",env:"SHOPIFY_FLAG_TOPIC"}),"status-code":u.Flags.string({description:"Exact webhook or REST HTTP status code (100\u2013599); no status classes.",env:"SHOPIFY_FLAG_STATUS_CODE"}),"operation-type":u.Flags.string({description:"Exact GraphQL operation type; excludes non-GraphQL records.",env:"SHOPIFY_FLAG_OPERATION_TYPE"}),"operation-name":u.Flags.string({description:"Exact GraphQL operation name; excludes non-GraphQL records.",env:"SHOPIFY_FLAG_OPERATION_NAME"}),"request-id":u.Flags.string({description:"Exact GraphQL or REST request ID; excludes other record types.",env:"SHOPIFY_FLAG_REQUEST_ID"}),"function-handle":u.Flags.string({description:"Exact Function extension handle; excludes non-Function records.",env:"SHOPIFY_FLAG_FUNCTION_HANDLE"}),target:u.Flags.string({description:"Exact Function execution, Sidekick event, or UI extension target; excludes other record types.",env:"SHOPIFY_FLAG_TARGET"}),"event-handle":u.Flags.string({description:"Exact app event or app billing event handle; excludes other record types.",env:"SHOPIFY_FLAG_EVENT_HANDLE"}),method:u.Flags.string({description:"Exact REST HTTP method; excludes non-REST records.",env:"SHOPIFY_FLAG_METHOD"}),"request-path":u.Flags.string({description:"Exact REST request path; excludes non-REST records.",env:"SHOPIFY_FLAG_REQUEST_PATH"}),since:u.Flags.string({description:"Inclusive start: positive duration (s/m/h/d) or whole-second RFC 3339 timestamp.",default:"1h",env:"SHOPIFY_FLAG_SINCE"}),until:u.Flags.string({description:"Exclusive whole-second RFC 3339 end; defaults to the current time.",env:"SHOPIFY_FLAG_UNTIL"}),limit:u.Flags.integer({description:"Maximum number of records to return, from 1 through 1000.",default:20,env:"SHOPIFY_FLAG_LIMIT"}),sort:u.Flags.string({description:"Select the oldest/newest matches using server-side sorting. Omit for faster, less-throttled retrieval.",options:["timestamp"],env:"SHOPIFY_FLAG_SORT"}),order:u.Flags.string({description:"Sort direction: asc (oldest first, default with --sort) or desc (newest first).",options:["asc","desc"],dependsOn:["sort"],env:"SHOPIFY_FLAG_ORDER"})};m();m();var ee=[{name:"webhook",backend:"WEBHOOK"},{name:"graphql",backend:"GRAPHQL_REQUEST"},{name:"function",backend:"FUNCTION_RUN"},{name:"app-event",backend:"APP_EVENT"},{name:"app-billing-event",backend:"APP_BILLING_EVENT"},{name:"rest",backend:"REST_REQUEST"},{name:"sidekick",backend:"SIDEKICK_EVENT"},{name:"ui-extension",backend:"UI_EXTENSION"}],F=[{flag:"store",field:"SHOP_MYSHOPIFY_DOMAIN"},{flag:"status",field:"RESULT_STATUS"},{flag:"topic",field:"TOPIC"},{flag:"status-code",field:"STATUS_CODE"},{flag:"operation-type",field:"OPERATION_TYPE"},{flag:"operation-name",field:"OPERATION_NAME"},{flag:"request-id",field:"REQUEST_ID"},{flag:"function-handle",field:"FUNCTION_HANDLE"},{flag:"target",field:"TARGET"},{flag:"event-handle",field:"EVENT_HANDLE"},{flag:"method",field:"METHOD"},{flag:"request-path",field:"REQUEST_PATH"}],f={defaultLimit:20,defaultSince:"1h",maximumLimit:1e3,maximumLookbackDays:7,maximumWindowDays:1,maximumFutureSkewMinutes:1};function o(e,t,n){let a=new N(n?`${t}
|
|
2
|
+
|
|
3
|
+
Request ID: ${n}`:t);return a.code=e,n&&(a.details={requestId:n}),a}function ge(e){let t=ee.find(({name:n})=>n===e);if(!t)throw o("invalid-argument","Supported log types are webhook, graphql, function, app-event, app-billing-event, rest, sidekick, and ui-extension.");return t}function te(e){return e===void 0?[...ee]:[...new Set(typeof e=="string"?[e]:e)].map(ge)}m();m();var ie={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"LogApp"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"clientId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"organizationId"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var he=r.object({message:r.string(),path:r.array(r.union([r.string(),r.number()])).optional(),extensions:r.record(r.unknown()).optional()}),ye=r.object({data:r.record(r.unknown()).nullable().optional(),errors:r.array(he.passthrough()).optional(),extensions:r.record(r.unknown()).optional()}),ke=new Map([["THROTTLED","rate-limited"],["TIMEOUT","query-timeout"],["SORTED_QUERY_TOO_LARGE","sorted-query-too-large"]]);async function ae(e,t){if(D())throw o("authentication-required","Sign in with a user account to retrieve app logs. Automation tokens are not supported.");let n=await U(),{appManagementToken:a}=await L({noPrompt:t}),s=`https://${n}`,i=await Z({query:ie,token:a,variables:{clientId:e},unauthorizedHandler:{type:"token_refresh",handler:async()=>(a=(await L({noPrompt:t,forceRefresh:!0})).appManagementToken,{token:a})}}),l=r.object({key:r.string(),organizationId:r.string().regex(/^gid:\/\/shopify\/Organization\/\d+$/).transform(W).pipe(r.string())}).safeParse(i.app);if(!l.success||l.data.key!==e)throw o("forbidden","The selected app was not resolved to an authorized organization.");return{origin:s,token:a,organizationId:l.data.organizationId}}async function re(e,t,n){let a=await G(`${e.origin}/app_logs/unstable/organizations/${e.organizationId}/graphql`,{method:"POST",redirect:"error",headers:J(e.token),body:JSON.stringify({query:q(t).query,variables:n})},$("non-blocking")).catch(d=>{throw ne(d),d}),s=a.headers.get("x-request-id"),i=await a.json().catch(d=>{if(ne(d,s),!!a.ok)throw o("invalid-response","App Logs returned a response that could not be read as JSON.",s)}),l=ye.safeParse(i),p=l.success?l.data.errors:void 0;if(!a.ok||p?.length){let d=p?.[0]?.extensions?.code,c=typeof d=="string"&&p?.every(({extensions:E})=>E?.code===d)?ke.get(d):void 0,g=a.ok?c??"log-query-failed":{401:"authentication-required",403:"forbidden",429:"rate-limited",504:"query-timeout"}[a.status]??"logs-api-unavailable",k=p?.length?p.map(({message:E})=>E).join(`
|
|
4
|
+
`):"Check API availability, access, and authentication.",v=o(g,a.ok?k:`App Logs request failed (HTTP ${a.status}). ${k}`,s),S=a.headers.get("retry-after"),x={...s?{requestId:s}:{},...l.success&&p?.length?{errors:p,...l.data.extensions===void 0?{}:{extensions:l.data.extensions}}:{},...S&&/^\d+$/.test(S)?{retryAfterSeconds:Number(S)}:{}};throw Object.keys(x).length&&(v.details=x),v}if(!l.success||l.data.data===void 0&&l.data.errors===void 0)throw o("invalid-response","App Logs returned an invalid GraphQL response.",s);return{...l.data,requestId:s}}function ne(e,t){if(e instanceof Error&&["AbortError","TimeoutError"].includes(e.name))throw o("query-timeout","App Logs request timed out. Check backend availability or use a narrower window or more selective filters.",t);if(e instanceof H&&e.type!=="invalid-json")throw o("logs-api-unavailable",`App Logs request failed: ${e.message}`,t)}m();function se(e){let t=te(e.type);if(!t.length)throw o("invalid-argument","Select at least one log type.");let n=e.limit??f.defaultLimit;if(!Number.isInteger(n)||n<1||n>f.maximumLimit)throw o("invalid-argument","--limit must be an integer between 1 and 1000.");if(e.sort!==void 0&&e.sort!=="timestamp")throw o("invalid-argument","--sort accepts timestamp.");if(e.order!==void 0&&!["asc","desc"].includes(e.order))throw o("invalid-argument","--order accepts asc or desc.");if(e.order!==void 0&&e.sort===void 0)throw o("invalid-argument","--order requires --sort.");let a=e.order==="desc"?"timestamp-desc":"timestamp-asc",s=e.sort===void 0?"none":a,i={};for(let d of F){let c=e[d.flag];if(c!==void 0){if(typeof c!="string"||!c.trim())throw o("invalid-argument",`--${d.flag} requires one nonempty value.`);if(Buffer.byteLength(c,"utf8")>1024)throw o("invalid-argument",`--${d.flag} accepts at most 1024 UTF-8 bytes.`);i[d.flag]=c}}if(i.store){let d;try{d=V(/^[a-zA-Z0-9][a-zA-Z0-9-]*$/.test(i.store.trim())?`${i.store.trim()}.myshopify.com`:i.store)}catch(c){throw c instanceof N&&(c.code="invalid-argument"),c}if(!/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(d))throw o("invalid-argument","Historical logs require a myshopify.com store domain.");i.store=d}if(i.status&&!["success","failure"].includes(i.status))throw o("invalid-argument","--status accepts success or failure.");if(i.topic&&!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_./-]+$/.test(i.topic))throw o("invalid-argument","--topic requires an exact slash-form topic, such as orders/create.");if(i["status-code"]&&!/^[1-5]\d{2}$/.test(i["status-code"]))throw o("invalid-argument","--status-code accepts an exact code from 100 to 599, not a status class.");let l=F.flatMap(({flag:d,field:c})=>{let g=i[d];return g===void 0?[]:[{field:c,operator:"EQUALS",value:d==="status"?g.toUpperCase():g}]}),p=ve(e);return{types:t,filters:l,limit:n,ordering:s,window:p}}function ve(e){let t=e.since??f.defaultSince,n=/^(\d+)(s|m|h|d)$/.exec(t),a=new Map([["s",1],["m",60],["h",3600],["d",86400]]),s=n?Number(n[1])*a.get(n[2]):void 0;if(s!==void 0&&(!Number.isSafeInteger(s)||s<=0))throw o("invalid-argument","--since requires a positive integer duration or a whole-second timestamp.");let i=s===void 0?oe(t,"--since"):void 0,l=e.until===void 0?void 0:oe(e.until,"--until");if(i!==void 0&&l!==void 0&&i>=l)throw o("invalid-argument","--since must be earlier than --until.");return{start:i,end:l,durationSeconds:s}}function de(e){let t=Math.floor(Date.now()/1e3)*1e3,n=e.end??t,a=e.start??n-e.durationSeconds*1e3;if(!Number.isFinite(new Date(a).valueOf()))throw o("invalid-argument","--since produces a timestamp outside the supported date range.");if(a>=n)throw o("invalid-argument","--since must be earlier than --until (the current time by default).");let s=864e5;if(a<t-f.maximumLookbackDays*s)throw o("invalid-argument",`--since must be within the last ${I(f.maximumLookbackDays,"day")}.`);if(n-a>f.maximumWindowDays*s)throw o("invalid-argument",`--since and --until must be at most ${I(f.maximumWindowDays,"day")} apart (--until is the current time by default).`);if(n>t+f.maximumFutureSkewMinutes*6e4)throw o("invalid-argument",`--until must not be more than ${I(f.maximumFutureSkewMinutes,"minute")} in the future.`);return{since:A(new Date(a)),until:A(new Date(n))}}function I(e,t){return`${e} ${e===1?t:`${t}s`}`}function oe(e,t){let n=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(Z|[+-]\d{2}:\d{2})$/.exec(e),a=()=>o("invalid-argument",`${t} requires ${t==="--since"?"a positive integer duration (s/m/h/d) or ":""}a whole-second RFC 3339 timestamp with a timezone; fractional input is not supported by the API.`);if(!n)throw a();let s=new Date(`${n[1]}T${n[2]}Z`);if(!Number.isFinite(s.valueOf())||s.toISOString().slice(0,19)!==`${n[1]}T${n[2]}`)throw a();let i=Date.parse(e);if(!Number.isFinite(i))throw a();return i}m();m();var w=r.object({timestamp:r.string().datetime().describe("Native API timestamp; fractional seconds are preserved."),type:r.string().describe("Native API enum, such as WEBHOOK or GRAPHQL_REQUEST."),resultStatus:r.string().nullable().optional(),shopMyshopifyDomain:r.string().nullable()}).passthrough().describe("Native record JSON. All additional approved API fields are preserved without renaming or truncation."),h=P({name:"HistoricalAppLogs",schema:r.object({logs:r.array(w),ordering:r.enum(["subset-timestamp-asc","timestamp-asc","timestamp-desc"]).describe("subset-timestamp-asc sorts only the returned subset in the CLI, not necessarily the oldest or newest matches when the limit is reached. timestamp-asc and timestamp-desc request server sorting before the limit."),limitations:r.array(r.string()).describe("Empty when fewer than the requested limit are returned.")}).strict(),definitions:{AppLogRecord:w}});var le=r.object({app:r.object({logs:r.object({records:r.array(r.object({json:w}))}).nullable()}).nullable()});m();var me={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HistoricalLogs"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"types"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LogType"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"timestamp"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TimestampRangeInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LogFilterInput"}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NamedType",name:{kind:"Name",value:"LogSortKeys"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reverse"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"clientId"},value:{kind:"Variable",name:{kind:"Name",value:"clientId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logs"},arguments:[{kind:"Argument",name:{kind:"Name",value:"types"},value:{kind:"Variable",name:{kind:"Name",value:"types"}}},{kind:"Argument",name:{kind:"Name",value:"timestamp"},value:{kind:"Variable",name:{kind:"Name",value:"timestamp"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}},{kind:"Argument",name:{kind:"Name",value:"reverse"},value:{kind:"Variable",name:{kind:"Name",value:"reverse"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"records"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"json"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function ce(e){let t=se(e),n=await be(e),a=await ae(n,e["no-input"]??!1),s=de(t.window),{data:i,requestId:l}=await re(a,me,{clientId:n,types:t.types.map(({backend:c})=>c),timestamp:{gte:s.since,lt:s.until},limit:t.limit,filters:t.filters,...t.ordering==="none"?{}:{sortKey:"TIMESTAMP",reverse:t.ordering==="timestamp-desc"}}),p=le.safeParse(i);if(!p.success||!p.data.app?.logs)throw o("invalid-response","App Logs returned no valid log result.",l);let d=p.data.app.logs.records.map(({json:c})=>c);if(d.length>t.limit||d.some(c=>!t.types.some(({backend:g})=>g===c.type)))throw o("invalid-response","App Logs returned records outside the requested type or limit.",l);return t.ordering==="none"&&d.sort((c,g)=>{let k=c.timestamp.slice(0,-1),v=g.timestamp.slice(0,-1);return k<v?-1:k>v?1:0}),h.validate({logs:d,ordering:t.ordering==="none"?"subset-timestamp-asc":t.ordering,limitations:d.length===t.limit?[`Reached the limit of ${t.limit} ${t.limit===1?"record":"records"}; additional records may match.${t.ordering==="none"?" Fast retrieval does not necessarily select the oldest or newest matches.":""}`]:[]})}async function be(e){if(e["client-id"]!==void 0){if(!e["client-id"].trim())throw o("invalid-argument","--client-id must not be empty.");return e["client-id"].trim()}let{activeConfig:t}=await B(e.path??R(),e.config,{skipPrompts:e["no-input"]??!1});if(t.file.errors.length)throw o("invalid-argument",t.file.errors.map(({message:a})=>a).join(`
|
|
5
|
+
`));let n=t.file.content.client_id;if(typeof n!="string"||!n.trim())throw o("invalid-argument","Pass --client-id or select an app configuration containing client_id.");return n.trim()}m();function ue(e,t,n){if(t){C(h.encode(e));return}if(!e.logs.length){b("No matching records available at query time.");return}b({"subset-timestamp-asc":"Used fast retrieval: returned records shown oldest first.","timestamp-asc":"Oldest first by timestamp.","timestamp-desc":"Newest first by timestamp."}[e.ordering]);let s=e.logs.some(i=>i.type==="GRAPHQL_REQUEST");M({rows:e.logs.map(i=>({timestamp:y(i.timestamp),type:y(i.type),result:i.type==="APP_EVENT"?"\u2014":y(i.resultStatus),store:y(i.shopMyshopifyDomain),details:y(Ne(i)),...s?{api:i.type==="GRAPHQL_REQUEST"?y(i.api):"\u2014"}:{}})),columns:{timestamp:{header:"Timestamp"},type:{header:"Type"},result:{header:"Result"},store:{header:"Store"},details:{header:"Details"},...s?{api:{header:"API"}}:{}}}),e.logs.length<n&&b(`Returned all ${e.logs.length} matching ${e.logs.length===1?"record":"records"} available at query time.`);for(let i of e.limitations)j(i);b("Use --json for full records.")}function Ne(e){switch(e.type){case"WEBHOOK":return e.topic;case"GRAPHQL_REQUEST":return e.operationName;case"FUNCTION_RUN":return e.functionHandle??e.target;case"APP_EVENT":case"APP_BILLING_EVENT":return e.eventHandle;case"REST_REQUEST":return[e.method,e.requestPath].filter(t=>typeof t=="string"&&t.length>0).join(" ")||void 0;case"SIDEKICK_EVENT":case"UI_EXTENSION":return e.target;default:return}}function y(e){let n=Array.from(Q(typeof e=="string"?e:"unknown"),i=>/[\p{Cc}\p{Cf}]/u.test(i)?`\\u${i.codePointAt(0).toString(16).padStart(4,"0")}`:i),a=n.join("");if(a.length<=100)return a;let s="";for(let i of n){if(s.length+i.length>99)break;s+=i}return`${s}\u2026`}var O=class e extends _{static hidden=!0;static baseFlags={..._.baseFlags,...K};static summary="Lists historical app logs.";static descriptionWithMarkdown=`Returns a list of historical app logs and exits. Defaults to all supported log types. Use --type to select a type; repeat it to select multiple.
|
|
6
|
+
|
|
7
|
+
Fast retrieval is the default: leave out --sort. Prefer this mode with a narrow time window and selective filters to consume less throttle capacity. The CLI orders the returned records oldest first, but when the limit is reached they aren't necessarily the oldest or newest matches.
|
|
8
|
+
|
|
9
|
+
Use server-side sorting only when selecting the oldest or newest matching records matters: --sort timestamp selects oldest first; add --order desc for newest first. This sorts before the result limit and is subject to API query limits.
|
|
10
|
+
|
|
11
|
+
When fewer than --limit records are returned, all matching records available at query time were returned. Sorting isn't needed to establish completeness.
|
|
12
|
+
|
|
13
|
+
Different filters combine with AND; each accepts one exact value. Type-specific filters exclude records without that field; combining --topic and --operation-name returns no records.
|
|
14
|
+
|
|
15
|
+
Defaults: preceding hour, 20 records. Maximum: 1-day window within the last 7 days, 1000 records. Time inputs accept whole seconds only.
|
|
16
|
+
|
|
17
|
+
--json preserves native record JSON in logs[], including fractional timestamps, diagnostic fields, bodies, and producer truncation flags.`;static jsonOutputSchema=h;static description=this.descriptionForHelp();static flags={...Y,...z,...X};static examples=["<%= config.bin %> <%= command.id %> --client-id APP_CLIENT_ID --type webhook --topic orders/create --status failure --since 30m","<%= config.bin %> <%= command.id %> --type graphql --operation-name MyQuery --json --no-input","<%= config.bin %> <%= command.id %> --since 1h --sort timestamp --order desc"];async run(){let{flags:t}=await this.parse(e);ue(await ce(t),t.json,t.limit)}};export{O as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as i,f as v,g as C}from"./chunk-5T3ZT6CC.js";import{a as T}from"./chunk-ALINJ6J2.js";import{a as F}from"./chunk-ASKBYEO7.js";import{Q as S}from"./chunk-HMPRWNGG.js";import{e as w}from"./chunk-YYWSHRO2.js";import{b as y,c as g}from"./chunk-DMOLPSXF.js";import{w as d,y as l}from"./chunk-2KUM2RU4.js";import{d as f}from"./chunk-25MYHE4W.js";import{a as u}from"./chunk-LG3KEHGD.js";import{zb as h}from"./chunk-ZMOW2YZ4.js";import{b as s,i as m}from"./chunk-3PYDIBTX.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();e();import{resolve as O}from"node:path";async function b(o,t){return await w(o,t),{status:"success",function:{handle:o.configuration.handle??null,name:o.name,directory:O(o.directory)}}}e();var n=u({name:"FunctionTypegenResult",schema:s.object({status:s.literal("success"),function:i}).strict(),definitions:{Function:i}});e();function j(o,t){t?h(n.encode(o)):l({headline:"GraphQL types generated successfully."})}var a=class o extends T{static jsonOutputSchema=n;static summary="Generate GraphQL types for a function.";static descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";static description=this.descriptionForHelp();static flags={...y,...F,...v,...g};async run(){let{flags:t}=await this.parse(o),{app:r}=await S({directory:t.path,userProvidedConfigName:t.config}),p=await C(r,t.path),c=async(x,J)=>{let G=await b(p,{stdout:x,stderr:J,app:r});j(G,t.json)};return t.json?await m({outputMode:"json",sink:f},()=>d({processes:[{prefix:p.localIdentifier,action:c}],showTimestamps:!1})):await c(process.stdout,process.stderr),{app:r}}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,g as c,i as p,j as d}from"./chunk-
|
|
1
|
+
import{b as a,g as c,i as p,j as d}from"./chunk-DVFVO6ZE.js";import{l as h}from"./chunk-TD6JBHUS.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function f(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=f(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await d({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),{...o,createdAtRuntime:!0}}};export{u as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as t,b as p,d as h}from"./chunk-WBJFTCEJ.js";import{p as f,v as c}from"./chunk-CZNUBAAG.js";import{b as d,c as l}from"./chunk-DMOLPSXF.js";import{i as a}from"./chunk-TD6JBHUS.js";import{zb as m}from"./chunk-ZMOW2YZ4.js";import{j as n}from"./chunk-3PYDIBTX.js";import{b as v}from"./chunk-AE3IQG7S.js";import{e as F,g as s}from"./chunk-VKWPEFWQ.js";s();var u=F(v(),1),i=class extends c{static jsonOutputSchema=t;static summary="Download metafields definitions from your shop into a local file.";static descriptionWithMarkdown=`Retrieves metafields from Shopify Admin.
|
|
2
|
+
|
|
3
|
+
If the metafields file already exists, it will be overwritten.`;static description=this.descriptionForHelp();static flags={...d,...l,...f,force:u.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=null;async command(e,b,w=!1){let y={path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"]},o=await h(y);if(o.status==="failed"){let r=new a("Failed to fetch metafield definitions.","Check your connection and permissions, then try again.");throw r.details={failedOwnerTypes:o.failedOwnerTypes},r}return o.status==="downloaded"&&o.failedOwnerTypes.length>0&&(process.exitCode=1,e.json&&n({type:"diagnostic",level:"error",message:`Failed to fetch metafield definitions for: ${o.failedOwnerTypes.join(", ")}.`})),(!w||!e.json)&&p(o,e.json?"json":"text"),o}renderEnvironmentResults(e){m(t.encode({environments:e}))}};export{i as a};
|