@shopify/cli 4.0.0 → 4.2.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/README.md +2 -2
- package/dist/analytics-CX22YIUZ.js +1 -0
- package/dist/analytics-UBWQIQYF.js +1 -0
- package/dist/angular-UTTM4Y4S.js +4 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-DU4WR4OP.js → chunk-23AMFHXC.js} +1 -1
- package/dist/{chunk-LNHLDRC5.js → chunk-2EJCY4CE.js} +1 -1
- package/dist/{chunk-YMWHHINU.js → chunk-2KH2S7PI.js} +1 -1
- package/dist/chunk-2N4O33VM.js +6 -0
- package/dist/{chunk-WZBSLU4Q.js → chunk-2VLMN5QZ.js} +1 -1
- package/dist/chunk-2WNODIWJ.js +1 -0
- package/dist/chunk-2YXKZWYW.js +1 -0
- package/dist/{chunk-GFJ7UV74.js → chunk-3BRUCKZ2.js} +1 -1
- package/dist/{chunk-RM5SJJN6.js → chunk-3V63X7WZ.js} +66 -66
- package/dist/chunk-3YWUSKWF.js +159 -0
- package/dist/chunk-42RMKTCJ.js +8 -0
- package/dist/{chunk-V2CNCPIE.js → chunk-4EXYYBQ6.js} +1 -1
- package/dist/chunk-4KRT35A2.js +1 -0
- package/dist/chunk-4V4DQ6W7.js +836 -0
- package/dist/chunk-4Z2WYNTE.js +1 -0
- package/dist/chunk-57N2DFIF.js +1 -0
- package/dist/chunk-5TIJLYZU.js +3 -0
- package/dist/{chunk-GNPS5SBU.js → chunk-6AJZKIZ3.js} +1 -1
- package/dist/{chunk-XNO6DZYP.js → chunk-6HZTMQD6.js} +1 -1
- package/dist/chunk-6LK6ZP3Q.js +1 -0
- package/dist/chunk-6SXOUZ7V.js +1 -0
- package/dist/chunk-6TEXPRI2.js +2 -0
- package/dist/{chunk-OUOYKNMY.js → chunk-6TORWTD7.js} +1 -1
- package/dist/{chunk-IASVAERO.js → chunk-6YAXFS6V.js} +1 -1
- package/dist/chunk-6YHJ554P.js +6 -0
- package/dist/chunk-6ZIOYXEF.js +3 -0
- package/dist/chunk-7BFDUVOG.js +1 -0
- package/dist/chunk-7DVOSOEP.js +11 -0
- package/dist/chunk-7JESXDF2.js +14 -0
- package/dist/chunk-7KJ5TBWG.js +5 -0
- package/dist/{chunk-7MUKLZOL.js → chunk-A3VYI4LO.js} +2 -2
- package/dist/{chunk-4HHXSMD7.js → chunk-A5SQCM63.js} +2 -2
- package/dist/chunk-A6X2IVGT.js +4 -0
- package/dist/{chunk-HUZUORYM.js → chunk-AP3RFOPL.js} +10 -10
- package/dist/{chunk-3LVGAQB4.js → chunk-ATPFTRCC.js} +1 -1
- package/dist/chunk-AWQ5AR2K.js +5 -0
- package/dist/chunk-BECEP46I.js +16 -0
- package/dist/{chunk-JPGO36XP.js → chunk-BHWEA4V2.js} +1 -1
- package/dist/chunk-BPVZ7E63.js +1 -0
- package/dist/chunk-C2FFA4O4.js +1 -0
- package/dist/chunk-C3LZPAAH.js +3 -0
- package/dist/chunk-C6ABJCRG.js +1 -0
- package/dist/chunk-CCEA5CUX.js +1 -0
- package/dist/chunk-CE6FKJFS.js +1 -0
- package/dist/chunk-CW7WJZKR.js +28 -0
- package/dist/chunk-D3DDLLNF.js +2 -0
- package/dist/chunk-D656BV5Z.js +25 -0
- package/dist/chunk-DCBYHVKW.js +1 -0
- package/dist/{chunk-RF2DPBA6.js → chunk-DCK2FX6J.js} +1 -1
- package/dist/chunk-DERA4K6A.js +32 -0
- package/dist/chunk-DNLOSMHL.js +3 -0
- package/dist/chunk-E2YBU6D3.js +294 -0
- package/dist/{chunk-INEU4XKS.js → chunk-F47MFBKM.js} +1 -1
- package/dist/chunk-F6T3UBBL.js +1 -0
- package/dist/{chunk-WXVZJJOR.js → chunk-FBVBO5YQ.js} +1 -1
- package/dist/chunk-FD5S2O6M.js +7 -0
- package/dist/chunk-FFYYJKF7.js +1 -0
- package/dist/{chunk-LX3ZOW52.js → chunk-FGVC22EY.js} +1 -1
- package/dist/{chunk-NRAFVIU3.js → chunk-FP2NOZSD.js} +1 -1
- package/dist/chunk-FQDRVPCY.js +2 -0
- package/dist/{chunk-IOLVEXM6.js → chunk-FSTCEWXX.js} +1 -1
- package/dist/chunk-FTN7Y6HD.js +7 -0
- package/dist/{chunk-52GC6XUT.js → chunk-GVITHCQJ.js} +1 -1
- package/dist/chunk-H4W4DFKK.js +1 -0
- package/dist/{chunk-72F3YBNA.js → chunk-HD5TYIDZ.js} +1 -1
- package/dist/chunk-HHXHOQQP.js +3 -0
- package/dist/chunk-HJSYHK4S.js +8 -0
- package/dist/chunk-HLMFVORT.js +1 -0
- package/dist/chunk-HSYRYSX4.js +3 -0
- package/dist/chunk-I3LX25MB.js +1 -0
- package/dist/chunk-INFBVFMU.js +4 -0
- package/dist/chunk-IOQQUHST.js +18 -0
- package/dist/chunk-IVGWFPMA.js +19 -0
- package/dist/chunk-IWCPQD7X.js +1382 -0
- package/dist/chunk-IWE4RUI7.js +1 -0
- package/dist/chunk-IXUVSFW2.js +1 -0
- package/dist/chunk-J6VTZEE2.js +15 -0
- package/dist/{chunk-MQNYGGAM.js → chunk-K3PGC6DC.js} +1 -1
- package/dist/{chunk-MBAFWQSZ.js → chunk-K77WAKOB.js} +1 -1
- package/dist/{chunk-UGDBJTLP.js → chunk-K7K6GNF6.js} +1 -1
- package/dist/chunk-KFCGMT67.js +1 -0
- package/dist/chunk-KLA7AWG6.js +7 -0
- package/dist/{chunk-6B53BWJW.js → chunk-KQU6HOJ3.js} +1 -1
- package/dist/{chunk-A74GETYC.js → chunk-KU5OPV7U.js} +1 -1
- package/dist/chunk-L2VSSINY.js +1 -0
- package/dist/chunk-LCCMXY6N.js +1 -0
- package/dist/{chunk-GOJ2QHSR.js → chunk-LITB5QQX.js} +1 -1
- package/dist/chunk-LKS47US7.js +8 -0
- package/dist/{chunk-DJONKJSZ.js → chunk-LQMSF3F7.js} +1 -1
- package/dist/chunk-LTWXTDDR.js +5 -0
- package/dist/{chunk-D6JARNEH.js → chunk-M2TJICTB.js} +1 -1
- package/dist/chunk-M4LOKANA.js +1 -0
- package/dist/chunk-M4V2OQAX.js +1 -0
- package/dist/chunk-MA52QGHP.js +1 -0
- package/dist/chunk-MFLBTJO7.js +1 -0
- package/dist/chunk-MGL4YM3S.js +28 -0
- package/dist/{chunk-6TZAAS5H.js → chunk-MIO2CV3Q.js} +1 -1
- package/dist/{chunk-2APPXD5Z.js → chunk-MKE434RB.js} +1 -1
- package/dist/chunk-MZJRNFAU.js +1 -0
- package/dist/{chunk-HSK7YMRE.js → chunk-N3YWHJMB.js} +11 -11
- package/dist/{chunk-TQYMC7TH.js → chunk-N5ROZKPZ.js} +1 -1
- package/dist/chunk-NBYS6YQ2.js +5 -0
- package/dist/chunk-NEZEHBT2.js +1 -0
- package/dist/chunk-NO5KVFTV.js +22 -0
- package/dist/{chunk-3DQIVE24.js → chunk-NP4UFPAX.js} +1 -1
- package/dist/chunk-NPM3MFB3.js +7 -0
- package/dist/{chunk-JVIKCGDY.js → chunk-NXL6LDJU.js} +1 -1
- package/dist/chunk-OA4P6AKS.js +1 -0
- package/dist/chunk-OKNBZSGN.js +2 -0
- package/dist/chunk-OKOYLEA7.js +278 -0
- package/dist/chunk-OLOBQ42K.js +1 -0
- package/dist/chunk-OYP7DKPU.js +1 -0
- package/dist/{chunk-7UYZQN4V.js → chunk-PBTXPBI6.js} +2 -2
- package/dist/chunk-PLQFX5ZP.js +9 -0
- package/dist/{chunk-JLBH7RCF.js → chunk-PS25FEBF.js} +1 -1
- package/dist/{chunk-OLZHWPZP.js → chunk-PSQFZAF3.js} +1 -1
- package/dist/chunk-PUTZFF2Z.js +613 -0
- package/dist/chunk-QLQGHMVU.js +15 -0
- package/dist/{chunk-XLELNRFF.js → chunk-QTGMS62F.js} +1 -1
- package/dist/chunk-R6JNXEB3.js +1 -0
- package/dist/chunk-RAH5NW3R.js +1 -0
- package/dist/{chunk-R466TU3N.js → chunk-RGNAWKD7.js} +1 -1
- package/dist/chunk-RL5BWZ7D.js +15 -0
- package/dist/{chunk-Y5JKV2AI.js → chunk-RVMB5LC2.js} +1 -1
- package/dist/chunk-SSM346XI.js +5 -0
- package/dist/chunk-T5MK7ZSF.js +1 -0
- package/dist/{chunk-22PCRFG4.js → chunk-TGACBJIY.js} +1 -1
- package/dist/{chunk-KBQ4LGFB.js → chunk-TLSAQ6FG.js} +1 -1
- package/dist/chunk-TNQXTZAX.js +32 -0
- package/dist/{chunk-ELVFJ7BR.js → chunk-TQGTEVSR.js} +1 -1
- package/dist/chunk-TXUTT6UA.js +17 -0
- package/dist/chunk-U3ZG675O.js +5 -0
- package/dist/chunk-UARVYVLN.js +3 -0
- package/dist/chunk-UBKVCI7A.js +3 -0
- package/dist/{chunk-SRCQVUMC.js → chunk-UCLSPAVX.js} +1 -1
- package/dist/chunk-ULQG3XQS.js +1 -0
- package/dist/chunk-UOQ75BL3.js +1 -0
- package/dist/{chunk-OXPWCC7I.js → chunk-UOQQNAHX.js} +2 -2
- package/dist/chunk-UURFVUAH.js +11 -0
- package/dist/chunk-VA5IUGZV.js +2 -0
- package/dist/{chunk-YZDDTYTU.js → chunk-VEDZUOVI.js} +3 -3
- package/dist/chunk-VICNWPLQ.js +567 -0
- package/dist/chunk-VPL2NDH6.js +370 -0
- package/dist/chunk-VT77EFRL.js +10 -0
- package/dist/chunk-VYXVYOIJ.js +3 -0
- package/dist/chunk-WCWNI3ZV.js +283 -0
- package/dist/chunk-WNGV4JQS.js +4 -0
- package/dist/chunk-WUK5NQSX.js +6 -0
- package/dist/chunk-X2TC7S57.js +103 -0
- package/dist/chunk-X4CV6TRE.js +1 -0
- package/dist/chunk-XDAOLCPN.js +4 -0
- package/dist/chunk-XFKCDWXB.js +5 -0
- package/dist/chunk-XP6IRAZN.js +1 -0
- package/dist/{chunk-JGXWQULI.js → chunk-XX343DDG.js} +1 -1
- package/dist/{chunk-Q7ING5F5.js → chunk-XXE7667M.js} +1 -1
- package/dist/chunk-YGMVL6NZ.js +6 -0
- package/dist/chunk-YJB7P2HC.js +1 -0
- package/dist/{chunk-P6XE4MH5.js → chunk-YS6VOQ7I.js} +1 -1
- package/dist/chunk-ZZYFG22L.js +26 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -2
- 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 -9
- package/dist/cli/commands/app/bulk/status.js +1 -5
- package/dist/cli/commands/app/config/link.js +1 -4
- 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 -3
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -22
- package/dist/cli/commands/app/dev/clean.js +1 -5
- package/dist/cli/commands/app/dev.js +1 -320
- package/dist/cli/commands/app/env/pull.js +1 -11
- 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 -16
- package/dist/cli/commands/app/function/replay.js +1 -5
- 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 -5
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -11
- package/dist/cli/commands/app/init.js +1 -10
- package/dist/cli/commands/app/logs.js +1 -2
- package/dist/cli/commands/app/release.js +1 -4
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -25
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/docs/generate.d.ts +0 -8
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -15
- package/dist/cli/commands/theme/delete.js +1 -7
- package/dist/cli/commands/theme/dev.js +1 -26
- package/dist/cli/commands/theme/duplicate.js +1 -32
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -8
- 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 -3
- package/dist/cli/commands/theme/open.js +1 -8
- package/dist/cli/commands/theme/package.js +1 -7
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -3
- package/dist/cli/commands/theme/publish.js +1 -7
- package/dist/cli/commands/theme/pull.js +1 -3
- package/dist/cli/commands/theme/push.js +1 -28
- package/dist/cli/commands/theme/rename.js +1 -6
- package/dist/cli/commands/theme/share.js +1 -3
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-6QNH5BID.js +1 -0
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-TSPWW5YF.js} +1 -1
- package/dist/data/filters.json +60 -0
- package/dist/data/latest.json +1 -1
- package/dist/data/setting.json +29 -9
- package/dist/data/shopify_system_translations.json +71 -19
- package/dist/data/tags.json +3 -3
- package/dist/deprecations-F6JWVV2W.js +1 -0
- package/dist/{devtools-OLOT2NY4.js → devtools-HCKYP7DQ.js} +1 -1
- package/dist/{devtools-UFRKBFGI.js → devtools-VEZNCV6W.js} +1 -1
- package/dist/dist-4BD6KOLR.js +1 -0
- package/dist/dist-AUABCVPI.js +1 -0
- package/dist/environments-RGLI75HN.js +1 -0
- package/dist/error-OZALZZ3U.js +1 -0
- package/dist/error-handler-V7LSEXHM.js +1 -0
- package/dist/{estree-KI7NUW53.js → estree-BYYJYS3A.js} +1 -1
- package/dist/fs-YMUQ6JLE.js +1 -0
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/html-HETICZ2F.js +25 -0
- package/dist/index.js +9 -1182
- package/dist/is-global-BLIZ57HQ.js +1 -0
- package/dist/is-wsl-TN2CXYI7.js +1 -0
- package/dist/{latest-version-EFWBOTWM.js → latest-version-6OAYLOBL.js} +1 -1
- package/dist/{lib-QB6I6CTC.js → lib-AK5EOIKR.js} +1 -1
- package/dist/{lib-C3VO2BQW.js → lib-LVUMLZ4H.js} +1 -1
- package/dist/lib-ME6554NA.js +1 -0
- package/dist/local-GPDAXHE6.js +1 -0
- package/dist/local-storage-P66KJG6I.js +1 -0
- package/dist/{markdown-PLKL4IZK.js → markdown-5TVCXM53.js} +1 -1
- package/dist/{metadata-UDMOTRS7.js → metadata-TRH25EHU.js} +1 -1
- package/dist/{morph-EMYAITFM.js → morph-I35VYPBH.js} +4 -4
- package/dist/node-package-manager-GO4ZRTKQ.js +1 -0
- package/dist/notifications-system-HM6JZ6WJ.js +1 -0
- package/dist/{npa-ICFSA3NL.js → npa-VNALV7XY.js} +1 -1
- package/dist/output-7IYOMPSA.js +1 -0
- package/dist/{postcss-3FJQPJI2.js → postcss-IIK6CGAW.js} +1 -1
- package/dist/{prettier-NVRHEAFO.js → prettier-ZSBNNQTK.js} +1 -1
- package/dist/system-X5C4EQQH.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-H62CMRLG.js +1 -0
- package/dist/upgrade-EEOPH464.js +1 -0
- package/dist/version-76NBQR4K.js +1 -0
- package/dist/version-IGSEISUA.js +1 -0
- package/dist/{workerd-L2EJKIAQ.js → workerd-ST6XJKUN.js} +1 -1
- package/oclif.manifest.json +142 -7
- package/package.json +14 -11
- package/dist/analytics-6IHHYAV6.js +0 -1
- package/dist/analytics-KKVP5DT3.js +0 -1
- package/dist/angular-VRDO2DBE.js +0 -4
- package/dist/chunk-26D72ZNV.js +0 -1
- package/dist/chunk-2I4PRX2I.js +0 -1
- package/dist/chunk-2VQJQ36C.js +0 -103
- package/dist/chunk-323UTVMM.js +0 -1
- package/dist/chunk-3F6NZK7S.js +0 -2
- package/dist/chunk-4G7J6HIV.js +0 -1
- package/dist/chunk-66RJ5T7A.js +0 -102
- package/dist/chunk-6BMMB2UO.js +0 -1
- package/dist/chunk-6HBRBQAN.js +0 -6
- package/dist/chunk-74HYYXXE.js +0 -17
- package/dist/chunk-7BGM2GAH.js +0 -1
- package/dist/chunk-AIV5RI3X.js +0 -1
- package/dist/chunk-AKML26N3.js +0 -7
- package/dist/chunk-ALKTLKQ6.js +0 -5
- package/dist/chunk-B2EHO7ZC.js +0 -847
- package/dist/chunk-B2IVY4V5.js +0 -1
- package/dist/chunk-BDVAE5MS.js +0 -28
- package/dist/chunk-CERXUPGC.js +0 -14
- package/dist/chunk-D3TSJA5S.js +0 -1
- package/dist/chunk-DFMQWJQ3.js +0 -3
- package/dist/chunk-DJQVNH7P.js +0 -567
- package/dist/chunk-ELYP4KFP.js +0 -8
- package/dist/chunk-FFQ5EWII.js +0 -294
- package/dist/chunk-FUOIGXI4.js +0 -1
- package/dist/chunk-GD7FWXJ5.js +0 -2
- package/dist/chunk-GFEAKSGV.js +0 -374
- package/dist/chunk-IIIVWD4R.js +0 -1
- package/dist/chunk-IX5ICOBV.js +0 -7
- package/dist/chunk-J3KVONB3.js +0 -6
- package/dist/chunk-JHPRFW5B.js +0 -19
- package/dist/chunk-K2WUCOQJ.js +0 -32
- package/dist/chunk-K5YV6UVF.js +0 -4
- package/dist/chunk-KGXQS7LS.js +0 -1
- package/dist/chunk-KL5Z3T6L.js +0 -1
- package/dist/chunk-KNVM7N3U.js +0 -1
- package/dist/chunk-KWJ562F2.js +0 -12
- package/dist/chunk-LALIKZPS.js +0 -5
- package/dist/chunk-LAZJ47DZ.js +0 -6
- package/dist/chunk-LDGAHMS7.js +0 -159
- package/dist/chunk-LW7U753G.js +0 -1
- package/dist/chunk-LXFJDCNG.js +0 -1
- package/dist/chunk-N5YIPQ6J.js +0 -1
- package/dist/chunk-N7RBSKYT.js +0 -1
- package/dist/chunk-NF2ABOOU.js +0 -1
- package/dist/chunk-ODNGDO4H.js +0 -50
- package/dist/chunk-OHY4ZL3U.js +0 -2
- package/dist/chunk-P5VVOLGV.js +0 -1
- package/dist/chunk-P7R7FBY2.js +0 -3
- package/dist/chunk-QRRNOVJ3.js +0 -1
- package/dist/chunk-RFG5RMPL.js +0 -1
- package/dist/chunk-RVNMVBPM.js +0 -1
- package/dist/chunk-SBEZBZM7.js +0 -144
- package/dist/chunk-SGQ6D3LU.js +0 -15
- package/dist/chunk-TFSBQ4RY.js +0 -5
- package/dist/chunk-UGXYQ23Y.js +0 -1411
- package/dist/chunk-VS3T5YOG.js +0 -264
- package/dist/chunk-VWYM4OWK.js +0 -1
- package/dist/chunk-VY6SNDKW.js +0 -3
- package/dist/chunk-WFXRSKRK.js +0 -1
- package/dist/chunk-XBXMPFXM.js +0 -1
- package/dist/chunk-YC6G4MHD.js +0 -3
- package/dist/chunk-YI232QLS.js +0 -1
- package/dist/chunk-ZTMSBSYD.js +0 -1
- package/dist/chunk-ZV6NCNI4.js +0 -586
- package/dist/chunk-ZVJVDCIM.js +0 -1
- package/dist/conf-store-U5ZITKJN.js +0 -1
- package/dist/deprecations-TU5UQJVV.js +0 -1
- package/dist/dist-2Z5TND4U.js +0 -1
- package/dist/dist-GYHFDHKP.js +0 -1
- package/dist/environments-Z5PR7DSI.js +0 -1
- package/dist/error-IJGNYKZ3.js +0 -1
- package/dist/error-handler-WSCGNS2P.js +0 -1
- package/dist/fs-5BDEA2KD.js +0 -1
- package/dist/html-VSSXOZOQ.js +0 -25
- package/dist/is-global-V4ZRHQG2.js +0 -1
- package/dist/is-wsl-FVUIXDOK.js +0 -1
- package/dist/lib-5L7UKDEK.js +0 -1
- package/dist/local-6QPX4GCJ.js +0 -1
- package/dist/local-storage-JLXBZVWO.js +0 -1
- package/dist/node-package-manager-HAFRYGUM.js +0 -1
- package/dist/notifications-system-MP7WDOCS.js +0 -1
- package/dist/output-YGMHXEIS.js +0 -1
- package/dist/system-KLXD4FXF.js +0 -1
- package/dist/ui-GHG3UGB3.js +0 -1
- package/dist/upgrade-OPZGPM5J.js +0 -1
- package/dist/version-D5PJZIRW.js +0 -1
- package/dist/version-KRQBMYCH.js +0 -1
- /package/dist/{acorn-LOOAJL3S.js → acorn-QBS5IYTX.js} +0 -0
- /package/dist/{babel-URCL33XX.js → babel-JS32NLHY.js} +0 -0
- /package/dist/{flow-MLHT7MTJ.js → flow-M3Q2HPQT.js} +0 -0
- /package/dist/{glimmer-HAJ4HQCW.js → glimmer-3DEJJGOJ.js} +0 -0
- /package/dist/{graphql-F7IHGXDT.js → graphql-A4HHE3MB.js} +0 -0
- /package/dist/{meriyah-AYZQ3BGY.js → meriyah-23OZNYWC.js} +0 -0
- /package/dist/{typescript-ODJ335NU.js → typescript-YKZ232QT.js} +0 -0
- /package/dist/{yaml-BIHS2GQW.js → yaml-SJKIH3VD.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as J,b as N,c as q,f as C,h as F}from"./chunk-IWE4RUI7.js";import{a as E}from"./chunk-T5MK7ZSF.js";import{a as k,c as A}from"./chunk-DCK2FX6J.js";import{b as x}from"./chunk-N5ROZKPZ.js";import{g as z,h as y}from"./chunk-4V4DQ6W7.js";import{b}from"./chunk-4KRT35A2.js";import{E as m,v as f,x as S}from"./chunk-MGL4YM3S.js";import{d as u}from"./chunk-BHWEA4V2.js";import{Fb as c,Hb as n,Lb as O,Ta as v,ma as w,ua as g}from"./chunk-VPL2NDH6.js";import{e as I,g as l}from"./chunk-VPRTJUIN.js";l();l();var M=I(z(),1);async function D(s,e){if(s)try{return JSON.parse(s)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new u(n`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await v(e))throw new u(n`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await w(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let p=r instanceof Error?r.message:"Unknown error";throw new u(n`Invalid JSON in variable file ${c.path(e)}: ${p}`,"Please provide valid JSON format.")}}}async function $(s){let{remoteApp:e,store:t,query:r,variables:p,variableFile:L,version:R,outputFile:d}=s,{adminSession:V,version:G}=await m({title:n`Authenticating`,task:async()=>{let o=await J(e,t.shopDomain),i=await q({adminSession:o,userSpecifiedVersion:R});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),P=await D(p,L);N(r),C(r,t);try{let o=await m({title:n`Executing GraphQL operation`,task:async()=>x({query:(0,M.parse)(r),session:V,variables:P,version:G,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);d?(await g(d,i),f({headline:"Operation succeeded.",body:`Results written to ${d}`})):(f({headline:"Operation succeeded."}),O(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},Q=JSON.stringify(i,null,2);S({headline:"GraphQL operation failed.",body:Q});return}throw o}}var h,a=class extends E{async run(){let{flags:e}=await this.parse(h),{query:t,appContextResult:r,store:p}=await F(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:p,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};h=a;a.summary="Execute GraphQL queries and mutations.";a.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";a.description=h.descriptionWithoutMarkdown();a.flags={...b,...k,...A};var oe=a;export{oe as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./chunk-VPRTJUIN.js";r();function u(s,e,c){let n=[];for(let t=0;t<s.length;t+=e){let o=s.slice(t,t+e);n.push(c(o))}return n}function h(s,e,c){let n=[];for(let t=0;t<s.length;t+=e){let o=s.slice(t,t+e);n.push(c(o,t))}return n}export{u as a,h as b};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-Z35BTAM6.js";import{a as Me}from"./chunk-75VPUOC5.js";import{a as He}from"./chunk-HZA6IAA4.js";import{a as Ce}from"./chunk-PD5ZHJWI.js";import{l as ze,r as F}from"./chunk-
|
|
1
|
+
import{a as Q}from"./chunk-Z35BTAM6.js";import{a as Me}from"./chunk-75VPUOC5.js";import{a as He}from"./chunk-HZA6IAA4.js";import{a as Ce}from"./chunk-PD5ZHJWI.js";import{l as ze,r as F}from"./chunk-3YWUSKWF.js";import{a as Ve,b as Ge}from"./chunk-ZR76GGZ6.js";import{a as ve,c as Z,e as b,g}from"./chunk-VPRTJUIN.js";var me=Z((Bn,je)=>{g();function Ye(i){t.debug=t,t.default=t,t.coerce=l,t.disable=c,t.enable=s,t.enabled=o,t.humanize=Ve(),t.destroy=f,Object.keys(i).forEach(a=>{t[a]=i[a]}),t.names=[],t.skips=[],t.formatters={};function e(a){let u=0;for(let d=0;d<a.length;d++)u=(u<<5)-u+a.charCodeAt(d),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(a){let u,d=null,p,m;function w(...C){if(!w.enabled)return;let I=w,P=Number(new Date),D=P-(u||P);I.diff=D,I.prev=u,I.curr=P,u=P,C[0]=t.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let K=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(de,We)=>{if(de==="%%")return"%";K++;let be=t.formatters[We];if(typeof be=="function"){let qe=C[K];de=be.call(I,qe),C.splice(K,1),K--}return de}),t.formatArgs.call(I,C),(I.log||t.log).apply(I,C)}return w.namespace=a,w.useColors=t.useColors(),w.color=t.selectColor(a),w.extend=n,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==t.namespaces&&(p=t.namespaces,m=t.enabled(a)),m),set:C=>{d=C}}),typeof t.init=="function"&&t.init(w),w}function n(a,u){let d=t(this.namespace+(typeof u>"u"?":":u)+a);return d.log=this.log,d}function s(a){t.save(a),t.namespaces=a,t.names=[],t.skips=[];let u=(typeof a=="string"?a:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?t.skips.push(d.slice(1)):t.names.push(d)}function r(a,u){let d=0,p=0,m=-1,w=0;for(;d<a.length;)if(p<u.length&&(u[p]===a[d]||u[p]==="*"))u[p]==="*"?(m=p,w=d,p++):(d++,p++);else if(m!==-1)p=m+1,w++,d=w;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function c(){let a=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),a}function o(a){for(let u of t.skips)if(r(a,u))return!1;for(let u of t.names)if(r(a,u))return!0;return!1}function l(a){return a instanceof Error?a.stack||a.message:a}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}je.exports=Ye});var Pe=Z((x,X)=>{g();x.formatArgs=Ze;x.save=Qe;x.load=Xe;x.useColors=Ke;x.storage=et();x.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();x.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ke(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let i;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ze(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+X.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,n=0;i[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(n=t))}),i.splice(n,0,e)}x.log=console.debug||console.log||(()=>{});function Qe(i){try{i?x.storage.setItem("debug",i):x.storage.removeItem("debug")}catch{}}function Xe(){let i;try{i=x.storage.getItem("debug")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function et(){try{return localStorage}catch{}}X.exports=me()(x);var{formatters:tt}=X.exports;tt.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var xe=Z((v,te)=>{g();var nt=ve("tty"),ee=ve("util");v.init=ct;v.log=rt;v.formatArgs=st;v.save=at;v.load=lt;v.useColors=it;v.destroy=ee.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");v.colors=[6,2,3,4,5,1];try{let i=Ge();i&&(i.stderr||i).level>=2&&(v.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}v.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,r)=>r.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),i[t]=n,i},{});function it(){return"colors"in v.inspectOpts?!!v.inspectOpts.colors:nt.isatty(process.stderr.fd)}function st(i){let{namespace:e,useColors:t}=this;if(t){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),r=` ${s};1m${e} \x1B[0m`;i[0]=r+i[0].split(`
|
|
2
2
|
`).join(`
|
|
3
3
|
`+r),i.push(s+"m+"+te.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=ot()+e+" "+i[0]}function ot(){return v.inspectOpts.hideDate?"":new Date().toISOString()+" "}function rt(...i){return process.stderr.write(ee.formatWithOptions(v.inspectOpts,...i)+`
|
|
4
4
|
`)}function at(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function lt(){return process.env.DEBUG}function ct(i){i.inspectOpts={};let e=Object.keys(v.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=v.inspectOpts[e[t]]}te.exports=me()(v);var{formatters:ke}=te.exports;ke.o=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts).split(`
|
|
5
5
|
`).map(e=>e.trim()).join(" ")};ke.O=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts)}});var T=Z((Rn,he)=>{g();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?he.exports=Pe():he.exports=xe()});g();g();var ge=b(F(),1);g();var $e=b(ze(),1);var{Ansis:St,ansi256:Bt,fg:Jt,bgAnsi256:At,bg:Ut,rgb:Rt,bgRgb:Tt,hex:_t,bgHex:Wt,reset:qt,inverse:Vt,hidden:Gt,visible:zt,bold:E,dim:k,italic:Ht,underline:Mt,strikethrough:Yt,strike:Kt,black:Zt,red:Qt,green:Xt,yellow:en,blue:tn,magenta:nn,cyan:R,white:sn,grey:on,gray:rn,blackBright:an,redBright:ln,greenBright:cn,yellowBright:un,blueBright:gn,magentaBright:fn,cyanBright:pn,whiteBright:dn,bgBlack:mn,bgRed:hn,bgGreen:yn,bgYellow:wn,bgBlue:bn,bgMagenta:vn,bgCyan:Cn,bgWhite:$n,bgGrey:jn,bgGray:Pn,bgBlackBright:kn,bgRedBright:xn,bgGreenBright:Fn,bgYellowBright:Ln,bgBlueBright:Nn,bgMagentaBright:In,bgCyanBright:On,bgWhiteBright:En}=$e.default;g();var $=b(F(),1);var Be=b(T(),1),B=b(He(),1);import{spawn as wt}from"node:child_process";import{access as bt,mkdir as vt,readFile as Ct,rename as $t,rm as Oe,writeFile as jt}from"node:fs/promises";import{basename as Pt,dirname as Ee,join as j,parse as De,resolve as we}from"node:path";import{fileURLToPath as kt}from"node:url";g();var re=b(F(),1),Le=b(T(),1);import{readFile as gt}from"node:fs/promises";import{createRequire as ft}from"node:module";import{join as pt,sep as dt}from"node:path";g();var _=b(F(),1),Fe=b(T(),1);import{spawn as ut}from"node:child_process";var ne=(0,Fe.default)("@oclif/plugin-plugins:spawn");async function ie(i,e=[],{cwd:t,logLevel:n}){return new Promise((s,r)=>{process.platform==="win32"&&i.endsWith(".js")&&(e.unshift(`"${i}"`),i="node"),ne("modulePath",i),ne("args",e);let c=ut(i,e,{cwd:t,env:{...Ce(),HUSKY:"0"},stdio:"pipe",windowsVerbatimArguments:!0,...process.platform==="win32"&&i.toLowerCase().endsWith(".cmd")&&{shell:!0}}),o=["up to date","added"],l=[],f=[],a=[],u=[],d=p=>{let m=a.length===0&&u.length===0,w=o.some(C=>p.startsWith(C));return m&&w&&n==="notice"?!1:n!=="silent"};c.stderr?.setEncoding("utf8"),c.stderr?.on("data",p=>{let m=p.toString().trim();l.push(m),d(m)?(a.push(m),_.ux.stdout(m)):ne(m)}),c.stdout?.setEncoding("utf8"),c.stdout?.on("data",p=>{let m=p.toString().trim();f.push(m),d(m)?(u.push(m),_.ux.stdout(m)):ne(m)}),c.on("error",r),c.on("exit",p=>{p===0?s({stderr:l,stdout:f}):r(new _.Errors.CLIError(`${i} ${e.join(" ")} exited with code ${p}`,{suggestions:["Run with DEBUG=@oclif/plugin-plugins* to see debug output."]}))})})}var se=(0,Le.default)("@oclif/plugin-plugins:npm"),oe=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let n=await this.findNpm();se("npm binary path",n),e.push(`--loglevel=${this.logLevel}`,"--no-fund"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&re.ux.stderr(`${t.cwd}: ${n} ${e.join(" ")}`),se(`${t.cwd}: ${n} ${e.join(" ")}`);try{let s=await ie(n,e,t);return se("npm done"),s}catch(s){throw se("npm error",s),s}}async install(e,t){let n=t.prod?["--omit","dev"]:[];return this.exec(["install",...e,...n,"--no-audit"],t)}async uninstall(e,t){return this.exec(["uninstall",...e],t)}async update(e,t){return this.exec(["update",...e],t)}async view(e,t){return this.exec(["view",...e],{...t,logLevel:"silent"})}async findNpm(){if(this.bin)return this.bin;try{let e=ft(import.meta.url).resolve("npm/package.json"),t=JSON.parse(await gt(e,{encoding:"utf8"})),n=e.slice(0,Math.max(0,e.lastIndexOf(dt)));this.bin=pt(n,t.bin.npm)}catch{let{default:e}=await import("./lib-WU3FEA6I.js");this.bin=await e("npm")}if(!this.bin)throw new re.Errors.CLIError("npm not found");return this.bin}};g();function ye(i,e){let t=i===void 0?0:i,n=e===void 0?0:e;if(Array.isArray(t)&&Array.isArray(n)){if(t.length===0&&n.length===0)return 0;let s=ye(t[0],n[0]);return s!==0?s:ye(t.slice(1),n.slice(1))}return t<n?-1:t>n?1:0}function A(i,e){return i.sort((t,n)=>ye(e(t),e(n)))}function Ne(i,e){return i.filter((t,n)=>!i.some((s,r)=>r>n&&e(t,s)))}g();var ce=b(F(),1),Ie=b(T(),1);import{createRequire as mt}from"node:module";import{fileURLToPath as ht}from"node:url";var yt=mt(import.meta.url),ae=(0,Ie.default)("@oclif/plugin-plugins:yarn"),le=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let n=await this.findYarn();ae("yarn binary path",n),t.logLevel==="verbose"&&e.push("--verbose"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&ce.ux.stderr(`${t.cwd}: ${n} ${e.join(" ")}`),ae(`${t.cwd}: ${n} ${e.join(" ")}`);try{let s=await ie(n,e,t);return ae("yarn done"),s}catch(s){throw ae("yarn error",s),s}}async install(e,t){return this.exec(["install",...e],t)}async findYarn(){if(this.bin)return this.bin;try{this.bin=yt.resolve("yarn/bin/yarn.js",{paths:[this.config.root,ht(import.meta.url)]})}catch{let{default:e}=await import("./lib-WU3FEA6I.js");this.bin=await e("yarn")}if(!this.bin)throw new ce.Errors.CLIError("yarn not found");return this.bin}};var ue={dependencies:{},oclif:{plugins:[],schema:1},private:!0};async function U(i){try{return await bt(i),!0}catch{return!1}}function Je(i){return Ne(i,(e,t)=>e.name===t.name||e.type==="link"&&t.type==="link"&&e.root===t.root)}function xt(i,e){if(i)return typeof i=="string"?i:i.url;if(e)return typeof e=="string"?e:e.url.replace("git+","").replace(".git","")}function Se(i,e){[...e.stdout,...e.stderr].some(n=>n.includes("npm WARN"))&&($.ux.stderr(E.yellow(`
|
|
6
6
|
These warnings can only be addressed by the owner(s) of ${i.name}.`)),(i.pjson.bugs||i.pjson.repository)&&$.ux.stderr(`We suggest that you create an issue at ${xt(i.pjson.bugs,i.pjson.repository)} and ask the plugin owners to address them.
|
|
7
|
-
`))}var h=class{config;npm;debug;logLevel;constructor(e){this.config=e.config,this.debug=(0,Be.default)("@oclif/plugin-plugins"),this.logLevel=e.logLevel??"notice",this.npm=new oe({config:this.config,logLevel:this.logLevel})}get pjsonPath(){return j(this.config.dataDir,"package.json")}async add(...e){let t=await this.pjson(),n=[...t.oclif.plugins||[],...e];await this.savePJSON({...t,oclif:{...t.oclif,plugins:Je(n)}})}friendlyName(e){let{pluginPrefix:t,scope:n}=this.config.pjson.oclif;return n?e.match(`@${n}/${t??"plugin"}-(.+)`)?.[1]??e:e}async hasPlugin(e){let t=await this.list(),n=this.friendlyName(e),s=this.unfriendlyName(e)??e;return t.find(r=>this.friendlyName(r.name)===n)??t.find(r=>this.unfriendlyName(r.name)===s)??t.find(r=>r.type==="link"&&we(r.root)===we(e))??!1}async install(e,{force:t=!1,tag:n="latest"}={}){await this.maybeCleanUp();try{this.debug(`installing plugin ${e}`);let s={cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0};await this.ensurePJSON();let r,c=t?["--force"]:[];if(e.includes(":")){let o=e,l=await this.npm.install([...c,o],s),{dependencies:f}=await this.pjson(),{default:a}=await import("./npa-
|
|
7
|
+
`))}var h=class{config;npm;debug;logLevel;constructor(e){this.config=e.config,this.debug=(0,Be.default)("@oclif/plugin-plugins"),this.logLevel=e.logLevel??"notice",this.npm=new oe({config:this.config,logLevel:this.logLevel})}get pjsonPath(){return j(this.config.dataDir,"package.json")}async add(...e){let t=await this.pjson(),n=[...t.oclif.plugins||[],...e];await this.savePJSON({...t,oclif:{...t.oclif,plugins:Je(n)}})}friendlyName(e){let{pluginPrefix:t,scope:n}=this.config.pjson.oclif;return n?e.match(`@${n}/${t??"plugin"}-(.+)`)?.[1]??e:e}async hasPlugin(e){let t=await this.list(),n=this.friendlyName(e),s=this.unfriendlyName(e)??e;return t.find(r=>this.friendlyName(r.name)===n)??t.find(r=>this.unfriendlyName(r.name)===s)??t.find(r=>r.type==="link"&&we(r.root)===we(e))??!1}async install(e,{force:t=!1,tag:n="latest"}={}){await this.maybeCleanUp();try{this.debug(`installing plugin ${e}`);let s={cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0};await this.ensurePJSON();let r,c=t?["--force"]:[];if(e.includes(":")){let o=e,l=await this.npm.install([...c,o],s),{dependencies:f}=await this.pjson(),{default:a}=await import("./npa-VNALV7XY.js"),u=a(o),p=Object.entries(f??{}).find(([,P])=>{let D=a(P);return D.type==="file"&&D.raw?De(o).base===De(D.raw).base:D.hosted?.type===u.hosted?.type&&D.hosted?.user===u.hosted?.user&&D.hosted?.project===u.hosted?.project})?.[0];if(!p)throw new $.Errors.CLIError(`Could not find plugin name for ${o}`);let m=j(this.config.dataDir,"node_modules",p);r=await $.Config.load({devPlugins:!1,name:p,root:m,userPlugins:!1}),Se(r,l),this.isValidPlugin(r),await this.add({name:p,type:"user",url:o});let w=new Set(["npm-shrinkwrap.json","oclif.lock","oclif.manifest.json"]),C=(r.pjson.files??[]).map(P=>j(m,P)).filter(P=>!w.has(Pt(P)));this.debug(`checking for existence of files: ${C.join(", ")}`);let I=Object.fromEntries(await Promise.all(C?.map(async P=>[P,await U(P)])??[]));this.debug(I),Object.values(I).every(Boolean)||$.ux.warn("This plugin may not work as expected because the prepare script did not produce all the expected files.")}else{let o=(0,B.validRange)(n),l=this.unfriendlyName(e);l&&await this.npmHasPackage(l)&&(e=l),await this.npmHasPackage(e,!0);let f=await this.npm.install([...c,`${e}@${n}`],s);this.debug(`loading plugin ${e}...`),r=await $.Config.load({devPlugins:!1,name:e,root:j(this.config.dataDir,"node_modules",e),userPlugins:!1}),this.debug(`finished loading plugin ${e} at root ${r.root}`),Se(r,f),this.isValidPlugin(r),await this.add({name:e,tag:o??n,type:"user"})}return await Oe(j(this.config.dataDir,"yarn.lock"),{force:!0}),r}catch(s){throw this.debug("error installing plugin:",s),await this.uninstall(e).catch(r=>this.debug(r)),String(s).includes("EACCES")?new $.Errors.CLIError(s,{suggestions:[`Plugin failed to install because of a permissions error.
|
|
8
8
|
Does your current user own the directory ${this.config.dataDir}?`]}):s}}async link(e,{install:t}){let n=await $.Config.load(we(e));return this.isValidPlugin(n),t&&(await U(j(n.root,"yarn.lock"))?(this.debug("installing dependencies with yarn"),await new le({config:this.config,logLevel:this.logLevel}).install([],{cwd:n.root,logLevel:this.logLevel})):await U(j(n.root,"package-lock.json"))?(this.debug("installing dependencies with npm"),await this.npm.install([],{cwd:n.root,logLevel:this.logLevel,prod:!1})):await U(j(n.root,"pnpm-lock.yaml"))?$.ux.warn(`pnpm is not supported for installing after a link. The link succeeded, but you may need to run 'pnpm install' in ${n.root}.`):$.ux.warn(`No lockfile found in ${n.root}. The link succeeded, but you may need to install the dependencies in your project.`)),await this.add({name:n.name,root:n.root,type:"link"}),n}async list(){return(await this.pjson()).oclif.plugins}async maybeUnfriendlyName(e){await this.ensurePJSON();let t=this.unfriendlyName(e);return this.debug(`checking registry for expanded package name ${t}`),t&&await this.npmHasPackage(t)?t:(this.debug(`expanded package name ${t} not found, using given package name ${e}`),e)}async pjson(){let e=await this.readPJSON(),t=e?Ft(e.oclif.plugins):[];return{...ue,...e,oclif:{...ue.oclif,...e?.oclif,plugins:t}}}async remove(e){let t=await this.pjson();t.dependencies&&delete t.dependencies[e],await this.savePJSON({...t,oclif:{...t.oclif,plugins:t.oclif.plugins.filter(n=>n.name!==e)}})}unfriendlyName(e){if(e.includes("@"))return;let{pluginPrefix:t,scope:n}=this.config.pjson.oclif;if(n)return`@${n}/${t??"plugin"}-${e}`}async uninstall(e){try{((await this.pjson()).oclif.plugins??[]).some(n=>typeof n=="object"&&n.type==="user"&&n.name===e)&&await this.npm.uninstall([e],{cwd:this.config.dataDir,logLevel:this.logLevel})}catch(t){$.ux.warn(t)}finally{await this.remove(e)}}async update(){let e=(await this.list()).filter(o=>o.type==="user");if(e.length===0)return;await this.maybeCleanUp();let t=this.config.pjson.oclif.aliases||{};for(let[o,l]of Object.entries(t))e.find(a=>a.name===o)&&(l&&await this.install(l),await this.uninstall(o),e=e.filter(a=>a.name!==o));let n=e.filter(o=>!!o.url);n.length>0&&await this.npm.update(n.map(o=>o.name),{cwd:this.config.dataDir,logLevel:this.logLevel});let s=e.filter(o=>!o.url),r=this.config.pjson.oclif.jitPlugins??{},c=[];s.length>0&&await this.npm.install(s.map(o=>{if(!(0,B.valid)(o.tag))return`${o.name}@${o.tag}`;if(o.tag&&(0,B.valid)(o.tag)&&r[o.name]&&(0,B.gt)(o.tag,r[o.name]))return`${o.name}@${o.tag}`;let l=r[o.name]??o.tag;return c.push({...o,tag:l}),`${o.name}@${l}`}),{cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0}),await this.add(...c)}async ensurePJSON(){await U(this.pjsonPath)||(this.debug(`creating ${this.pjsonPath} with pjson: ${JSON.stringify(ue,null,2)}`),await this.savePJSON(ue))}isValidPlugin(e){if(e.valid||this.config.plugins.get("@oclif/plugin-legacy")||e._base.includes("@oclif/plugin-legacy"))return!0;throw new $.Errors.CLIError("plugin is invalid",{suggestions:[`Plugin failed to install because it does not appear to be a valid CLI plugin.
|
|
9
9
|
If you are sure it is, contact the CLI developer noting this error.`]})}async maybeCleanUp(){if(await U(j(this.config.dataDir,"yarn.lock")))try{this.debug("Found yarn.lock! Removing yarn.lock and node_modules..."),await Promise.all([$t(j(this.config.dataDir,"node_modules"),j(this.config.dataDir,"node_modules.old")),Oe(j(this.config.dataDir,"yarn.lock"),{force:!0})]);let e=j(Ee(kt(import.meta.url)),"rm.js");this.debug(`spawning ${e} to remove node_modules.old`),wt(process.argv[0],[e,j(this.config.dataDir,"node_modules.old")],{detached:!0,stdio:"ignore",...this.config.windows?{shell:!0}:{}}).unref()}catch(e){this.debug("Error cleaning up yarn.lock and node_modules:",e)}}async npmHasPackage(e,t=!1){try{return await this.npm.view([e],{cwd:this.config.dataDir,logLevel:this.logLevel}),this.debug(`Found ${e} in the registry.`),!0}catch(n){if(this.debug(n),t)throw new $.Errors.CLIError(`${e} does not exist in the registry.`);return!1}}async readPJSON(){try{return JSON.parse(await Ct(this.pjsonPath,"utf8"))}catch(e){this.debug(e);let t=e;t.code!=="ENOENT"&&process.emitWarning(t)}}async savePJSON(e){await vt(Ee(this.pjsonPath),{recursive:!0}),await jt(this.pjsonPath,JSON.stringify({name:this.config.name,...e},null,2))}},Ft=i=>{let e=(i??[]).map(t=>typeof t=="string"?{name:t,tag:"latest",type:"user"}:t);return Je(e)};var W=class i extends ge.Command{static description="List installed plugins.";static enableJsonFlag=!0;static examples=["<%= config.bin %> <%= command.id %>"];static flags={core:ge.Flags.boolean({description:"Show core plugins."})};plugins;async run(){let{flags:e}=await this.parse(i);this.plugins=new h({config:this.config});let t=this.config.getPluginsList();A(t,o=>this.plugins.friendlyName(o.name)),e.core||(t=t.filter(o=>o.type!=="core"&&o.type!=="dev")),t.length===0&&this.log("No plugins installed.");let n=this.config.getPluginsList(),s=new Set(n.filter(o=>o.type==="user"||o.type==="link").map(o=>o.name)),r=this.config.pjson.oclif.jitPlugins??{},c=Object.entries(r).map(([o,l])=>({name:o,type:"jit",version:l})).filter(o=>!s.has(o.name));return A(c,o=>o.name),this.jsonEnabled()||(this.display(t),this.displayJitPlugins(c)),[...n.filter(o=>!o.parent).map(o=>{let{config:l,...f}=o;return f}),...c]}createTree(e){let t={};for(let n of e.children??[])t[this.formatPlugin(n)]=this.createTree(n);return t}display(e){let t=e.find(n=>n.root===this.config.root);for(let n of e.filter(s=>!s.parent))if(n.name!==t?.name&&(this.log(this.formatPlugin(n)),n.children&&n.children.length>0)){let s=this.createTree(n);this.log(Q(s))}}displayJitPlugins(e){if(e.length!==0){this.log(k(`
|
|
10
10
|
Uninstalled JIT Plugins:`));for(let{name:t,version:n}of e)this.log(`${this.plugins.friendlyName(t)} ${k(n)}`)}}formatPlugin(e){let t=`${this.plugins.friendlyName(e.name)} ${k(e.version)}`;return e.type!=="user"&&(t+=k(` (${e.type})`)),e.type==="link"?t+=` ${e.root}`:e.tag&&e.tag!=="latest"&&(t+=k(` (${String(e.tag)})`)),t}};g();var J=b(F(),1);import{readFile as Ae}from"node:fs/promises";import{dirname as Nt,join as fe,sep as Ue}from"node:path";g();var Lt=["silent","error","warn","notice","http","info","verbose","silly"];function O(i,e,t){if(e.verbose)return"verbose";if(e.silent)return"silent";let n=i.scopedEnvVar("NPM_LOG_LEVEL");return Lt.includes(n)?n:t}function It(i,e){let t=i.split(Ue),n=t.reduce((r,c,o)=>c===e?[...r,o]:r,[]),s=Math.max(...n);return s===-1?i:t.slice(0,s+1).join(Ue)}var q=class i extends J.Command{static args={plugin:J.Args.string({default:".",description:"Plugin to inspect.",required:!0})};static description="Displays installation properties of a plugin.";static enableJsonFlag=!0;static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> '];static flags={help:J.Flags.help({char:"h"}),verbose:J.Flags.boolean({char:"v"})};static strict=!1;static usage="plugins:inspect PLUGIN...";plugins;async findDep(e,t){let n=fe(...t.split("/")),s=fe(e.root,"node_modules"),r=[s];for(;(s.match(/node_modules/g)??[]).length>1;)s=It(Nt(s),"node_modules"),r.push(s);for(let c of r)try{let o=fe(c,n),l=fe(o,"package.json"),f=JSON.parse(await Ae(l,"utf8"));return{pkgPath:o,version:f.version}}catch{}return{pkgPath:null,version:null}}findPlugin(e){let t=this.config.getPluginsList().find(n=>n.name===e);if(t)return t;throw this.config.pjson.oclif.jitPlugins?.[e]&&this.warn(`Plugin ${e} is a JIT plugin. It will be installed the first time you run one of it's commands.`),new Error(`${e} not installed`)}async inspect(e,t=!1){let n=this.findPlugin(e),s={},r={};for(let o of A(Object.keys({...n.pjson.dependencies}),l=>l)){let{pkgPath:l,version:f}=await this.findDep(n,o);if(!f)continue;let a=n.pjson.dependencies?.[o],u=k(a?`${a} => ${f}`:f),d=t?`${o} ${u} ${l}`:`${o} ${u}`;s[d]=null,r[o]={from:a,version:f}}let c={[E.cyan(n.name)]:{[`version ${n.version}`]:null,...n.tag?{[`tag ${n.tag}`]:null}:{},...n.pjson.homepage?{[`homepage ${n.pjson.homepage}`]:null}:{},[`location ${n.root}`]:null,commands:Object.fromEntries(A(n.commandIDs,o=>o).map(o=>[o,null])),dependencies:s}};return this.log(Q(c)),{...n,deps:r}}async run(){let{argv:e,flags:t}=await this.parse(i);this.plugins=new h({config:this.config,logLevel:O(this.config,t,"silent")});let n=this.config.pjson.oclif.aliases??{},s=[];for(let r of e){r==="."&&(r=JSON.parse(await Ae("package.json","utf8")).name),n[r]===null&&this.error(`${r} is blocked`),r=n[r]??r;let c=await this.plugins.maybeUnfriendlyName(r)??r;try{s.push(await this.inspect(c,t.verbose))}catch(o){throw this.log(E.red("failed")),o}}return s}};g();var y=b(F(),1);var Re=b(Me(),1);var V=class i extends y.Command{static aliases=["plugins:add"];static args={plugin:y.Args.string({description:"Plugin to install.",required:!0})};static description=`Uses npm to install plugins.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as O,b as H,d as X,g as F}from"./chunk-HSYRYSX4.js";import{a as K,c as J,d as z,e as h,f as G,h as W}from"./chunk-IWE4RUI7.js";import{a as Q}from"./chunk-T5MK7ZSF.js";import{a as $,b as j}from"./chunk-DCK2FX6J.js";import{b as c}from"./chunk-N5ROZKPZ.js";import{n as w}from"./chunk-4V4DQ6W7.js";import{b as q}from"./chunk-4KRT35A2.js";import{E as v,P as B,a as P,u as C,v as N,w as I,x as _}from"./chunk-MGL4YM3S.js";import{d as u,g as V}from"./chunk-BHWEA4V2.js";import{Fb as p,Hb as d,Lb as M,Ta as x,ma as U,ua as L}from"./chunk-VPL2NDH6.js";import{g as r}from"./chunk-VPRTJUIN.js";r();r();r();r();var Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function Z(n){let{adminSession:e,query:i,version:t}=n;return(await c({query:Y,session:e,variables:{query:i},...t&&{version:t}})).bulkOperationRunQuery}r();r();r();var ee={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function ne(n){let{adminSession:e,variablesJsonl:i}=n,t=Buffer.from(i??"","utf-8"),a="bulk-variables.jsonl",l=t.length,o=await pe(e,a,l),m=ke(o);return await ce(t,m.url,m.parameters,a),m.stagedUploadKey}async function pe(n,e,i){return c({query:ee,session:n,variables:{input:[{filename:e,fileSize:i.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function ke(n){if(!n.stagedUploadsCreate)throw new u("No response received from stagedUploadsCreate mutation");if(n.stagedUploadsCreate.userErrors.length>0){let t=n.stagedUploadsCreate.userErrors.map(a=>a.message).join(", ");throw new u(`Failed to create staged upload: ${t}`)}let e=n.stagedUploadsCreate.stagedTargets?.[0];if(!e)throw new u("No staged upload target returned from Shopify");if(!e.url||!e.resourceUrl)throw new u("Invalid staged upload target: missing required URLs");let i=e.parameters.find(t=>t.name==="key")?.value;if(!i)throw new u("No key parameter found in staged upload target");return{url:e.url,resourceUrl:e.resourceUrl,parameters:e.parameters,stagedUploadKey:i}}async function ce(n,e,i,t){let a=new FormData;for(let o of i)a.append(o.name,o.value);a.append("file",new Blob([new Uint8Array(n)],{type:"text/jsonl"}),t);let l=await v({title:d`Uploading bulk operation variables`,task:async()=>w(e,{method:"POST",body:a},"slow-request"),renderOptions:{stdout:process.stderr}});if(!l.ok){let o=await l.text();throw new u(`Failed to upload file to staged URL: ${l.statusText}
|
|
2
|
+
${o}`)}}r();var ae={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mutation"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunMutation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"mutation"},value:{kind:"Variable",name:{kind:"Name",value:"mutation"}}},{kind:"Argument",name:{kind:"Name",value:"stagedUploadPath"},value:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}}},{kind:"Argument",name:{kind:"Name",value:"clientIdentifier"},value:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function te(n){let{adminSession:e,query:i,variablesJsonl:t,version:a}=n,l=await ne({adminSession:e,variablesJsonl:t});return(await c({query:ae,session:e,variables:{mutation:i,stagedUploadPath:l},...a&&{version:a}})).bulkOperationRunMutation}r();var fe=["COMPLETED","FAILED","CANCELED","EXPIRED"],ie=1,ve=5,oe=10,ye=3e3,Ne=300;async function re(n,e){return v({title:d`Starting bulk operation`,task:async()=>{let i=Date.now(),t=se({adminSession:n,operationId:e,pollIntervalSeconds:Ne/1e3,useAdaptivePolling:!1}),a;do{let{value:l,done:o}=await t.next();if(a=l,o)return a}while(Date.now()-i<ye);return a},renderOptions:{stdout:process.stderr}})}async function le(n,e,i,t){return v({title:d`Polling bulk operation`,task:async a=>{let l=se({adminSession:n,operationId:e,pollIntervalSeconds:ve,initialPollIntervalSeconds:ie,initialPollCount:oe,useAdaptivePolling:!0,abortSignal:i});for(;;){let{value:o,done:m}=await l.next();if(m)return o;a(F(o))}},onAbort:t,renderOptions:{stdout:process.stderr}})}async function*se({adminSession:n,operationId:e,pollIntervalSeconds:i,useAdaptivePolling:t=!1,initialPollIntervalSeconds:a=ie,initialPollCount:l=oe,abortSignal:o}){let m=0;for(;;){let g=await be(n,e);if(!g.bulkOperation)throw new Error("bulk operation not found");let b=g.bulkOperation;if(fe.includes(b.status)||o?.aborted)return b;yield b,m++;let k=i;t&&m<=l&&(k=a),o?await Promise.race([B(k),new Promise(S=>o.addEventListener("abort",S))]):await B(k)}}async function be(n,e){return c({query:H,session:n,variables:{id:e},version:O})}r();async function de(n){let e=await w(n);if(!e.ok)throw new u(`Failed to download bulk operation results: ${e.statusText}`);return e.text()}async function Se(n,e){if(n)return n.join(`
|
|
3
|
+
`);if(e){if(!await x(e))throw new u(d`Variable file not found at ${p.path(e)}. Please check the path and try again.`);return U(e,{encoding:"utf8"})}else return}async function me(n){let{organization:e,remoteApp:i,store:t,query:a,variables:l,variableFile:o,outputFile:m,watch:g=!1,version:b}=n,{adminSession:k,version:S}=await v({title:d`Authenticating`,task:async()=>{let s=await K(i,t.shopDomain),y=await J({adminSession:s,userSpecifiedVersion:b,minimumDefaultVersion:O});return{adminSession:s,version:y}},renderOptions:{stdout:process.stderr}}),R=await Se(l,o);we(a,R),G(a,t),C({headline:"Starting bulk operation.",body:[{list:{items:z({organization:e,remoteApp:i,storeFqdn:t.shopDomain,version:S})}}]});let A=h(a)?await te({adminSession:k,query:a,variablesJsonl:R,version:S}):await Z({adminSession:k,query:a,version:S});if(A?.userErrors?.length){_({headline:"Error creating bulk operation.",body:{list:{items:A.userErrors.map(s=>s.field?`${s.field.join(".")}: ${s.message}`:s.message)}}});return}let T=A?.bulkOperation;if(T)if(g){let s=new P,y=await le(k,T.id,s.signal,()=>s.abort());s.signal.aborted?C({headline:`Bulk operation ${y.id} is still running in the background.`,body:E(y.id)}):await ue(y,m)}else{let s=await re(k,T.id);["FAILED","CANCELED","EXPIRED"].includes(s.status)?await ue(s,m):N({headline:"Bulk operation is running.",body:E(s.id),customSections:[{body:[{list:{items:[d`ID: ${p.cyan(s.id)}`.value]}}]}]})}else throw I({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new V("Bulk operation response returned null with no error message.")}async function ue(n,e){let i=F(n).value,a=[{body:[{list:{items:[d`ID: ${p.cyan(n.id)}`.value,d`Status: ${p.yellow(n.status)}`.value,d`Created at: ${p.gray(String(n.createdAt))}`.value,...n.completedAt?[d`Completed at: ${p.gray(String(n.completedAt))}`.value]:[]]}}]}];switch(n.status){case"CREATED":N({headline:"Bulk operation started.",body:E(n.id),customSections:a});break;case"RUNNING":N({headline:"Bulk operation is running.",body:E(n.id),customSections:a});break;case"COMPLETED":if(n.url){let l=await de(n.url),o=ge(l);e?await L(e,l):M(l),o?I({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:a}):N({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:a})}else N({headline:i,customSections:a});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":_({headline:i,customSections:a});break}}function ge(n){return n.trim().split(`
|
|
4
|
+
`).some(i=>{let t=JSON.parse(i);if(!t.data)return!1;let a=Object.values(t.data)[0];return a?.userErrors!==void 0&&a.userErrors.length>0})}function we(n,e){if(h(n)&&!e)throw new u(d`Bulk mutations require variables. Provide a JSONL file with ${p.yellow("--variable-file")} or individual JSON objects with ${p.yellow("--variables")}.`);if(!h(n)&&e)throw new u(d`The ${p.yellow("--variables")} and ${p.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function E(n){return[`Monitor its progress with:
|
|
5
|
+
`,{command:`shopify app bulk status --id=${X(n)}`}]}var D,f=class extends Q{async run(){let{flags:e}=await this.parse(D),{query:i,appContextResult:t,store:a}=await W(e);return await me({organization:t.organization,remoteApp:t.remoteApp,store:a,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:t.app}}};D=f;f.summary="Execute bulk operations.";f.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
|
|
6
|
+
|
|
7
|
+
Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
|
|
8
|
+
|
|
9
|
+
Use [\`bulk status\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.`;f.description=D.descriptionWithoutMarkdown();f.flags={...q,...$,...j};var En=f;export{En as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
1
|
+
import{b as m}from"./chunk-VEDZUOVI.js";import{C as f}from"./chunk-MGL4YM3S.js";import{r as N}from"./chunk-3YWUSKWF.js";import{Lb as c}from"./chunk-VPL2NDH6.js";import{e as v,g}from"./chunk-VPRTJUIN.js";g();var d=v(N(),1),i=class h extends m{static{this.description="View all the available command flags"}static{this.hidden=!0}static{this.flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})}}async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
|
|
2
2
|
`,o=s.map(n=>t.map(e=>n[e]).join(",")).join(`
|
|
3
3
|
`),l=`${a}${o}
|
|
4
4
|
`;c(l)}else f({rows:s,columns:{pluginName:{header:"plugin",color:"red"},command:{},flagName:{header:"long flag",color:"green"},flagChar:{header:"short flag",color:"green"},flagEnv:{header:"env variable",color:"blueBright"}}})}};export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as c,o as m}from"./chunk-
|
|
1
|
+
import{n as c,o as m}from"./chunk-7JESXDF2.js";import{g as F}from"./chunk-VPRTJUIN.js";F();F();F();function o(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var S=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,B=["\x1B","\x9B"],E=e=>`${B[0]}[${e}m`,y=(e,t,a)=>{let i=[];e=[...e];for(let f of e){let s=f;f.includes(";")&&(f=f.split(";")[0][0]+"0");let r=m.codes.get(Number.parseInt(f,10));if(r){let n=e.indexOf(r.toString());n===-1?i.push(E(t?r:s)):e.splice(n,1)}else if(t){i.push(E(0));break}else i.push(E(s))}if(t&&(i=i.filter((f,s)=>i.indexOf(f)===s),a!==void 0)){let f=E(m.codes.get(Number.parseInt(a,10)));i=i.reduce((s,r)=>r===f?[r,...s]:[...s,r],[])}return i.join("")};function p(e,t,a){let i=[...e],f=[],s=typeof a=="number"?a:i.length,r=!1,n,u=0,l="";for(let[h,x]of i.entries()){let b=!1;if(B.includes(x)){let A=/\d[^m]*/.exec(e.slice(h,h+18));n=A&&A.length>0?A[0]:void 0,u<s&&(r=!0,n!==void 0&&f.push(n))}else r&&x==="m"&&(r=!1,b=!0);if(!r&&!b&&u++,!S.test(x)&&o(x.codePointAt())&&(u++,typeof a!="number"&&s++),u>t&&u<=s)l+=x;else if(u===t&&!r&&n!==void 0)l=y(f);else if(u>=s){l+=y(f,!0,n);break}}return l}function g(e,t,a){if(e.charAt(t)===" ")return t;let i=a?1:-1;for(let f=0;f<=3;f++){let s=t+f*i;if(e.charAt(s)===" ")return s}return t}function C(e,t,a={}){let{position:i="end",space:f=!1,preferTruncationOnSpace:s=!1}=a,{truncationCharacter:r="\u2026"}=a;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return r;let n=c(e);if(n<=t)return e;if(i==="start"){if(s){let u=g(e,n-t+1,!0);return r+p(e,u,n).trim()}return f===!0&&(r+=" "),r+p(e,n-t+c(r),n)}if(i==="middle"){f===!0&&(r=` ${r} `);let u=Math.floor(t/2);if(s){let l=g(e,u),h=g(e,n-(t-u)+1,!0);return p(e,0,l)+r+p(e,h,n).trim()}return p(e,0,u)+r+p(e,n-(t-u)+c(r),n)}if(i==="end"){if(s){let u=g(e,t-1);return p(e,0,u)+r}return f===!0&&(r=` ${r}`),p(e,0,t-c(r))+r}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${i}`)}export{o as a,C as b};
|