shopify 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-NMMVOF4B.js +1 -0
- package/dist/{analytics-RSUIYNLC.js → analytics-UK77WNLG.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-FTHVOIK7.js → chunk-224UPIYS.js} +1 -1
- package/dist/{chunk-YFRI75U4.js → chunk-26PWHH3B.js} +1 -1
- package/dist/{chunk-5TWYJQQO.js → chunk-27NXPOAS.js} +1 -1
- package/dist/{chunk-FK5OFLSJ.js → chunk-2A2JSAAA.js} +1 -1
- package/dist/{chunk-63UKZLPC.js → chunk-2L6AN3QA.js} +1 -1
- package/dist/{chunk-B2VE7WOX.js → chunk-2MT3LSMZ.js} +1 -1
- package/dist/{chunk-MZWPIFAM.js → chunk-2T4HDR6R.js} +1 -1
- package/dist/{chunk-37P5YOP2.js → chunk-2WJOTJOD.js} +1 -1
- package/dist/{chunk-FS5PZCZ3.js → chunk-2ZBXHCQZ.js} +1 -1
- package/dist/chunk-33ZE3DRQ.js +16 -0
- package/dist/{chunk-T5YVYVSW.js → chunk-34MOWGRL.js} +1 -1
- package/dist/{chunk-7NYCJG2U.js → chunk-35XFNKNB.js} +1 -1
- package/dist/{chunk-C3LL5CZA.js → chunk-3JSKNXL7.js} +1 -1
- package/dist/{chunk-5AWELO3D.js → chunk-3KM5ZOW2.js} +1 -1
- package/dist/{chunk-WQ6W725N.js → chunk-3MG4MTWQ.js} +1 -1
- package/dist/{chunk-ZBVHPC6W.js → chunk-3MYDSQHF.js} +1 -1
- package/dist/{chunk-VG2AESTZ.js → chunk-3ODQKAEA.js} +1 -1
- package/dist/{chunk-7U2MTK6I.js → chunk-3XRI3D44.js} +1 -1
- package/dist/{chunk-K3YALQBQ.js → chunk-3Z3MADXZ.js} +1 -1
- package/dist/chunk-43R5VGKT.js +1 -0
- package/dist/{chunk-CXPYOLGM.js → chunk-4KECSZTL.js} +1 -1
- package/dist/{chunk-4GQEXVDT.js → chunk-4WYKPIN3.js} +1 -1
- package/dist/{chunk-XYFYQWKW.js → chunk-5AEZJZNQ.js} +1 -1
- package/dist/{chunk-6JZC6UKY.js → chunk-5ED7SOQZ.js} +1 -1
- package/dist/{chunk-YCUEDZDA.js → chunk-5IDJALJH.js} +1 -1
- package/dist/{chunk-LENSEW2F.js → chunk-62EOM3Y2.js} +1 -1
- package/dist/{chunk-3JACWBUC.js → chunk-64G5TGFF.js} +1 -1
- package/dist/{chunk-LWMKZJ4M.js → chunk-66TMIQMB.js} +1 -1
- package/dist/{chunk-B4ISKIXN.js → chunk-67L7FIB6.js} +1 -1
- package/dist/{chunk-LGXNXAQA.js → chunk-6ES4KRFW.js} +1 -1
- package/dist/{chunk-YQ63ZFYT.js → chunk-74NRFUGQ.js} +1 -1
- package/dist/{chunk-2QQ7EBJD.js → chunk-7CCTPBCT.js} +1 -1
- package/dist/{chunk-X7DCL5LT.js → chunk-7GUMJ5E4.js} +1 -1
- package/dist/{chunk-OUMERKRE.js → chunk-7NFTSBHQ.js} +1 -1
- package/dist/{chunk-A7LBGXWG.js → chunk-ACZNWIRY.js} +1 -1
- package/dist/{chunk-MMUGP3WP.js → chunk-AQ6EVL73.js} +1 -1
- package/dist/{chunk-KNQXCU3Y.js → chunk-AQKWPRZE.js} +1 -1
- package/dist/chunk-AUE7LM32.js +1 -0
- package/dist/{chunk-H57KYDEI.js → chunk-AXL2VIWA.js} +1 -1
- package/dist/{chunk-V2FCZC7U.js → chunk-B2O3ANRZ.js} +1 -1
- package/dist/chunk-B3ZJGYZY.js +3 -0
- package/dist/{chunk-KVF55INC.js → chunk-BWN2QG6D.js} +1 -1
- package/dist/{chunk-EA5XVQJT.js → chunk-C3RFAKWR.js} +1 -1
- package/dist/{chunk-4IUXLUFD.js → chunk-CCUQM4FX.js} +1 -1
- package/dist/{chunk-2M4BKFYF.js → chunk-CGVROSPS.js} +1 -1
- package/dist/{chunk-6Y6A2QGK.js → chunk-CLUUA3HX.js} +1 -1
- package/dist/{chunk-FHNJLON5.js → chunk-CXI3RHPW.js} +1 -1
- package/dist/chunk-CYEEGTVZ.js +11 -0
- package/dist/{chunk-V654BMS7.js → chunk-D2KIGKBI.js} +2 -2
- package/dist/chunk-DBDTE3EE.js +5 -0
- package/dist/{chunk-4SDCXKYR.js → chunk-DLVB3237.js} +1 -1
- package/dist/{chunk-OH7BQZQ7.js → chunk-DN6X7SHW.js} +1 -1
- package/dist/{chunk-5XOEMYEQ.js → chunk-DZKFP6H2.js} +1 -1
- package/dist/{chunk-2S5NPJEJ.js → chunk-E5COIKGY.js} +1 -1
- package/dist/{chunk-PXFPVGWV.js → chunk-E6RONHMT.js} +1 -1
- package/dist/{chunk-ADVLRSSO.js → chunk-EAZIQI2D.js} +1 -1
- package/dist/{chunk-RFZNFTVM.js → chunk-EEY4FKAW.js} +1 -1
- package/dist/{chunk-E3CTHNQS.js → chunk-EKFPTBXC.js} +1 -1
- package/dist/{chunk-CX3ANDPI.js → chunk-ER6C5WS3.js} +1 -1
- package/dist/{chunk-5YUDEPEY.js → chunk-ESFCYB46.js} +1 -1
- package/dist/{chunk-DSKAIC7O.js → chunk-F3CK3EJJ.js} +1 -1
- package/dist/{chunk-AOBE6HN6.js → chunk-FEBOZ2XX.js} +1 -1
- package/dist/{chunk-OYGIQDME.js → chunk-GNCVDN7U.js} +1 -1
- package/dist/{chunk-NCPZVARH.js → chunk-GQLNG537.js} +3 -3
- package/dist/{chunk-HPT3UXZ5.js → chunk-GVI3DWSB.js} +1 -1
- package/dist/{chunk-PVASYKSJ.js → chunk-GW7YIJPJ.js} +1 -1
- package/dist/{chunk-KGASGUDQ.js → chunk-H6GNKWYM.js} +1 -1
- package/dist/{chunk-2NZ7GDDR.js → chunk-H6GYBLVQ.js} +1 -1
- package/dist/chunk-HSKDFEXW.js +1 -0
- package/dist/{chunk-REDUS6EW.js → chunk-HTRJU4R4.js} +1 -1
- package/dist/{chunk-BB7GAZP6.js → chunk-HXZAY5OA.js} +1 -1
- package/dist/{chunk-TTBNFGCW.js → chunk-I4CEH7AK.js} +1 -1
- package/dist/{chunk-HXNGLDMU.js → chunk-I7PEEJVH.js} +1 -1
- package/dist/{chunk-5YXYYQBX.js → chunk-IHMATNOR.js} +1 -1
- package/dist/{chunk-QGWC23HQ.js → chunk-IHXGZW42.js} +1 -1
- package/dist/{chunk-2RFCYZMG.js → chunk-IJY3RJPJ.js} +1 -1
- package/dist/{chunk-WQOPLNDH.js → chunk-ISKQQXLZ.js} +1 -1
- package/dist/{chunk-NMLLRFZF.js → chunk-J55GQLP4.js} +1 -1
- package/dist/{chunk-AIEVQSI3.js → chunk-J5ERDFIC.js} +1 -1
- package/dist/{chunk-RIG66DIQ.js → chunk-JLQRDFR5.js} +3 -3
- package/dist/{chunk-WAY723TL.js → chunk-JPWRZ5SL.js} +1 -1
- package/dist/{chunk-WGOSE3RL.js → chunk-K7ZSPQKL.js} +1 -1
- package/dist/{chunk-X4A5D3PZ.js → chunk-KNWT7JLL.js} +1 -1
- package/dist/{chunk-CWR3IFXD.js → chunk-KZRLZWOU.js} +1 -1
- package/dist/chunk-L5TSPCSY.js +26 -0
- package/dist/{chunk-F3OM2YO6.js → chunk-LEHBZKK3.js} +1 -1
- package/dist/{chunk-HT66BOEC.js → chunk-LGXI7EGM.js} +1 -1
- package/dist/{chunk-GSGCSBRN.js → chunk-LHXFTFFM.js} +1 -1
- package/dist/{chunk-IULZYDCI.js → chunk-LUGMXSRI.js} +1 -1
- package/dist/chunk-M2CWCOFU.js +11 -0
- package/dist/{chunk-J7BTC45S.js → chunk-M5VIFG2V.js} +1 -1
- package/dist/{chunk-OQUXGAF2.js → chunk-MADINS4Z.js} +1 -1
- package/dist/{chunk-QYFU363G.js → chunk-MEYVUHQH.js} +1 -1
- package/dist/{chunk-GGJUPL4W.js → chunk-MGHPF7HU.js} +1 -1
- package/dist/{chunk-J3UXIC23.js → chunk-MHR5OHT5.js} +1 -1
- package/dist/{chunk-CFUZ6574.js → chunk-MXEXP3HT.js} +1 -1
- package/dist/{chunk-ZHHTQRWU.js → chunk-N57Y7THE.js} +1 -1
- package/dist/{chunk-D4LFWIFE.js → chunk-NVKJ7ZLP.js} +1 -1
- package/dist/{chunk-QVVQUJQL.js → chunk-NXAEBGMO.js} +1 -1
- package/dist/{chunk-PNZURX3S.js → chunk-OJULL7HT.js} +1 -1
- package/dist/{chunk-JMVK2BIB.js → chunk-OMPQ7REW.js} +1 -1
- package/dist/{chunk-2AW3KBTP.js → chunk-OR4IJ4BQ.js} +1 -1
- package/dist/{chunk-GCKGQFV7.js → chunk-P2RMFHQP.js} +1 -1
- package/dist/{chunk-GHU6YEXH.js → chunk-P4VZYOKO.js} +2 -2
- package/dist/{chunk-FNWXMCSD.js → chunk-PDZBKVWL.js} +1 -1
- package/dist/{chunk-VXL5FBE7.js → chunk-PF53E2DC.js} +1 -1
- package/dist/{chunk-ETXBF6Q7.js → chunk-PLSS456F.js} +1 -1
- package/dist/{chunk-EH22T4FI.js → chunk-PTSCGSQV.js} +2 -2
- package/dist/{chunk-P5W5RVE6.js → chunk-PWAT52M4.js} +1 -1
- package/dist/{chunk-UU2R56LN.js → chunk-Q2KWXZQB.js} +1 -1
- package/dist/{chunk-DVW7NDVD.js → chunk-Q4JYAUVL.js} +1 -1
- package/dist/{chunk-3G2PEYPI.js → chunk-Q5IC3IYY.js} +1 -1
- package/dist/{chunk-ZTZGDZCE.js → chunk-QDCLL5OI.js} +1 -1
- package/dist/{chunk-56GKTWFF.js → chunk-QEKGGTMN.js} +1 -1
- package/dist/{chunk-36TZ447N.js → chunk-QEVTBD33.js} +1 -1
- package/dist/{chunk-DM7BTMFP.js → chunk-QF5WKTPD.js} +1 -1
- package/dist/{chunk-RDXLDCMI.js → chunk-QFSENE5T.js} +1 -1
- package/dist/chunk-QQJNQNKP.js +6 -0
- package/dist/{chunk-AQ34X5B3.js → chunk-QW52RPAU.js} +1 -1
- package/dist/{chunk-4QZ6OBXL.js → chunk-R4UVIYZP.js} +1 -1
- package/dist/{chunk-DTRENW4Q.js → chunk-RLNIOJH3.js} +1 -1
- package/dist/{chunk-LR4J4KYJ.js → chunk-RPCIFYCY.js} +1 -1
- package/dist/{chunk-2YGPWG3I.js → chunk-RPVZ2JON.js} +1 -1
- package/dist/{chunk-M2KX3PXA.js → chunk-RW6G4ZPU.js} +1 -1
- package/dist/{chunk-YXIFSIRX.js → chunk-S4LOWCGS.js} +1 -1
- package/dist/{chunk-ZVEBXHEY.js → chunk-S5P7KWY4.js} +1 -1
- package/dist/{chunk-XZLM4HLO.js → chunk-SACNUF4I.js} +1 -1
- package/dist/chunk-SB27UOXX.js +1 -0
- package/dist/{chunk-2TPLPZA2.js → chunk-SHD4VV5V.js} +1 -1
- package/dist/{chunk-75LAVRRL.js → chunk-SIL6HPMK.js} +2 -2
- package/dist/{chunk-7AWAOPLA.js → chunk-SK7EPN6C.js} +1 -1
- package/dist/{chunk-4EDE3UH7.js → chunk-SLY27GDC.js} +1 -1
- package/dist/{chunk-KOTZSPZA.js → chunk-SNH4XZ6E.js} +1 -1
- package/dist/{chunk-MZCIRMZJ.js → chunk-T4XJKM6B.js} +1 -1
- package/dist/{chunk-OPVXPDOQ.js → chunk-TAWCKJKP.js} +1 -1
- package/dist/{chunk-2CJQQQW4.js → chunk-TFPW2VGN.js} +1 -1
- package/dist/{chunk-HP2ZAAY7.js → chunk-TODZ3TJR.js} +1 -1
- package/dist/{chunk-XV6XCOTG.js → chunk-U2T5HPRD.js} +1 -1
- package/dist/{chunk-VXD26GIG.js → chunk-U6YOP562.js} +1 -1
- package/dist/{chunk-43HKFLOU.js → chunk-UBP3LQFY.js} +1 -1
- package/dist/{chunk-C4EKNOLY.js → chunk-UKWIWCOH.js} +1 -1
- package/dist/{chunk-HNU6R7RT.js → chunk-UPPO3BMT.js} +1 -1
- package/dist/{chunk-J5DUFSR4.js → chunk-URXM5A2K.js} +1 -1
- package/dist/{chunk-FVRI7ZKE.js → chunk-USXIXANP.js} +1 -1
- package/dist/{chunk-MS7DTL4U.js → chunk-UUAKOX7E.js} +1 -1
- package/dist/{chunk-GNPIKPHB.js → chunk-UV5GAGAD.js} +1 -1
- package/dist/{chunk-EXTVC33U.js → chunk-UXVXVI6O.js} +1 -1
- package/dist/{chunk-CNPBDSDL.js → chunk-UY6W2EVZ.js} +1 -1
- package/dist/{chunk-IAL6IQYW.js → chunk-UYELAINQ.js} +1 -1
- package/dist/{chunk-ULMNNGGX.js → chunk-VAVXDIUX.js} +1 -1
- package/dist/{chunk-XKKKMV46.js → chunk-VEUKT5EI.js} +1 -1
- package/dist/chunk-VGSH52JM.js +1 -0
- package/dist/chunk-VHZ6RL67.js +1 -0
- package/dist/{chunk-PRKJVU4Y.js → chunk-VQA3X7O3.js} +1 -1
- package/dist/{chunk-32O27NE3.js → chunk-VZCMJRYV.js} +1 -1
- package/dist/{chunk-NJVNGEOU.js → chunk-W37IFK3P.js} +1 -1
- package/dist/{chunk-MNWT2SQO.js → chunk-W56ZGEQQ.js} +1 -1
- package/dist/{chunk-MXXMIPUN.js → chunk-WBVS5NBV.js} +1 -1
- package/dist/{chunk-QBE6XVU3.js → chunk-WCC52MR2.js} +1 -1
- package/dist/{chunk-KLYGMYXV.js → chunk-WESTVWWD.js} +1 -1
- package/dist/{chunk-364BVGRY.js → chunk-WRZWHT6M.js} +1 -1
- package/dist/{chunk-M7NLCGCP.js → chunk-WSDKCQH6.js} +1 -1
- package/dist/{chunk-IWTOC6DG.js → chunk-X2PFXSU4.js} +1 -1
- package/dist/{chunk-CKVVJ4XO.js → chunk-X5NIAZA4.js} +1 -1
- package/dist/{chunk-RWTAPWLJ.js → chunk-XBMD3FEZ.js} +1 -1
- package/dist/{chunk-W7S6SYBM.js → chunk-XDVPIGXE.js} +1 -1
- package/dist/chunk-XLIJYJ6Q.js +1 -0
- package/dist/chunk-XUHGWIWW.js +4 -0
- package/dist/{chunk-IY5EI5V2.js → chunk-XWSWXQCC.js} +1 -1
- package/dist/{chunk-5AQ5JT2V.js → chunk-Y55T4IIQ.js} +1 -1
- package/dist/{chunk-QX3T6G5X.js → chunk-Y5CVX5LJ.js} +1 -1
- package/dist/{chunk-5D4FNAAD.js → chunk-Y6J46XYF.js} +1 -1
- package/dist/{chunk-KT5QQOES.js → chunk-YKMINHYY.js} +1 -1
- package/dist/{chunk-FPOZMNT2.js → chunk-YSWVYPWR.js} +1 -1
- package/dist/{chunk-M73IECPW.js → chunk-YV2TP44L.js} +1 -1
- package/dist/{chunk-V7H7ITCF.js → chunk-Z2WAW6MM.js} +1 -1
- package/dist/chunk-ZBL7XMJ6.js +25 -0
- package/dist/{chunk-RNUEPPVN.js → chunk-ZGBTO46A.js} +1 -1
- package/dist/{chunk-OLKLHVHA.js → chunk-ZJOX5HW4.js} +4 -4
- package/dist/{chunk-L6VONMA2.js → chunk-ZOOT3GBY.js} +1 -1
- package/dist/{chunk-NUCDRKDW.js → chunk-ZRI3SSLG.js} +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/{command-json-schema-6EGXCM4B.js → command-json-schema-F5XF7XHL.js} +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-E7ELDWBA.js → conf-store-5CBLWTOC.js} +1 -1
- package/dist/{custom-oclif-loader-FKFZJPHF.js → custom-oclif-loader-UDVUFKMD.js} +1 -1
- package/dist/{deprecations-RNGBHZYB.js → deprecations-EOHPSTCS.js} +1 -1
- package/dist/dist-RNV3GFZ7.js +1 -0
- package/dist/dist-ZFKWJVNB.js +1 -0
- package/dist/{environments-WZJ6MRTH.js → environments-4FLRZW4P.js} +1 -1
- package/dist/{error-IFB626JA.js → error-JY2ADS6S.js} +1 -1
- package/dist/error-handler-4GCXKC6I.js +1 -0
- package/dist/{fs-7UOUHJDO.js → fs-XS5YF34R.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{is-global-XW3CVHLK.js → is-global-27MUENOK.js} +1 -1
- package/dist/{json-error-C2U7ZLCG.js → json-error-S5XFS3UX.js} +1 -1
- package/dist/{local-KA3IWOZ6.js → local-OKPVB4NH.js} +1 -1
- package/dist/{metadata-6JI7HF5B.js → metadata-2YJBAKR7.js} +1 -1
- package/dist/{node-package-manager-X3QIEMMX.js → node-package-manager-B3OW3PFQ.js} +1 -1
- package/dist/{notifications-system-OXGLT2R4.js → notifications-system-BWTDYBG2.js} +1 -1
- package/dist/{os-NORIEVMI.js → os-F6QKJCFW.js} +1 -1
- package/dist/{output-K3JTLRJD.js → output-BRIPK7UC.js} +1 -1
- package/dist/{system-LTHR2T7L.js → system-466QKFDI.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-MYUBVKCK.js → ui-VJTNGCS6.js} +1 -1
- package/dist/upgrade-VHVJLXKX.js +1 -0
- package/dist/{version-RCGFWSB4.js → version-FETZRLZO.js} +1 -1
- package/dist/version-T4XXTJMB.js +1 -0
- package/dist/{workerd-ISSXMKIH.js → workerd-32DMKLMN.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-V2SDYXQJ.js +0 -1
- package/dist/chunk-2M535QQJ.js +0 -6
- package/dist/chunk-46JYM3GH.js +0 -1
- package/dist/chunk-7XAEI4XT.js +0 -3
- package/dist/chunk-BNTOGZLY.js +0 -1
- package/dist/chunk-BU3JQM3W.js +0 -1
- package/dist/chunk-JUTULEWW.js +0 -5
- package/dist/chunk-MHWETFNT.js +0 -1
- package/dist/chunk-MU2X7NGF.js +0 -11
- package/dist/chunk-NMECLRGK.js +0 -11
- package/dist/chunk-NPB753M3.js +0 -1
- package/dist/chunk-Q2ORJEB2.js +0 -25
- package/dist/chunk-UDPYSL3M.js +0 -4
- package/dist/chunk-URCH4ITT.js +0 -1
- package/dist/chunk-WFOU5M4H.js +0 -16
- package/dist/chunk-XDXHSGDL.js +0 -1
- package/dist/chunk-XRVJJG6W.js +0 -26
- package/dist/dist-VHIZZDYK.js +0 -1
- package/dist/dist-WXI5YQYP.js +0 -1
- package/dist/error-handler-OVJYVIOZ.js +0 -1
- package/dist/upgrade-MFTWBXL3.js +0 -1
- package/dist/version-BNGPPAUU.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as he,b as fe,c as ge,d as _}from"./chunk-
|
|
1
|
+
import{a as he,b as fe,c as ge,d as _}from"./chunk-JPWRZ5SL.js";import{a as q}from"./chunk-V75WUEFU.js";import{a as pe}from"./chunk-X5NIAZA4.js";import{B as ne,C as S,D as se,F as oe,G as re,H as ce,I as ae,J as le,K as ue,L as de,M as m,O as y,P as k,Q as j,R as w,S as v,T as F,U as C,V as me,W as $,X as ye,Y as T,Z as R,_ as be,a as z,c as Q,d as D,g as X,i as Z,p as ee,t as te,u as ie}from"./chunk-W56ZGEQQ.js";import{b as K}from"./chunk-ZJOX5HW4.js";import{b as J,c as V}from"./chunk-3KM5ZOW2.js";import{A as M,B as p,C as Y,E as H,W as b,z as P}from"./chunk-D2KIGKBI.js";import{a as U}from"./chunk-BN7ZXAZJ.js";import{na as B,wb as g}from"./chunk-JLQRDFR5.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as Ne}from"./chunk-YTUUU33R.js";import{f as d,p as W}from"./chunk-IWTNUJGY.js";import{e as Ge,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();function Se(e,t){if(t==="none")return 0;let i=e.scan.issues.filter(n=>D[n.severity]>=D[t]);return new Set(i.map(n=>n.id)).size}async function ke({includeDirs:e,excludePatterns:t,noGitIgnore:i,...n}){let s=Date.now();return{...await Z(n,{includeDirs:e,excludePatterns:t,noGitIgnore:i}),elapsedMilliseconds:Date.now()-s}}function we({includeDirs:e,excludePatterns:t,noGitIgnore:i,...n}){return X(n,{includeDirs:e,excludePatterns:t,noGitIgnore:i})}var Oe={resolveSelection:oe,execute:ke,listFiles:we,writeArtifacts:ie,canPrompt:b,recordMetadata:pe};async function G(e,t=Oe){let i=await re(e.includeDirs),n=await t.resolveSelection({path:e.directory,config:e.configName,clientId:e.clientId,withoutAppConfig:e.withoutAppConfig,allowPrompts:!e.listFiles&&t.canPrompt(),validateClientIdFlag:!0});if(n.kind==="declined")return{kind:"cancelled"};let{appDirectory:s}=n,o={include_dirs:[...e.includeDirs],excludes:[...e.excludePatterns],no_git_ignore:e.noGitIgnore},c=le(n,e.directory,o);(n.kind==="no-config"?!e.withoutAppConfig:n.appConfigFilePicked===!0)&&e.onSelectionPrompted?.(c);let I=n.kind==="config"?n.appConfigDirectories??[]:[],{scanDirectories:x,requestedScanDirectories:Te}=ce(s,i,I),A={selection:n,resultsKey:se(n),commands:c,scope:o,scanDirectories:x},L={appDirectory:s,scanDirectories:x.map(({directory:u})=>u),requestedScanDirectories:Te,appConfigDirectories:x.filter(({origin:u})=>u==="app_config_directory").map(({directory:u})=>u),appConfigFilePath:n.kind==="config"?n.appConfigFilePath:void 0,clientId:S(n),includeDirs:e.includeDirs,excludePatterns:e.excludePatterns,noGitIgnore:e.noGitIgnore};if(e.listFiles){let u=await t.listFiles(L);return{kind:"listed",...A,...u}}let f=await t.execute(L);await t.recordMetadata({num_security_findings:f.scan.issues.length});let Re=await t.writeArtifacts(s,A.resultsKey,{deterministicFindings:f.deterministicFindings,agentChecks:f.agentChecks});return{kind:"scanned",...A,execution:f,artifacts:Re,blocking:{level:e.blocking,blockedChecks:Se(f,e.blocking)}}}a();a();var ve=r.object({status:r.literal("success"),app:k,scope:w,scanDirectories:r.array(v).describe("The directories that a scan would walk."),files:r.array(r.object({path:y().describe("The absolute path of the file.")}).strict()).describe("The files that a scan would gather, ordered by their paths relative to the app directory, as listed without --json.")}).strict().describe("With --list-files, the files that a scan would gather. Nothing is scanned or written."),h=U({name:"AppSecurityCheckResult",schema:r.union([r.object({status:r.literal("success"),valid:r.boolean().describe("Whether --blocking passed: no finding of the scan has its own severity at or above the level. blocking.blockedCheckCount counts the checks with such findings, and --blocking none always passes. Run review --json for the findings."),app:k,resultsDirectory:y().describe("The absolute path of the results directory that holds the files the scan wrote."),deterministicFindingsPath:y().describe("The absolute path of deterministic-findings.json, which the scan replaced."),agentChecksPath:y().describe("The absolute path of agent-checks.json, which the scan replaced."),scope:w,scanDirectories:r.array(v).describe("The directories that the scan walked."),agentCheckCount:r.number().int().nonnegative().describe("The number of checks in agent-checks.json for a coding agent to investigate."),blocking:F,instructions:j.optional().describe("The coding-agent instructions for this scan, with --print-instructions or when chosen at the prompt. Left out otherwise.")}).strict(),ve,r.object({status:r.literal("cancelled")}).strict().describe("Asked whether to scan without app configuration, the user declined. Nothing was scanned or written.")]).describe("The scan and the files it wrote. With --list-files, the files that a scan would gather."),definitions:{AppSecurityApp:k,AppSecurityScope:w,AppSecurityScanDirectory:v,AppSecurityBlocking:F,AppSecurityInstructions:j,AppSecurityCheckFileList:ve}});a();var Ee={high:"High",medium:"Medium",low:"Low"},N=3,O=8;function Le(e){let t=Ue(e),i=ee(e.scan.issues);return{type:t,options:{headline:We(e,i),body:Be(e),reference:[{subdued:`Engine: ${e.engine.name} ${e.engine.version}`},{subdued:`Ruleset: ${e.engine.ruleset}`},...i.some(n=>n.issues.length>1)&&!e.verbose?[{subdued:"Use --verbose for every occurrence and fix. deterministic-findings.json retains all file and line details."}]:[]],customSections:Ke(e,i)}}}function Ce(e){let{type:t,options:i}=Le(e);if(t==="success"){M(i);return}if(t==="warning"){p(i);return}Y(i)}function Ie(e){return e.scan.scan.coverage_gaps.length>0}function Ue(e){return e.scan.issues.some(t=>t.severity==="high")?"error":e.scan.issues.length>0||Ie(e)?"warning":"success"}function We(e,t){let i=e.scan.issues.length;return t.length<i?`${t.length} security issue ${t.length===1?"group":"groups"} found (${i} occurrences).`:i>0?`${i} security ${i===1?"issue":"issues"} found.`:Ie(e)?"Scan completed with coverage gaps.":"No security issues found."}function Be(e){let t=e.scan,i=[{userInput:t.app.name},{char:"."},`${t.scan.files_scanned} files scanned in ${ze(e.elapsedMilliseconds)}.`],n=t.scan.checks_executed.filter(s=>s.status==="not_applicable").length;return n>0&&i.push({info:`
|
|
2
2
|
${n} check${n===1?"":"s"} not applicable.`}),i.push({info:`
|
|
3
3
|
${e.agentCheckCount} check${e.agentCheckCount===1?"":"s"} ready for your coding agent.`}),i}function Me(e){return[["Have your coding agent run the agent checks"],["Record the agent results with",{command:m(e.commands.record)}],["Review the results with",{command:m(e.commands.review)}]]}function Ye(e){let t=S(e)??"not linked";return e.kind==="config"&&e.clientIdOverride?`${t} (from --client-id)`:t}function He(e){let{selection:t}=e;return{title:"Selection",body:{tabularData:[["App directory",t.appDirectory],["Config file",ne(t)??"none"],["Client ID",Ye(t)],["Scan directories",e.scanDirectories.map(({directory:i})=>d(t.appDirectory,i)||".").join(", ")]],firstColumnSubdued:!0}}}function Ke(e,t){let i=[He(e)];for(let s of["high","medium","low"]){let o=t.filter(c=>c.severity===s);o.length!==0&&i.push({title:Ee[s],body:{list:{items:o.flatMap(c=>[Ve(c),...e.verbose?c.issues.map(Je):[]])}}})}if(e.scan.scan.coverage_gaps.length>0){let s=e.scan.scan.coverage_gaps,o=s.slice(0,O).map(c=>c.message);s.length>O&&o.push({info:`${s.length-O} more coverage gaps`}),i.push({title:"Coverage gaps",body:{list:{items:o}}})}let{appDirectory:n}=e.selection;return i.push({title:"Artifacts",body:{list:{items:[["Deterministic findings:",{filePath:d(n,e.deterministicFindingsPath)}],["Agent security check instructions:",{filePath:d(n,e.agentChecksPath)}]]}}}),i.push({title:"Next steps",body:{list:{items:Me(e),ordered:!0}}}),e.verbose&&i.push({title:"Scan details",body:{tabularData:[["Framework",e.scan.detection.framework],["Surface",e.scan.detection.surface],["Languages",e.scan.detection.languages.map(s=>`${s.name} (${s.support})`).join(", ")||"none"],["Capabilities",qe(e.scan.capabilities)],["Rules run",String(e.scan.scan.rules_run)],["Not run",String(e.scan.scan.rules_skipped)]],firstColumnSubdued:!0}}),i}function Je(e){let t=e.location.line?`${e.location.file}:${e.location.line}`:e.location.file,i=[{bold:e.title},xe(e.id),{filePath:t}];return i.push({subdued:e.message},{subdued:`Fix: ${e.fix.description}`}),e.fix.guide&&(e.fix.guide.startsWith("https://")||e.fix.guide.startsWith("http://")?i.push({link:{label:"Guide",url:e.fix.guide}}):i.push({subdued:`Guide: ${e.fix.guide}`})),e.snippet&&i.push({subdued:`Code: ${e.snippet}`}),i}function Ve(e){let t=e.issues[0],i=e.issues.length,n=e.files.length,s=e.files.slice(0,N).map(o=>{let c=e.issues.find(I=>I.location.file===o);return{filePath:c.location.line?`${o}:${c.location.line}`:o}});return[{bold:t.title},xe(t.id),`${i} ${i===1?"occurrence":"occurrences"} across ${n} ${n===1?"file":"files"}`,...s,...n>N?[{subdued:`+${n-N} more files`}]:[]]}function xe(e){let t=Q(e);return t?{link:{label:e,url:t}}:{subdued:e}}function qe(e){let t=Object.entries(e).filter(([,i])=>i).map(([i])=>i);return t.length>0?t.join(", "):"none detected"}function ze(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}var Qe={canPrompt:b,selectInstructionsDestination:e=>H(e)};function Xe(e,t){return{message:`${e} recommended agent ${e===1?"check":"checks"} available to complete your scan. How do you want to pass that prompt to your agent?`,choices:t==="json"?[{label:"Include instructions in the JSON output and copy them to the clipboard",value:"copy"},{label:"Include instructions in the JSON output",value:"print"},{label:"Nothing",value:"nothing"}]:[{label:"Copy instructions to the clipboard",value:"copy"},{label:"Print instructions to the terminal",value:"print"},{label:"Nothing",value:"nothing"}],defaultValue:"copy"}}function Pe(e){P({headline:"To skip these prompts next time, run:",body:[{command:m(e.scan)}]})}async function De(e,t,i,n=Qe){if(e.kind==="cancelled"){if(i==="json")g(h.encode({status:"cancelled"}));else{let{headline:s,nextStep:o}=ae(t.directory);P({headline:s,body:o})}return}if(e.kind==="listed"){await Ae(e),i==="json"?g(h.encode(it(e))):e.paths.length>0&&g(e.paths.join(`
|
|
4
4
|
`));return}await Ae(e.execution),i==="json"?await et(e,t,n):await Ze(e,t,n),e.blocking.blockedChecks>0&&(process.exitCode=1)}async function Ze(e,t,i){Ce(nt(e,t.verbose));let n=await Fe(e,t,"text",i);if(n==="nothing")return;let s=_e(e);n==="print"?_(s,{copy:!1}):await je(s,"text")&&_(s,{copy:!0})}async function et(e,t,i){let n=await Fe(e,t,"json",i),s=n==="nothing"?void 0:_e(e),o=s!==void 0&&n==="copy"&&await je(s,"json");g(h.encode(tt(e,s===void 0?void 0:ye(s,{copy:o}))))}async function je(e,t){try{return await ge(e,{copy:!0}),!0}catch(i){if(!(i instanceof he))throw i;return p({headline:i.message,body:t==="json"?"The result still includes them.":["Run the check again with",{command:"--print-instructions"},"to print them."]}),!1}}async function Fe(e,t,i,n){return t.skipInstructions?"nothing":t.printInstructions?"print":n.canPrompt()?n.selectInstructionsDestination(Xe(e.execution.agentChecks.checks.length,i)):"nothing"}function _e(e){return fe({appDirectory:e.selection.appDirectory,resultsKey:e.resultsKey,commands:e.commands,scanScope:e.scope})}function tt(e,t){let{appDirectory:i}=e.selection,{resultsDirectory:n}=te(i,e.resultsKey);return{status:"success",valid:e.blocking.blockedChecks===0,app:$(e.selection),resultsDirectory:C(n),deterministicFindingsPath:C(e.artifacts.deterministicFindingsPath),agentChecksPath:C(e.artifacts.agentChecksPath),scope:T(e.scope),scanDirectories:e.scanDirectories.map(s=>R(i,s)),agentCheckCount:e.execution.agentChecks.checks.length,blocking:be(e.blocking),...t===void 0?{}:{instructions:t}}}function it(e){let{appDirectory:t}=e.selection;return{status:"success",app:$(e.selection),scope:T(e.scope),scanDirectories:e.scanDirectories.map(i=>R(t,i)),files:e.paths.map(i=>({path:me(t,i)}))}}function nt(e,t){let{execution:i,artifacts:n}=e;return{scan:i.scan,selection:e.selection,scanDirectories:e.scanDirectories,engine:i.engine,verbose:t,elapsedMilliseconds:i.elapsedMilliseconds,commands:e.commands,deterministicFindingsPath:n.deterministicFindingsPath,agentChecksPath:n.agentChecksPath,agentCheckCount:i.agentChecks.checks.length}}function st(e){return e.replace(/[?*()[\]{}!#\\]/g,"\\$&")}async function Ae(e){if(e.ignoredScanDirectories.length===0&&e.otherAppDirectories.length===0)return;let t=await B(W()),i=n=>d(t,n)||".";for(let n of e.ignoredScanDirectories)p({headline:`${i(n)} is ignored by Git, so only the files Git tracks in it are scanned.`,body:["Use",{command:"--no-git-ignore"},"to scan everything in it."]});for(let n of e.otherAppDirectories){let s=i(n);p({headline:`${s} holds another app's configuration, so its files are scanned as part of this app.`,body:["Use",{command:`--exclude ${de(st(s),ue())}`},"to leave it out."]})}}var l=Ge(Ne(),1);var E=class e extends K{static summary="Check an app for Shopify-specific security issues and write deterministic-findings.json and agent-checks.json.";static descriptionWithMarkdown="Runs an app security check locally and writes `deterministic-findings.json` and `agent-checks.json` to the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`; the other `app security` commands take the same selection flags and find the same directory. Every run replaces both files, so it's always safe to run the check again.\n\n`deterministic-findings.json` holds the deterministic scan results. `agent-checks.json` holds the checks for your coding agent to investigate; the agent's results are recorded with `shopify app security record`. Use `--config` to select a specific app configuration when the project has multiple `shopify.app*.toml` files; the check inspects only that configuration. Use `--client-id` to replace the configuration's client ID for this run. `--client-id` is checked against your Shopify account before anything is scanned, so it needs you to be logged in. When no app configuration exists, use `--without-app-config --client-id <client-id>` to scan `--path` anyway with config checks skipped; in an interactive terminal the command offers to do this.\n\nThe check scans the app directory and each `--include-dir`. Git ignore rules apply by default: a file or directory that Git ignores is skipped, using the rules of the repository that contains it, while files that Git tracks are always scanned. Use `--no-git-ignore` to turn Git ignore rules off for every scanned directory. When the check uses Git, it requires Git 2.38.0 or later.\n\nUse `--exclude` to skip more paths. Each value is a glob that is matched against the path relative to the working directory, so a path above it starts with `../`, and a name at any depth needs `**/`, for example `--exclude '**/generated'`. Repeat the flag to add globs. An exclusion can't remove the selected app configuration file. Quote each value so your shell doesn't expand `*`. The coding-agent instructions this check offers repeat the globs. Other `app security` commands don't take `--exclude` or `--no-git-ignore`, so pass the same flags each time you run the check.\n\nUse `--list-files` to check the scope before scanning: it prints the files the check would gather, one path per line and relative to the app directory, and then stops. It writes no results and never prompts. `--client-id` is still checked, but doesn't change the list. With `--json`, the result lists the files with absolute paths.\n\nIn interactive terminals, the command offers to copy the coding-agent instructions, print them, or choose nothing; copying is the default. In CI and other non-interactive environments, instructions aren't offered unless you pass `--print-instructions`, which prints them. You can also run `shopify app security instructions` to print, copy, or write them later. With `--json`, the command offers to include the instructions in the result, with or without copying them, and `--print-instructions` includes them.\n\nWith `--json`, the result describes the scan and the files it wrote, and whether `--blocking` passed, but not the findings: run `shopify app security review --json` for those.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static get jsonOutputSchema(){return h}static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --include-dir ../backend","<%= config.bin %> <%= command.id %> --path extensions --config production --include-dir .","<%= config.bin %> <%= command.id %> --without-app-config --client-id <client-id>",'<%= config.bin %> <%= command.id %> --path app --include-dir . --exclude marketing --exclude "**/generated"',"<%= config.bin %> <%= command.id %> --no-git-ignore --exclude local-data","<%= config.bin %> <%= command.id %> --include-dir ../backend --list-files"];static flags={...J,...z,"include-dir":l.Flags.string({description:"Also scan this directory, relative to the working directory. Repeat the flag to add directories. Use it for code that lives outside the app directory, such as a backend or a shared library.",multiple:!0}),exclude:l.Flags.string({description:"Skip paths that match this glob, relative to the working directory. Repeat the flag to add globs. The selected app configuration file can't be excluded.",multiple:!0}),"no-git-ignore":l.Flags.boolean({description:"Turn off Git ignore rules for every scanned directory, so files that Git ignores are scanned too. Files that Git tracks are always scanned.",env:"SHOPIFY_FLAG_NO_GIT_IGNORE"}),"list-files":l.Flags.boolean({description:"Print the files the check would gather, one path per line, and stop. Nothing is scanned, no results are written, and nothing is prompted for. With --json, the result lists them with absolute paths.",env:"SHOPIFY_FLAG_LIST_FILES",exclusive:["print-instructions","skip-instructions","blocking"]}),...q,"print-instructions":l.Flags.boolean({description:"Print coding-agent instructions without prompting for how to deliver them. With --json, the instructions are included in the result.",default:!1,exclusive:["skip-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_PRINT_INSTRUCTIONS"}),yes:l.Flags.boolean({description:"Print coding-agent instructions without prompting.",hidden:!0,deprecated:{to:"--print-instructions"},exclusive:["skip-instructions","list-files"],env:"SHOPIFY_FLAG_YES"}),"skip-instructions":l.Flags.boolean({description:"Don't offer the coding-agent instructions after the scan. Use it when you want only the deterministic scan results.",default:!1,exclusive:["print-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_SKIP_INSTRUCTIONS"}),...V};async run(){let{flags:t}=await this.parse(e),i=await G({directory:t.path,configName:t.config,clientId:t["client-id"],withoutAppConfig:!!t["without-app-config"],blocking:t.blocking,includeDirs:t["include-dir"]??[],excludePatterns:t.exclude??[],noGitIgnore:!!t["no-git-ignore"],listFiles:!!t["list-files"],onSelectionPrompted:Pe});await De(i,{directory:t.path,verbose:!!t.verbose,printInstructions:!!(t["print-instructions"]||t.yes),skipInstructions:t["skip-instructions"]},t.json?"json":"text")}};export{E as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ot}from"./chunk-5HBIIYSK.js";import{a as Gt}from"./chunk-GB3YC4TI.js";import{a as ce}from"./chunk-RJ5VF3QY.js";import{a as ae}from"./chunk-636CTEW7.js";import{Bb as de,sb as ue}from"./chunk-
|
|
1
|
+
import{a as Ot}from"./chunk-5HBIIYSK.js";import{a as Gt}from"./chunk-GB3YC4TI.js";import{a as ce}from"./chunk-RJ5VF3QY.js";import{a as ae}from"./chunk-636CTEW7.js";import{Bb as de,sb as ue}from"./chunk-JLQRDFR5.js";import{a as y,c as h,e as A,g as s}from"./chunk-VKWPEFWQ.js";var he=h((rr,pe)=>{s();pe.exports=fe;fe.sync=kt;var le=y("fs");function Nt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function me(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:Nt(t,r)}function fe(e,t,r){le.stat(e,function(n,o){r(n,n?!1:me(o,e,t))})}function kt(e,t){return me(le.statSync(e),e,t)}});var xe=h((ir,Ee)=>{s();Ee.exports=Se;Se.sync=Ut;var ge=y("fs");function Se(e,t,r){ge.stat(e,function(n,o){r(n,n?!1:ye(o,t))})}function Ut(e,t){return ye(ge.statSync(e),t)}function ye(e,t){return e.isFile()&&Lt(e,t)}function Lt(e,t){var r=e.mode,n=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),c=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),d=parseInt("001",8),l=a|u,f=r&d||r&u&&o===c||r&a&&n===i||r&l&&i===0;return f}});var we=h((ar,be)=>{s();var cr=y("fs"),$;process.platform==="win32"||global.TESTING_WINDOWS?$=he():$=xe();be.exports=U;U.sync=Mt;function U(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){U(e,t||{},function(i,c){i?o(i):n(c)})})}$(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function Mt(e,t){try{return $.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var $e=h((dr,Ae)=>{s();var x=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Te=y("path"),Ft=x?";":":",Ie=we(),ve=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ce=(e,t)=>{let r=t.colon||Ft,n=e.match(/\//)||x&&e.match(/\\/)?[""]:[...x?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=x?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=x?o.split(r):[""];return x&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},Pe=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:i}=Ce(e,t),c=[],a=d=>new Promise((l,f)=>{if(d===n.length)return t.all&&c.length?l(c):f(ve(e));let m=n[d],g=/^".*"$/.test(m)?m.slice(1,-1):m,p=Te.join(g,e),S=!g&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;l(u(S,d,0))}),u=(d,l,f)=>new Promise((m,g)=>{if(f===o.length)return m(a(l+1));let p=o[f];Ie(d+p,{pathExt:i},(S,E)=>{if(!S&&E)if(t.all)c.push(d+p);else return m(d+p);return m(u(d,l,f+1))})});return r?a(0).then(d=>r(null,d),r):a(0)},jt=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=Ce(e,t),i=[];for(let c=0;c<r.length;c++){let a=r[c],u=/^".*"$/.test(a)?a.slice(1,-1):a,d=Te.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let f=0;f<n.length;f++){let m=l+n[f];try{if(Ie.sync(m,{pathExt:o}))if(t.all)i.push(m);else return m}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw ve(e)};Ae.exports=Pe;Pe.sync=jt});var Ge=h((mr,L)=>{"use strict";s();var Re=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};L.exports=Re;L.exports.default=Re});var Ue=h((pr,ke)=>{"use strict";s();var Oe=y("path"),Bt=$e(),Dt=Ge();function Ne(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let c;try{c=Bt.sync(e.command,{path:r[Dt({env:r})],pathExt:t?Oe.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return c&&(c=Oe.resolve(o?e.options.cwd:"",c)),c}function qt(e){return Ne(e)||Ne(e,!0)}ke.exports=qt});var Le=h((gr,F)=>{"use strict";s();var M=/([()\][%!^"`<>&|;, *?])/g;function Wt(e){return e=e.replace(M,"^$1"),e}function _t(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(M,"^$1"),t&&(e=e.replace(M,"^$1")),e}F.exports.command=Wt;F.exports.argument=_t});var Fe=h((yr,Me)=>{"use strict";s();Me.exports=/^#!(.*)/});var Be=h((xr,je)=>{"use strict";s();var Ht=Fe();je.exports=(e="")=>{let t=e.match(Ht);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var qe=h((wr,De)=>{"use strict";s();var j=y("fs"),zt=Be();function Xt(e){let r=Buffer.alloc(150),n;try{n=j.openSync(e,"r"),j.readSync(n,r,0,150,0),j.closeSync(n)}catch{}return zt(r.toString())}De.exports=Xt});var ze=h((Ir,He)=>{"use strict";s();var Kt=y("path"),We=Ue(),_e=Le(),Vt=qe(),Yt=process.platform==="win32",Qt=/\.(?:com|exe)$/i,Zt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Jt(e){e.file=We(e);let t=e.file&&Vt(e.file);return t?(e.args.unshift(e.file),e.command=t,We(e)):e.file}function en(e){if(!Yt)return e;let t=Jt(e),r=!Qt.test(t);if(e.options.forceShell||r){let n=Zt.test(t);e.command=Kt.normalize(e.command),e.command=_e.command(e.command),e.args=e.args.map(i=>_e.argument(i,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function tn(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:en(n)}He.exports=tn});var Ve=h((Cr,Ke)=>{"use strict";s();var B=process.platform==="win32";function D(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function nn(e,t){if(!B)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let i=Xe(o,t);if(i)return r.call(e,"error",i)}return r.apply(e,arguments)}}function Xe(e,t){return B&&e===1&&!t.file?D(t.original,"spawn"):null}function rn(e,t){return B&&e===1&&!t.file?D(t.original,"spawnSync"):null}Ke.exports={hookChildProcess:nn,verifyENOENT:Xe,verifyENOENTSync:rn,notFoundError:D}});var Ze=h((Ar,b)=>{"use strict";s();var Ye=y("child_process"),q=ze(),W=Ve();function Qe(e,t,r){let n=q(e,t,r),o=Ye.spawn(n.command,n.args,n.options);return W.hookChildProcess(o,n),o}function on(e,t,r){let n=q(e,t,r),o=Ye.spawnSync(n.command,n.args,n.options);return o.error=o.error||W.verifyENOENTSync(o.status,n),o}b.exports=Qe;b.exports.spawn=Qe;b.exports.sync=on;b.exports._parse=q;b.exports._enoent=W});var ht=h((mo,pt)=>{"use strict";s();var{PassThrough:An}=y("stream");pt.exports=function(){var e=[],t=new An({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(r),t;function r(i){return Array.isArray(i)?(i.forEach(r),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function n(){return e.length==0}function o(i){e=e.filter(function(c){return c!==i}),!e.length&&t.readable&&t.end()}}});s();s();var At=A(Ze(),1);import{Buffer as Hn}from"node:buffer";import zn from"node:path";import ne from"node:child_process";import k from"node:process";s();function _(e){let t=typeof e=="string"?`
|
|
2
2
|
`:10,r=typeof e=="string"?"\r":13;return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===r&&(e=e.slice(0,-1)),e}s();var R=new WeakMap,Je=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,o=e.displayName||e.name||"<anonymous>",i=function(...c){if(R.set(i,++n),n===1)r=e.apply(this,c),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return r};return ce(i,e),R.set(i,n),i};Je.callCount=e=>{if(!R.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return R.get(e)};var et=Je;s();import hn from"node:process";s();import{constants as un}from"node:os";s();var tt=()=>{let e=rt-nt+1;return Array.from({length:e},sn)},sn=(e,t)=>({name:`SIGRT${t+1}`,number:nt+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),nt=34,rt=64;s();import{constants as cn}from"node:os";s();var ot=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var H=()=>{let e=tt();return[...ot,...e].map(an)},an=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{let{signals:{[e]:c}}=cn,a=c!==void 0;return{name:e,number:a?c:t,description:r,supported:a,action:n,forced:o,standard:i}};var dn=()=>{let e=H();return Object.fromEntries(e.map(ln))},ln=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:c})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:c}],it=dn(),mn=()=>{let e=H(),t=65,r=Array.from({length:t},(n,o)=>fn(o,e));return Object.assign({},...r)},fn=(e,t)=>{let r=pn(e,t);if(r===void 0)return{};let{name:n,description:o,supported:i,action:c,forced:a,standard:u}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:c,forced:a,standard:u}}},pn=(e,t)=>{let r=t.find(({name:n})=>un.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},zr=mn();var gn=({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:c})=>e?`timed out after ${t} milliseconds`:c?"was canceled":r!==void 0?`failed with ${r}`:n!==void 0?`was killed with ${n} (${o})`:i!==void 0?`failed with exit code ${i}`:"failed",w=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:c,escapedCommand:a,timedOut:u,isCanceled:d,killed:l,parsed:{options:{timeout:f,cwd:m=hn.cwd()}}})=>{i=i===null?void 0:i,o=o===null?void 0:o;let g=o===void 0?void 0:it[o].description,p=n&&n.code,E=`Command ${gn({timedOut:u,timeout:f,errorCode:p,signal:o,signalDescription:g,exitCode:i,isCanceled:d})}: ${c}`,v=Object.prototype.toString.call(n)==="[object Error]",C=v?`${E}
|
|
3
3
|
${n.message}`:E,P=[C,t,e].filter(Boolean).join(`
|
|
4
4
|
`);return v?(n.originalMessage=n.message,n.message=P):n=new Error(P),n.shortMessage=C,n.command=c,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=g,n.stdout=e,n.stderr=t,n.cwd=m,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!u,n.isCanceled=d,n.killed=l&&!u,n};s();var G=["stdin","stdout","stderr"],Sn=e=>G.some(t=>e[t]!==void 0),st=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return G.map(n=>e[n]);if(Sn(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${G.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,G.length);return Array.from({length:r},(n,o)=>t[o])};s();var ct=A(Ot(),1);import yn from"node:os";var En=1e3*5,at=(e,t="SIGTERM",r={})=>{let n=e(t);return xn(e,t,r,n),n},xn=(e,t,r,n)=>{if(!bn(t,r,n))return;let o=Tn(r),i=setTimeout(()=>{e("SIGKILL")},o);i.unref&&i.unref()},bn=(e,{forceKillAfterTimeout:t},r)=>wn(e)&&t!==!1&&r,wn=e=>e===yn.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Tn=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return En;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},ut=(e,t)=>{e.kill()&&(t.isCanceled=!0)},In=(e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},dt=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let o,i=new Promise((a,u)=>{o=setTimeout(()=>{In(e,r,u)},t)}),c=n.finally(()=>{clearTimeout(o)});return Promise.race([i,c])},lt=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},mt=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let o=(0,ct.default)(()=>{e.kill()});return n.finally(()=>{o()})};s();import{createWriteStream as vn}from"node:fs";import{ChildProcess as Cn}from"node:child_process";s();function O(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function z(e){return O(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"}var Pn=e=>e instanceof Cn&&typeof e.then=="function",X=(e,t,r)=>{if(typeof r=="string")return e[t].pipe(vn(r)),e;if(z(r))return e[t].pipe(r),e;if(!Pn(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!z(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r},ft=e=>{e.stdout!==null&&(e.pipeStdout=X.bind(void 0,e,"stdout")),e.stderr!==null&&(e.pipeStderr=X.bind(void 0,e,"stderr")),e.all!==void 0&&(e.pipeAll=X.bind(void 0,e,"all"))};s();import{createReadStream as $n,readFileSync as Rn}from"node:fs";var Y=A(Gt(),1),gt=A(ht(),1),St=e=>{if(e!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Gn=({input:e,inputFile:t})=>typeof t!="string"?e:(St(e),Rn(t)),yt=e=>{let t=Gn(e);if(O(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},On=({input:e,inputFile:t})=>typeof t!="string"?e:(St(e),$n(t)),Et=(e,t)=>{let r=On(t);r!==void 0&&(O(r)?r.pipe(e.stdin):e.stdin.end(r))},xt=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=(0,gt.default)();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},K=async(e,t)=>{if(!(!e||t===void 0)){e.destroy();try{return await t}catch(r){return r.bufferedData}}},V=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!(!e||!r))return t?(0,Y.default)(e,{encoding:t,maxBuffer:n}):Y.default.buffer(e,{maxBuffer:n})},bt=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},c)=>{let a=V(e,{encoding:n,buffer:o,maxBuffer:i}),u=V(t,{encoding:n,buffer:o,maxBuffer:i}),d=V(r,{encoding:n,buffer:o,maxBuffer:i*2});try{return await Promise.all([c,a,u,d])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},K(e,a),K(t,u),K(r,d)])}};s();var Nn=(async()=>{})().constructor.prototype,kn=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Nn,e)]),Q=(e,t)=>{for(let[r,n]of kn){let o=typeof t=="function"?(...i)=>Reflect.apply(n.value,t(),i):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},wt=e=>new Promise((t,r)=>{e.on("exit",(n,o)=>{t({exitCode:n,signal:o})}),e.on("error",n=>{r(n)}),e.stdin&&e.stdin.on("error",n=>{r(n)})});s();import{Buffer as Un}from"node:buffer";import{ChildProcess as Ln}from"node:child_process";var vt=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Mn=/^[\w.-]+$/,Fn=/"/g,jn=e=>typeof e!="string"||Mn.test(e)?e:`"${e.replace(Fn,'\\"')}"`,Z=(e,t)=>vt(e,t).join(" "),J=(e,t)=>vt(e,t).map(r=>jn(r)).join(" "),Bn=/ +/g;var Tt=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(t==="object"&&e!==null&&!(e instanceof Ln)&&"stdout"in e){let r=typeof e.stdout;if(r==="string")return e.stdout;if(Un.isBuffer(e.stdout))return e.stdout.toString();throw new TypeError(`Unexpected "${r}" stdout in template expression`)}throw new TypeError(`Unexpected "${t}" in template expression`)},It=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e[e.length-1]}${t[0]}`,...t.slice(1)],Dn=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{let i=o??e.raw[n],c=i.split(Bn).filter(Boolean),a=It(r,c,i.startsWith(" "));if(n===t.length)return a;let u=t[n],d=Array.isArray(u)?u.map(l=>Tt(l)):[Tt(u)];return It(a,d,i.endsWith(" "))},ee=(e,t)=>{let r=[];for(let[n,o]of e.entries())r=Dn({templates:e,expressions:t,tokens:r,index:n,template:o});return r};s();import{debuglog as qn}from"node:util";import Wn from"node:process";var Ct=qn("execa").enabled,N=(e,t)=>String(e).padStart(t,"0"),_n=()=>{let e=new Date;return`${N(e.getHours(),2)}:${N(e.getMinutes(),2)}:${N(e.getSeconds(),2)}.${N(e.getMilliseconds(),3)}`},te=(e,{verbose:t})=>{t&&Wn.stderr.write(`[${_n()}] ${e}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as m}from"./chunk-
|
|
1
|
+
import{U as m}from"./chunk-D2KIGKBI.js";import{h as c}from"./chunk-M5VIFG2V.js";import{Bb as a,qb as l,sb as n}from"./chunk-JLQRDFR5.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as T}from"./chunk-7AWAOPLA.js";import{ga as D,p as C,ua as E,va as k,xa as o}from"./chunk-NCPZVARH.js";import{A as U,K as B,M as L,N as q,O as R,X as P,z as O}from"./chunk-V654BMS7.js";import{h as c}from"./chunk-J7BTC45S.js";import{Bb as _,S as I}from"./chunk-RIG66DIQ.js";import{j as A}from"./chunk-FZCGRIOM.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var de=/gid:\/\/shopify\/\w*\/(\d+)/,w="development",Fe="live",ge="unpublished";function be(e){return e.role===w}async function Te(e){let n=await I("creative");return B({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function N(e){let n=de.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:i,role:a,processing:t,createdAtRuntime:d}=e;return{id:n,name:i,processing:t,createdAtRuntime:d,role:a==="main"?"live":a}}function Ve(e){if(!e)return;let{key:n,checksum:i,attachment:a,value:t}=e,d={size:(t||a||"").length,mtime:Date.now()};return{key:n,checksum:i,attachment:a,value:t,stats:d}}l();var G={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 M={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 $={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 H={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 z={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 j={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 Q={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 K={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 X={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 Y={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"}}}},{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:"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"}},{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:"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:"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 W={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 Z={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 J={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 ee={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"}}]}}]}}]};l();var le="CHALLENGE_REQUIRED",me=["\r",`
|
|
1
|
+
import{b as T}from"./chunk-SK7EPN6C.js";import{ga as D,p as C,ua as E,va as k,xa as o}from"./chunk-GQLNG537.js";import{A as U,K as B,M as L,N as q,O as R,X as P,z as O}from"./chunk-D2KIGKBI.js";import{h as c}from"./chunk-M5VIFG2V.js";import{Bb as _,S as I}from"./chunk-JLQRDFR5.js";import{j as A}from"./chunk-FZCGRIOM.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var de=/gid:\/\/shopify\/\w*\/(\d+)/,w="development",Fe="live",ge="unpublished";function be(e){return e.role===w}async function Te(e){let n=await I("creative");return B({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function N(e){let n=de.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:i,role:a,processing:t,createdAtRuntime:d}=e;return{id:n,name:i,processing:t,createdAtRuntime:d,role:a==="main"?"live":a}}function Ve(e){if(!e)return;let{key:n,checksum:i,attachment:a,value:t}=e,d={size:(t||a||"").length,mtime:Date.now()};return{key:n,checksum:i,attachment:a,value:t,stats:d}}l();var G={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 M={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 $={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 H={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 z={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 j={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 Q={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 K={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 X={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 Y={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"}}}},{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:"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"}},{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:"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:"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 W={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 Z={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 J={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 ee={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"}}]}}]}}]};l();var le="CHALLENGE_REQUIRED",me=["\r",`
|
|
2
2
|
`," "],b=class extends c{},g,V=0;async function ie(e){g&&await g;let n=V,i=await ne(e);if(!i.challenged)return i.result;let a=V>n;(g||!a)&&await se(i.challengeUrl);let t=await ne(e);if(!t.challenged)return t.result;throw o("theme-api:trust-challenge:retry-challenged"),new b("Shopify still needs to verify your identity before it can continue.",void 0,[["Complete the verification at",{link:{url:t.challengeUrl}},"then run the command again."]])}async function ne(e){try{return{challenged:!1,result:await e()}}catch(n){let i=await oe(n);if(!i)throw n;return{challenged:!0,challengeUrl:i}}}async function oe(e){let i=D(e).find(a=>a.extensions?.code===le)?.extensions?.redirect_to;if(typeof i=="string"){if(!await re(i)){_(`Ignoring trust challenge with an unexpected URL host: ${i}`);return}return i}}async function re(e){try{let n=new URL(e);return n.protocol==="https:"&&n.hostname===await C()}catch{return!1}}async function se(e){return g??=ue(e).then(()=>{V+=1}).finally(()=>{g=void 0}),g}async function ue(e){if(o("theme-api:trust-challenge:required"),P()||!q()||A()==="json")throw o("theme-api:trust-challenge:non-interactive"),new b("Shopify needs to verify your identity before it can continue.",void 0,[["Open",{link:{url:e}},"in a browser where you're logged in to Shopify with the same account you use in Shopify CLI, complete the verification, then run the command again."]]);let n=await R(e);o(n?"theme-api:trust-challenge:browser-opened":"theme-api:trust-challenge:browser-not-opened"),O({headline:"Verify your identity to continue.",body:n?"A verification page opened in your browser.":"Shopify needs to verify your identity before it can continue.",link:n?void 0:{label:"Open the verification page",url:e},nextSteps:[["Complete the verification in your browser, logged in with the same account you use in Shopify CLI."],["Press",{userInput:"Enter"},"here once you have completed it."]],orderedNextSteps:!0}),await L(process.stdin,void 0,{keys:me}),o("theme-api:trust-challenge:acknowledged"),U({headline:"Continuing."})}var ke="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},ae="the required theme access scope";async function Pn(e,n){let i=S(e);o("theme-api:fetch-theme");try{let{theme:a}=await T({query:Z,session:n,variables:{id:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a)return y({id:N(a.id),processing:a.processing,role:a.role.toLowerCase(),name:a.name})}catch(a){te(a),k(a),_(`Error fetching theme with ID: ${e}`)}}async function Gn(e){let n=[],i=null;for(o("theme-api:fetch-themes");;){let a=await h({query:W,session:e,variables:{after:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});a.themes||s("Failed to fetch themes");let{nodes:t,pageInfo:d}=a.themes;if(t.forEach(m=>{let r=y({id:N(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});r&&n.push(r)}),!d.hasNextPage)return n;i=d.endCursor}}async function Mn(e,n){o("theme-api:find-development-theme-by-name");let{themes:i}=await h({query:J,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(i||s("Failed to fetch themes"),i.nodes.length>1)throw k(new c(`More than one development theme is named "${e}"`));if(i.nodes.length===1){let{id:a,processing:t,role:d,name:m}=i.nodes[0];return y({id:N(a),processing:t,role:d.toLowerCase(),name:m})}}async function $n(e,n){let i=e.src??ke;o("theme-api:create-theme");let{themeCreate:a}=await h({query:z,session:n,variables:{name:e.name??"",source:i,role:(e.role??w).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});a||s("Failed to create theme");let{theme:t,userErrors:d}=a;if(d.length){let m=a.userErrors.map(r=>r.message).join(", ");throw k(new c(m))}return t||s("Failed to create theme"),y({id:N(t.id),name:t.name,role:t.role.toLowerCase()})}async function Hn(e,n,i){let a=[],t=null;for(o("theme-api:fetch-assets");;){let d=await h({query:j,session:i,variables:{id:x(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(f=>f.filename).join(", ");s(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:r}=d.theme.files;if(a.push(...await Promise.all(m.map(async u=>{let{attachment:f,value:v}=await Ne(u.body);return{attachment:f,key:u.filename,checksum:u.checksumMd5,value:v}}))),!r.hasNextPage)return a;t=r.endCursor}}async function zn(e,n,i){let t=[];o("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:r}=await h({query:X,session:i,variables:{themeId:S(e),files:m},preferredBehaviour:p});r||s("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:f}=r;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),f.length>0&&f.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):s(`Failed to delete theme assets: ${v.message}`)})}return t}async function jn(e,n,i){let a=[];o("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=ce(d);E("theme-api:upload-files");let r=await pe(e,m,i);E("theme-api:upload-files"),a.push(...he(r))}return a}function ce(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function pe(e,n,i){return h({query:K,session:i,variables:{themeId:x(e),files:n},preferredBehaviour:p})}function he(e){let{themeFilesUpsert:n}=e;n||s("Failed to upload theme files");let{upsertedThemeFiles:i,userErrors:a}=n,t=[];return i?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),a.forEach(d=>{d.filename||s(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function Qn(e,n){let i=[],a=null;for(o("theme-api:fetch-checksums");;){let t=await h({query:Q,session:n,variables:{id:x(e),after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let r=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new c(`Failed to fetch checksums for: ${r}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(i.push(...d.map(r=>({key:r.filename,checksum:r.checksumMd5}))),!m.hasNextPage)return i;a=m.endCursor}}async function Kn(e,n,i){let a=n.name,t={};a&&(t.name=a),o("theme-api:update-theme");let{themeUpdate:d}=await h({query:G,session:i,variables:{id:S(e),input:t},preferredBehaviour:p});d||s("Failed to update theme");let{theme:m,userErrors:r}=d;if(r.length){let u=d.userErrors.map(f=>f.message).join(", ");throw k(new c(u))}return m||s("Failed to update theme"),y({id:N(m.id),name:m.name,role:m.role.toLowerCase()})}async function Xn(e,n){o("theme-api:publish-theme");let{themePublish:i}=await h({query:H,session:n,variables:{id:S(e)},preferredBehaviour:p});i||s("Failed to update theme");let{theme:a,userErrors:t}=i;if(t.length){let d=i.userErrors.map(m=>m.message).join(", ");throw k(new c(d))}return a||s("Failed to update theme"),y({id:N(a.id),name:a.name,role:a.role.toLowerCase()})}async function Yn(e,n){o("theme-api:delete-theme");let{themeDelete:i}=await h({query:M,session:n,variables:{id:S(e)},preferredBehaviour:p});i||s("Failed to update theme");let{deletedThemeId:a,userErrors:t}=i;if(t.length){let d=i.userErrors.map(m=>m.message).join(", ");throw k(new c(d))}return a||s("Failed to update theme"),!0}async function Wn(e,n,i){let a;o("theme-api:duplicate-theme");let{themeDuplicate:t}=await h({query:$,session:i,variables:{id:S(e),name:n},preferredBehaviour:p,responseOptions:{onResponse:u=>{a=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:a};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:a}:d?{theme:y({id:N(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:a}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:a}}async function Zn(e,n){o("theme-api:fetch-metafield-definitions");let i=[],a=null;for(;;){let{metafieldDefinitions:t}=await T({query:Y,session:n,variables:{ownerType:e,after:a}});if(i.push(...t.nodes),!t.pageInfo.hasNextPage)break;let d=t.pageInfo.endCursor;(!d||d===a)&&s("Failed to paginate metafield definitions"),a=d}return i.map(t=>({key:t.key,namespace:t.namespace,name:t.name,description:t.description,type:{name:t.type.name,category:t.type.category}}))}async function Jn(e){o("theme-api:check-password-protection");let{onlineStore:n}=await T({query:ee,session:e});n||s("Unable to get details about the storefront's password protection");let{passwordProtection:i}=n;return i.enabled}function s(e){throw k(new c(e))}function ei(e){return e instanceof b}async function h(e){try{return await ie(()=>T(e))}catch(n){throw te(n),n}}function te(e){let n=ve(e);if(!n)return;let i=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},{char:","},{command:"theme dev"},{char:","},{command:"theme publish"},{char:","},{command:"theme delete"},{char:","},{command:"theme rename"},{char:","},"and",{command:"theme duplicate"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new c(`The authenticated account or access token is missing ${n}.`,void 0,i))}function ve(e){let n=D(e).find(a=>a.extensions?.code==="ACCESS_DENIED");if(!n)return;let i=n.extensions?.requiredAccess;return typeof i!="string"?ae:fe(i)}function fe(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||ae}function x(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function Ne(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let i=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(i).toString("base64")}}catch{throw k(new c(`Error downloading content from URL: ${e.url}`))}}}export{Ve as a,w as b,Fe as c,ge as d,be as e,Te as f,Pn as g,Gn as h,Mn as i,$n as j,Hn as k,zn as l,jn as m,Qn as n,Kn as o,Xn as p,Yn as q,Wn as r,Zn as s,Jn as t,ei as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="5.0.2";export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-66TMIQMB.js";import{D as b,E as C,F as R,O as c,P as l,U as p,W as j,b as w,s as A,x as v,y as D}from"./chunk-W56ZGEQQ.js";import{b as f}from"./chunk-ZJOX5HW4.js";import{b as S,c as g}from"./chunk-3KM5ZOW2.js";import{A as y,z as d}from"./chunk-D2KIGKBI.js";import{a as m}from"./chunk-BN7ZXAZJ.js";import{wb as h}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as T}from"./chunk-YTUUU33R.js";import{e as J,g as i}from"./chunk-VKWPEFWQ.js";i();i();var W={cleanResults:v,cleanAllResults:D};async function n(t,e=W){return{removed:t.all?await e.cleanAllResults(t.appDirectory):await e.cleanResults(t.selection.appDirectory,b(t.selection))}}i();i();var x=o.object({directory:c().describe("The absolute app directory.")}).strict(),a=m({name:"AppSecurityCleanResult",schema:o.object({status:o.literal("success"),changed:o.boolean().describe("Whether any results directory was removed."),app:o.union([l,x]).describe("The selected app. With --all, only its directory."),resultsDirectories:o.array(c()).describe("The absolute paths of the removed results directories, sorted. Empty when there was nothing to remove.")}).strict(),definitions:{AppSecurityApp:l,AppSecurityCleanAllApp:x}});function O(t,e,s){if(s==="json"){h(a.encode(I(t,e)));return}if(t.removed.length===0){let r=e.all?e.appDirectory:e.selection.appDirectory;d({headline:"No app security check results to remove.",body:["Nothing was found in",{filePath:A(r)}]})}else y({headline:"App security check results removed.",body:{list:{items:t.removed.map(r=>({filePath:r}))}}})}function I(t,e){return{status:"success",changed:t.removed.length>0,app:e.all?{directory:p(e.appDirectory)}:j(e.selection),resultsDirectories:t.removed.map(p)}}var P=J(T(),1);var u=class t extends f{static summary="Remove local app security check results.";static descriptionWithMarkdown="Deletes the results directory, `.shopify/app-security/<results key>/`, without asking. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. Other results directories are left alone. Prints each removed path.\n\nUse `--all` to delete every results directory under `.shopify/app-security/` instead. `--all` takes neither `--config` nor `--client-id`, and with `--without-app-config` it doesn't need `--client-id`.";static get jsonOutputSchema(){return a}static description=this.descriptionForHelp();static flags={...S,...w,...g,all:P.Flags.boolean({description:"Delete every results directory under .shopify/app-security/, not only the selected one.",exclusive:["config","client-id"]})};async run(){let{flags:e}=await this.parse(t),s={path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"]},r=e.all?{all:!0,appDirectory:await C(s)}:{all:!1,selection:await R({...s,allowPrompts:!1})};r.all||await k(r.selection,e.path);let F=await n(r);O(F,r,e.json?"json":"text")}};export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as w}from"./chunk-
|
|
1
|
+
import{a as h,b as w}from"./chunk-2T4HDR6R.js";import{j as f}from"./chunk-GQLNG537.js";import{U as d}from"./chunk-D2KIGKBI.js";import{h as i}from"./chunk-M5VIFG2V.js";import{Fa as m,ma as p}from"./chunk-JLQRDFR5.js";import{c as u}from"./chunk-IWTNUJGY.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
|
|
@@ -4,4 +4,4 @@ import{a as Oo,b as vo,c as Br,d as Yr}from"./chunk-T7KHS6RF.js";import{b as yo}
|
|
|
4
4
|
`,e.proxy.authorization&&(s+="Proxy-Authorization: Basic "+Buffer.from(e.proxy.authorization).toString("base64")+`\r
|
|
5
5
|
`),s+=`\r
|
|
6
6
|
`,n.write(s)}},Al=Cr;xe.default=Al});var Ks=f(te=>{"use strict";i();Object.defineProperty(te,"__esModule",{value:!0});Object.defineProperty(te,"Agent",{enumerable:!0,get:function(){return Nl.default}});Object.defineProperty(te,"HttpProxyAgent",{enumerable:!0,get:function(){return Tl.default}});Object.defineProperty(te,"HttpsProxyAgent",{enumerable:!0,get:function(){return Ll.default}});var Nl=jr(Ie()),Tl=jr(zs()),Ll=jr(Ws());function jr(r){return r&&r.__esModule?r:{default:r}}});var Qs=f((Ce,Zs)=>{"use strict";i();Object.defineProperty(Ce,"__esModule",{value:!0});function Sl(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Js(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function Il(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function ql(r){function e(){r.apply(this,arguments)}return e.prototype=Object.create(r.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r,e}var xl=(function(r){Il(e,r);function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";Sl(this,e);var n=Js(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),Js(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),n)}return e})(ql(Error));Ce.default=xl;Zs.exports=Ce.default});var je=f(De=>{"use strict";i();Object.defineProperty(De,"__esModule",{value:!0});De.UnexpectedStateError=void 0;var Cl=Dl(Qs());function Dl(r){return r&&r.__esModule?r:{default:r}}var Gr=class extends Cl.default{constructor(e,t="UNEXPECTED_STATE_ERROR"){super(e),this.code=t}};De.UnexpectedStateError=Gr});var ro=f(Ge=>{"use strict";i();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=void 0;var jl=eo(N("http")),Gl=eo(N("https"));function eo(r){return r&&r.__esModule?r:{default:r}}var Ml=(r,e,t)=>(...n)=>{let s,o,a;return typeof n[0]=="string"||n[0]instanceof URL?(s=n[0],typeof n[1]=="function"?(o={},a=n[1]):(o={...n[1]},a=n[2])):(o={...n[0]},a=n[1]),t?o.agent=e:(o.agent||(o.agent=e),(o.agent===jl.default.globalAgent||o.agent===Gl.default.globalAgent)&&(o.agent=e)),s?r(s,o,a):r(o,a)},Ul=Ml;Ge.default=Ul});var no=f((Ad,Ur)=>{"use strict";i();var kl=yo(),Mr=new Map;function to(r,e){e={caseSensitive:!1,...e};let t=r+JSON.stringify(e);if(Mr.has(t))return Mr.get(t);let n=r[0]==="!";n&&(r=r.slice(1)),r=kl(r).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${r}$`,e.caseSensitive?"":"i");return s.negated=n,Mr.set(t,s),s}Ur.exports=(r,e,t)=>{if(!(Array.isArray(r)&&Array.isArray(e)))throw new TypeError(`Expected two arrays, got ${typeof r} ${typeof e}`);if(e.length===0)return r;let n=e[0][0]==="!";e=e.map(o=>to(o,t));let s=[];for(let o of r){let a=n;for(let c of e)c.test(o)&&(a=!c.negated);a&&s.push(o)}return s};Ur.exports.isMatch=(r,e,t)=>{let n=Array.isArray(r)?r:[r],s=Array.isArray(e)?e:[e];return n.some(o=>s.every(a=>{let c=to(a,t),l=c.test(o);return c.negated?!l:l}))}});var oo=f(Me=>{"use strict";i();Object.defineProperty(Me,"__esModule",{value:!0});Me.default=void 0;var Xl=N("url"),Fl=Hl(no()),so=je();function Hl(r){return r&&r.__esModule?r:{default:r}}var Vl=(r,e)=>{let t=(0,Xl.parse)(r),n=e.split(/[\s,]+/);for(let s of n){let o=s.replace(/^(?<leadingDot>\.)/,"*").match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);if(!o||!o.groups)throw new so.UnexpectedStateError("Invalid NO_PROXY pattern.");if(!o.groups.hostname)throw new so.UnexpectedStateError("NO_PROXY entry pattern must include hostname. Use * to match any hostname.");if(Fl.default.isMatch(t.hostname,o.groups.hostname)&&(!o.groups||!o.groups.port||t.port&&t.port===o.groups.port))return!0}return!1},Bl=Vl;Me.default=Bl});var io=f(Ue=>{"use strict";i();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.default=void 0;var Yl=N("url"),kr=je(),zl=r=>{let e=(0,Yl.parse)(r);if(e.query!==null)throw new kr.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.");if(e.hash!==null)throw new kr.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.");if(e.protocol!=="http:")throw new kr.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');let t=80;return e.port&&(t=Number.parseInt(e.port,10)),{authorization:e.auth||null,hostname:e.hostname,port:t}},Wl=zl;Ue.default=Wl});var ao=f(ne=>{"use strict";i();Object.defineProperty(ne,"__esModule",{value:!0});Object.defineProperty(ne,"bindHttpMethod",{enumerable:!0,get:function(){return Kl.default}});Object.defineProperty(ne,"isUrlMatchingNoProxy",{enumerable:!0,get:function(){return Jl.default}});Object.defineProperty(ne,"parseProxyUrl",{enumerable:!0,get:function(){return Zl.default}});var Kl=Xr(ro()),Jl=Xr(oo()),Zl=Xr(io());function Xr(r){return r&&r.__esModule?r:{default:r}}});var Fr=f(ke=>{"use strict";i();Object.defineProperty(ke,"__esModule",{value:!0});ke.default=void 0;var Ql=ec(z());function ec(r){return r&&r.__esModule?r:{default:r}}var rc=Ql.default.child({namespace:"createProxyController"}),tc=["HTTP_PROXY","HTTPS_PROXY","NO_PROXY"],nc=()=>new Proxy({HTTP_PROXY:null,HTTPS_PROXY:null,NO_PROXY:null},{set:(r,e,t)=>{if(!tc.includes(e))throw new Error('Cannot set an unmapped property "'+e+'".');return r[e]=t,rc.info({change:{name:e,value:t},newConfiguration:r},"configuration changed"),!0}}),sc=nc;ke.default=sc});var po=f(Xe=>{"use strict";i();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.default=void 0;var X=se(N("http")),F=se(N("https")),oc=ue(),uo=se(Fs()),ic=se(z()),lo=Ks(),ac=je(),k=ao(),uc=se(Fr());function se(r){return r&&r.__esModule?r:{default:r}}var lc=X.default.get,cc=X.default.request,fc=F.default.get,pc=F.default.request,co=ic.default.child({namespace:"createGlobalProxyAgent"}),fo={environmentVariableNamespace:void 0,forceGlobalAgent:void 0,socketConnectionTimeout:6e4},dc=r=>{let e=Object.keys(r),t={};for(let n of e){let s=r[n];s!==void 0&&(t[n]=s)}return t},hc=r=>{let e=process.env;return{...{environmentVariableNamespace:typeof e.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE=="string"?e.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE:"GLOBAL_AGENT_",forceGlobalAgent:typeof e.GLOBAL_AGENT_FORCE_GLOBAL_AGENT=="string"?(0,oc.boolean)(e.GLOBAL_AGENT_FORCE_GLOBAL_AGENT):!0,socketConnectionTimeout:typeof e.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT=="string"?Number.parseInt(e.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT,10):fo.socketConnectionTimeout},...dc(r)}},gc=(r=fo)=>{let e=hc(r),t=(0,uc.default)();t.HTTP_PROXY=process.env[e.environmentVariableNamespace+"HTTP_PROXY"]||null,t.HTTPS_PROXY=process.env[e.environmentVariableNamespace+"HTTPS_PROXY"]||null,t.NO_PROXY=process.env[e.environmentVariableNamespace+"NO_PROXY"]||null,co.info({configuration:e,state:t},"global agent has been initialized");let n=p=>m=>p()?t.NO_PROXY?!(0,k.isUrlMatchingNoProxy)(m,t.NO_PROXY):!0:!1,s=p=>()=>{let m=p();if(!m)throw new ac.UnexpectedStateError("HTTP(S) proxy must be configured.");return(0,k.parseProxyUrl)(m)},o=()=>t.HTTP_PROXY,a=class extends lo.HttpProxyAgent{constructor(){super(()=>o(),n(o),s(o),X.default.globalAgent,e.socketConnectionTimeout)}},c=new a,l=()=>t.HTTPS_PROXY||t.HTTP_PROXY,E=class extends lo.HttpsProxyAgent{constructor(){super(()=>l(),n(l),s(l),F.default.globalAgent,e.socketConnectionTimeout)}},u=new E;return uo.default.gte(process.version,"v11.7.0")&&(X.default.globalAgent=c,F.default.globalAgent=u),uo.default.gte(process.version,"v10.0.0")?(X.default.get=(0,k.bindHttpMethod)(lc,c,e.forceGlobalAgent),X.default.request=(0,k.bindHttpMethod)(cc,c,e.forceGlobalAgent),F.default.get=(0,k.bindHttpMethod)(fc,u,e.forceGlobalAgent),F.default.request=(0,k.bindHttpMethod)(pc,u,e.forceGlobalAgent)):co.warn("attempt to initialize global-agent in unsupported Node.js version was ignored"),t},Ec=gc;Xe.default=Ec});var Hr=f(Fe=>{"use strict";i();Object.defineProperty(Fe,"__esModule",{value:!0});Object.defineProperty(Fe,"createGlobalProxyAgent",{enumerable:!0,get:function(){return mc.default}});Object.defineProperty(Fe,"createProxyController",{enumerable:!0,get:function(){return yc.default}});var mc=ho(po()),yc=ho(Fr());function ho(r){return r&&r.__esModule?r:{default:r}}});var go=f(He=>{"use strict";i();Object.defineProperty(He,"__esModule",{value:!0});He.default=void 0;var Oc=bc(z()),vc=Hr();function bc(r){return r&&r.__esModule?r:{default:r}}var Rc=Oc.default.child({namespace:"bootstrap"}),_c=r=>global.GLOBAL_AGENT?(Rc.warn("found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored"),!1):(global.GLOBAL_AGENT=(0,vc.createGlobalProxyAgent)(r),!0),wc=_c;He.default=wc});var Eo=f(Vr=>{"use strict";i();Object.defineProperty(Vr,"__esModule",{value:!0});Object.defineProperty(Vr,"bootstrap",{enumerable:!0,get:function(){return Pc.default}});var Pc=$c(go());function $c(r){return r&&r.__esModule?r:{default:r}}});var Tc=f(Ve=>{"use strict";i();Object.defineProperty(Ve,"__esModule",{value:!0});Object.defineProperty(Ve,"bootstrap",{enumerable:!0,get:function(){return Ac.bootstrap}});Object.defineProperty(Ve,"createGlobalProxyAgent",{enumerable:!0,get:function(){return Nc.createGlobalProxyAgent}});var Ac=Eo(),Nc=Hr()});i();import bo from"fs";function zr(r){let e=r instanceof Error?r.stack??r.message:String(r);bo.writeSync(process.stderr.fd,`${e}
|
|
7
|
-
`)}async function Sc(r){try{let{jsonOutputEnabled:e}=await import("./environment-O7ECODHU.js");if(e()){let{handler:n}=await import("./error-
|
|
7
|
+
`)}async function Sc(r){try{let{jsonOutputEnabled:e}=await import("./environment-O7ECODHU.js");if(e()){let{handler:n}=await import("./error-JY2ADS6S.js");await n(r);return}let{FatalError:t}=await import("./error-JY2ADS6S.js");if(r instanceof t){let{renderFatalError:n}=await import("./ui-VJTNGCS6.js");n(r)}else zr(r)}catch{zr(r)}}export{Sc as a,Tc as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,c as w,d as O}from"./chunk-
|
|
1
|
+
import{a as v,c as w,d as O}from"./chunk-EAZIQI2D.js";import{f as y,g as P,h as b}from"./chunk-S4LOWCGS.js";import{a as F}from"./chunk-VGSH52JM.js";import{a as h}from"./chunk-NVKJ7ZLP.js";import{Na as x}from"./chunk-U2T5HPRD.js";import{b as m,c as d}from"./chunk-3KM5ZOW2.js";import{G as g,W as l}from"./chunk-D2KIGKBI.js";import{Bb as n}from"./chunk-JLQRDFR5.js";import{b as N}from"./chunk-YTUUU33R.js";import{e as I,g as f}from"./chunk-VKWPEFWQ.js";f();var r=I(N(),1);var a="_start",s=class S extends F{static get jsonOutputSchema(){return v}static summary="Run a function locally for testing.";static descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";static description=this.descriptionForHelp();static flags={...m,...h,...y,...d,input:r.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:r.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"}),profile:r.Flags.boolean({description:"Generate a WebAssembly performance profile for the function run. The profile can be viewed in Speedscope.",env:"SHOPIFY_FLAG_PROFILE"})};async run(){let{flags:t}=await this.parse(S),o=a,{app:p}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await P(p,t.path);if(t.export!==void 0)n(`Using export ${t.export} from the --export flag.`),o=t.export;else if(e.configuration.targeting!==void 0&&e.configuration.targeting.length>0){let i=e.configuration.targeting;if(i.length>1&&!t["no-input"]&&l()){let E=i.map(u=>({label:u.target,value:u.export||a}));o=await g({message:"Which target would you like to execute?",choices:E})}else o=i?.[0]?.export||a,n(`Using export '${o}'. Use the --export flag or an interactive terminal to select a different export.`)}else n(`No targeting information found. Using the default export '${o}'. Use the --export flag or an interactive terminal to select a different export.`);let c=e?.configuration.targeting?.[0]?.input_query,A=c&&`${e?.directory}/${c}`,U=await b(e,t.path,t["client-id"],t.reset,t.config),_={functionExtension:e,inputPath:t.input,export:o,stdin:"inherit",schemaPath:U,queryPath:A,profile:t.profile,json:t.json},T=await w(_);return O(T),{app:p}}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk-HB3MJYBK.js";import{a as B}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-HB3MJYBK.js";import{a as B}from"./chunk-X5NIAZA4.js";import{a as P}from"./chunk-66TMIQMB.js";import{A as O,D as p,F as N,J as u,M as m,O as h,P as l,U as g,W as J,a as D,e as F,f as x,r as I,t as E,v as M}from"./chunk-W56ZGEQQ.js";import{b as C}from"./chunk-ZJOX5HW4.js";import{b as j,c as _}from"./chunk-3KM5ZOW2.js";import{$ as v,A as k}from"./chunk-D2KIGKBI.js";import{a as R}from"./chunk-BN7ZXAZJ.js";import{h as d}from"./chunk-M5VIFG2V.js";import{wb as T}from"./chunk-JLQRDFR5.js";import{b as c}from"./chunk-FZCGRIOM.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();var X=5e6,Y={readStdin:v,engineVersion:x,writeAgentFindings:M,recordMetadata:B};function z(t){return m(t.record)}function a(t,e){let i=new d("The findings document was rejected. Nothing was recorded.",null,[["Fix every error, then run",{command:z(e)},"again."]],[{title:"Errors",body:{list:{items:t}}}]);throw i.code="findings-document-rejected",i.details={errors:t},i}async function q(t,e){try{return await e.readStdin()}catch(i){throw i instanceof d&&a([i.message],t),i}}async function G(t,e){let i=await q(t,e);if(i===void 0){let n=new d("No findings document was piped on stdin.",null,[["Pipe the findings document on stdin:",{command:z(t)}]]);throw n.code="findings-document-missing",n}let r=Buffer.byteLength(i,"utf8");r>X&&a([`The findings document is ${r} bytes; the limit is 5 MB.`],t);try{return JSON.parse(i)}catch(n){let o=n instanceof Error?n.message:String(n);a([`The findings document is not valid JSON: ${o}`],t)}}async function S(t,e=Y){let{selection:i}=t,r=u(i,t.path),n=await G(r,e),o=F(n,{engineVersion:e.engineVersion()});o.ok||a(o.errors,r);let b=O(o.document);b>I&&a([`The recorded findings would be stored as ${b} bytes; the limit is 5 MB. Shorten or remove findings.`],r);let V=await e.writeAgentFindings(i.appDirectory,p(i),o.document),A=o.document.checks.reduce((L,K)=>L+K.findings.length,0);return await e.recordMetadata({num_security_findings:A}),{path:V,checks:o.document.checks.length,findings:A}}s();s();var f=R({name:"AppSecurityRecordResult",schema:c.object({status:c.literal("success"),app:l,resultsDirectory:h().describe("The absolute path of the results directory."),path:h().describe("The absolute path of the agent-findings.json file that was written."),checkCount:c.number().int().nonnegative().describe("The number of checks recorded."),findingCount:c.number().int().nonnegative().describe("The number of findings recorded, across every check.")}).strict(),definitions:{AppSecurityApp:l}});function $(t,e,i){if(i==="json"){T(f.encode(H(t,e)));return}let r=u(e.selection,e.path);k({headline:"Agent findings recorded.",body:[`Recorded ${y(t.checks,"check")} and ${y(t.findings,"finding")} in`,{filePath:t.path}],nextSteps:[["Run",{command:m(r.review)},"to see the results."]]})}function H(t,{selection:e}){let{resultsDirectory:i}=E(e.appDirectory,p(e));return{status:"success",app:J(e),resultsDirectory:g(i),path:g(t.path),checkCount:t.checks,findingCount:t.findings}}var w=class t extends C{static summary="Record agent findings from an app security check.";static descriptionWithMarkdown="Reads a coding agent's complete findings document from stdin, validates it, and replaces `agent-findings.json` in the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. `--client-id` is checked against your Shopify account before anything is read, so it needs you to be logged in.\n\nThe document must include a `scope` with the `include_dirs`, `excludes` and `no_git_ignore` values of the `check` run it describes, exactly as typed. It's recorded as reported and never compared with the scan's files.\n\nThe document is recorded all or nothing: if anything is invalid, the command fails with every error, writes nothing, and exits with a non-zero code. It needs the results directory that `shopify app security check` creates.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static get jsonOutputSchema(){return f}static description=this.descriptionForHelp();static flags={...j,...D,..._};async run(){let{flags:e}=await this.parse(t),i=await N({path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"],allowPrompts:!1,validateClientIdFlag:!0});await P(i,e.path);let r={selection:i,path:e.path},n=await S(r);$(n,r,e.json?"json":"text")}};export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,g as c,i as p,j as d}from"./chunk-
|
|
1
|
+
import{b as a,g as c,i as p,j as d}from"./chunk-H6GYBLVQ.js";import{k as h}from"./chunk-M5VIFG2V.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function f(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=f(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await d({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),{...o,createdAtRuntime:!0}}};export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as G,t as B}from"./chunk-
|
|
1
|
+
import{k as G,t as B}from"./chunk-H6GYBLVQ.js";import{a as j}from"./chunk-Q7BOSHWX.js";import{a as C}from"./chunk-SK7EPN6C.js";import{L as q,N as L,j as I,k as w,va as f,xa as h}from"./chunk-GQLNG537.js";import{a as x}from"./chunk-HSKDFEXW.js";import{C as O,D as P,U as N}from"./chunk-D2KIGKBI.js";import{h as l,j as U}from"./chunk-M5VIFG2V.js";import{Bb as c,qb as _,sb as D}from"./chunk-JLQRDFR5.js";import{i as H,j as v}from"./chunk-FZCGRIOM.js";import{u as F}from"./chunk-LHXFTFFM.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function M(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let s=r.split("/")[0];t.append(`replace_extension_templates[${s}][${r}]`,o)}return t.append("_method",e.method),t}function S(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function E(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],s=o[1]?.trim(),n=o[2]?.trim()??"";s&&(t[s]=n)}),t}function y(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var $=class extends l{};async function Pe(e){return B(e)}async function Ue(e,t,r){let o=Y(t),s=new URLSearchParams;s.append("form_type","storefront_password"),s.append("utf8","\u2713"),s.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let n={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await w(`${o}/password`,{headers:n,body:s.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw f(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return V(a,o)}async function z(e,t,r,o,s={}){let n={},a=await W(e,r,s),i=Y(t);if(n._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return n;let u=await ae(a,e,i,o,s);return{...n,...u}}var se=1;async function W(e,t,r,o=1){let s=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),n=`${e}?${s}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...S()},i=await w(n,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],d=R(u,"_shopify_essential");if(!d){if(c(`Failed to obtain _shopify_essential cookie.
|
|
2
2
|
|
|
3
3
|
-Request ID: ${i.headers.get("x-request-id")??"unknown"}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-PLSS456F.js";import{a}from"./chunk-3MG4MTWQ.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var r=class extends a{static hidden=!0;static flags={...a.flags};static baseFlags={...a.baseFlags};async run(){return e({from:"app import-extensions",to:"app import dashboard-extensions"}),super.run()}};export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as A,S as O,T as z,V as P,X as x}from"./chunk-
|
|
1
|
+
import{R as A,S as O,T as z,V as P,X as x}from"./chunk-U2T5HPRD.js";import{Aa as D,o as $,ta as l,wa as L}from"./chunk-33ZE3DRQ.js";import{a as F}from"./chunk-N57Y7THE.js";import{u as R}from"./chunk-GQLNG537.js";import{A as k,I as N,N as v,U as y,z as g}from"./chunk-D2KIGKBI.js";import{b as E}from"./chunk-335BUVBP.js";import{f as _,h as d}from"./chunk-M5VIFG2V.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function b(e,t){if(t.clientName!==l.AppManagement||!t.devStoreCapReached)return!1;try{return await t.devStoreCapReached(e)}catch{return!1}}async function M(e,t,o,i="disabled"){let c=o.clientName===l.AppManagement,s=async f=>o.devStoresForOrg(t.id,f),n=i!=="disabled"&&o.clientName===l.AppManagement,r=async()=>{if(await b(t.id,o))throw new d(U,W(t.id));let f=await A(),w=await O(),u=await z(),T=await $({name:f,plan:w,withDemoData:u,organization:t,json:!1,summary:!1}),S=await I(t,T,o);return k({headline:`Dev store "${S.shopName}" created successfully.`}),S},a,h;if(n&&e.stores.length===0){if(await b(t.id,o))throw new d(U,W(t.id));if(v()===!1)throw new d("No development store was specified.",H(t.id));a=async()=>(g({body:Y(t)}),r())}else if(n&&i==="selection-option"){if(v()===!1&&(e.stores.length>1||e.hasMorePages))throw new d("No development store was specified.","Run `shopify app dev --store <store-domain>` to select a development store.");v()&&!await b(t.id,o)&&(h=r)}let m=await P({onSearchForStoresByName:s,...e,showDomainOnPrompt:c,...a?{onCreateStoreWhenEmpty:a}:{},...h?{onCreateStore:h}:{}});if(!m){if(a)throw new _;if(g({body:await o.getCreateDevStoreLink(t)}),await y(5),!await x(t))throw new _;let w=await B(t.id,o);m=await M({stores:w,hasMorePages:!1},t,o,i)}return C(m),m}async function I(e,t,o){let s;if(await N([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){try{let a=await D(e,t,o);if(a){s=a;return}}catch(a){if(!(a instanceof L))throw a}await y(3)}}}]),!s)throw new d(`The newly created development store (${t}) is not available yet.`,`Run \`shopify app dev --store ${t}\` to select it when it is ready.`);return s}async function B(e,t){let c=[];return await N([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:r}=await t.devStoresForOrg(e);if(r.length>0){c=r;return}await y(3)}}}]),c}var U="Your organization has reached its development store limit.";function Y(e){return`You don't have any dev stores associated with ${e.businessName}'s Dev Dashboard. Let's create one.`}function q(e){return`shopify store create dev --organization-id ${e} --name <store-name> --plan <plan>`}function H(e){return`Create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function W(e){return`Make a development store slot available in Dev Dashboard. Then create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function C(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new d(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new d(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function fe({appContextResult:e,storeFqdn:t,forceReselectStore:o,storeTypes:i=["APP_DEVELOPMENT"],storeCreationMode:c="disabled"}){let{app:s,organization:n,developerPlatformClient:r}=e,a,h=s.configuration.build?.dev_store_url,m=s.hiddenConfig.dev_store_url,f=h??m,u=t??(o?void 0:f),T=i.length===1&&i[0]==="APP_DEVELOPMENT";if(u)a=await D(n,u,r,i),T&&C(a);else{let S=await r.devStoresForOrg(n.id);a=await M(S,n,r,c)}return a.shopDomain=R(a.shopDomain),await V(a,o),(a.shopDomain!==f||!m)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await r.ensureUserAccessToStore(n.id,a),a}async function V(e,t){await F.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:E(e.shopDomain),store_domain:e.shopDomain})),await F.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{fe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as M,l as h,r as y}from"./chunk-
|
|
1
|
+
import{k as M,l as h,r as y}from"./chunk-PDZBKVWL.js";import{J as w,z as O}from"./chunk-D2KIGKBI.js";import{h as d}from"./chunk-M5VIFG2V.js";import{sb as f,wb as S}from"./chunk-JLQRDFR5.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();function E(t){return t.map(L).join(" \xB7 ")}function x(t,r){if(r){S(M.encode({operations:t.map(h)}));return}O({headline:"Subscription migration operations.",body:t.map(L)})}function L(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}n();n();var C=1e3,F=new Set(["COMPLETED","FAILED","CANCELED"]);async function T({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=C,sleep:m=$,onUpdate:c}){let u=new Map,g=new Map,l=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let i=await s({clientId:t,operationId:o});if(!i)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:i}})),A=e.some(({operationId:o,operation:i})=>g.get(o)!==JSON.stringify(i));for(let{operationId:o,operation:i}of e)u.set(o,i),g.set(o,JSON.stringify(i));if(c&&(l||A)){let o=r.map(i=>u.get(i));await c(o)}l=!1,a=e.filter(({operation:o})=>!F.has(o.status)).map(({operationId:o})=>o),a.length>0&&await m(p)}return r.map(e=>u.get(e))}async function $(t){await new Promise(r=>setTimeout(r,t))}async function v({clientId:t,operationIds:r,waitForOperations:s=T}){return w({title:f`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:m=>p(f`${E(m)}`)}),renderOptions:{stdout:process.stderr}})}export{x as a,v as b};
|