shopify 3.94.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +5 -1
- package/dist/analytics-6IHHYAV6.js +1 -0
- package/dist/analytics-KKVP5DT3.js +1 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chunk-22PCRFG4.js +1 -0
- package/dist/chunk-26D72ZNV.js +1 -0
- package/dist/chunk-2APPXD5Z.js +2 -0
- package/dist/chunk-2I4PRX2I.js +1 -0
- package/dist/chunk-2VQJQ36C.js +103 -0
- package/dist/chunk-323UTVMM.js +1 -0
- package/dist/chunk-3DQIVE24.js +9 -0
- package/dist/chunk-3F6NZK7S.js +2 -0
- package/dist/chunk-3LVGAQB4.js +1 -0
- package/dist/chunk-3TNEIDOD.js +1 -0
- package/dist/chunk-3VZEETAV.js +1 -0
- package/dist/chunk-4G7J6HIV.js +1 -0
- package/dist/chunk-4HHXSMD7.js +10 -0
- package/dist/chunk-4LNCYIS3.js +1 -0
- package/dist/chunk-4ZGSSQC6.js +1 -0
- package/dist/chunk-52GC6XUT.js +1 -0
- package/dist/chunk-5CH3B62S.js +2 -0
- package/dist/chunk-5Y7GIF2W.js +1 -0
- package/dist/chunk-66RJ5T7A.js +102 -0
- package/dist/chunk-6B53BWJW.js +1 -0
- package/dist/chunk-6BMMB2UO.js +1 -0
- package/dist/chunk-6HBRBQAN.js +6 -0
- package/dist/chunk-6M3ZYNGO.js +451 -0
- package/dist/chunk-6TZAAS5H.js +1 -0
- package/dist/chunk-72F3YBNA.js +1 -0
- package/dist/chunk-74HYYXXE.js +17 -0
- package/dist/chunk-75VPUOC5.js +1 -0
- package/dist/chunk-7BGM2GAH.js +1 -0
- package/dist/chunk-7UYZQN4V.js +18 -0
- package/dist/chunk-A74GETYC.js +1 -0
- package/dist/chunk-AIV5RI3X.js +1 -0
- package/dist/chunk-ALKTLKQ6.js +5 -0
- package/dist/chunk-B2EHO7ZC.js +847 -0
- package/dist/chunk-B2IVY4V5.js +1 -0
- package/dist/chunk-BDVAE5MS.js +28 -0
- package/dist/chunk-CERXUPGC.js +14 -0
- package/dist/chunk-D3TSJA5S.js +1 -0
- package/dist/chunk-D6JARNEH.js +1 -0
- package/dist/chunk-DFMQWJQ3.js +3 -0
- package/dist/chunk-DJONKJSZ.js +1 -0
- package/dist/chunk-DJQVNH7P.js +567 -0
- package/dist/chunk-DU4WR4OP.js +1 -0
- package/dist/chunk-ELVFJ7BR.js +4 -0
- package/dist/chunk-ELYP4KFP.js +8 -0
- package/dist/chunk-FFQ5EWII.js +294 -0
- package/dist/chunk-FUOIGXI4.js +1 -0
- package/dist/chunk-GD7FWXJ5.js +2 -0
- package/dist/chunk-GFEAKSGV.js +374 -0
- package/dist/chunk-GFJ7UV74.js +1 -0
- package/dist/chunk-GNPS5SBU.js +1 -0
- package/dist/chunk-GOJ2QHSR.js +1 -0
- package/dist/chunk-HSK7YMRE.js +359 -0
- package/dist/chunk-HUZUORYM.js +19 -0
- package/dist/chunk-HZA6IAA4.js +1 -0
- package/dist/chunk-IASVAERO.js +1 -0
- package/dist/chunk-IIIVWD4R.js +1 -0
- package/dist/chunk-INEU4XKS.js +6 -0
- package/dist/chunk-IOLVEXM6.js +1 -0
- package/dist/chunk-IU2ZQ6TE.js +2 -0
- package/dist/chunk-IX5ICOBV.js +7 -0
- package/dist/chunk-J3KVONB3.js +6 -0
- package/dist/chunk-JGXWQULI.js +1 -0
- package/dist/chunk-JHPRFW5B.js +19 -0
- package/dist/chunk-JLBH7RCF.js +4 -0
- package/dist/chunk-JPGO36XP.js +1 -0
- package/dist/chunk-JUVAGMIH.js +1 -0
- package/dist/chunk-JVIKCGDY.js +1 -0
- package/dist/chunk-K2WUCOQJ.js +32 -0
- package/dist/chunk-K5YV6UVF.js +4 -0
- package/dist/chunk-KBQ4LGFB.js +1 -0
- package/dist/chunk-KGXQS7LS.js +1 -0
- package/dist/chunk-KL5Z3T6L.js +1 -0
- package/dist/chunk-KLMDWDT2.js +1 -0
- package/dist/chunk-KNVM7N3U.js +1 -0
- package/dist/chunk-KWJ562F2.js +12 -0
- package/dist/chunk-LALIKZPS.js +5 -0
- package/dist/chunk-LAZJ47DZ.js +6 -0
- package/dist/chunk-LDGAHMS7.js +159 -0
- package/dist/chunk-LNHLDRC5.js +1 -0
- package/dist/chunk-LW7U753G.js +1 -0
- package/dist/chunk-LX3ZOW52.js +12 -0
- package/dist/chunk-LXFJDCNG.js +1 -0
- package/dist/chunk-MBAFWQSZ.js +7 -0
- package/dist/chunk-MOA33ZFO.js +1 -0
- package/dist/chunk-MQNYGGAM.js +1 -0
- package/dist/chunk-N5YIPQ6J.js +1 -0
- package/dist/chunk-N7RBSKYT.js +1 -0
- package/dist/chunk-NF2ABOOU.js +1 -0
- package/dist/chunk-NRAFVIU3.js +1 -0
- package/dist/chunk-OCOY5MV2.js +1 -0
- package/dist/chunk-ODNGDO4H.js +50 -0
- package/dist/chunk-OHY4ZL3U.js +2 -0
- package/dist/chunk-OLZHWPZP.js +1 -0
- package/dist/chunk-OUOYKNMY.js +1 -0
- package/dist/chunk-OXPWCC7I.js +64 -0
- package/dist/chunk-P5VVOLGV.js +1 -0
- package/dist/chunk-P6XE4MH5.js +1 -0
- package/dist/chunk-P7R7FBY2.js +3 -0
- package/dist/chunk-PD5ZHJWI.js +1 -0
- package/dist/chunk-PIBY5DDZ.js +1 -0
- package/dist/chunk-Q7ING5F5.js +1 -0
- package/dist/chunk-QFWIDATO.js +1 -0
- package/dist/chunk-QRRNOVJ3.js +1 -0
- package/dist/chunk-QSTEVZFQ.js +1 -0
- package/dist/chunk-R466TU3N.js +2 -0
- package/dist/chunk-RF2DPBA6.js +1 -0
- package/dist/chunk-RFG5RMPL.js +1 -0
- package/dist/chunk-RM5SJJN6.js +559 -0
- package/dist/chunk-RVNMVBPM.js +1 -0
- package/dist/chunk-SBEZBZM7.js +144 -0
- package/dist/chunk-SGQ6D3LU.js +15 -0
- package/dist/chunk-SRCQVUMC.js +1 -0
- package/dist/chunk-TFSBQ4RY.js +5 -0
- package/dist/chunk-TQYMC7TH.js +1 -0
- package/dist/chunk-UGDBJTLP.js +6 -0
- package/dist/chunk-UGXYQ23Y.js +1411 -0
- package/dist/chunk-UWJ73J4B.js +1 -0
- package/dist/chunk-V2CNCPIE.js +2 -0
- package/dist/chunk-VBUZWRUL.js +1 -0
- package/dist/chunk-VS3T5YOG.js +264 -0
- package/dist/chunk-VWYM4OWK.js +1 -0
- package/dist/chunk-VY6SNDKW.js +3 -0
- package/dist/chunk-WDC3KIZT.js +2 -0
- package/dist/chunk-WFXRSKRK.js +1 -0
- package/dist/chunk-WXVZJJOR.js +16 -0
- package/dist/chunk-WZBSLU4Q.js +6 -0
- package/dist/chunk-XBXMPFXM.js +1 -0
- package/dist/chunk-XEFQQPL4.js +1 -0
- package/dist/chunk-XLELNRFF.js +3 -0
- package/dist/chunk-XNO6DZYP.js +1 -0
- package/dist/chunk-Y5JKV2AI.js +1 -0
- package/dist/chunk-YC6G4MHD.js +3 -0
- package/dist/chunk-YI232QLS.js +1 -0
- package/dist/chunk-YMWHHINU.js +1 -0
- package/dist/chunk-YOZNRLFC.js +1 -0
- package/dist/chunk-YZDDTYTU.js +11 -0
- package/dist/chunk-Z35BTAM6.js +2 -0
- package/dist/chunk-ZR76GGZ6.js +5 -0
- package/dist/chunk-ZTMSBSYD.js +1 -0
- package/dist/chunk-ZV6NCNI4.js +586 -0
- package/dist/chunk-ZVJVDCIM.js +1 -0
- package/dist/cli/commands/app/app-logs/sources.js +2 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +9 -0
- package/dist/cli/commands/app/bulk/status.js +5 -0
- package/dist/cli/commands/app/config/link.js +4 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +3 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +22 -0
- package/dist/cli/commands/app/dev/clean.js +5 -0
- package/dist/cli/commands/app/dev.js +320 -0
- package/dist/cli/commands/app/env/pull.js +11 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +16 -0
- package/dist/cli/commands/app/function/replay.js +5 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +5 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +11 -0
- package/dist/cli/commands/app/init.js +10 -0
- package/dist/cli/commands/app/logs.js +2 -0
- package/dist/cli/commands/app/release.js +4 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +25 -0
- package/dist/cli/commands/auth/login.js +1 -20
- package/dist/cli/commands/auth/logout.js +1 -12
- package/dist/cli/commands/cache/clear.js +1 -11
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
- package/dist/cli/commands/config/autoupgrade/off.js +1 -22
- package/dist/cli/commands/config/autoupgrade/on.js +1 -22
- package/dist/cli/commands/config/autoupgrade/status.js +1 -30
- package/dist/cli/commands/debug/command-flags.js +1 -79
- package/dist/cli/commands/docs/generate.js +1 -157
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
- package/dist/cli/commands/doctor-release/theme/index.js +1 -56
- package/dist/cli/commands/help.js +1 -26
- package/dist/cli/commands/kitchen-sink/async.js +1 -16
- package/dist/cli/commands/kitchen-sink/index.js +1 -21
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
- package/dist/cli/commands/kitchen-sink/static.js +1 -16
- package/dist/cli/commands/notifications/generate.js +1 -11
- package/dist/cli/commands/notifications/list.js +1 -33
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.js +1 -27
- package/dist/cli/commands/theme/check.js +1 -0
- package/dist/cli/commands/theme/console.js +15 -0
- package/dist/cli/commands/theme/delete.js +7 -0
- package/dist/cli/commands/theme/dev.js +26 -0
- package/dist/cli/commands/theme/duplicate.js +32 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +8 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +3 -0
- package/dist/cli/commands/theme/open.js +8 -0
- package/dist/cli/commands/theme/package.js +7 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +3 -0
- package/dist/cli/commands/theme/publish.js +7 -0
- package/dist/cli/commands/theme/pull.js +3 -0
- package/dist/cli/commands/theme/push.js +28 -0
- package/dist/cli/commands/theme/rename.js +6 -0
- package/dist/cli/commands/theme/share.js +3 -0
- package/dist/cli/commands/upgrade.js +1 -17
- package/dist/cli/commands/version.js +1 -10
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-U5ZITKJN.js +1 -0
- package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
- package/dist/deprecations-TU5UQJVV.js +1 -0
- package/dist/dist-2Z5TND4U.js +1 -0
- package/dist/dist-GYHFDHKP.js +1 -0
- package/dist/environments-Z5PR7DSI.js +1 -0
- package/dist/error-IJGNYKZ3.js +1 -0
- package/dist/error-handler-WSCGNS2P.js +1 -0
- package/dist/fs-5BDEA2KD.js +1 -0
- package/dist/hooks/app-init.d.ts +9 -0
- package/dist/hooks/app-init.js +1 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
- package/dist/index.js +254 -3668
- package/dist/is-global-V4ZRHQG2.js +1 -0
- package/dist/latest-version-EFWBOTWM.js +49 -0
- package/dist/lib-5L7UKDEK.js +1 -0
- package/dist/lib-C3VO2BQW.js +1 -0
- package/dist/lib-QB6I6CTC.js +1 -0
- package/dist/local-6QPX4GCJ.js +1 -0
- package/dist/local-storage-JLXBZVWO.js +1 -0
- package/dist/metadata-UDMOTRS7.js +1 -0
- package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
- package/dist/node-package-manager-HAFRYGUM.js +1 -0
- package/dist/notifications-system-MP7WDOCS.js +1 -0
- package/dist/npa-ICFSA3NL.js +1 -0
- package/dist/output-YGMHXEIS.js +1 -0
- package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
- package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
- package/dist/system-KLXD4FXF.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-K5CWIA4V.js +1 -0
- package/dist/ui-GHG3UGB3.js +1 -0
- package/dist/upgrade-OPZGPM5J.js +1 -0
- package/dist/version-D5PJZIRW.js +1 -0
- package/dist/version-KRQBMYCH.js +1 -0
- package/dist/workerd-L2EJKIAQ.js +18 -0
- package/oclif.manifest.json +5247 -6056
- package/package.json +17 -41
- package/dist/chunk-45T5XUIM.js +0 -1
- package/dist/chunk-52KHWFYF.js +0 -1
- package/dist/chunk-66TIGB4U.js +0 -415
- package/dist/chunk-675GKVCB.js +0 -3
- package/dist/chunk-7ES6PV7M.js +0 -847
- package/dist/chunk-BF7JM4FH.js +0 -396
- package/dist/chunk-FU2Y2M3M.js +0 -5
- package/dist/chunk-IDQ4X47Z.js +0 -3
- package/dist/chunk-JBSYWYIP.js +0 -2
- package/dist/chunk-PBKIXB7L.js +0 -63
- package/dist/chunk-SVA22NZQ.js +0 -607
- package/dist/error-handler-LC7FITE7.js +0 -1
- package/dist/http-proxy-node16-TTURN6MD.js +0 -38
- package/dist/lib-3WHF5XD3.js +0 -1
- package/dist/local-TWIGLQ7X.js +0 -1
- package/dist/node-package-manager-3UCLJPGW.js +0 -1
- package/dist/npa-OKDXXRCU.js +0 -1
- package/dist/ui-UYE67X4Y.js +0 -1
- package/dist/workerd-37BZZEVW.js +0 -18
- /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
package/bin/run.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
|
4
|
+
import {enableCompileCache} from 'node:module'
|
|
5
|
+
|
|
6
|
+
if (enableCompileCache) enableCompileCache()
|
|
4
7
|
|
|
5
8
|
process.removeAllListeners('warning')
|
|
6
9
|
|
|
10
|
+
const {default: runCLI} = await import('../dist/bootstrap.js')
|
|
7
11
|
runCLI({development: false})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ta as a,ua as b,va as c,wa as d,xa as e,ya as f}from"./chunk-B2EHO7ZC.js";import"./chunk-4LNCYIS3.js";import"./chunk-LAZJ47DZ.js";import"./chunk-PRKBO42R.js";import"./chunk-GOJ2QHSR.js";import"./chunk-7BGM2GAH.js";import"./chunk-XNO6DZYP.js";import"./chunk-3TNEIDOD.js";import"./chunk-4HHXSMD7.js";import"./chunk-JUVAGMIH.js";import"./chunk-BDVAE5MS.js";import"./chunk-P6XE4MH5.js";import"./chunk-KLMDWDT2.js";import"./chunk-5CH3B62S.js";import"./chunk-QUTQDXSL.js";import"./chunk-IASVAERO.js";import"./chunk-JPGO36XP.js";import"./chunk-PD5ZHJWI.js";import"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-V2CNCPIE.js";import"./chunk-GFEAKSGV.js";import"./chunk-CERXUPGC.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-YC6G4MHD.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export{f as compileData,c as recordError,e as recordEvent,d as recordRetry,b as recordTiming,a as reportAnalyticsEvent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qa as a,ra as b,sa as c}from"./chunk-B2EHO7ZC.js";import"./chunk-4LNCYIS3.js";import"./chunk-LAZJ47DZ.js";import"./chunk-PRKBO42R.js";import"./chunk-GOJ2QHSR.js";import"./chunk-7BGM2GAH.js";import"./chunk-XNO6DZYP.js";import"./chunk-3TNEIDOD.js";import"./chunk-4HHXSMD7.js";import"./chunk-JUVAGMIH.js";import"./chunk-BDVAE5MS.js";import"./chunk-P6XE4MH5.js";import"./chunk-KLMDWDT2.js";import"./chunk-5CH3B62S.js";import"./chunk-QUTQDXSL.js";import"./chunk-IASVAERO.js";import"./chunk-JPGO36XP.js";import"./chunk-PD5ZHJWI.js";import"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-V2CNCPIE.js";import"./chunk-GFEAKSGV.js";import"./chunk-CERXUPGC.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-YC6G4MHD.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import"./chunk-VPRTJUIN.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as p}from"./chunk-6HBRBQAN.js";import{a as e}from"./chunk-323UTVMM.js";import"./chunk-3TNEIDOD.js";import{a as s}from"./chunk-OUOYKNMY.js";import"./chunk-LDGAHMS7.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-FUOIGXI4.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-N7RBSKYT.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import{e as m,g as t}from"./chunk-VPRTJUIN.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-IJGNYKZ3.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-GHG3UGB3.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
|
|
2
|
+
`)}catch{n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
|
|
3
|
+
`)}process.exit(1)});var f=["SIGINT","SIGTERM","SIGQUIT"];f.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function l({development:o}){await e({moduleURL:import.meta.url,development:o,lazyCommandLoader:s})}var S=l;export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-2APPXD5Z.js";import{Fa as i}from"./chunk-B2EHO7ZC.js";import{b as s}from"./chunk-YZDDTYTU.js";import{r as m}from"./chunk-LDGAHMS7.js";import{e as d,g as e}from"./chunk-VPRTJUIN.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as i,c,d as f}from"./chunk-RVNMVBPM.js";import{b as w}from"./chunk-DFMQWJQ3.js";import{d as s,f as d,j as S}from"./chunk-RFG5RMPL.js";import{B as h}from"./chunk-BDVAE5MS.js";import{d as u}from"./chunk-JPGO36XP.js";import{U as a}from"./chunk-GFEAKSGV.js";import{g as l}from"./chunk-VPRTJUIN.js";l();async function q(e,r){let n=await i(e),t=new f(r.filter),m=e.storeFqdn;if(t.any())return c(m,n,t)[0];let T=r.header??"",p=n.map(o=>{let g=o.id.toString()===w()?" [current]":"";return{value:async()=>o,label:`${o.name}${g}`,group:a(o.role)}});return r.create&&p.unshift(y(e)),(await h({message:T,choices:p}))()}async function B(e,r){return(await i(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await i(e),t=new f(r),m=e.storeFqdn;return t.any()?c(m,n,t):[]}function y(e){return{value:async()=>{let r=s,n=await d("Name of the new theme"),t=await S({name:n,role:r},e);if(!t)throw new u("The theme could not be created.");return t},label:"[Create a new theme]",group:a(s)}}export{q as a,B as b,C as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as x,c as D,f as M}from"./chunk-XLELNRFF.js";import{a as o}from"./chunk-7BGM2GAH.js";import{c as w}from"./chunk-JUVAGMIH.js";import{C as h,F as e,v as y,z as s}from"./chunk-BDVAE5MS.js";import{Nb as _,ua as u}from"./chunk-GFEAKSGV.js";import{g as p}from"./chunk-VPRTJUIN.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
|
|
2
|
+
`)}export{$ as a,j as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./chunk-323UTVMM.js";import{tb as n}from"./chunk-GFEAKSGV.js";import{g as e}from"./chunk-VPRTJUIN.js";e();function s(o){o.verbose&&(process.env[r.verbose.env]="true"),o.noColor&&(n.level=0,process.env.FORCE_COLOR="0")}export{s as a};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import{a as dt,b as pt,f as we,g as ie,h as H,i as oe,k as mt}from"./chunk-KWJ562F2.js";import{n as ne,o as re}from"./chunk-DFMQWJQ3.js";import{a as O,b as lt}from"./chunk-3VZEETAV.js";import{a as ee,b as te,e as tt,g as st,i as nt,j as rt,k as it,n as ot,p as at,q as ct,r as se,s as I}from"./chunk-IX5ICOBV.js";import{a as J,l as Ke,m as et}from"./chunk-RFG5RMPL.js";import{aa as Qe}from"./chunk-UGXYQ23Y.js";import{va as C,xa as q}from"./chunk-B2EHO7ZC.js";import{b as Ve}from"./chunk-JUVAGMIH.js";import{u as Xe,w as b,x as X,y as Ze}from"./chunk-BDVAE5MS.js";import{d as Z}from"./chunk-JPGO36XP.js";import{Gb as $,Ib as Q,Nb as K,O as Ge,Qb as R,Rb as j,Ta as F,Wa as L,_ as Re,bb as Pe,ma as k,ua as Fe,wa as ze,ya as Ye}from"./chunk-GFEAKSGV.js";import{d as E,g as Se,j as Je,k as A}from"./chunk-IU2ZQ6TE.js";import{e as Ue,g as u}from"./chunk-VPRTJUIN.js";u();u();u();var qt=".shopifyignore",ht=/templates\/\*(\.(json|liquid))?$/,ut=new Set;function be(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[i=[],o=[]]=ke(s),[a=[],m=[]]=ke(n),[p=[],h=[]]=ke(r),l=e.filter(N(i,".shopifyignore"));return l=l.filter(N(a,"--ignore")),l=l.filter(N(p,"--only",!0)),o.length>0&&(l=l.concat(e.filter(N(o,".shopifyignore",!0)))),m.length>0&&(l=l.concat(e.filter(N(m,"--ignore",!0)))),h.length>0&&(l=l.filter(N(h,"--only"))),Ge(l,f=>f.key)}function N(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(o=>jt(n,o)||Wt(o)&&Nt(n,Mt(o)));return(s?!r:r)?(R(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function ft(e){let t=E(e,qt);return await F(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function ke(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function jt(e,t){let s={matchBase:!0,noglobstar:!0};return Pe(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!ut.has(t)&&(ut.add(t),b({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),Ot(t)?Pe(e,t.replace(ht,"templates/**/*$1"),s):!1)}function Ot(e){return ht.test(e)}function Nt(e,t){return t.test(e)}function Wt(e){return e.startsWith("/")&&e.endsWith("/")}function Mt(e){return new RegExp(e.slice(1,-1))}u();import gt from"fs/promises";var ae=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&j("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{R(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){C(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),j(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await gt.writeFile(this.notifyPath,t),await gt.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};u();u();u();u();u();var Bt="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function yt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Et(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>${e.title}</title>
|
|
5
|
+
<link rel="stylesheet" href="${Bt}" />
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<div style="display: flex; justify-content: center; padding-top: 2rem;">
|
|
9
|
+
<div style="width: 80%;">
|
|
10
|
+
<div class="Polaris-Banner Polaris-Banner--withinPage" tabindex="0" role="alert" aria-live="polite">
|
|
11
|
+
<div class="Polaris-Box" style="--pc-box-width:100%">
|
|
12
|
+
<div
|
|
13
|
+
class="Polaris-BlockStack"
|
|
14
|
+
style="--pc-block-stack-align:space-between;--pc-block-stack-order:column"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
class="Polaris-Box"
|
|
18
|
+
style="--pc-box-color: var(--p-color-text-critical-on-bg-fill); --pc-box-background: var(--p-color-bg-fill-critical); --pc-box-padding-block-start-xs: var(--p-space-300); --pc-box-padding-block-end-xs: var(--p-space-300); --pc-box-padding-inline-start-xs: var(--p-space-300); --pc-box-padding-inline-end-xs: var(--p-space-300); --pc-box-border-start-start-radius: var(--p-border-radius-300); --pc-box-border-start-end-radius: var(--p-border-radius-300);"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="Polaris-InlineStack"
|
|
22
|
+
style="--pc-inline-stack-align:space-between;--pc-inline-stack-block-align:center;--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-200);--pc-inline-stack-flex-direction-xs:row"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="Polaris-InlineStack"
|
|
26
|
+
style="--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-100);--pc-inline-stack-flex-direction-xs:row"
|
|
27
|
+
>
|
|
28
|
+
<span class="Polaris-Banner--textCriticalOnBgFill">
|
|
29
|
+
<span class="Polaris-Icon">
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
31
|
+
<path d="M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z" />
|
|
32
|
+
<path d="M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
|
|
33
|
+
<path
|
|
34
|
+
fill-rule="evenodd"
|
|
35
|
+
d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
|
|
36
|
+
/>
|
|
37
|
+
</svg>
|
|
38
|
+
</span>
|
|
39
|
+
</span>
|
|
40
|
+
<h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--break">
|
|
41
|
+
${e.header}
|
|
42
|
+
</h2>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div
|
|
47
|
+
class="Polaris-Box"
|
|
48
|
+
style="--pc-box-padding-block-start-xs:var(--p-space-300);--pc-box-padding-block-end-xs:var(--p-space-300);--pc-box-padding-block-end-md:var(--p-space-400);--pc-box-padding-inline-start-xs:var(--p-space-300);--pc-box-padding-inline-start-md:var(--p-space-400);--pc-box-padding-inline-end-xs:var(--p-space-300);--pc-box-padding-inline-end-md:var(--p-space-400)"
|
|
49
|
+
>
|
|
50
|
+
<div
|
|
51
|
+
class="Polaris-BlockStack"
|
|
52
|
+
style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-300)"
|
|
53
|
+
>
|
|
54
|
+
${e.errors.map(s=>`
|
|
55
|
+
<div>
|
|
56
|
+
<span class="Polaris-Text--root Polaris-Text--headingSm">${yt(s.message)}</span>
|
|
57
|
+
<ul class="Polaris-List">
|
|
58
|
+
<li class="Polaris-List__Item">${yt(s.code)}</li>
|
|
59
|
+
</ul>
|
|
60
|
+
</div>`).join("")}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</body>
|
|
69
|
+
</html>`}u();u();var Tt=80;function G(e,t,s){if(!Ut(e)||s.type==="theme-extension")return;let n=e.path.length>Tt?`${e.path.substring(0,Tt)}...`:e.path,i=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],o=i?`${Math.round(Number(i))}ms`:"",a=Jt(t.status),m=e.method.padStart(6);K(Q`• ${ne.format(new Date)} Request ${$.raw("\xBB")} ${m} ${a(String(t.status))} ${n} ${$.gray(o)}`)}function Ut(e){let t=[M,W,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(i=>e.path.startsWith(i)))return!1;let[n]=e.path.split("?"),r=A(n);return!s.includes(r)}function Jt(e){return e<300?$.green:e<400?$.yellow:$.errorText}var W="/cdn/",M="/ext/cdn/",$e="/api/collect",Gt=/^\/cart\//,vt=/^\/checkouts\/(?!internal\/)/,zt=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Yt=new RegExp(`^${W}`),Vt=new RegExp(`^${M}`),Xt=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Zt=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",$e,"/cdn-cgi/challenge-platform"],xt="_shopify_essential",Qt=new RegExp(`${xt}=([^;]*)(;|$)`);function Kt(e,t){return I(async s=>{if(Zt.some(n=>s.path.startsWith(n)))return null;if(es(s)){let n=s.path.split("?")[0]??"";return De(s,t).then(async r=>{if(G(s,r,t),r.ok){let i=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${i}.liquid`)){let o=z(await r.text(),t);return new Response(o,r)}}return r}).catch(async r=>{let{status:i,statusText:o,...a}=H(r,`Failed to proxy request to ${n}`);return i>=500&&!n.endsWith(".js.map")&&b(a),new Response(r.message,{status:i,statusText:o})})}})}function es(e){if(e.method!=="GET"||e.path.match(Gt)||e.path.match(vt)||e.path.match(zt)||e.path.match(Yt)||e.path.match(Vt))return!0;let[t]=e.path.split("?"),s=A(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function ce(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function ts(e){return Xt.test(e.path)}function z(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${ce(t)}${$e}`,r=new RegExp(n,"g");s=s.replace(r,`$1${$e}`);let i=new RegExp(`(https?:)?//${ce(t)}${W}`,"g");s=s.replace(i,W);let o=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=h=>h.startsWith("assets/"),m=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),p=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(o,(h,l,d)=>{let f=d&&m.has(d),P=d&&p.has(d)&&l.startsWith("extensions/");return O(d).startsWith("image/")?h:P?`${M}${l}`:f?`${W}${l}`:h}),s}function ss(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${ce(t)})[^"']*?["']`,"g");return e.replace(n,(r,i)=>r.replace(i,s))}function ns(e,t){let s=new RegExp(`Domain=${ce(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function le(e,t,s){if(t.status>=300&&t.status<400)return t;let n=Rt(e,t);t.headers.get("content-type")?.includes("application/json")||n.headers.set("content-type","text/html; charset=utf-8");let o=await n.text();return o=z(o,e),o=ss(o,e),s&&(o=s(o)??o),new Response(o,n)}var St=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function Rt(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let o of St)s.headers.delete(o);s.headers.delete("access-control-allow-origin"),s.headers.delete("access-control-allow-credentials"),s.headers.delete("access-control-allow-methods"),s.headers.delete("access-control-allow-headers"),s.headers.delete("access-control-expose-headers"),s.headers.delete("access-control-max-age");let n=s.headers.get("Link");n&&s.headers.set("Link",z(n,e));let r=s.headers.get("Location");if(r){let o=new URL(r,"https://shopify.dev");vt.test(o.pathname)||(o.searchParams.delete("_fd"),o.searchParams.delete("pb"),s.headers.set("Location",o.href.replace(o.origin,"")))}let i=s.headers.getSetCookie();if(i?.length){s.headers.set("Set-Cookie",ns(i,e).join(","));let o=i.join(",").match(Qt)?.[1];o&&(e.session.sessionCookies[xt]=o)}return s}function Ie(e){let t=tt(e);for(let n of St)delete t[n];delete t["upgrade-insecure-requests"];let s=st(e);return s&&(t["X-Forwarded-For"]=s),t}function De(e,t){let s=e.path.replace(new RegExp(M,"g"),"/"),n=e.path.startsWith(M)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let i=nt(e),o=Ie(e);return ts(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),o=pt({...o,...dt(),referer:r.origin,Cookie:mt(t.session,{headers:o}),...t.type==="theme"?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:i,duplex:i?"half":void 0,redirect:"manual",headers:o}).then(a=>Rt(t,a)).catch(a=>{throw ie(C(a),r)})}var Ae=0,rs=5;function is(e,t){return I(s=>{let[n="/",r=""]=s.path.split("?");return as(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Ft(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([o,a])=>({message:o,code:a.join(`
|
|
70
|
+
`)}))}):oe(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:Ie(s),replaceExtensionTemplates:pe(t),replaceTemplates:He(t,n,rt(s,"localization")?.toLowerCase())}).then(async o=>{if(o.status>=400&&o.status<500&&!os(s)){let a=await cs(s,t,o);if(a)return G(s,a,t),a}return G(s,o,t),le(t,o,a=>(ls(o,a,String(e.id)),Ae=0,Le(a,t)))}).catch(async o=>{if(o instanceof de&&(R(`Theme ID mismatch: expected ${o.getExpectedThemeId()} but got ${o.getActualThemeId()}; refreshing session...`),q("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){Ae++,Ae>rs&&(Ze(new Z(o.getMessage())),process.exit(1)),await t.session.refresh();let f=new URLSearchParams(r),P=new URLSearchParams([...f].filter(([ve])=>!ve.startsWith("__sfr"))),D=n+(P.toString()?`?${P}`:"");return new Response(null,{status:302,headers:{Location:D}})}let{status:a,statusText:m,cause:p,...h}=H(o,"Failed to render storefront"),[l,...d]=h.headline.split(`
|
|
71
|
+
`);return X(h),Ft(t,{status:a,statusText:m},{title:l,header:l,errors:[{message:[...d,p.message].join("<br>"),code:p.stack?.replace(`${p.message}
|
|
72
|
+
`,"")??""}]})})})}function Ft(e,t,s){let n=Le(Et(s),e);return q("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function os(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function as(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function cs(e,t,s){R(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await De(e,t).catch(r=>new Response(null,H(r)));if(n.status<400)return R(`Proxy status: ${n.status}. Returning proxy response.`),n;R(`Proxy status: ${n.status}. Returning render error.`)}function ls(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new de(s,n,e)}var de=class extends Error{constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
|
|
73
|
+
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};u();u();function me(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let i=r.index+r[0].length;n.lastIndex=i;let o=n.exec(e);if(!o)return;let a=o.index;return e.slice(i,a)}u();function ue(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var ds={stylesheet:new Map,javascript:new Map};function ps(e,t){return I(async s=>{if(s.method!=="GET")return;if(us(s,t))return hs(s,t);let{file:n,fileKey:r,isUnsynced:i}=ms(s,t);if(!r)return;let o=O(r);if(o.startsWith("image/")&&s.path.includes("&")&&!i)return;if(ot(s,"X-Local-Asset","true"),!n){i&&te(s,ee({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(z(n.value,t)):Buffer.from(n.attachment??"","base64");return se(s,{getContents:()=>a,getMeta:()=>({type:o,size:a.length,mtime:n.stats?.mtime})})})}function ms(e,t){let s=(n,r)=>{let i=e.path.match(n)?.[1];if(i){let o=E("assets",i),a=r.files.get(o),m=r.unsyncedFileKeys.has(o);if(a||m)return{file:a,isUnsynced:m,fileKey:o}}};return s(/^(?:\/cdn\/.*?)?\/assets\/([^?]+)/,t.localThemeFileSystem)??s(/^(?:\/ext\/cdn\/extensions\/.*?)?\/assets\/([^?]+)/,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function us(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function hs(e,t){switch(ue(e).pathname.split("/").at(-1)){case"styles.css":return fs(t,e);case"block-scripts.js":return qe(t,e,"block");case"snippet-scripts.js":return qe(t,e,"snippet");case"scripts.js":return qe(t,e,"section");case void 0:break;default:break}}function fs(e,t){let s=he(e,"section"),n=he(e,"block"),r=he(e,"snippet"),i=[`/*** GENERATED LOCALLY ***/
|
|
74
|
+
`];for(let[,a]of[...s,...n,...r]){let m=Pt(a,"stylesheet");m&&i.push(m)}let o=i.join(`
|
|
75
|
+
`);return se(t,{getContents:()=>o,getMeta:()=>({type:"text/css",size:Buffer.byteLength(o),mtime:new Date})})}function qe(e,t,s){let n=he(e,s),r=`${s}s`,i=[`
|
|
76
|
+
/*** GENERATED LOCALLY ***/
|
|
77
|
+
|
|
78
|
+
(function () {
|
|
79
|
+
var __${r}__ = {};
|
|
80
|
+
|
|
81
|
+
(function () {
|
|
82
|
+
var element = document.getElementById("${r}-script");
|
|
83
|
+
var attribute = element ? element.getAttribute("data-${r}") : "";
|
|
84
|
+
var ${r} = attribute.split(",").filter(Boolean);
|
|
85
|
+
|
|
86
|
+
for (var i = 0; i < ${r}.length; i++) {
|
|
87
|
+
__${r}__[${r}[i]] = true;
|
|
88
|
+
}
|
|
89
|
+
})();`];for(let[a,m]of n){let p=a.split("/").pop()?.replace(".liquid",""),h=Pt(m,"javascript")??"";p&&h&&i.push(`
|
|
90
|
+
(function () {
|
|
91
|
+
if (!__${r}__["${p}"] && !Shopify.designMode) return;
|
|
92
|
+
try {
|
|
93
|
+
${h}
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.error(e);
|
|
96
|
+
}
|
|
97
|
+
})();`)}i.push("})();");let o=i.join(`
|
|
98
|
+
`);return se(t,{getContents:()=>o,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(o),mtime:new Date})})}function he(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Pt(e,t){let s=ds[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],i=me(e.value??"",t);if(i&&r.push(i),r.length>1){let o=r.join(`
|
|
99
|
+
`);return s.set(e.key,{checksum:e.checksum,content:o}),o}}u();function Qn(){return gs()}function gs(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}function pe(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),i=r?.value??r?.attachment;i&&(t[n]=i)}return t}var ye=Ue(Qe(),1);import Es from"node:events";var Oe=new Map,Y=new Map;function wt(e,t){let s=(0,ye.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?Y.set(e,Object.entries(n||{}).map(([r,{type:i}])=>[i,r])):Y.delete(e)}function Ne(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(A(e))}function He(e,t,s){let n={},r=/^templates\/.+\.json$/,i=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",o=!!t&&e.localThemeFileSystem.files.has(i),a=/^locales\/.+\.json$/,m=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let p of e.localThemeFileSystem.unsyncedFileKeys)if(Ne(p)){if(o&&r.test(p)){if(p!==i)continue}else if(a.test(p)){if(m){if(!p.startsWith(`locales/${s}.`))continue}else if(!p.includes(".default."))continue}n[p]=e.localThemeFileSystem.files.get(p)?.value??""}return n}function wr(e,t){let s=({fileKey:r,onContent:i,onSync:o})=>{let a=A(r);i(m=>{!Rs(r)&&Ne(r)&&a===".json"&&wt(r,m),je(e,t,o,{type:"update",key:r,payload:xs(r,t)})})},n=({fileKey:r,onSync:i})=>{Y.delete(r),je(e,t,i,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([i,o])=>{if(i.endsWith(".json")){let a=o.value??await t.localThemeFileSystem.read(i);a&&typeof a=="string"&&wt(i,a)}else i.endsWith(".liquid")&&Ct(o)}))})}var Ts="1",bt=new Es;function ge(e){bt.emit("hot-reload",{...e,version:Ts})}function ys(e,t){return I(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ue(s).searchParams;if(n){let i=ct(s);return bt.on("hot-reload",o=>{i.push(JSON.stringify(o)).catch(a=>{b({headline:"Failed to send HotReload event.",body:a.stack})})}),ge({type:"open",pid:String(process.pid),themeId:String(e.id)}),i.send().then(()=>i.flush())}if(r.has("hr-log")){let i=(0,ye.parseJSON)(r.get("hr-log")??"",null);return i&&(i.headline=`[HotReload] ${i.headline}`,i.type==="error"?X(i):i.type==="warn"?b(i):i.type==="info"?Xe(i):b({headline:`Unknown HotReload log type: ${i.type}`})),null}if(s.path===_t)return k(Ee()).then(i=>it(s,i,"application/javascript")).catch(i=>te(s,ee({cause:i})));if(r.has("section_id")||r.has("app_block_id")){let i=r.get("section_key")??"",o=r.get("section_id")??"",a=r.get("app_block_id")??"",m=s.path.split("?")[0]??"",p=new URLSearchParams(r);if(p.delete("section_key"),p.delete("section_id"),p.delete("app_block_id"),p.delete("_fd"),p.delete("pb"),o===""&&a==="")return;let h={};if(o){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(i)){let d=t.localThemeFileSystem.files.get(i)?.value;if(!d)return"";h[i]=d}for(let d of l)if(d.endsWith(".json")){for(let[f,P]of Y.get(d)??[])if(o.endsWith(`__${P}`)){let D=t.localThemeFileSystem.files.get(d)?.value;D&&(h[d]=D);continue}}}return oe(t.session,{method:s.method,path:m??"/",query:[...p.entries()],themeId:String(e.id),sectionId:o,appBlockId:a,replaceTemplates:h,headers:at(s),replaceExtensionTemplates:pe(t)}).then(async l=>{if(!l.ok)throw q("theme-service:hot-reload:section:render-failed"),ie(l);return le(t,l)}).catch(async l=>{let{status:d,statusText:f,...P}=H(C(l),"Failed to render section on Hot Reload");return q("theme-service:hot-reload:section:render-error"),a||b(P),new Response(null,{status:d,statusText:f})})}})}var V=(e,t)=>ge({themeId:String(e),type:"full",key:t});function je(e,t,s,n){let r=()=>V(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let i=String(e.id);ge({sync:"local",themeId:i,...n}),s(()=>ge({sync:"remote",themeId:i,...n}),r)}function vs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,ye.parseJSON)(n,null,!0)?.sections;for(let i of Object.keys(r??{}))s.add(i)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,i]of Y)for(let[o,a]of i)o===n&&s.add(a)}return[...s]}function xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?vs(e,t):[],replaceTemplates:Ne(e)?He(t):{},updatedFileParts:n&&Ct(n)}}var fe="hot-reload-client",Ss="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",kt=new RegExp(`<script id="${fe}"[^>]*>[^<]*</script>`),_t="/@shopify/theme-hot-reload";function Le(e,t){return t.options.liveReload==="off"?e.replace(kt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(kt,"").replace(/<\/head>/,`<script id="${fe}" src="${_t}" defer></script></head>`):e.includes(`<script id="${fe}"`)?e:e.replace(/<\/head>/,`<script id="${fe}" src="${Ss}" defer></script></head>`)}function Rs(e){return e.startsWith("assets/")}function Ct(e){if(!(["sections/","snippets/","blocks/"].some(h=>e.key.startsWith(h))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},i=Oe.get(e.key);if(i?.checksum===e.checksum||(Oe.delete(e.key),!e.value))return n;let o=["stylesheet","javascript","schema"],a=h=>h?.replace(/\s+/g," ").trim(),m=e.value,p=(h,l)=>{m=m.replace(l,"");let d=a(l),f=`${h}Tag`;n[f]=!i||d!==i[f],r[f]=d};for(let h of o){let l=me(e.value??"",h);l&&p(h,l)}return m=a(m.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=m,n.liquid=!i||m!==i.liquid,Oe.set(e.key,r),n}u();var $t=Ue(Qe(),1);function Fs(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function It(e,t,s){if(Fs(s)){let n=E(e,"listings",t,s);if(await F(n))return n}}async function Dt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,$t.parseJSON)(n,null,!0);return r?(r.current=Re(t),JSON.stringify(r,null,2)):n}async function Dr(e,t){let s=E(e,"listings"),n=E(s,t);if(await F(n))return;let i=[];await F(s)&&(i=await L("*",{cwd:s,onlyDirectories:!0,deep:1}));let o=i.length>0?`Available presets: ${i.map(a=>`"${Re(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new Z(`Listing preset "${t}" was not found. ${o}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import Ps from"node:events";import{fileURLToPath as ws}from"node:url";var ks=250,At=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],w={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Kr(e,t){let s=new Map,n=new Map,r=new Set,i={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},o=new Ps,a=(c,g)=>{o.emit(c,g)},m=t?.notify?new ae(t.notify):void 0,p=async c=>{let g=t?.listing?await _s(e,c,t.listing):await Ce(e,c),y=_e(c,g);return s.set(c,J({key:c,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},h=L(At,{cwd:e,deep:3,ignore:re}).then(c=>Promise.all([ft(e),...c.map(p)])).then(([c])=>{Array.isArray(c)&&i.ignoreFromFile.push(...c)}),l=c=>Se(e,c),d=c=>be([{key:c}],i).length===0;function f(c,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Ee()){V(g,T);return}let x=l(T);if(t?.listing&&x.startsWith(`listings/${t.listing}/`)){let v=x.replace(`listings/${t.listing}/`,"");if(v.startsWith("templates/")||v.startsWith("sections/"))x=v;else return}P(x).then(()=>{switch(c){case"add":case"change":return D(c,g,y,x);case"unlink":return ve(g,y,x,n)}}).catch(v=>{j(`Error handling file event for ${x}: ${v}`)})}function P(c){return m?.notify(c)??Promise.resolve()}let D=(c,g,y,T)=>{if(d(T))return;let x=s.get(T)?.checksum,v=p(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==x&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),_=v.then(S=>{if(S)return bs(r,n,T,g,y)(S)}).catch(we(T,"upload"));a(c,{fileKey:T,onContent:S=>{v.then(B=>{r.has(T)&&S(B?.value??B?.attachment??"")}).catch(()=>{})},onSync:(S,B)=>{_.then(U=>{U?S():B?.()}).catch(()=>{})}})},ve=(c,g,y,T)=>{if(d(y))return;T.delete(y),s.delete(y),r.add(y);let x=t?.noDelete?Promise.resolve():Ke(Number(c),[y],g).then(async v=>{if(!v[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),Ht("delete",y),!0}).catch(v=>(we(y,"delete")(v),!1));a("unlink",{fileKey:y,onSync:v=>{x.then(_=>{_&&v()}).catch(()=>{})}})},xe=new Set(At.map(c=>E(e,c.split("/").shift()??"")));return t?.listing&&xe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&xe.add(Ee()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>h,delete:async c=>{s.delete(c),await Cs(e,c)},write:async c=>{let g=(c.key.startsWith("templates/")||c.key.startsWith("sections/"))&&c.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,c.key),T=E(e,y),x=await F(T);s.set(c.key,J({key:c.key,checksum:c.checksum,value:c.value??"",attachment:c.attachment??""})),x?await We(e,{...c,key:y}):await We(e,c);return}s.set(c.key,J({key:c.key,checksum:c.checksum,value:c.value??"",attachment:c.attachment??""})),await We(e,c)},read:p,applyIgnoreFilters:c=>be(c,i),addEventListener:(c,g)=>{o.on(c,g)},startWatcher:async(c,g)=>{let{default:y}=await import("./chokidar-G4ONJSK4.js"),T=y.watch([...xe],{ignored:re,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),x=new Map,v=(_,S)=>{let U=`${l(S)}:${_}`,Be=x.get(U);Be&&clearTimeout(Be);let Lt=setTimeout(()=>{x.delete(U),f(_,c,g,S)},ks);x.set(U,Lt)};T.on("add",v.bind(null,"add")).on("change",v.bind(null,"change")).on("unlink",v.bind(null,"unlink")).on("error",_=>{j(`File watcher error: ${_}`),C("theme-service:file-watcher:error")})}}}function bs(e,t,s,n,r){return async i=>{if(!e.has(s))return!1;let[o]=await et(Number(n),[{key:s,...i}],r);if(!o?.success){let a=o?.errors?.asset??["Response was not successful."];throw t.set(s,a),V(n,s),new Error(a.join(`
|
|
100
|
+
`))}return t.delete(s)&&V(n,s),e.delete(s),Ht("update",s),!0}}async function We(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await $s(r),s){let i=Buffer.from(s,"base64");await Fe(r,i,{encoding:"base64"})}else await Fe(r,n??"")}async function Ce(e,t){let s=Te(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await F(n)){R(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function _s(e,t,s){if(t==="config/settings_data.json")return Dt(e,s);let n=await It(e,s,t);if(n){let r=Te(t)?{encoding:"utf8"}:{};return k(n,r)}return Ce(e,t)}async function Cs(e,t){let s=E(e,t);if(!await F(s)){R(`File ${s} can't be removed because it doesn't exist...`);return}await Ye(s)}function ei(e){let t=[],s=[],n=[],r=[],i=[],o=[],a=[],m=[],p=[],h=[],l=[];return e.forEach(d=>{let f=d.key;f.endsWith(".liquid")?w.sectionLiquidRegex.test(f)?t.push(d):w.blockLiquidRegex.test(f)?h.push(d):w.layoutLiquidRegex.test(f)?l.push(d):s.push(d):w.configSchemaRegex.test(f)?a.push(d):w.configDataRegex.test(f)?m.push(d):w.jsonRegex.test(f)?w.contextualizedJsonRegex.test(f)?o.push(d):w.sectionJsonRegex.test(f)?n.push(d):w.templateJsonRegex.test(f)?r.push(d):i.push(d):w.staticAssetRegex.test(f)&&p.push(d)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:o,otherJsonFiles:i,configSchemaFile:a,configDataFile:m,staticAssetFiles:p,blockLiquidFiles:h,layoutFiles:l}}function Te(e){return lt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(O(e))}async function ti(e){let t=new Set(await L("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","sections","templates"].every(n=>t.has(n))}async function $s(e){let t=Is(e);await F(t)||await ze(t)}function Is(e){let t=Je(e),s=e.lastIndexOf(t);return e.substring(0,s)}function Ht(e,t){K(Q`• ${ne.format(new Date)} Synced ${$.raw("\xBB")} ${e} ${t}`)}function Ee(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(ws(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function _e(e,t){return t?Buffer.isBuffer(t)?Me(t):Ls(e)?Ds(t):As(e,t):""}function Ds(e){let t=e;return t=t.replace(/\r\n/g,`
|
|
101
|
+
`),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=Hs(t),Me(t)}function As(e,t){let s=t;return Te(e)&&(s=s.replace(/\r\n/g,`
|
|
102
|
+
`)),Me(s)}function Hs(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
|
|
103
|
+
`))&&(n+=r,s=r==="\\"&&!s);return n}function Me(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Ve(t)}function oi(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function Ls(e){return e.endsWith("/settings_data.json")}export{oi as a,Kt as b,is as c,ps as d,Qn as e,wr as f,ys as g,V as h,Dr as i,Kr as j,ei as k,ti as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as C}from"./chunk-LDGAHMS7.js";import{a as i,c as u}from"./chunk-N7RBSKYT.js";import{e as h,g as s}from"./chunk-VPRTJUIN.js";s();s();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-6QPX4GCJ.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-DVFFWCBV.js"),t=await import("./lib-C3VO2BQW.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-WSCGNS2P.js");return await l(r),d.handle(r)}}var c=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-GHG3UGB3.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function O(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||i(o.NO_COLOR)||i(o.SHOPIFY_FLAG_NO_COLOR)||i(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await b(e,n),O(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function b(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-HAFRYGUM.js"),{moduleDirectory:t}=await import("./path-CWUNINMX.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var E={"no-color":c.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:c.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},F={json:c.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})};async function S(){let{cacheClear:e}=await import("./conf-store-U5ZITKJN.js");e()}export{_ as a,E as b,F as c,S as d};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{b as t}from"./chunk-YZDDTYTU.js";import{J as o}from"./chunk-BDVAE5MS.js";import{r as p}from"./chunk-LDGAHMS7.js";import{e as h,g as e}from"./chunk-VPRTJUIN.js";e();e();async function i(r){let a=new URLSearchParams;a.append("search",r??""),await o(`https://shopify.dev?${a.toString()}`)}var c=h(p(),1),s=class r extends t{static{this.description="Starts a search on shopify.dev."}static{this.usage="search [query]"}static{this.examples=[`# open the search modal on Shopify.dev
|
|
2
|
+
shopify search
|
|
3
|
+
|
|
4
|
+
# search for a term on Shopify.dev
|
|
5
|
+
shopify search <query>
|
|
6
|
+
|
|
7
|
+
# search for a phrase on Shopify.dev
|
|
8
|
+
shopify search "<a search query separated by spaces>"
|
|
9
|
+
`]}static{this.args={query:c.Args.string()}}async run(){let{args:a}=await this.parse(r);await i(a.query)}};export{s as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{X as j,ha as H,ia as G,ja as w,ka as X,la as A,ma as B,na as v,oa as J,pa as F,qa as W,ra as k,sa as q,ta as R,ua as K}from"./chunk-SBEZBZM7.js";import{b as T,e as $,l}from"./chunk-DJQVNH7P.js";import{c as z}from"./chunk-HUZUORYM.js";import{v as I,z as x}from"./chunk-BDVAE5MS.js";import{d as _,f as V}from"./chunk-JPGO36XP.js";import{$ as E,Ib as U,Ta as O,Y as a,qa as N,wa as S,ya as M}from"./chunk-GFEAKSGV.js";import{d as y,j as L}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();s();function Q(e){switch(e){case"payments_app":return w;case"payments_app_credit_card":return k;case"payments_app_custom_credit_card":return F;case"payments_app_custom_onsite":return v;case"payments_app_redeemable":return A;case"payments_app_card_present":return R}}function Y(e,i){let t=e.activeVersion?.context??e.draftVersion?.context??Q(e.type);switch(t){case w:return C(e,i,X);case k:return C(e,i,q);case F:return C(e,i,W);case v:return C(e,i,J);case A:return C(e,i,B);case R:return C(e,i,K);default:throw new Error(`Unsupported extension: ${t}`)}}function C(e,i,t){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let r=JSON.parse(o),p=t(r,i);p&&delete p.api_version;let c=e.activeVersion?.context??e.draftVersion?.context??Q(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:a(e.title.substring(0,l)),...p,targeting:[{target:`${c}`}]}]}}s();s();var pe=new Map(G.map(e=>[e[1],e[0]])),ce=(e,i)=>{let t=pe.get(e.uiType);if(!t)throw new _(`Field type ${e.uiType} is not supported`);let n={key:e.name,description:e.description??void 0,type:t};return i==="flow_action_definition"&&(n.name=e.label,n.required=e.required),n},me=(e,i)=>{let o={type:i==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return i==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},Z=(e,i)=>i?i.map(n=>n.uiType==="commerce-object-id"||n.uiType==="marketing-activity-id"||H.includes(n.uiType)?me(n,e):ce(n,e)):[];function ee(e){let i=e.activeVersion?.config??e.draftVersion?.config;if(!i)throw new Error("No config found for extension");let t=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,n;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(i);n={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:a(e.title.substring(0,l)),url:o.url}]}}else{let o=JSON.parse(i),r=Z(e.type,o.fields??[]);n={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:a(e.title.substring(0,l)),description:o.description,runtime_url:o.url??t,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return n}s();s();var ie=e=>{let i=e.split("#");if(i.length!==2||i.some(p=>p===""||p===void 0))throw new Error("Invalid context");let t="admin",n=ue(i[0]??""),o=de(i[1]??""),r="link";return o==="selection"?[t,`${n}-index`,`${o}-action`,r].join("."):[t,`${n}-${o}`,"action",r].join(".")},de=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},ue=e=>e.toLocaleLowerCase()==="variants"?"product-variant":E(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function te(e,i,t){let n=e.activeVersion?.config??e.draftVersion?.config;if(!n)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let r=JSON.parse(n);if(t.embedded)try{let c=new URL(r.url),m=c.pathname.startsWith("/")?c.pathname.substring(1):c.pathname,d=new URL(`app://${m}`);d.search=c.search,d.hash=c.hash,r.url=d.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:a(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(o)}]}]}}s();var fe={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},ge={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let i=new URL(e);return i.pathname+i.search+i.hash}function ne(e){let i=e.activeVersion?.config??e.draftVersion?.config;if(!i)throw new Error("No config found for extension");let t=JSON.parse(i);return{extensions:[{type:"marketing_activity",name:e.title,handle:a(e.title.substring(0,l)),title:t.title,description:t.description,api_path:ye(t.app_api_url),tactic:t.tactic,marketing_channel:fe[t.platform]??"",referring_domain:ge[t.platform]??"",is_automation:t.is_automation,use_external_editor:t.use_external_editor,preview_data:t.preview_data,fields:t.fields.map(({id:o,...r})=>r)}]}}s();function oe(e){let i=e.activeVersion?.config??e.draftVersion?.config;if(!i)throw new Error("No config found for extension");let t=JSON.parse(i);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:a(e.title.substring(0,l)),pattern:t.pattern}]}}var P=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Y},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:ee},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:ne},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:oe},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:te}];function re(e){return P.filter(i=>i.extensionTypes.some(t=>e.some(n=>n.type.toLowerCase()===t.toLowerCase())))}async function yi(e){if(e.length===1&&e[0])return e[0];let i=e.map(o=>({label:o.label,value:o.value})),t=await x({message:"Extension type to migrate",choices:i}),n=e.find(o=>o.value===t);if(n===void 0)throw new _("Invalid migration choice");return n}s();var Di=P.flatMap(e=>e.extensionTypes);async function _e({name:e,app:i}){let t=E(e),n=y(i.directory,$.extensions.directoryName,t);if(await O(n)){let o=[{label:"Overwrite local TOML with remote configuration",value:"write"},{label:"Keep local TOML",value:"skip"},{label:"Cancel",value:"cancel"}],r=await x({message:`Directory "${t}" already exists. What would you like to do?`,choices:o});if(r==="cancel")throw new V;return{directory:n,action:r}}return await S(n),await N(y(n,T.lockFile)),{directory:n,action:"write"}}async function Ce(e){let{app:i,remoteApp:t,developerPlatformClient:n,extensionTypes:o,extensions:r,buildExtensionConfig:p,all:c}=e,m=r.filter(u=>o.includes(u.type.toLowerCase()));if(m=xe(i,m),m.length===0)throw new _("No extensions to migrate");if(!c){let u=m.map(g=>({label:g.title,value:g.uuid}));m.length>1&&u.push({label:"All",value:"All"});let f=await x({message:"Extensions to migrate",choices:u});f!=="All"&&(m=[m.find(g=>g?.uuid===f)])}let d={},b=m.map(async u=>{let{directory:f,action:g}=await _e({app:i,name:u.title}),se=a(u.title.substring(0,l));if(d[se]=u.uuid,g==="write"){let D=p(u,r,i.configuration),ae=y(f,"shopify.extension.toml");await new z(ae,D).replace(D);let le=y(f,T.lockFile);await M(le)}return{extension:u,directory:y("extensions",L(f))}}),h=await Promise.all(b);Ee(h),await j({app:i,identifiers:{extensions:d,app:t.apiKey},command:"import-extensions",developerPlatformClient:n})}function xe(e,i){let t=e.dotenv?.variables??{},n=e.allExtensions.map(o=>t[o.idEnvironmentVariableName]);return i.filter(o=>!n.includes(o.uuid))}async function Li(e){let i=re(e.extensions);await Promise.all(i.map(async t=>Ce({...e,extensionTypes:t.extensionTypes,buildExtensionConfig:t.buildExtensionConfig,all:!0})))}function Ee(e){I({headline:["Imported the following extensions from the dashboard:"],body:e.map(i=>U`• "${i.extension.title}" at: ${i.directory}`.value).join(`
|
|
2
|
+
`)})}s();async function Mi({developerPlatformClient:e,apiKey:i,organizationId:t,extensionTypes:n,onlyDashboardManaged:o=!1}){let r=await e.appExtensionRegistrations({id:i,apiKey:i,organizationId:t}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:c}=r.app;return(o?p:c.concat(p)).filter(d=>{let b=n.includes(d.type.toLowerCase()),h=d.activeVersion&&d.activeVersion.config,u=d.draftVersion&&d.draftVersion.config;return b&&(h??u)})}export{re as a,yi as b,Di as c,Ce as d,xe as e,Li as f,Mi as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-NRAFVIU3.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllSensitiveMetadata(),i=e;export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r,g as e}from"./chunk-VPRTJUIN.js";var f=r((O,c)=>{"use strict";e();c.exports=TypeError});var l=r((g,i)=>{"use strict";e();i.exports=SyntaxError});var p=r((v,o)=>{"use strict";e();o.exports=Object.getOwnPropertyDescriptor});var n=r((d,a)=>{"use strict";e();var t=p();if(t)try{t([],"length")}catch{t=null}a.exports=t});var x=r((D,u)=>{"use strict";e();var s=Object.defineProperty||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}u.exports=s});export{l as a,f as b,n as c,x as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./chunk-VPRTJUIN.js";t();t();var l={ez:"application/andrew-inset",aw:"application/applixware",atom:"application/atom+xml",atomcat:"application/atomcat+xml",atomdeleted:"application/atomdeleted+xml",atomsvc:"application/atomsvc+xml",dwd:"application/atsc-dwd+xml",held:"application/atsc-held+xml",rsat:"application/atsc-rsat+xml",bdoc:"application/bdoc",xcs:"application/calendar+xml",ccxml:"application/ccxml+xml",cdfx:"application/cdfx+xml",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",cu:"application/cu-seeme",mpd:"application/dash+xml",davmount:"application/davmount+xml",dbk:"application/docbook+xml",dssc:"application/dssc+der",xdssc:"application/dssc+xml",es:"application/ecmascript",ecma:"application/ecmascript",emma:"application/emma+xml",emotionml:"application/emotionml+xml",epub:"application/epub+zip",exi:"application/exi",fdt:"application/fdt+xml",pfr:"application/font-tdpfr",geojson:"application/geo+json",gml:"application/gml+xml",gpx:"application/gpx+xml",gxf:"application/gxf",gz:"application/gzip",hjson:"application/hjson",stk:"application/hyperstudio",ink:"application/inkml+xml",inkml:"application/inkml+xml",ipfix:"application/ipfix",its:"application/its+xml",jar:"application/java-archive",war:"application/java-archive",ear:"application/java-archive",ser:"application/java-serialized-object",class:"application/java-vm",js:"application/javascript",mjs:"application/javascript",json:"application/json",map:"application/json",json5:"application/json5",jsonml:"application/jsonml+json",jsonld:"application/ld+json",lgr:"application/lgr+xml",lostxml:"application/lost+xml",hqx:"application/mac-binhex40",cpt:"application/mac-compactpro",mads:"application/mads+xml",webmanifest:"application/manifest+json",mrc:"application/marc",mrcx:"application/marcxml+xml",ma:"application/mathematica",nb:"application/mathematica",mb:"application/mathematica",mathml:"application/mathml+xml",mbox:"application/mbox",mscml:"application/mediaservercontrol+xml",metalink:"application/metalink+xml",meta4:"application/metalink4+xml",mets:"application/mets+xml",maei:"application/mmt-aei+xml",musd:"application/mmt-usd+xml",mods:"application/mods+xml",m21:"application/mp21",mp21:"application/mp21",mp4s:"application/mp4",m4p:"application/mp4",doc:"application/msword",dot:"application/msword",mxf:"application/mxf",nq:"application/n-quads",nt:"application/n-triples",cjs:"application/node",bin:"application/octet-stream",dms:"application/octet-stream",lrf:"application/octet-stream",mar:"application/octet-stream",so:"application/octet-stream",dist:"application/octet-stream",distz:"application/octet-stream",pkg:"application/octet-stream",bpk:"application/octet-stream",dump:"application/octet-stream",elc:"application/octet-stream",deploy:"application/octet-stream",exe:"application/octet-stream",dll:"application/octet-stream",deb:"application/octet-stream",dmg:"application/octet-stream",iso:"application/octet-stream",img:"application/octet-stream",msi:"application/octet-stream",msp:"application/octet-stream",msm:"application/octet-stream",buffer:"application/octet-stream",oda:"application/oda",opf:"application/oebps-package+xml",ogx:"application/ogg",omdoc:"application/omdoc+xml",onetoc:"application/onenote",onetoc2:"application/onenote",onetmp:"application/onenote",onepkg:"application/onenote",oxps:"application/oxps",relo:"application/p2p-overlay+xml",xer:"application/patch-ops-error+xml",pdf:"application/pdf",pgp:"application/pgp-encrypted",asc:"application/pgp-signature",sig:"application/pgp-signature",prf:"application/pics-rules",p10:"application/pkcs10",p7m:"application/pkcs7-mime",p7c:"application/pkcs7-mime",p7s:"application/pkcs7-signature",p8:"application/pkcs8",ac:"application/pkix-attr-cert",cer:"application/pkix-cert",crl:"application/pkix-crl",pkipath:"application/pkix-pkipath",pki:"application/pkixcmp",pls:"application/pls+xml",ai:"application/postscript",eps:"application/postscript",ps:"application/postscript",provx:"application/provenance+xml",cww:"application/prs.cww",pskcxml:"application/pskc+xml",raml:"application/raml+yaml",rdf:"application/rdf+xml",owl:"application/rdf+xml",rif:"application/reginfo+xml",rnc:"application/relax-ng-compact-syntax",rl:"application/resource-lists+xml",rld:"application/resource-lists-diff+xml",rs:"application/rls-services+xml",rapd:"application/route-apd+xml",sls:"application/route-s-tsid+xml",rusd:"application/route-usd+xml",gbr:"application/rpki-ghostbusters",mft:"application/rpki-manifest",roa:"application/rpki-roa",rsd:"application/rsd+xml",rss:"application/rss+xml",rtf:"application/rtf",sbml:"application/sbml+xml",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",spq:"application/scvp-vp-request",spp:"application/scvp-vp-response",sdp:"application/sdp",senmlx:"application/senml+xml",sensmlx:"application/sensml+xml",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",shf:"application/shf+xml",siv:"application/sieve",sieve:"application/sieve",smi:"application/smil+xml",smil:"application/smil+xml",rq:"application/sparql-query",srx:"application/sparql-results+xml",gram:"application/srgs",grxml:"application/srgs+xml",sru:"application/sru+xml",ssdl:"application/ssdl+xml",ssml:"application/ssml+xml",swidtag:"application/swid+xml",tei:"application/tei+xml",teicorpus:"application/tei+xml",tfi:"application/thraud+xml",tsd:"application/timestamped-data",toml:"application/toml",trig:"application/trig",ttml:"application/ttml+xml",ubj:"application/ubjson",rsheet:"application/urc-ressheet+xml",td:"application/urc-targetdesc+xml",vxml:"application/voicexml+xml",wasm:"application/wasm",wgt:"application/widget",hlp:"application/winhlp",wsdl:"application/wsdl+xml",wspolicy:"application/wspolicy+xml",xaml:"application/xaml+xml",xav:"application/xcap-att+xml",xca:"application/xcap-caps+xml",xdf:"application/xcap-diff+xml",xel:"application/xcap-el+xml",xns:"application/xcap-ns+xml",xenc:"application/xenc+xml",xhtml:"application/xhtml+xml",xht:"application/xhtml+xml",xlf:"application/xliff+xml",xml:"application/xml",xsl:"application/xml",xsd:"application/xml",rng:"application/xml",dtd:"application/xml-dtd",xop:"application/xop+xml",xpl:"application/xproc+xml",xslt:"application/xml",xspf:"application/xspf+xml",mxml:"application/xv+xml",xhvml:"application/xv+xml",xvml:"application/xv+xml",xvm:"application/xv+xml",yang:"application/yang",yin:"application/yin+xml",zip:"application/zip","3gpp":"video/3gpp",adp:"audio/adpcm",amr:"audio/amr",au:"audio/basic",snd:"audio/basic",mid:"audio/midi",midi:"audio/midi",kar:"audio/midi",rmi:"audio/midi",mxmf:"audio/mobile-xmf",mp3:"audio/mpeg",m4a:"audio/mp4",mp4a:"audio/mp4",mpga:"audio/mpeg",mp2:"audio/mpeg",mp2a:"audio/mpeg",m2a:"audio/mpeg",m3a:"audio/mpeg",oga:"audio/ogg",ogg:"audio/ogg",spx:"audio/ogg",opus:"audio/ogg",s3m:"audio/s3m",sil:"audio/silk",wav:"audio/wav",weba:"audio/webm",xm:"audio/xm",ttc:"font/collection",otf:"font/otf",ttf:"font/ttf",woff:"font/woff",woff2:"font/woff2",exr:"image/aces",apng:"image/apng",avif:"image/avif",bmp:"image/bmp",cgm:"image/cgm",drle:"image/dicom-rle",emf:"image/emf",fits:"image/fits",g3:"image/g3fax",gif:"image/gif",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",hsj2:"image/hsj2",ief:"image/ief",jls:"image/jls",jp2:"image/jp2",jpg2:"image/jp2",jpeg:"image/jpeg",jpg:"image/jpeg",jpe:"image/jpeg",jph:"image/jph",jhc:"image/jphc",jpm:"image/jpm",jpx:"image/jpx",jpf:"image/jpx",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",ktx:"image/ktx",ktx2:"image/ktx2",png:"image/png",btif:"image/prs.btif",pti:"image/prs.pti",sgi:"image/sgi",svg:"image/svg+xml",svgz:"image/svg+xml",t38:"image/t38",tif:"image/tiff",tiff:"image/tiff",tfx:"image/tiff-fx",webp:"image/webp",wmf:"image/wmf","disposition-notification":"message/disposition-notification",u8msg:"message/global",u8dsn:"message/global-delivery-status",u8mdn:"message/global-disposition-notification",u8hdr:"message/global-headers",eml:"message/rfc822",mime:"message/rfc822","3mf":"model/3mf",gltf:"model/gltf+json",glb:"model/gltf-binary",igs:"model/iges",iges:"model/iges",msh:"model/mesh",mesh:"model/mesh",silo:"model/mesh",mtl:"model/mtl",obj:"model/obj",stpz:"model/step+zip",stpxz:"model/step-xml+zip",stl:"model/stl",wrl:"model/vrml",vrml:"model/vrml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3d:"model/x3d+xml",x3dz:"model/x3d+xml",appcache:"text/cache-manifest",manifest:"text/cache-manifest",ics:"text/calendar",ifb:"text/calendar",coffee:"text/coffeescript",litcoffee:"text/coffeescript",css:"text/css",csv:"text/csv",html:"text/html",htm:"text/html",shtml:"text/html",jade:"text/jade",jsx:"text/jsx",less:"text/less",markdown:"text/markdown",md:"text/markdown",mml:"text/mathml",mdx:"text/mdx",n3:"text/n3",txt:"text/plain",text:"text/plain",conf:"text/plain",def:"text/plain",list:"text/plain",log:"text/plain",in:"text/plain",ini:"text/plain",dsc:"text/prs.lines.tag",rtx:"text/richtext",sgml:"text/sgml",sgm:"text/sgml",shex:"text/shex",slim:"text/slim",slm:"text/slim",spdx:"text/spdx",stylus:"text/stylus",styl:"text/stylus",tsv:"text/tab-separated-values",t:"text/troff",tr:"text/troff",roff:"text/troff",man:"text/troff",me:"text/troff",ms:"text/troff",ttl:"text/turtle",uri:"text/uri-list",uris:"text/uri-list",urls:"text/uri-list",vcard:"text/vcard",vtt:"text/vtt",yaml:"text/yaml",yml:"text/yaml","3gp":"video/3gpp","3g2":"video/3gpp2",h261:"video/h261",h263:"video/h263",h264:"video/h264",m4s:"video/iso.segment",jpgv:"video/jpeg",jpgm:"image/jpm",mj2:"video/mj2",mjp2:"video/mj2",ts:"video/mp2t",mp4:"video/mp4",mp4v:"video/mp4",mpg4:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",mpe:"video/mpeg",m1v:"video/mpeg",m2v:"video/mpeg",ogv:"video/ogg",qt:"video/quicktime",mov:"video/quicktime",webm:"video/webm"};function o(i){let a=(""+i).trim().toLowerCase(),p=a.lastIndexOf(".");return l[~p?a.substring(++p):a]}function s(i){return o(i)??"application/octet-stream"}function n(i){Object.entries(i).forEach(([a,p])=>{l[a]=p})}export{s as a,n as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as m}from"./chunk-4HHXSMD7.js";import{Ib as t,Qb as o}from"./chunk-GFEAKSGV.js";import{g as h}from"./chunk-VPRTJUIN.js";h();var n;function r(){return n??(n=new m({projectName:"shopify-cli-host-theme-conf"})),n}function u(e){return o(t`Getting host theme...`),r().get(e)}function p(e,s){o(t`Setting host theme...`),r().set(e,s)}function g(e){o(t`Removing host theme...`),r().delete(e)}export{u as a,p as b,g as c};
|