@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
package/dist/chunk-LW7U753G.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as l}from"./chunk-KWJ562F2.js";import{a as i,h as m,i as d,j as f,m as w}from"./chunk-DFMQWJQ3.js";import{c as t}from"./chunk-QFWIDATO.js";import{F as n}from"./chunk-BDVAE5MS.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function h(o,r){i()||w({store:r});let e=o??m()??await P(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r);)s||(f(),s=!0),e=await P(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return d(e),e}async function P(o){return n({message:o,password:!0})}export{h as a};
|
package/dist/chunk-LXFJDCNG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-QRRNOVJ3.js";import{Ba as A}from"./chunk-SBEZBZM7.js";import{d as y}from"./chunk-TQYMC7TH.js";import{R as x,g as C}from"./chunk-B2EHO7ZC.js";import{d as r,g as c}from"./chunk-JPGO36XP.js";import{Gb as f,Ib as s,Ta as g,ma as l}from"./chunk-GFEAKSGV.js";import{e as E,g as u}from"./chunk-VPRTJUIN.js";u();u();var m=E(C(),1);async function T(e,t){let n=e.apiSecretKeys[0]?.secret;if(!n)throw new c("No API secret keys found for app");return x(t,e.apiKey,n)}function v(e){let t;try{t=(0,m.parse)(e)}catch(o){throw o instanceof Error?new r(`Invalid GraphQL syntax: ${o.message}`):o}if(t.definitions.filter(o=>o.kind==="OperationDefinition").length!==1)throw new r("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}async function b(e){let{adminSession:t,userSpecifiedVersion:n,minimumDefaultVersion:o}=e;if(n==="unstable")return n;let i=await y(t);if(!n){let p=i.filter(d=>d.supported).map(d=>d.handle);return o&&p.push(o),p.sort().reverse()[0]}let a=i.map(p=>p.handle);if(a.includes(n))return n;let S=s`Invalid API version: ${n}`.value,w=s`Allowed versions: ${a.join(", ")}`.value;throw new r(S,w)}function z(e){let{organization:t,remoteApp:n,storeFqdn:o,version:i}=e,a=[`Organization: ${t.businessName}`,`App: ${n.title}`,`Store: ${o}`];return i&&a.push(`API version: ${i}`),a}function O(e){return(0,m.parse)(e).definitions.find(o=>o.kind==="OperationDefinition")?.operation==="mutation"}function N(e,t){if(O(e)&&t.storeType!=="APP_DEVELOPMENT")throw new r("Mutations can only be executed on dev stores.")}async function P(e){let t=await A({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),n=await h({appContextResult:t,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:t,store:n}}async function K(e){let t;if(e.query!==void 0){if(!e.query.trim())throw new r("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");t=e.query}else if(e["query-file"]){let i=e["query-file"];if(!await g(i))throw new r(s`Query file not found at ${f.path(i)}. Please check the path and try again.`);if(t=await l(i,{encoding:"utf8"}),!t.trim())throw new r(s`Query file at ${f.path(i)} is empty. Please provide a valid GraphQL query or mutation.`)}if(!t)throw new c("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");v(t);let{appContextResult:n,store:o}=await P(e);return{query:t,appContextResult:n,store:o}}export{T as a,v as b,b as c,z as d,O as e,N as f,P as g,K as h};
|
package/dist/chunk-N5YIPQ6J.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as t}from"./chunk-LAZJ47DZ.js";import{D as n}from"./chunk-BDVAE5MS.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function c(e){await n([{title:"Installing dependencies",task:async()=>{await t({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
|
package/dist/chunk-N7RBSKYT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as s}from"./chunk-IU2ZQ6TE.js";import{g as i}from"./chunk-VPRTJUIN.js";i();function L(o){return o?["1","true","TRUE","yes","YES"].includes(o):!1}i();i();import e from"node:path";import p from"node:os";import c from"node:process";var n=p.homedir(),I=p.tmpdir(),{env:r}=c,O=o=>{let t=e.join(n,"Library");return{data:e.join(t,"Application Support",o),config:e.join(t,"Preferences",o),cache:e.join(t,"Caches",o),log:e.join(t,"Logs",o),temp:e.join(I,o)}},A=o=>{let t=r.APPDATA||e.join(n,"AppData","Roaming"),_=r.LOCALAPPDATA||e.join(n,"AppData","Local");return{data:e.join(_,o,"Data"),config:e.join(t,o,"Config"),cache:e.join(_,o,"Cache"),log:e.join(_,o,"Log"),temp:e.join(I,o)}},S=o=>{let t=e.basename(n);return{data:e.join(r.XDG_DATA_HOME||e.join(n,".local","share"),o),config:e.join(r.XDG_CONFIG_HOME||e.join(n,".config"),o),cache:e.join(r.XDG_CACHE_HOME||e.join(n,".cache"),o),log:e.join(r.XDG_STATE_HOME||e.join(n,".local","state"),o),temp:e.join(I,t,o)}};function a(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),c.platform==="darwin"?O(o):c.platform==="win32"?A(o):S(o)}var P="shopify-cli",E=()=>process.env.XDG_CACHE_HOME?process.env.XDG_CACHE_HOME:a(P).cache;var T={alwaysLogAnalytics:"SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",alwaysLogMetrics:"SHOPIFY_CLI_ALWAYS_LOG_METRICS",deviceAuth:"SHOPIFY_CLI_DEVICE_AUTH",doctor:"SHOPIFY_CLI_DOCTOR",enableCliRedirect:"SHOPIFY_CLI_ENABLE_CLI_REDIRECT",env:"SHOPIFY_CLI_ENV",firstPartyDev:"SHOPIFY_CLI_1P_DEV",hostedApps:"HOSTED_APPS",noAnalytics:"SHOPIFY_CLI_NO_ANALYTICS",optOutInstrumentation:"OPT_OUT_INSTRUMENTATION",appAutomationToken:"SHOPIFY_APP_AUTOMATION_TOKEN",partnersToken:"SHOPIFY_CLI_PARTNERS_TOKEN",runAsUser:"SHOPIFY_RUN_AS_USER",serviceEnv:"SHOPIFY_SERVICE_ENV",skipCliRedirect:"SHOPIFY_CLI_SKIP_CLI_REDIRECT",spinInstance:"SPIN_INSTANCE",themeToken:"SHOPIFY_CLI_THEME_TOKEN",unitTest:"SHOPIFY_UNIT_TEST",verbose:"SHOPIFY_FLAG_VERBOSE",codespaces:"CODESPACES",codespaceName:"CODESPACE_NAME",codespacePortForwardingDomain:"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",gitpod:"GITPOD_WORKSPACE_URL",cloudShell:"CLOUD_SHELL",spinAppPort:"SERVER_PORT",spinAppHost:"SPIN_APP_HOST",organization:"SHOPIFY_CLI_ORGANIZATION",identityToken:"SHOPIFY_CLI_IDENTITY_TOKEN",refreshToken:"SHOPIFY_CLI_REFRESH_TOKEN",otelURL:"SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",themeKitAccessDomain:"SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",json:"SHOPIFY_FLAG_JSON",neverUsePartnersApi:"SHOPIFY_CLI_NEVER_USE_PARTNERS_API",skipNetworkLevelRetry:"SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",maxRequestTimeForNetworkCalls:"SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS",disableImportScanning:"SHOPIFY_CLI_DISABLE_IMPORT_SCANNING"},C="theme-kit-access.shopifyapps.com",Y={backendPort:"BACKEND_PORT"},f={executables:{dev:"/opt/dev/bin/dev"},directories:{cache:{path:()=>E(),vendor:{path:()=>s(E(),"vendor"),binaries:()=>s(E(),"vendor","binaries")}}}},m={expirationTimeMarginInMinutes:4},g="9e1e6889176fd0c795d5c659225e0fae",j={limit:300,timeout:{days:1}},v=process.env[T.themeKitAccessDomain]??C;export{L as a,a as b,T as c,C as d,Y as e,f,m as g,g as h,j as i,v as j};
|
package/dist/chunk-NF2ABOOU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a}from"./chunk-VPRTJUIN.js";a();function c(e,s,r){let n=[];for(let t=0;t<e.length;t+=s){let o=e.slice(t,t+s);n.push(r(o))}return n}function u(e,s,r){let n=[];for(let t=0;t<e.length;t+=s){let o=e.slice(t,t+s);n.push(r(o,t))}return n}export{c as a,u as b};
|
package/dist/chunk-ODNGDO4H.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import{b as k}from"./chunk-YZDDTYTU.js";import{Ca as D,Nb as b,ua as p,wa as d}from"./chunk-GFEAKSGV.js";import{d as v,q as x}from"./chunk-IU2ZQ6TE.js";import{g as C}from"./chunk-VPRTJUIN.js";C();var c=v(x(),"/docs-shopify.dev/commands"),u=class extends k{static{this.description="Generate CLI commands documentation"}static{this.hidden=!0}async run(){let i=this.config.commands;await D(c),await d(c);let a=i.sort((t,n)=>t.id.length-n.id.length).filter(t=>!M(t)).flatMap(t=>{let n=F(t);return[P(t,n),S(t,n),j(t,n)]});await Promise.all(a)}},T=["commands","help","plugins"],W=["config","auth","organization"];function M(e){return e.hidden?(T.push(e.id),!0):e.pluginType==="user"?!0:T.some(i=>e.id.startsWith(`${i}:`))}function F(e){let i=e.id.replace(/[:]/g," "),s=e.id.replace(/[:]/g,"-"),a=e.id.replace(/[:-]/g,""),t=e.id.includes(":"),n=e.id.split(":")[0],r=e.flags&&Object.keys(e.flags).length>0;return{commandName:i,fileName:s,interfaceName:a,hasTopic:t,topic:n,hasFlags:r}}async function j(e,{commandName:i,fileName:s,interfaceName:a,hasTopic:t,topic:n,hasFlags:r}){let o=`
|
|
2
|
-
{
|
|
3
|
-
title: 'Flags',
|
|
4
|
-
description: 'The following flags are available for the \`${i}\` command:',
|
|
5
|
-
type: '${a}',
|
|
6
|
-
},`,l=e.descriptionWithMarkdown??e.description??e.summary??"",f=l?.replace(/`/g,"\\`").replace(/https:\/\/shopify\.dev/g,""),g=(e.summary??l??"").replace(/`/g,"\\`").replace(/https:\/\/shopify\.dev/g,""),m=t&&!W.includes(n)?n:"general commands",w=`// This is an autogenerated file. Don't edit this file manually.
|
|
7
|
-
import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'
|
|
8
|
-
|
|
9
|
-
const data: ReferenceEntityTemplateSchema = {
|
|
10
|
-
name: '${i}',
|
|
11
|
-
description: \`${f}\`,
|
|
12
|
-
overviewPreviewDescription: \`${g}\`,
|
|
13
|
-
type: 'command',
|
|
14
|
-
isVisualComponent: false,
|
|
15
|
-
defaultExample: {
|
|
16
|
-
codeblock: {
|
|
17
|
-
tabs: [
|
|
18
|
-
{
|
|
19
|
-
title: '${i}',
|
|
20
|
-
code: './examples/${s}.example.sh',
|
|
21
|
-
language: 'bash',
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
title: '${i}',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
definitions: [${r?o:""}
|
|
28
|
-
],
|
|
29
|
-
category: '${m}',
|
|
30
|
-
related: [
|
|
31
|
-
],
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default data`.replace(/<%= config\.bin %>/g,"shopify");await p(`${c}/${s}.doc.ts`,w),b(`Generated docs for ${i}`)}async function P(e,{commandName:i,fileName:s,interfaceName:a}){let t=Object.keys(e.flags).map(r=>{let o=e.flags[r];if(!o||o.hidden)return;let l=o.description??"",f=o.char?`-${o.char}, `:"",$=o.type==="option"?"string":"''",g=o.type==="option"?" <value>":"",m=o.required?"":"?",y=o.env!==void 0?` @environment ${o.env}`:"";return` /**
|
|
35
|
-
* ${l}
|
|
36
|
-
*${y}
|
|
37
|
-
*/
|
|
38
|
-
'${f}--${r}${g}'${m}: ${$}`}).filter(r=>r&&r?.length>0).join(`
|
|
39
|
-
|
|
40
|
-
`),n=`// This is an autogenerated file. Don't edit this file manually.
|
|
41
|
-
/**
|
|
42
|
-
* The following flags are available for the \`${i}\` command:
|
|
43
|
-
* @publicDocs
|
|
44
|
-
*/
|
|
45
|
-
export interface ${a} {
|
|
46
|
-
${t}
|
|
47
|
-
}
|
|
48
|
-
`;await d(`${c}/interfaces`),await p(`${c}/interfaces/${s}.interface.ts`,n)}async function S(e,{fileName:i,commandName:s}){let a="",t=e.flags&&Object.keys(e.flags).length>0;typeof e.usage=="string"?a=h(e.usage):Array.isArray(e.usage)?a=e.usage.map(n=>h(n)).join(`
|
|
49
|
-
|
|
50
|
-
`):a=`${h(s)}${t?" [flags]":""}`,await d(`${c}/examples`),await p(`${c}/examples/${i}.example.sh`,a)}function h(e){return e.startsWith("shopify ")?e:`shopify ${e}`}export{u as a,F as b,j as c,P as d,S as e};
|
package/dist/chunk-OHY4ZL3U.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-NF2ABOOU.js";import{a as ce}from"./chunk-74HYYXXE.js";import{b as te,c as oe,d as re,e as se,f as ie,g as ne,i as ae,j as le,l as me}from"./chunk-2VQJQ36C.js";import{a as Q}from"./chunk-LW7U753G.js";import{c as V,e as P,m as X}from"./chunk-KWJ562F2.js";import{c as Z,e as ee}from"./chunk-KNVM7N3U.js";import{n as R,p as w}from"./chunk-DFMQWJQ3.js";import{a as z,b as B}from"./chunk-KL5Z3T6L.js";import{o as K,s as J,t as Y,u as j,w as N}from"./chunk-IX5ICOBV.js";import{k as v,l as x,n as y}from"./chunk-RFG5RMPL.js";import{ta as L,xa as $}from"./chunk-B2EHO7ZC.js";import{a as O}from"./chunk-JUVAGMIH.js";import{J as U,s as M,u as I,v as H,w as T,y as q,z as G}from"./chunk-BDVAE5MS.js";import{d as _,e as W}from"./chunk-IASVAERO.js";import{d as g}from"./chunk-JPGO36XP.js";import{Gb as k,Ib as b,Nb as S,Qb as f,tb as p}from"./chunk-GFEAKSGV.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();d();d();var de={workPromise:Promise.resolve()};async function he(e,t,r,o,s){if(r.length===0)return de;f("Initiating theme asset reconciliation process");let{filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l}=be(r,o),n=a.length===0&&i.length===0&&l.length===0;if($(`theme-service:theme-reconciliation:manual:${n}`),n)return f("Local and remote checksums match - no need to reconcile theme assets"),de;let m=await Re({filesOnlyPresentLocally:a,filesOnlyPresentOnRemote:i,filesWithConflictingChecksums:l},s);return{workPromise:Se(e,t,o,m)}}function be(e,t){let r=new Set,o=[],s=[];for(let i of e){r.add(i.key);let l=t.files.get(i.key);l?i.checksum!==l.checksum&&s.push(i):o.push(i)}let a=Array.from(t.files.values()).filter(i=>!r.has(i.key));return{filesOnlyPresentOnRemote:A(o,t),filesOnlyPresentLocally:A(a,t),filesWithConflictingChecksums:A(s,t)}}function A(e,t){return t.applyIgnoreFilters(e).filter(o=>o.key.endsWith(".json"))}async function E(e,t,r){if(e.length===0)return;I({body:{list:{title:t,items:e.map(s=>s.key)}}}),await G({message:"Reconciliation Strategy",choices:[{label:r.remote.label,value:D},{label:r.local.label,value:ue}]})===D?r.remote.callback(e):r.local.callback(e)}async function Se(e,t,r,o){let{localFilesToDelete:s,filesToDownload:a,remoteFilesToDelete:i}=o,l=s.map(c=>r.delete(c.key)),n=C(a,w,async c=>{let h=await v(e.id,c.map(u=>u.key),t);return Promise.all(h.map(u=>{if(u)return r.write(u)}))}),m=x(e.id,i.map(c=>c.key),t);await Promise.all([...l,...n,m])}async function Re(e,t){let{filesOnlyPresentLocally:r,filesOnlyPresentOnRemote:o,filesWithConflictingChecksums:s}=e,a=[],i=[],l=[];return t.noDelete||await E(r,"The files listed below are only present locally. What would you like to do?",{remote:{label:"Delete files from the local directory",callback:n=>{a.push(...n)}},local:{label:"Upload local files to the remote theme",callback:()=>{}}}),await E(o,"The files listed below are only present on the remote theme. What would you like to do?",{remote:{label:"Download remote files to the local directory",callback:n=>{i.push(...n)}},local:{label:"Delete files from the remote theme",callback:n=>{l.push(...n)}}}),await E(s,"The files listed below differ between the local and remote versions. What would you like to do?",{remote:{label:"Keep the remote version",callback:n=>{i.push(...n)}},local:{label:"Keep the local version",callback:()=>{}}}),{localFilesToDelete:a,filesToDownload:i,remoteFilesToDelete:l}}d();var Ae=3e3,F=class extends Error{};function pe(e,t,r,o,s,a){f("Listening for changes in the theme editor");let i=5,l=0,n="",m=r,c=async()=>{await new Promise(h=>setTimeout(h,Ae)),m=await Ee(e,t,m,o,s).then(h=>(l=0,n="",h)).catch(h=>{if(l++,h.message!==n&&(n=h.message,P("Error while polling for changes.",h)),l>=i){let u=new g("Too many polling errors...","Please check the errors above and ensure you have a stable internet connection.");q(u),a(u)}return m})};setTimeout(async()=>{for(;;)await c()})}async function Ee(e,t,r,o,s){let a=new Set(o.unsyncedFileKeys),i=fe(r,o,a),l=await y(e.id,t).then(c=>fe(c,o,a)),n=Fe(i,l),m=De(l,i);return await $e(o,n),await Oe(e,t,o,n),await Le(o,m,s),l}function De(e,t){let r=new Map(e.map(s=>[s.key,s]));return t.filter(s=>r.get(s.key)===void 0)}function Fe(e,t){let r=new Map(e.map(s=>[s.key,s]));return t.filter(s=>{let a=r.get(s.key);if(!a||a.checksum!==s.checksum)return!0})}async function Oe(e,t,r,o){let s=o.filter(i=>r.files.get(i.key)?.checksum!==i.checksum),a=C(s,w,async i=>v(e.id,i.map(l=>l.key),t).then(l=>Promise.all(l.map(async n=>{n&&(await r.write(n),S(b`• ${R.format(new Date)} Synced ${k.raw("\xBB")} ${k.gray(`download ${n.key} from remote theme`)}`))}))));await Promise.all(a)}async function Le(e,t,r){if(!r.noDelete)return Promise.all(t.map(o=>{if(e.files.get(o.key))return e.delete(o.key).then(()=>{S(b`• ${R.format(new Date)} Synced ${k.raw("\xBB")} ${k.gray(`remove ${o.key} from local theme`)}`)})}))}async function $e(e,t){let r=new Map(e.files);await Promise.all(t.map(o=>e.read(o.key)));for(let o of t){let s=r.get(o.key)?.checksum,a=e.files.get(o.key)?.checksum;if(s!==a)throw new F(`Detected changes to the file '${o.key}' on both local and remote sources. Aborting...`)}}function fe(e,t,r){return t.applyIgnoreFilters(e).filter(s=>s.key.endsWith(".json")).filter(s=>!r.has(s.key))}var ue="local",D="remote";async function ye(e,t,r,o,s,a){f("Initiating theme asset reconciliation process"),await o.ready();let{workPromise:i}=await he(e,t,r,o,s);return{updatedRemoteChecksumsPromise:i.then(async()=>{let n=await y(e.id,t);return pe(e,t,n,o,s,a),n}),workPromise:i}}d();function ke(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise((o,s)=>{e=o,t=s}),resolve:e,reject:t}}import{createServer as _e}from"node:http";function ge(e,t){let{promise:r,resolve:o,reject:s}=ke(),a=ie(e,t),i=We(e,t,s),l=Promise.all([a,i.workPromise]).then(()=>t.localThemeFileSystem.startWatcher(e.id.toString(),t.session)),n=Ie(e,t,l);return{workPromise:l,serverStart:n.start,dispatchEvent:n.dispatch,renderDevSetupProgress:i.renderProgress,backgroundJobPromise:r,resolveBackgroundJob:o}}function We(e,t,r){let o=n=>(P("Failed to perform the initial theme synchronization.",n),r(n),new Promise(()=>{})),a=y(e.id,t.session).then(n=>Me(e,t,n,r)),i=a.then(async({updatedRemoteChecksumsPromise:n})=>{let m=await n;return ce(e,t.session,m,t.localThemeFileSystem,{nodelete:t.options.noDelete,deferPartialWork:!0,backgroundWorkCatch:o})});return{workPromise:i.then(n=>n.workPromise).catch(o),renderProgress:async()=>{if(t.options.themeEditorSync){let{workPromise:m}=await a;await ee([{title:"Performing file synchronization. This may take a while...",task:async()=>{await m}}])}let{renderThemeSyncProgress:n}=await i;await n()}}}function Me(e,t,r,o){return t.options.themeEditorSync?ye(e,t.session,r,t.localThemeFileSystem,{noDelete:t.options.noDelete,ignore:t.options.ignore,only:t.options.only},o):Promise.resolve({updatedRemoteChecksumsPromise:Promise.resolve(r),workPromise:Promise.resolve()})}function Ie(e,t,r){let o=j(),s=[`http://${t.options.host}:${t.options.port}`,`https://${t.session.storeFqdn}`];o.use(Y(async()=>(await r,J(i=>{i.node.req.headers.origin&&K(i,{origin:n=>s.includes(n),credentials:!0,methods:["GET","POST","HEAD","OPTIONS"],preflight:{statusCode:204}})})))),t.options.liveReload!=="off"&&o.use(ne(e,t)),o.use(re(e,t)),o.use(te(e,t)),o.use(oe(e,t));let a=_e(N(o));return{dispatch:o.handler.bind(o),start:async()=>new Promise(i=>a.listen({port:t.options.port,host:t.options.host},()=>i({close:async()=>{await Promise.all([new Promise(l=>{a.closeAllConnections(),a.close(l)})])}})))}}import He from"readline";var qe="127.0.0.1",Ge="9292",ve=!1;async function Bt(e){if(!await me(e.directory)&&!await Z(e.force))return;e.password?.startsWith("shpat_")&&T({headline:"Admin API token missing features:",body:["Directly using an Admin API token will result in some missing features.","We recommend generating a password from the Theme Access app.","Alternatively, you can authenticate normally by not passing the --password flag.",`
|
|
2
|
-
`,{list:{title:"Known limitations:",items:["Hot module reloading","Password protected storefronts"]}}],link:{label:"Theme Access app",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-access"}}),e.listing&&await ae(e.directory,e.listing);let t=await V(e.adminSession).then(Te=>Te?Q(e.storePassword,e.adminSession.storeFqdn):void 0),r=se(),o=le(e.directory,{filters:e,listing:e.listing,noDelete:e.noDelete,notify:e.notify}),s=e.host??qe;if(e.port&&!await B(Number(e.port)))throw new g(`Port ${e.port} is not available. Try a different port or remove the --port flag to use an available port.`);let a=e.port??String(await z(Number(Ge))),i={local:`http://${s}:${a}`,giftCard:`http://${s}:${a}/gift_cards/[store_id]/preview`,themeEditor:`https://${e.store}/admin/themes/${e.theme.id}/editor?hr=${a}`,preview:`https://${e.store}/?preview_theme_id=${e.theme.id}`},l=await t,m={session:await X(e.theme.id.toString(),e.adminSession,e.password,l),localThemeFileSystem:o,localThemeExtensionFileSystem:r,directory:e.directory,type:"theme",lastRequestedPath:"",options:{themeEditorSync:e["theme-editor-sync"],host:s,port:a,open:e.open,liveReload:e["live-reload"],noDelete:e.noDelete,ignore:e.ignore,only:e.only,errorOverlay:e["error-overlay"]}},{serverStart:c,renderDevSetupProgress:h,backgroundJobPromise:u,resolveBackgroundJob:Pe}=ge(e.theme,m);He.emitKeypressEvents(process.stdin);let Ce=xe(i,m,Pe);process.stdin.on("keypress",Ce),await Promise.all([u,h().then(c).then(()=>{process.stdin.isTTY&&process.stdin.setRawMode(!0),Je(i),e.open&&we(i.local,"development server")})]),await Ue(e.commandConfig,e.adminSession),process.exit(0)}async function Ue(e,t){if(!ve){ve=!0;try{await _(()=>({store_fqdn_hash:O(t.storeFqdn)})),await W(()=>({store_fqdn:t.storeFqdn})),await L({config:e,exitMode:"ok"})}catch{}}}function xe(e,t,r){let o=M(we,100,{leading:!0,trailing:!1});return(s,a)=>{if(a.ctrl&&a.name==="c"){r();return}switch(a.name){case void 0:break;case"t":o(e.local,"localhost");break;case"p":o(e.preview,"theme preview");break;case"e":o(t.lastRequestedPath==="/"?e.themeEditor:`${e.themeEditor}&previewPath=${encodeURIComponent(t.lastRequestedPath)}`,"theme editor");break;case"g":o(e.giftCard,"gift card preview");break;default:break}}}function we(e,t){U(e).catch(Ke(t))}function Ke(e){return t=>{T({headline:`Failed to open ${e}.`,body:t.stack??t.message})}}function Je(e){H({body:[{list:{title:p.bold("Preview your theme ")+p.cyan("(t)"),items:[{link:{url:e.local}}]}}],nextSteps:[[{link:{label:`Share your theme preview ${p.cyan("(p)")}`,url:e.preview}},{subdued:e.preview}],[{link:{label:`Customize your theme at the theme editor ${p.cyan("(e)")}`,url:e.themeEditor}}],[{link:{label:`Preview your gift cards ${p.cyan("(g)")}`,url:e.giftCard}}]]})}export{Bt as a,we as b};
|
package/dist/chunk-P5VVOLGV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as E}from"./chunk-323UTVMM.js";import{b}from"./chunk-YZDDTYTU.js";import{M as F,N}from"./chunk-BDVAE5MS.js";import{r as U}from"./chunk-LDGAHMS7.js";import{Nb as k,T as C,Ta as w,ma as O,tb as n}from"./chunk-GFEAKSGV.js";import{l as R}from"./chunk-YC6G4MHD.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-IU2ZQ6TE.js";import{e as H,g as d}from"./chunk-VPRTJUIN.js";d();d();d();d();var m=class{constructor(){this.assertions=[],this.registeredTests=[]}async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let i of this.registeredTests){this.assertions=[];let s=Date.now();try{await i.fn(),e.push({name:i.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:i.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let i=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:i,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let i=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:i,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,i){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:i??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:i??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,i){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:i??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:i??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:i??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,i){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:i??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,i){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:i??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:i??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:i??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,i){this.assertions.push({description:i,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};m.description="Doctor test suite";var p=class extends m{constructor(){super(...arguments);this.themeName="";this.themePath=""}static{this.description="Tests the theme init command creates a valid theme structure"}tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let e=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(e),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let e=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(e.map(i=>this.assertFile(u(this.themePath,i))))}),this.test("theme directories exist",async()=>{let e=["sections","snippets","assets","locales"];await Promise.all(e.map(i=>this.assertDirectory(u(this.themePath,i))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static{this.description="Tests pushing a theme to the store creates an unpublished theme"}static{this.requiresStore=!0}tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let i=await this.run(e);this.assertSuccess(i);let s=this.assertJson(i,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(o){return{workingDirectory:o.path??y(),environment:o.environment,store:o.store,password:o.password,data:{}}}d();var a=o=>k(o),v;function J(o){v=o}function G(o){if(!v)return o;let t=/\/[^\s,)]+/g;return o.replace(t,e=>T(e,v))}function A(o,t){a(""),a(n.bold(n.cyan(`Suite: ${o}`))),a(n.dim(t))}function j(o){a(n.bold(n.blue(`Running: ${o}`)))}function q(o){let t=`(${(o.duration/1e3).toFixed(2)}s)`;if(o.status==="passed"){a(n.bold(n.green(`PASSED: ${o.name} ${n.dim(t)}`)));for(let e of I(o.assertions))a(e)}else if(o.status==="failed"){a(n.red(`FAILED: ${o.name} ${n.dim(t)}`));for(let e of I(o.assertions))a(e);o.error&&a(n.red(` Error: ${G(o.error.message)}`))}else a(n.yellow(`SKIPPED: ${o.name}`))}function S(o){let t=o.filter(h=>h.status==="passed").length,e=o.filter(h=>h.status==="failed").length,i=o.filter(h=>h.status==="skipped").length,s=o.length,r=o.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),i>0&&a(` Skipped: ${n.yellow(String(i))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(o){return o.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(o){let t=[],e=_(o);J(e.workingDirectory);for(let i of Y){let s=new i,r=i.description??"Test suite";A(i.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class o extends b{static{this.description="Run all theme command doctor-release tests"}static{this.hidden=!0}static{this.flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})}}async run(){if(!R())return;let{flags:t}=await this.parse(o);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
|
package/dist/chunk-P7R7FBY2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-VBUZWRUL.js";import{e as f}from"./chunk-BDVAE5MS.js";import{f as G}from"./chunk-IASVAERO.js";import{d as i}from"./chunk-JPGO36XP.js";import{Ea as $,Gb as a,Ib as s,Qb as l,Ta as b,Wa as C}from"./chunk-GFEAKSGV.js";import{a as I,s as k}from"./chunk-YC6G4MHD.js";import{q as d}from"./chunk-IU2ZQ6TE.js";import{e as v,g as x}from"./chunk-VPRTJUIN.js";x();var R=v(D());async function r(t,e){try{return(await f("git",t,{cwd:e})).stdout}catch(o){if(o instanceof Error){let n=new i(o.message);throw n.stack=o.stack,"exitCode"in o&&Object.assign(n,{exitCode:o.exitCode}),n}throw o}}async function K(t,e="main"){l(s`Initializing git repository at ${a.path(t)}...`),await w(),await r(["init"],t),await r(["checkout","-b",e],t)}async function Q(t,e){try{return(await r(["check-ignore",...e],t)).split(`
|
|
2
|
-
`).filter(Boolean)}catch(o){if(o instanceof i&&"exitCode"in o&&o.exitCode===1)return[];throw o}}async function V(t){return G("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:o,shallow:n,latestTag:m}=t;if(l(s`Git-cloning repository ${e} into ${a.path(o)}...`),await w(),await b(o)){if(!await $(o))throw new i(s`Can't clone to ${a.path(o)}`,"The path exists but isn't a directory.");if((await C(["*",".*"],{cwd:o,deep:1,onlyFiles:!1})).length>0)throw new i(s`Directory ${a.path(o)} already exists and is not empty`,s`Choose a different name or remove the existing directory first.`)}let[E,h]=e.split("#");if(h&&m)throw new i("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(n&&m)throw new i("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];h&&u.push("--branch",h),n&&u.push("--depth","1"),I()||u.push("-c","core.askpass=true"),u.push(E,o);try{if(await f("git",u),m){let c=await A(o,e);await r(["checkout",c],o)}}catch(c){if(c instanceof i)throw c;if(c instanceof Error){let y=new i(c.message);throw y.stack=c.stack,y}throw c}})}async function A(t,e){let o=await F(t);if(!o)throw new i(`Couldn't obtain the most recent tag of the repository ${e}`);return o}async function X(t){let o=await r(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!o.trim())throw new i("Must have at least one commit to run command",s`Run ${a.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let n=o.split("\0");return{hash:n[0],date:n[1],message:n[2],refs:n[3],body:n[4],author_name:n[5],author_email:n[6]}}async function Y(t){await r(["add","--all"],t)}async function Z(t,e){let o=["commit","-m",t];return e?.author&&o.push("--author",e.author),await r(o,e?.directory),(await r(["rev-parse","HEAD"],e?.directory)).trim()}async function w(){if(!await k())throw new i("Git is necessary in the environment to continue",s`Install ${a.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var g=class extends i{};async function N(t){if(!await S(t))throw new g(`${a.path(t??d())} is not a Git directory`)}async function S(t){try{return await f("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var p=class extends i{};async function tt(t){if(!await T(t))throw new p(`${a.path(t??d())} is not a clean Git directory`)}async function T(t){return(await r(["status","--porcelain"],t)).trim()===""}async function F(t){try{return(await r(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof i&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function et(t,e="origin"){if(l(s`Removing git remote ${e} from ${a.path(t)}...`),await w(),!(await r(["remote"],t)).split(`
|
|
3
|
-
`).filter(Boolean).includes(e)){l(s`Remote ${e} does not exist, no action needed`);return}await r(["remote","remove",e],t)}export{K as a,Q as b,V as c,X as d,Y as e,Z as f,N as g,S as h,p as i,tt as j,T as k,et as l};
|
package/dist/chunk-QRRNOVJ3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as h,L as y,N as _,l as S}from"./chunk-SBEZBZM7.js";import{Y as E}from"./chunk-DJQVNH7P.js";import{z as T}from"./chunk-B2EHO7ZC.js";import{a as D}from"./chunk-JUVAGMIH.js";import{D as O,P as l,u as b}from"./chunk-BDVAE5MS.js";import{b as m,d as p,g as P}from"./chunk-JPGO36XP.js";import{Ob as z}from"./chunk-GFEAKSGV.js";import{k as C}from"./chunk-YC6G4MHD.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();async function u(e,t,r){let s=r.clientName==="app-management",n;r.supportsStoreSearch&&(n=async a=>r.devStoresForOrg(t.id,a));let o=await h({onSearchForStoresByName:n,...e,showDomainOnPrompt:s});if(!o){if(b({body:await r.getCreateDevStoreLink(t)}),await l(5),!await _(t))throw new m;let f=await I(t.id,r);o=await u({stores:f,hasMorePages:!1},t,r)}let i=await c(o,t.id,r,"prompt-first");for(;!i;){if(o=await h({stores:[o],hasMorePages:!1,showDomainOnPrompt:s}),!o)throw new m;i=await c(o,t.id,r,"prompt-first")}return o}async function I(e,t){let n=[];return await O([{title:"Fetching organization data",task:async()=>{for(let i=0;i<10;i++){let{stores:a}=await t.devStoresForOrg(e);if(a.length>0){n=a;return}await l(3)}}}]),n}async function c(e,t,r,s){if(e.transferDisabled||C())return!0;if(!e.transferDisabled&&!e.convertableToPartnerTest)throw new p(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store.");switch(s){case"prompt-first":return await y()?(await A(e,t,r),!0):!1;case"never":throw new p("The store you specified is not transfer-disabled","Try running 'dev --reset' and selecting a different store, or choosing to convert this one.")}}async function A(e,t,r){let s={input:{organizationID:parseInt(t,10),shopId:e.shopId}},n=await r.convertToTransferDisabledStore(s);if(!n.convertDevToTestStore.convertedToTestStore){let o=n.convertDevToTestStore.userErrors.map(i=>i.message).join(", ");throw new P(`Error converting store ${e.shopDomain} to a transfer-disabled store: ${o}`,"This store might not be compatible with draft apps, please try a different store")}z(`Converted ${e.shopDomain} to a transfer-disabled store`)}async function Z({appContextResult:e,storeFqdn:t,forceReselectStore:r,storeTypes:s=["APP_DEVELOPMENT"]}){let{app:n,organization:o,developerPlatformClient:i}=e,a,f=n.configuration.build?.dev_store_url,g=n.hiddenConfig.dev_store_url,v=f??g,w=t??(r?void 0:v),F=s.length===1&&s[0]==="APP_DEVELOPMENT";if(w)a=await E(o,w,i,s),F&&await c(a,o.id,i,"never");else{let x=await i.devStoresForOrg(o.id);a=await u(x,o,i)}return await M(a,r),a.shopDomain=T(a.shopDomain),(a.shopDomain!==v||!g)&&await n.updateHiddenConfig({dev_store_url:a.shopDomain}),await i.ensureUserAccessToStore(o.id,a),a}async function M(e,t){await S.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:D(e.shopDomain)})),await S.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{Z as a};
|
package/dist/chunk-RFG5RMPL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as k}from"./chunk-TQYMC7TH.js";import{ua as b,va as c,xa as s}from"./chunk-B2EHO7ZC.js";import{F as _}from"./chunk-BDVAE5MS.js";import{d as N}from"./chunk-JPGO36XP.js";import{Qb as E,T as D}from"./chunk-GFEAKSGV.js";import{g as l}from"./chunk-VPRTJUIN.js";l();var M=/gid:\/\/shopify\/\w*\/(\d+)/,T="development",W="live",Y="unpublished";function Z(e){return e.role===T}async function J(e){let i=await D("creative");return _({message:e,defaultValue:i})}function F(e){return`gid://shopify/OnlineStoreTheme/${e}`}function h(e){let i=M.exec(e);if(i&&i[1]!==void 0)return parseInt(i[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var S;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(S||(S={}));l();function y(e){if(!e)return;e.processing??(e.processing=!1),e.createdAtRuntime??(e.createdAtRuntime=!1);let{id:i,name:a,role:n,processing:d,createdAtRuntime:t}=e;return{id:i,name:a,processing:d,createdAtRuntime:t,role:n==="main"?"live":n}}function te(e){if(!e)return;let{key:i,checksum:a,attachment:n,value:d}=e,t={size:(d||n||"").length,mtime:Date.now()};return{key:i,checksum:a,attachment:n,value:d,stats:t}}l();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{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:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{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"}}]}}]}}]};l();var w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{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"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{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"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{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"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{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"}}]}}]}}]};l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var $="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0};async function an(e,i){let a=F(e);s("theme-api:fetch-theme");try{let{theme:n}=await k({query:q,session:i,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(n)return y({id:h(n.id),processing:n.processing,role:n.role.toLowerCase(),name:n.name})}catch(n){c(n),E(`Error fetching theme with ID: ${e}`)}}async function tn(e){let i=[],a=null;for(s("theme-api:fetch-themes");;){let n=await k({query:L,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});n.themes||r("Failed to fetch themes");let{nodes:d,pageInfo:t}=n.themes;if(d.forEach(m=>{let o=y({id:h(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&i.push(o)}),!t.hasNextPage)return i;a=t.endCursor}}async function dn(e,i){s("theme-api:find-development-theme-by-name");let{themes:a}=await k({query:R,session:i,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw c(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:n,processing:d,role:t,name:m}=a.nodes[0];return y({id:h(n),processing:d,role:t.toLowerCase(),name:m})}}async function ln(e,i){let a=e.src??$;s("theme-api:create-theme");let{themeCreate:n}=await k({query:I,session:i,variables:{name:e.name??"",source:a,role:(e.role??T).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});n||r("Failed to create theme");let{theme:d,userErrors:t}=n;if(t.length){let m=n.userErrors.map(o=>o.message).join(", ");throw c(new N(m))}return d||r("Failed to create theme"),y({id:h(d.id),name:d.name,role:d.role.toLowerCase()})}async function mn(e,i,a){let n=[],d=null;for(s("theme-api:fetch-assets");;){let t=await k({query:A,session:a,variables:{id:g(e),filenames:i,after:d},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t.theme?.files?.nodes||!t.theme?.files?.pageInfo){let u=t.theme?.files?.userErrors.map(f=>f.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=t.theme.files;if(n.push(...await Promise.all(m.map(async u=>{let{attachment:f,value:v}=await X(u.body);return{attachment:f,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return n;d=o.endCursor}}async function on(e,i,a){let d=[];s("theme-api:delete-assets");for(let t=0;t<i.length;t+=50){let m=i.slice(t,t+50),{themeFilesDelete:o}=await k({query:P,session:a,variables:{themeId:F(e),files:m},preferredBehaviour:p});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:f}=o;u&&u.forEach(v=>{d.push({key:v.filename,success:!0,operation:S.Delete})}),f.length>0&&f.forEach(v=>{v.filename?(c(`Asset deletion failed for ${v.filename}: ${v.message}`),d.push({key:v.filename,success:!1,operation:S.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return d}async function rn(e,i,a){let n=[];s("theme-api:bulk-upload-assets");for(let d=0;d<i.length;d+=50){let t=i.slice(d,d+50),m=z(t);b("theme-api:upload-files");let o=await H(e,m,a);b("theme-api:upload-files"),n.push(...j(o))}return n}function z(e){return e.map(i=>i.attachment?{filename:i.key,body:{type:"BASE64",value:i.attachment}}:{filename:i.key,body:{type:"TEXT",value:i.value??""}})}async function H(e,i,a){return k({query:C,session:a,variables:{themeId:g(e),files:i},preferredBehaviour:p})}function j(e){let{themeFilesUpsert:i}=e;i||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:n}=i,d=[];return a?.forEach(t=>{d.push({key:t.filename,success:!0,operation:S.Upload})}),n.forEach(t=>{t.filename||r(`Error uploading theme files: ${t.message}`),c(`Asset upload failed for ${t.filename}: ${t.message}`),d.push({key:t.filename,success:!1,operation:S.Upload,errors:{asset:[t.message]}})}),d}async function sn(e,i){let a=[],n=null;for(s("theme-api:fetch-checksums");;){let d=await k({query:B,session:i,variables:{id:g(e),after:n},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d?.theme?.files?.nodes||!d?.theme?.files?.pageInfo){let o=d.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw c(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:t,pageInfo:m}=d.theme.files;if(a.push(...t.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;n=m.endCursor}}async function kn(e,i,a){let n=i.name,d={};n&&(d.name=n),s("theme-api:update-theme");let{themeUpdate:t}=await k({query:V,session:a,variables:{id:F(e),input:d},preferredBehaviour:p});t||r("Failed to update theme");let{theme:m,userErrors:o}=t;if(o.length){let u=t.userErrors.map(f=>f.message).join(", ");throw c(new N(u))}return m||r("Failed to update theme"),y({id:h(m.id),name:m.name,role:m.role.toLowerCase()})}async function un(e,i){s("theme-api:publish-theme");let{themePublish:a}=await k({query:O,session:i,variables:{id:F(e)},preferredBehaviour:p});a||r("Failed to update theme");let{theme:n,userErrors:d}=a;if(d.length){let t=a.userErrors.map(m=>m.message).join(", ");throw c(new N(t))}return n||r("Failed to update theme"),y({id:h(n.id),name:n.name,role:n.role.toLowerCase()})}async function cn(e,i){s("theme-api:delete-theme");let{themeDelete:a}=await k({query:w,session:i,variables:{id:F(e)},preferredBehaviour:p});a||r("Failed to update theme");let{deletedThemeId:n,userErrors:d}=a;if(d.length){let t=a.userErrors.map(m=>m.message).join(", ");throw c(new N(t))}return n||r("Failed to update theme"),!0}async function pn(e,i,a){let n;s("theme-api:duplicate-theme");let{themeDuplicate:d}=await k({query:x,session:a,variables:{id:F(e),name:i},preferredBehaviour:p,responseOptions:{onResponse:u=>{n=u.headers.get("x-request-id")??void 0}}});if(!d)return c("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:n};let{newTheme:t,userErrors:m}=d;return m.length>0?{theme:void 0,userErrors:m,requestId:n}:t?{theme:y({id:h(t.id),name:t.name,role:t.role.toLowerCase()}),userErrors:[],requestId:n}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:n}}async function vn(e,i){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await k({query:U,session:i,variables:{ownerType:e}});return a.nodes.map(n=>({key:n.key,namespace:n.namespace,name:n.name,description:n.description,type:{name:n.type.name,category:n.type.category}}))}async function Nn(e){s("theme-api:check-password-protection");let{onlineStore:i}=await k({query:G,session:e});i||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=i;return a.enabled}function r(e){throw c(new N(e))}function g(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function X(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw c(new N(`Error downloading content from URL: ${e.url}`))}}}export{te as a,T as b,W as c,Y as d,Z as e,J as f,an as g,tn as h,dn as i,ln as j,mn as k,on as l,rn as m,sn as n,kn as o,un as p,cn as q,pn as r,vn as s,Nn as t};
|
package/dist/chunk-RVNMVBPM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as m}from"./chunk-RFG5RMPL.js";import{d as h}from"./chunk-JPGO36XP.js";import{g as i}from"./chunk-VPRTJUIN.js";i();var s=["live","unpublished","development"];async function A(r){let e=r.storeFqdn,t=(await m(r)).filter(c);if(t.length===0)throw new h(`There are no themes in the ${e} store`);return t.sort(p)}function c(r){return s.includes(r.role)}function p(r,e){return s.indexOf(r.role)-s.indexOf(e.role)}i();function R(r,e,t){return T(r,e,t)??d(r,e,t)}function T(r,e,t){let o=t.role;if(!o)return;let n=`No themes on the store ${r} match the role "${o}"`;return a(e,l=>l.role===o).orThrow(n)}function d(r,e,t){return t.themeIdentifiers.flatMap(n=>{let l=`No themes on the store ${r} match the ID or name "${n}"`;return a(e,u=>`${u.id}`===n||u.name.toLowerCase()===n.toLowerCase()?!0:g(u.name.toLowerCase(),n.toLowerCase())).orThrow(l)})}function a(r,e){let t=r.filter(e);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new h(o)}}}var f=class{constructor(e){this.queryProps=e}get role(){for(let e of s)if(this.queryProps[e])return e}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(e=>e?.length!==void 0?e.length>0:!!e)}};function g(r,e){let t=e.replace(/(^\*)|(\*$)/g,"");return e.startsWith("*")&&e.endsWith("*")?r.includes(t):e.startsWith("*")?r.endsWith(t):e.endsWith("*")?r.startsWith(t):!1}export{s as a,A as b,R as c,f as d};
|