@shopify/cli 3.94.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/run.js +5 -1
- package/dist/analytics-5TEIW43T.js +1 -0
- package/dist/analytics-GG7CYCGL.js +1 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chunk-2AJ5FI2K.js +7 -0
- package/dist/chunk-2GK56X53.js +1 -0
- package/dist/chunk-3D4JXJPS.js +2 -0
- package/dist/chunk-3NBK56IK.js +1 -0
- package/dist/chunk-3TNEIDOD.js +1 -0
- package/dist/chunk-3VZEETAV.js +1 -0
- package/dist/chunk-4DCQNGUV.js +19 -0
- package/dist/chunk-4IC626OL.js +1 -0
- package/dist/chunk-4LNCYIS3.js +1 -0
- package/dist/chunk-4ZGSSQC6.js +1 -0
- package/dist/chunk-54CAKCYR.js +144 -0
- package/dist/chunk-5CH3B62S.js +2 -0
- package/dist/chunk-5UHQVR2Z.js +1 -0
- package/dist/chunk-5WVAHE5E.js +1 -0
- package/dist/chunk-5Y7GIF2W.js +1 -0
- package/dist/chunk-67MH4AXG.js +1 -0
- package/dist/chunk-6CYMJ76C.js +9 -0
- package/dist/chunk-6G6TMKXF.js +28 -0
- package/dist/chunk-6HBRBQAN.js +6 -0
- package/dist/chunk-6ITDI2SD.js +1 -0
- package/dist/chunk-6M3ZYNGO.js +451 -0
- package/dist/chunk-6RE2SNCU.js +6 -0
- package/dist/chunk-6SF3ZETE.js +1 -0
- package/dist/chunk-6WL4GA2M.js +15 -0
- package/dist/chunk-75VPUOC5.js +1 -0
- package/dist/chunk-76R52ODR.js +1 -0
- package/dist/chunk-7ESSIN27.js +567 -0
- package/dist/chunk-7NH7CHVI.js +6 -0
- package/dist/chunk-7QIOUDCX.js +8 -0
- package/dist/chunk-7UYZQN4V.js +18 -0
- package/dist/chunk-7ZT57XT7.js +2 -0
- package/dist/chunk-AGNMOFJS.js +1 -0
- package/dist/chunk-BS3BKORT.js +16 -0
- package/dist/chunk-C2IK2HY3.js +4 -0
- package/dist/chunk-C7BTJ32Z.js +1 -0
- package/dist/chunk-CBXSPL4W.js +1 -0
- package/dist/chunk-CEIQFLCN.js +1 -0
- package/dist/chunk-CERXUPGC.js +14 -0
- package/dist/chunk-DCPBRWVC.js +1 -0
- package/dist/chunk-DN2IE3VY.js +1 -0
- package/dist/chunk-DRFGABEB.js +1 -0
- package/dist/chunk-E3EMHAJB.js +1 -0
- package/dist/chunk-EKXY5COY.js +1 -0
- package/dist/chunk-EQU4MUQJ.js +1 -0
- package/dist/chunk-F2QU6WWX.js +1 -0
- package/dist/chunk-FFQ5EWII.js +294 -0
- package/dist/chunk-FKMC5OFF.js +1 -0
- package/dist/chunk-FQWB2F75.js +3 -0
- package/dist/chunk-FUOIGXI4.js +1 -0
- package/dist/chunk-FYFNUDOC.js +19 -0
- package/dist/chunk-G4BPGWJC.js +1 -0
- package/dist/chunk-GVQIPEZT.js +1 -0
- package/dist/chunk-GZS44BUW.js +102 -0
- package/dist/chunk-HIBX234C.js +6 -0
- package/dist/chunk-HRUGYZZ4.js +2 -0
- package/dist/chunk-HUIJMGVJ.js +586 -0
- package/dist/chunk-HZA6IAA4.js +1 -0
- package/dist/chunk-IU2ZQ6TE.js +2 -0
- package/dist/chunk-IX5ICOBV.js +7 -0
- package/dist/chunk-IZ3C5J7G.js +5 -0
- package/dist/chunk-JAO53IH2.js +1 -0
- package/dist/chunk-JCL2RRU6.js +1 -0
- package/dist/chunk-JQJBBXMX.js +17 -0
- package/dist/chunk-JUVAGMIH.js +1 -0
- package/dist/chunk-JXW374CL.js +359 -0
- package/dist/chunk-K2WUCOQJ.js +32 -0
- package/dist/chunk-K6CTUBFC.js +12 -0
- package/dist/chunk-KHSYW7I4.js +1 -0
- package/dist/chunk-KHTV6PBV.js +12 -0
- package/dist/chunk-KKTW6ZCA.js +5 -0
- package/dist/chunk-KLMDWDT2.js +1 -0
- package/dist/chunk-KN3WTTHZ.js +1 -0
- package/dist/chunk-KR6QDE7D.js +2 -0
- package/dist/chunk-KZOBF55B.js +1 -0
- package/dist/chunk-L2MGAEV3.js +6 -0
- package/dist/chunk-LDGAHMS7.js +159 -0
- package/dist/chunk-M2D7USAX.js +1 -0
- package/dist/chunk-M2ZHFKPN.js +6 -0
- package/dist/chunk-M3RYUB22.js +1 -0
- package/dist/chunk-M56NDIMD.js +1 -0
- package/dist/chunk-MCVRONUY.js +1 -0
- package/dist/chunk-MHWV5RQV.js +10 -0
- package/dist/chunk-MOA33ZFO.js +1 -0
- package/dist/chunk-MWGBTOO3.js +1 -0
- package/dist/chunk-MWY3A7O3.js +4 -0
- package/dist/chunk-N5PQPIBF.js +374 -0
- package/dist/chunk-NF2ABOOU.js +1 -0
- package/dist/chunk-NMBBTTIH.js +2 -0
- package/dist/chunk-NPEVESCV.js +3 -0
- package/dist/chunk-OBEWZXOQ.js +2 -0
- package/dist/chunk-OCOY5MV2.js +1 -0
- package/dist/chunk-OLZHWPZP.js +1 -0
- package/dist/chunk-OTY24J2W.js +1 -0
- package/dist/chunk-OY3PNHPZ.js +103 -0
- package/dist/chunk-P6XE4MH5.js +1 -0
- package/dist/chunk-PAP22IQO.js +264 -0
- package/dist/chunk-PD5ZHJWI.js +1 -0
- package/dist/chunk-PIBY5DDZ.js +1 -0
- package/dist/chunk-PYVAWAUO.js +5 -0
- package/dist/chunk-Q33IBIVJ.js +1 -0
- package/dist/chunk-Q4T2T2QE.js +15 -0
- package/dist/chunk-QA23HIH4.js +1 -0
- package/dist/chunk-QBSKKQBN.js +1 -0
- package/dist/chunk-QFWIDATO.js +1 -0
- package/dist/chunk-QSTEVZFQ.js +1 -0
- package/dist/chunk-S6EJHWJL.js +1 -0
- package/dist/chunk-SIMFNECG.js +1 -0
- package/dist/chunk-SXTMSGUE.js +1 -0
- package/dist/chunk-T542UQBY.js +1 -0
- package/dist/chunk-TQ6HYDVC.js +1 -0
- package/dist/chunk-TYZXGSHO.js +3 -0
- package/dist/chunk-UHJYPEY2.js +1 -0
- package/dist/chunk-UJVH7FZS.js +1 -0
- package/dist/chunk-UJXUSRQK.js +1 -0
- package/dist/chunk-ULFWK45W.js +64 -0
- package/dist/chunk-ULQG3XQS.js +1 -0
- package/dist/chunk-URZPVSJZ.js +559 -0
- package/dist/chunk-UWJ73J4B.js +1 -0
- package/dist/chunk-UXVZ2P63.js +1411 -0
- package/dist/chunk-UYXEA3Y6.js +1 -0
- package/dist/chunk-VBUZWRUL.js +1 -0
- package/dist/chunk-VICYNG2W.js +1 -0
- package/dist/chunk-WDC3KIZT.js +2 -0
- package/dist/chunk-WFXRSKRK.js +1 -0
- package/dist/chunk-WSDN25F5.js +1 -0
- package/dist/chunk-XEFQQPL4.js +1 -0
- package/dist/chunk-XITQULK4.js +3 -0
- package/dist/chunk-XONFGLJQ.js +847 -0
- package/dist/chunk-XOTA6JTZ.js +11 -0
- package/dist/chunk-XR6GMMEU.js +1 -0
- package/dist/chunk-XULPJ6UG.js +1 -0
- package/dist/chunk-XXVEHDVO.js +1 -0
- package/dist/chunk-Y7JGYGV7.js +1 -0
- package/dist/chunk-YOZNRLFC.js +1 -0
- package/dist/chunk-YTNDFQJT.js +3 -0
- package/dist/chunk-Z35BTAM6.js +2 -0
- package/dist/chunk-ZBRRJDGW.js +1 -0
- package/dist/chunk-ZGK3LGCH.js +4 -0
- package/dist/chunk-ZR76GGZ6.js +5 -0
- package/dist/chunk-ZSBA6VIC.js +1 -0
- package/dist/chunk-ZTMSBSYD.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.d.ts +0 -8
- 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-BMZFATRQ.js +1 -0
- package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
- package/dist/deprecations-7LHRXPXU.js +1 -0
- package/dist/dist-LDXPBYSZ.js +1 -0
- package/dist/dist-V63ILV6L.js +1 -0
- package/dist/environments-5X7S2O5U.js +1 -0
- package/dist/error-ZRLNNGIQ.js +1 -0
- package/dist/error-handler-PRZFHPRG.js +1 -0
- package/dist/fs-H7V6IRSH.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-IOWPCT2U.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-MTKXSZ3I.js +1 -0
- package/dist/local-storage-CYEL4MXF.js +1 -0
- package/dist/metadata-NOVBMKLM.js +1 -0
- package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
- package/dist/node-package-manager-N5CVNHA3.js +1 -0
- package/dist/notifications-system-YX2GPLDW.js +1 -0
- package/dist/npa-ICFSA3NL.js +1 -0
- package/dist/output-Q46DT46U.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-E6Q3OBX3.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-K5CWIA4V.js +1 -0
- package/dist/ui-WRS2IDPP.js +1 -0
- package/dist/upgrade-TKUN2M5P.js +1 -0
- package/dist/version-5W5RVAPA.js +1 -0
- package/dist/version-BQJ3FPXD.js +1 -0
- package/dist/workerd-GOK6GWEX.js +18 -0
- package/oclif.manifest.json +5136 -5945
- 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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as o}from"./chunk-OCOY5MV2.js";import{q as i}from"./chunk-ZSBA6VIC.js";import{b as r}from"./chunk-XOTA6JTZ.js";import{u as e}from"./chunk-6G6TMKXF.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
|
|
2
|
+
|
|
3
|
+
When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
|
|
4
|
+
|
|
5
|
+
Run \`shopify config autoupgrade on\` or \`shopify config autoupgrade off\` to configure it.
|
|
6
|
+
`}static{this.description=this.descriptionWithoutMarkdown()}async run(){i()?e({body:o.on}):e({body:o.off})}};export{t as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{d as h}from"./chunk-M56NDIMD.js";import{Gb as V,Ib as T,Qb as $,Ta as N,ma as w}from"./chunk-N5PQPIBF.js";import{a as d,c as b,e as K,g as v}from"./chunk-VPRTJUIN.js";var O=b((H,L)=>{L.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var j=b((z,p)=>{v();var m=d("fs"),y=d("path"),Y=d("os"),R=d("crypto"),F=O(),_=F.version,P=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
2
|
+
`);let s;for(;(s=P.exec(r))!=null;){let a=s[1],t=s[2]||"";t=t.trim();let o=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(t=t.replace(/\\n/g,`
|
|
3
|
+
`),t=t.replace(/\\r/g,"\r")),n[a]=t}return n}function U(e){let n=A(e),r=c.configDotenv({path:n});if(!r.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let s=k(e).split(","),a=s.length,t;for(let o=0;o<a;o++)try{let i=s[o].trim(),l=q(r,i);t=c.decrypt(l.ciphertext,l.key);break}catch(i){if(o+1>=a)throw i}return c.parse(t)}function C(e){console.log(`[dotenv@${_}][INFO] ${e}`)}function M(e){console.log(`[dotenv@${_}][WARN] ${e}`)}function g(e){console.log(`[dotenv@${_}][DEBUG] ${e}`)}function k(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function q(e,n){let r;try{r=new URL(n)}catch(i){if(i.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw i}let s=r.password;if(!s){let i=new Error("INVALID_DOTENV_KEY: Missing key part");throw i.code="INVALID_DOTENV_KEY",i}let a=r.searchParams.get("environment");if(!a){let i=new Error("INVALID_DOTENV_KEY: Missing environment part");throw i.code="INVALID_DOTENV_KEY",i}let t=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[t];if(!o){let i=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw i.code="NOT_FOUND_DOTENV_ENVIRONMENT",i}return{ciphertext:o,key:s}}function A(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)m.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=y.resolve(process.cwd(),".env.vault");return m.existsSync(n)?n:null}function I(e){return e[0]==="~"?y.join(Y.homedir(),e.slice(1)):e}function B(e){C("Loading env from encrypted .env.vault");let n=c._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),c.populate(r,n,e),{parsed:n}}function W(e){let n=y.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug);e&&e.encoding?r=e.encoding:s&&g("No encoding is specified. UTF-8 is used by default");let a=[n];if(e&&e.path)if(!Array.isArray(e.path))a=[I(e.path)];else{a=[];for(let l of e.path)a.push(I(l))}let t,o={};for(let l of a)try{let u=c.parse(m.readFileSync(l,{encoding:r}));c.populate(o,u,e)}catch(u){s&&g(`Failed to load ${l} ${u.message}`),t=u}let i=process.env;return e&&e.processEnv!=null&&(i=e.processEnv),c.populate(i,o,e),t?{parsed:o,error:t}:{parsed:o}}function G(e){if(k(e).length===0)return c.configDotenv(e);let n=A(e);return n?c._configVault(e):(M(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),c.configDotenv(e))}function J(e,n){let r=Buffer.from(n.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.subarray(0,12),t=s.subarray(-16);s=s.subarray(12,-16);try{let o=R.createDecipheriv("aes-256-gcm",r,a);return o.setAuthTag(t),`${o.update(s)}${o.final()}`}catch(o){let i=o instanceof RangeError,l=o.message==="Invalid key length",u=o.message==="Unsupported state or unable to authenticate data";if(i||l){let f=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw f.code="INVALID_DOTENV_KEY",f}else if(u){let f=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw f.code="DECRYPTION_FAILED",f}else throw o}}function Q(e,n,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(a===!0&&(e[t]=n[t]),s&&g(a===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t]}var c={configDotenv:W,_configVault:B,_parseVault:U,config:G,decrypt:J,parse:S,populate:Q};p.exports.configDotenv=c.configDotenv;p.exports._configVault=c._configVault;p.exports._parseVault=c._parseVault;p.exports.config=c.config;p.exports.decrypt=c.decrypt;p.exports.parse=c.parse;p.exports.populate=c.populate;p.exports=c});v();var x=K(j());async function re(e){if($(T`Reading the .env file at ${V.path(e)}`),!await N(e))throw new h(`The environment file at ${e} does not exist.`);let n=await w(e);return{path:e,variables:(0,x.parse)(n)}}function oe(e,n){let r=[],s=e===null?[]:e.split(`
|
|
4
|
+
`),a=[],t;for(let o of s){if(t){if(o.endsWith(t.quote)){let u=E(t.key,t.value+o.slice(0,-1),t.quote),f=n[t.key];f&&(a.push(t.key),u=E(t.key,f)),r.push(u),t=void 0}else t.value+=`${o}
|
|
5
|
+
`;continue}let i=o.match(/^([^=:#]+?)[=:](.*)/),l=o;if(i){let u=i[1].trim(),f=(i[2]??"").trim();if(/^["'`]/.test(f)&&!f.endsWith(f[0])){t={key:u,value:`${f.slice(1)}
|
|
6
|
+
`,quote:f[0]};continue}let D=n[u];D&&(a.push(u),l=E(u,D))}r.push(l)}if(t)throw new h(`Multi-line environment variable '${t.key}' is not properly enclosed.`);for(let[o,i]of Object.entries(n))a.includes(o)||r.push(E(o,i));return r.join(`
|
|
7
|
+
`)}function E(e,n,r){if(r)return`${e}=${r}${n}${r}`;if(n?.includes(`
|
|
8
|
+
`)){let s=['"',"'","`"].find(a=>!n.includes(a));if(!s)throw new h(`The environment file patch has an env value that can't be surrounded by quotes: ${n}`);return`${e}=${s}${n}${s}`}return`${e}=${n}`}export{re as a,oe as b,E as c};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{a as Q}from"./chunk-Z35BTAM6.js";import{a as Me}from"./chunk-75VPUOC5.js";import{a as He}from"./chunk-HZA6IAA4.js";import{a as Ce}from"./chunk-PD5ZHJWI.js";import{l as ze,r as F}from"./chunk-LDGAHMS7.js";import{a as Ve,b as Ge}from"./chunk-ZR76GGZ6.js";import{a as ve,c as Z,e as b,g}from"./chunk-VPRTJUIN.js";var me=Z((Bn,je)=>{g();function Ye(i){t.debug=t,t.default=t,t.coerce=l,t.disable=c,t.enable=s,t.enabled=o,t.humanize=Ve(),t.destroy=f,Object.keys(i).forEach(a=>{t[a]=i[a]}),t.names=[],t.skips=[],t.formatters={};function e(a){let u=0;for(let d=0;d<a.length;d++)u=(u<<5)-u+a.charCodeAt(d),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(a){let u,d=null,p,m;function w(...C){if(!w.enabled)return;let I=w,P=Number(new Date),D=P-(u||P);I.diff=D,I.prev=u,I.curr=P,u=P,C[0]=t.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let K=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(de,We)=>{if(de==="%%")return"%";K++;let be=t.formatters[We];if(typeof be=="function"){let qe=C[K];de=be.call(I,qe),C.splice(K,1),K--}return de}),t.formatArgs.call(I,C),(I.log||t.log).apply(I,C)}return w.namespace=a,w.useColors=t.useColors(),w.color=t.selectColor(a),w.extend=n,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==t.namespaces&&(p=t.namespaces,m=t.enabled(a)),m),set:C=>{d=C}}),typeof t.init=="function"&&t.init(w),w}function n(a,u){let d=t(this.namespace+(typeof u>"u"?":":u)+a);return d.log=this.log,d}function s(a){t.save(a),t.namespaces=a,t.names=[],t.skips=[];let u=(typeof a=="string"?a:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?t.skips.push(d.slice(1)):t.names.push(d)}function r(a,u){let d=0,p=0,m=-1,w=0;for(;d<a.length;)if(p<u.length&&(u[p]===a[d]||u[p]==="*"))u[p]==="*"?(m=p,w=d,p++):(d++,p++);else if(m!==-1)p=m+1,w++,d=w;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function c(){let a=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),a}function o(a){for(let u of t.skips)if(r(a,u))return!1;for(let u of t.names)if(r(a,u))return!0;return!1}function l(a){return a instanceof Error?a.stack||a.message:a}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}je.exports=Ye});var Pe=Z((x,X)=>{g();x.formatArgs=Ze;x.save=Qe;x.load=Xe;x.useColors=Ke;x.storage=et();x.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();x.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ke(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let i;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ze(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+X.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,n=0;i[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(n=t))}),i.splice(n,0,e)}x.log=console.debug||console.log||(()=>{});function Qe(i){try{i?x.storage.setItem("debug",i):x.storage.removeItem("debug")}catch{}}function Xe(){let i;try{i=x.storage.getItem("debug")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function et(){try{return localStorage}catch{}}X.exports=me()(x);var{formatters:tt}=X.exports;tt.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var xe=Z((v,te)=>{g();var nt=ve("tty"),ee=ve("util");v.init=ct;v.log=rt;v.formatArgs=st;v.save=at;v.load=lt;v.useColors=it;v.destroy=ee.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");v.colors=[6,2,3,4,5,1];try{let i=Ge();i&&(i.stderr||i).level>=2&&(v.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}v.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,r)=>r.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),i[t]=n,i},{});function it(){return"colors"in v.inspectOpts?!!v.inspectOpts.colors:nt.isatty(process.stderr.fd)}function st(i){let{namespace:e,useColors:t}=this;if(t){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),r=` ${s};1m${e} \x1B[0m`;i[0]=r+i[0].split(`
|
|
2
|
+
`).join(`
|
|
3
|
+
`+r),i.push(s+"m+"+te.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=ot()+e+" "+i[0]}function ot(){return v.inspectOpts.hideDate?"":new Date().toISOString()+" "}function rt(...i){return process.stderr.write(ee.formatWithOptions(v.inspectOpts,...i)+`
|
|
4
|
+
`)}function at(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function lt(){return process.env.DEBUG}function ct(i){i.inspectOpts={};let e=Object.keys(v.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=v.inspectOpts[e[t]]}te.exports=me()(v);var{formatters:ke}=te.exports;ke.o=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts).split(`
|
|
5
|
+
`).map(e=>e.trim()).join(" ")};ke.O=function(i){return this.inspectOpts.colors=this.useColors,ee.inspect(i,this.inspectOpts)}});var T=Z((Rn,he)=>{g();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?he.exports=Pe():he.exports=xe()});g();g();var ge=b(F(),1);g();var $e=b(ze(),1);var{Ansis:St,ansi256:Bt,fg:Jt,bgAnsi256:At,bg:Ut,rgb:Rt,bgRgb:Tt,hex:_t,bgHex:Wt,reset:qt,inverse:Vt,hidden:Gt,visible:zt,bold:E,dim:k,italic:Ht,underline:Mt,strikethrough:Yt,strike:Kt,black:Zt,red:Qt,green:Xt,yellow:en,blue:tn,magenta:nn,cyan:R,white:sn,grey:on,gray:rn,blackBright:an,redBright:ln,greenBright:cn,yellowBright:un,blueBright:gn,magentaBright:fn,cyanBright:pn,whiteBright:dn,bgBlack:mn,bgRed:hn,bgGreen:yn,bgYellow:wn,bgBlue:bn,bgMagenta:vn,bgCyan:Cn,bgWhite:$n,bgGrey:jn,bgGray:Pn,bgBlackBright:kn,bgRedBright:xn,bgGreenBright:Fn,bgYellowBright:Ln,bgBlueBright:Nn,bgMagentaBright:In,bgCyanBright:On,bgWhiteBright:En}=$e.default;g();var $=b(F(),1);var Be=b(T(),1),B=b(He(),1);import{spawn as wt}from"node:child_process";import{access as bt,mkdir as vt,readFile as Ct,rename as $t,rm as Oe,writeFile as jt}from"node:fs/promises";import{basename as Pt,dirname as Ee,join as j,parse as De,resolve as we}from"node:path";import{fileURLToPath as kt}from"node:url";g();var re=b(F(),1),Le=b(T(),1);import{readFile as gt}from"node:fs/promises";import{createRequire as ft}from"node:module";import{join as pt,sep as dt}from"node:path";g();var _=b(F(),1),Fe=b(T(),1);import{spawn as ut}from"node:child_process";var ne=(0,Fe.default)("@oclif/plugin-plugins:spawn");async function ie(i,e=[],{cwd:t,logLevel:n}){return new Promise((s,r)=>{process.platform==="win32"&&i.endsWith(".js")&&(e.unshift(`"${i}"`),i="node"),ne("modulePath",i),ne("args",e);let c=ut(i,e,{cwd:t,env:{...Ce(),HUSKY:"0"},stdio:"pipe",windowsVerbatimArguments:!0,...process.platform==="win32"&&i.toLowerCase().endsWith(".cmd")&&{shell:!0}}),o=["up to date","added"],l=[],f=[],a=[],u=[],d=p=>{let m=a.length===0&&u.length===0,w=o.some(C=>p.startsWith(C));return m&&w&&n==="notice"?!1:n!=="silent"};c.stderr?.setEncoding("utf8"),c.stderr?.on("data",p=>{let m=p.toString().trim();l.push(m),d(m)?(a.push(m),_.ux.stdout(m)):ne(m)}),c.stdout?.setEncoding("utf8"),c.stdout?.on("data",p=>{let m=p.toString().trim();f.push(m),d(m)?(u.push(m),_.ux.stdout(m)):ne(m)}),c.on("error",r),c.on("exit",p=>{p===0?s({stderr:l,stdout:f}):r(new _.Errors.CLIError(`${i} ${e.join(" ")} exited with code ${p}`,{suggestions:["Run with DEBUG=@oclif/plugin-plugins* to see debug output."]}))})})}var se=(0,Le.default)("@oclif/plugin-plugins:npm"),oe=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let n=await this.findNpm();se("npm binary path",n),e.push(`--loglevel=${this.logLevel}`,"--no-fund"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&re.ux.stderr(`${t.cwd}: ${n} ${e.join(" ")}`),se(`${t.cwd}: ${n} ${e.join(" ")}`);try{let s=await ie(n,e,t);return se("npm done"),s}catch(s){throw se("npm error",s),s}}async install(e,t){let n=t.prod?["--omit","dev"]:[];return this.exec(["install",...e,...n,"--no-audit"],t)}async uninstall(e,t){return this.exec(["uninstall",...e],t)}async update(e,t){return this.exec(["update",...e],t)}async view(e,t){return this.exec(["view",...e],{...t,logLevel:"silent"})}async findNpm(){if(this.bin)return this.bin;try{let e=ft(import.meta.url).resolve("npm/package.json"),t=JSON.parse(await gt(e,{encoding:"utf8"})),n=e.slice(0,Math.max(0,e.lastIndexOf(dt)));this.bin=pt(n,t.bin.npm)}catch{let{default:e}=await import("./lib-WU3FEA6I.js");this.bin=await e("npm")}if(!this.bin)throw new re.Errors.CLIError("npm not found");return this.bin}};g();function ye(i,e){let t=i===void 0?0:i,n=e===void 0?0:e;if(Array.isArray(t)&&Array.isArray(n)){if(t.length===0&&n.length===0)return 0;let s=ye(t[0],n[0]);return s!==0?s:ye(t.slice(1),n.slice(1))}return t<n?-1:t>n?1:0}function A(i,e){return i.sort((t,n)=>ye(e(t),e(n)))}function Ne(i,e){return i.filter((t,n)=>!i.some((s,r)=>r>n&&e(t,s)))}g();var ce=b(F(),1),Ie=b(T(),1);import{createRequire as mt}from"node:module";import{fileURLToPath as ht}from"node:url";var yt=mt(import.meta.url),ae=(0,Ie.default)("@oclif/plugin-plugins:yarn"),le=class{bin;config;logLevel;constructor({config:e,logLevel:t}){this.config=e,this.logLevel=t}async exec(e=[],t){let n=await this.findYarn();ae("yarn binary path",n),t.logLevel==="verbose"&&e.push("--verbose"),this.config.npmRegistry&&e.push(`--registry=${this.config.npmRegistry}`),t.logLevel!=="notice"&&t.logLevel!=="silent"&&ce.ux.stderr(`${t.cwd}: ${n} ${e.join(" ")}`),ae(`${t.cwd}: ${n} ${e.join(" ")}`);try{let s=await ie(n,e,t);return ae("yarn done"),s}catch(s){throw ae("yarn error",s),s}}async install(e,t){return this.exec(["install",...e],t)}async findYarn(){if(this.bin)return this.bin;try{this.bin=yt.resolve("yarn/bin/yarn.js",{paths:[this.config.root,ht(import.meta.url)]})}catch{let{default:e}=await import("./lib-WU3FEA6I.js");this.bin=await e("yarn")}if(!this.bin)throw new ce.Errors.CLIError("yarn not found");return this.bin}};var ue={dependencies:{},oclif:{plugins:[],schema:1},private:!0};async function U(i){try{return await bt(i),!0}catch{return!1}}function Je(i){return Ne(i,(e,t)=>e.name===t.name||e.type==="link"&&t.type==="link"&&e.root===t.root)}function xt(i,e){if(i)return typeof i=="string"?i:i.url;if(e)return typeof e=="string"?e:e.url.replace("git+","").replace(".git","")}function Se(i,e){[...e.stdout,...e.stderr].some(n=>n.includes("npm WARN"))&&($.ux.stderr(E.yellow(`
|
|
6
|
+
These warnings can only be addressed by the owner(s) of ${i.name}.`)),(i.pjson.bugs||i.pjson.repository)&&$.ux.stderr(`We suggest that you create an issue at ${xt(i.pjson.bugs,i.pjson.repository)} and ask the plugin owners to address them.
|
|
7
|
+
`))}var h=class{config;npm;debug;logLevel;constructor(e){this.config=e.config,this.debug=(0,Be.default)("@oclif/plugin-plugins"),this.logLevel=e.logLevel??"notice",this.npm=new oe({config:this.config,logLevel:this.logLevel})}get pjsonPath(){return j(this.config.dataDir,"package.json")}async add(...e){let t=await this.pjson(),n=[...t.oclif.plugins||[],...e];await this.savePJSON({...t,oclif:{...t.oclif,plugins:Je(n)}})}friendlyName(e){let{pluginPrefix:t,scope:n}=this.config.pjson.oclif;return n?e.match(`@${n}/${t??"plugin"}-(.+)`)?.[1]??e:e}async hasPlugin(e){let t=await this.list(),n=this.friendlyName(e),s=this.unfriendlyName(e)??e;return t.find(r=>this.friendlyName(r.name)===n)??t.find(r=>this.unfriendlyName(r.name)===s)??t.find(r=>r.type==="link"&&we(r.root)===we(e))??!1}async install(e,{force:t=!1,tag:n="latest"}={}){await this.maybeCleanUp();try{this.debug(`installing plugin ${e}`);let s={cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0};await this.ensurePJSON();let r,c=t?["--force"]:[];if(e.includes(":")){let o=e,l=await this.npm.install([...c,o],s),{dependencies:f}=await this.pjson(),{default:a}=await import("./npa-ICFSA3NL.js"),u=a(o),p=Object.entries(f??{}).find(([,P])=>{let D=a(P);return D.type==="file"&&D.raw?De(o).base===De(D.raw).base:D.hosted?.type===u.hosted?.type&&D.hosted?.user===u.hosted?.user&&D.hosted?.project===u.hosted?.project})?.[0];if(!p)throw new $.Errors.CLIError(`Could not find plugin name for ${o}`);let m=j(this.config.dataDir,"node_modules",p);r=await $.Config.load({devPlugins:!1,name:p,root:m,userPlugins:!1}),Se(r,l),this.isValidPlugin(r),await this.add({name:p,type:"user",url:o});let w=new Set(["npm-shrinkwrap.json","oclif.lock","oclif.manifest.json"]),C=(r.pjson.files??[]).map(P=>j(m,P)).filter(P=>!w.has(Pt(P)));this.debug(`checking for existence of files: ${C.join(", ")}`);let I=Object.fromEntries(await Promise.all(C?.map(async P=>[P,await U(P)])??[]));this.debug(I),Object.values(I).every(Boolean)||$.ux.warn("This plugin may not work as expected because the prepare script did not produce all the expected files.")}else{let o=(0,B.validRange)(n),l=this.unfriendlyName(e);l&&await this.npmHasPackage(l)&&(e=l),await this.npmHasPackage(e,!0);let f=await this.npm.install([...c,`${e}@${n}`],s);this.debug(`loading plugin ${e}...`),r=await $.Config.load({devPlugins:!1,name:e,root:j(this.config.dataDir,"node_modules",e),userPlugins:!1}),this.debug(`finished loading plugin ${e} at root ${r.root}`),Se(r,f),this.isValidPlugin(r),await this.add({name:e,tag:o??n,type:"user"})}return await Oe(j(this.config.dataDir,"yarn.lock"),{force:!0}),r}catch(s){throw this.debug("error installing plugin:",s),await this.uninstall(e).catch(r=>this.debug(r)),String(s).includes("EACCES")?new $.Errors.CLIError(s,{suggestions:[`Plugin failed to install because of a permissions error.
|
|
8
|
+
Does your current user own the directory ${this.config.dataDir}?`]}):s}}async link(e,{install:t}){let n=await $.Config.load(we(e));return this.isValidPlugin(n),t&&(await U(j(n.root,"yarn.lock"))?(this.debug("installing dependencies with yarn"),await new le({config:this.config,logLevel:this.logLevel}).install([],{cwd:n.root,logLevel:this.logLevel})):await U(j(n.root,"package-lock.json"))?(this.debug("installing dependencies with npm"),await this.npm.install([],{cwd:n.root,logLevel:this.logLevel,prod:!1})):await U(j(n.root,"pnpm-lock.yaml"))?$.ux.warn(`pnpm is not supported for installing after a link. The link succeeded, but you may need to run 'pnpm install' in ${n.root}.`):$.ux.warn(`No lockfile found in ${n.root}. The link succeeded, but you may need to install the dependencies in your project.`)),await this.add({name:n.name,root:n.root,type:"link"}),n}async list(){return(await this.pjson()).oclif.plugins}async maybeUnfriendlyName(e){await this.ensurePJSON();let t=this.unfriendlyName(e);return this.debug(`checking registry for expanded package name ${t}`),t&&await this.npmHasPackage(t)?t:(this.debug(`expanded package name ${t} not found, using given package name ${e}`),e)}async pjson(){let e=await this.readPJSON(),t=e?Ft(e.oclif.plugins):[];return{...ue,...e,oclif:{...ue.oclif,...e?.oclif,plugins:t}}}async remove(e){let t=await this.pjson();t.dependencies&&delete t.dependencies[e],await this.savePJSON({...t,oclif:{...t.oclif,plugins:t.oclif.plugins.filter(n=>n.name!==e)}})}unfriendlyName(e){if(e.includes("@"))return;let{pluginPrefix:t,scope:n}=this.config.pjson.oclif;if(n)return`@${n}/${t??"plugin"}-${e}`}async uninstall(e){try{((await this.pjson()).oclif.plugins??[]).some(n=>typeof n=="object"&&n.type==="user"&&n.name===e)&&await this.npm.uninstall([e],{cwd:this.config.dataDir,logLevel:this.logLevel})}catch(t){$.ux.warn(t)}finally{await this.remove(e)}}async update(){let e=(await this.list()).filter(o=>o.type==="user");if(e.length===0)return;await this.maybeCleanUp();let t=this.config.pjson.oclif.aliases||{};for(let[o,l]of Object.entries(t))e.find(a=>a.name===o)&&(l&&await this.install(l),await this.uninstall(o),e=e.filter(a=>a.name!==o));let n=e.filter(o=>!!o.url);n.length>0&&await this.npm.update(n.map(o=>o.name),{cwd:this.config.dataDir,logLevel:this.logLevel});let s=e.filter(o=>!o.url),r=this.config.pjson.oclif.jitPlugins??{},c=[];s.length>0&&await this.npm.install(s.map(o=>{if(!(0,B.valid)(o.tag))return`${o.name}@${o.tag}`;if(o.tag&&(0,B.valid)(o.tag)&&r[o.name]&&(0,B.gt)(o.tag,r[o.name]))return`${o.name}@${o.tag}`;let l=r[o.name]??o.tag;return c.push({...o,tag:l}),`${o.name}@${l}`}),{cwd:this.config.dataDir,logLevel:this.logLevel,prod:!0}),await this.add(...c)}async ensurePJSON(){await U(this.pjsonPath)||(this.debug(`creating ${this.pjsonPath} with pjson: ${JSON.stringify(ue,null,2)}`),await this.savePJSON(ue))}isValidPlugin(e){if(e.valid||this.config.plugins.get("@oclif/plugin-legacy")||e._base.includes("@oclif/plugin-legacy"))return!0;throw new $.Errors.CLIError("plugin is invalid",{suggestions:[`Plugin failed to install because it does not appear to be a valid CLI plugin.
|
|
9
|
+
If you are sure it is, contact the CLI developer noting this error.`]})}async maybeCleanUp(){if(await U(j(this.config.dataDir,"yarn.lock")))try{this.debug("Found yarn.lock! Removing yarn.lock and node_modules..."),await Promise.all([$t(j(this.config.dataDir,"node_modules"),j(this.config.dataDir,"node_modules.old")),Oe(j(this.config.dataDir,"yarn.lock"),{force:!0})]);let e=j(Ee(kt(import.meta.url)),"rm.js");this.debug(`spawning ${e} to remove node_modules.old`),wt(process.argv[0],[e,j(this.config.dataDir,"node_modules.old")],{detached:!0,stdio:"ignore",...this.config.windows?{shell:!0}:{}}).unref()}catch(e){this.debug("Error cleaning up yarn.lock and node_modules:",e)}}async npmHasPackage(e,t=!1){try{return await this.npm.view([e],{cwd:this.config.dataDir,logLevel:this.logLevel}),this.debug(`Found ${e} in the registry.`),!0}catch(n){if(this.debug(n),t)throw new $.Errors.CLIError(`${e} does not exist in the registry.`);return!1}}async readPJSON(){try{return JSON.parse(await Ct(this.pjsonPath,"utf8"))}catch(e){this.debug(e);let t=e;t.code!=="ENOENT"&&process.emitWarning(t)}}async savePJSON(e){await vt(Ee(this.pjsonPath),{recursive:!0}),await jt(this.pjsonPath,JSON.stringify({name:this.config.name,...e},null,2))}},Ft=i=>{let e=(i??[]).map(t=>typeof t=="string"?{name:t,tag:"latest",type:"user"}:t);return Je(e)};var W=class i extends ge.Command{static description="List installed plugins.";static enableJsonFlag=!0;static examples=["<%= config.bin %> <%= command.id %>"];static flags={core:ge.Flags.boolean({description:"Show core plugins."})};plugins;async run(){let{flags:e}=await this.parse(i);this.plugins=new h({config:this.config});let t=this.config.getPluginsList();A(t,o=>this.plugins.friendlyName(o.name)),e.core||(t=t.filter(o=>o.type!=="core"&&o.type!=="dev")),t.length===0&&this.log("No plugins installed.");let n=this.config.getPluginsList(),s=new Set(n.filter(o=>o.type==="user"||o.type==="link").map(o=>o.name)),r=this.config.pjson.oclif.jitPlugins??{},c=Object.entries(r).map(([o,l])=>({name:o,type:"jit",version:l})).filter(o=>!s.has(o.name));return A(c,o=>o.name),this.jsonEnabled()||(this.display(t),this.displayJitPlugins(c)),[...n.filter(o=>!o.parent).map(o=>{let{config:l,...f}=o;return f}),...c]}createTree(e){let t={};for(let n of e.children??[])t[this.formatPlugin(n)]=this.createTree(n);return t}display(e){let t=e.find(n=>n.root===this.config.root);for(let n of e.filter(s=>!s.parent))if(n.name!==t?.name&&(this.log(this.formatPlugin(n)),n.children&&n.children.length>0)){let s=this.createTree(n);this.log(Q(s))}}displayJitPlugins(e){if(e.length!==0){this.log(k(`
|
|
10
|
+
Uninstalled JIT Plugins:`));for(let{name:t,version:n}of e)this.log(`${this.plugins.friendlyName(t)} ${k(n)}`)}}formatPlugin(e){let t=`${this.plugins.friendlyName(e.name)} ${k(e.version)}`;return e.type!=="user"&&(t+=k(` (${e.type})`)),e.type==="link"?t+=` ${e.root}`:e.tag&&e.tag!=="latest"&&(t+=k(` (${String(e.tag)})`)),t}};g();var J=b(F(),1);import{readFile as Ae}from"node:fs/promises";import{dirname as Nt,join as fe,sep as Ue}from"node:path";g();var Lt=["silent","error","warn","notice","http","info","verbose","silly"];function O(i,e,t){if(e.verbose)return"verbose";if(e.silent)return"silent";let n=i.scopedEnvVar("NPM_LOG_LEVEL");return Lt.includes(n)?n:t}function It(i,e){let t=i.split(Ue),n=t.reduce((r,c,o)=>c===e?[...r,o]:r,[]),s=Math.max(...n);return s===-1?i:t.slice(0,s+1).join(Ue)}var q=class i extends J.Command{static args={plugin:J.Args.string({default:".",description:"Plugin to inspect.",required:!0})};static description="Displays installation properties of a plugin.";static enableJsonFlag=!0;static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> '];static flags={help:J.Flags.help({char:"h"}),verbose:J.Flags.boolean({char:"v"})};static strict=!1;static usage="plugins:inspect PLUGIN...";plugins;async findDep(e,t){let n=fe(...t.split("/")),s=fe(e.root,"node_modules"),r=[s];for(;(s.match(/node_modules/g)??[]).length>1;)s=It(Nt(s),"node_modules"),r.push(s);for(let c of r)try{let o=fe(c,n),l=fe(o,"package.json"),f=JSON.parse(await Ae(l,"utf8"));return{pkgPath:o,version:f.version}}catch{}return{pkgPath:null,version:null}}findPlugin(e){let t=this.config.getPluginsList().find(n=>n.name===e);if(t)return t;throw this.config.pjson.oclif.jitPlugins?.[e]&&this.warn(`Plugin ${e} is a JIT plugin. It will be installed the first time you run one of it's commands.`),new Error(`${e} not installed`)}async inspect(e,t=!1){let n=this.findPlugin(e),s={},r={};for(let o of A(Object.keys({...n.pjson.dependencies}),l=>l)){let{pkgPath:l,version:f}=await this.findDep(n,o);if(!f)continue;let a=n.pjson.dependencies?.[o],u=k(a?`${a} => ${f}`:f),d=t?`${o} ${u} ${l}`:`${o} ${u}`;s[d]=null,r[o]={from:a,version:f}}let c={[E.cyan(n.name)]:{[`version ${n.version}`]:null,...n.tag?{[`tag ${n.tag}`]:null}:{},...n.pjson.homepage?{[`homepage ${n.pjson.homepage}`]:null}:{},[`location ${n.root}`]:null,commands:Object.fromEntries(A(n.commandIDs,o=>o).map(o=>[o,null])),dependencies:s}};return this.log(Q(c)),{...n,deps:r}}async run(){let{argv:e,flags:t}=await this.parse(i);this.plugins=new h({config:this.config,logLevel:O(this.config,t,"silent")});let n=this.config.pjson.oclif.aliases??{},s=[];for(let r of e){r==="."&&(r=JSON.parse(await Ae("package.json","utf8")).name),n[r]===null&&this.error(`${r} is blocked`),r=n[r]??r;let c=await this.plugins.maybeUnfriendlyName(r)??r;try{s.push(await this.inspect(c,t.verbose))}catch(o){throw this.log(E.red("failed")),o}}return s}};g();var y=b(F(),1);var Re=b(Me(),1);var V=class i extends y.Command{static aliases=["plugins:add"];static args={plugin:y.Args.string({description:"Plugin to install.",required:!0})};static description=`Uses npm to install plugins.
|
|
11
|
+
|
|
12
|
+
Installation of a user-installed plugin will override a core plugin.
|
|
13
|
+
|
|
14
|
+
Use the <%= config.scopedEnvVarKey('NPM_LOG_LEVEL') %> environment variable to set the npm loglevel.
|
|
15
|
+
Use the <%= config.scopedEnvVarKey('NPM_REGISTRY') %> environment variable to set the npm registry.`;static enableJsonFlag=!0;static examples=[{command:'<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> ',description:"Install a plugin from npm registry."},{command:"<%= config.bin %> <%= command.id %> https://github.com/someuser/someplugin",description:"Install a plugin from a github url."},{command:"<%= config.bin %> <%= command.id %> someuser/someplugin",description:"Install a plugin from a github slug."}];static flags={force:y.Flags.boolean({char:"f",description:"Force npm to fetch remote resources even if a local copy exists on disk."}),help:y.Flags.help({char:"h"}),jit:y.Flags.boolean({hidden:!0,async parse(e,t){if(e===!1||e===void 0)return e;let n=t.argv.filter(l=>!l.startsWith("-"));if(n.length===0)return e;let s=t.config.pjson.oclif.jitPlugins??{};if(Object.keys(s).length===0)return e;let r=new h({config:t.config}),o=(await Promise.all(n.map(async l=>{let f=await r.maybeUnfriendlyName(l);return{jit:!!s[f],name:f}}))).filter(l=>!l.jit).map(l=>l.name);if(o.length>0)throw new y.Errors.CLIError(`The following plugins are not JIT plugins: ${o.join(", ")}`);return e}}),silent:y.Flags.boolean({char:"s",description:"Silences npm output.",exclusive:["verbose"]}),verbose:y.Flags.boolean({char:"v",description:"Show verbose npm output.",exclusive:["silent"]})};static strict=!1;static summary="Installs a plugin into <%= config.bin %>.";flags;async parsePlugin(e,t){if(t.startsWith("git+ssh://")||t.endsWith(".git"))return{type:"repo",url:t};let n=async c=>{let o=/(?<!^)@/,[l,f="latest"]=c.split(o),a=l.startsWith("@")?l:await e.maybeUnfriendlyName(l);if(Ot(a),this.flags.jit){let u=this.config.pjson.oclif?.jitPlugins?.[a];return u?(o.test(c)&&this.warn(`--jit flag is present along side a tag. Ignoring tag ${f} and using the version specified in package.json (${u}).`),{name:a,tag:u}):(this.warn(`--jit flag is present but ${a} is not a JIT plugin. Installing ${f} instead.`),{name:a,tag:f})}return{name:a,tag:f}};if(t.startsWith("@")&&t.includes("/")){let{name:c,tag:o}=await n(t);return{name:c,tag:o,type:"npm"}}if(t.includes("/"))return t.includes(":")?{type:"repo",url:t}:{type:"repo",url:`https://github.com/${t}`};let{name:s,tag:r}=await n(t);return{name:s,tag:r,type:"npm"}}async run(){let{argv:e,flags:t}=await this.parse(i);this.flags=t;let n=new h({config:this.config,logLevel:O(this.config,this.flags,"notice")}),s=this.config.pjson.oclif.aliases||{},r=e.length;for(let c of e){if(s[c]===null&&this.error(`${c} is blocked`),c=s[c]||c,c===this.config.name){let a=this.config.binPath&&this.config.plugins.get("@oclif/plugin-update")?` Use "${this.config.bin} update" to update ${this.config.name}.`:"",u=`Ignoring top-level CLI plugin ${this.config.name}.${a}`;r===1?this.error(u):this.warn(u);continue}let o=await this.parsePlugin(n,c),l;await this.config.runHook("plugins:preinstall",{plugin:o});try{o.type==="npm"?(y.ux.action.start(`${this.config.name}: Installing plugin ${R(n.friendlyName(o.name)+"@"+o.tag)}`),l=await n.install(o.name,{force:t.force,tag:o.tag})):(y.ux.action.start(`${this.config.name}: Installing plugin ${R(o.url)}`),l=await n.install(o.url,{force:t.force}))}catch(a){throw y.ux.action.stop(E.red("failed")),a}let f=new y.Plugin(l);await f.load(),this.config.plugins.set(f.name,f),await this.config.runHook("plugins:postinstall",{}),y.ux.action.stop(`installed v${l.version}`)}}};function Ot(i){if(!(0,Re.default)(i).validForNewPackages)throw new y.Errors.CLIError("Invalid npm package name.")}g();var L=b(F(),1);var G=class i extends L.Command{static args={path:L.Args.string({default:".",description:"path to plugin",name:"path",required:!0})};static description=`Installation of a linked plugin will override a user-installed or core plugin.
|
|
16
|
+
|
|
17
|
+
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work.
|
|
18
|
+
`;static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %> '];static flags={help:L.Flags.help({char:"h"}),install:L.Flags.boolean({allowNo:!0,default:!0,description:"Install dependencies after linking the plugin."}),verbose:L.Flags.boolean({char:"v"})};static summary="Links a plugin into the CLI for development.";async run(){let{args:e,flags:t}=await this.parse(i),n=new h({config:this.config,logLevel:O(this.config,t,"silent")});L.ux.action.start(`${this.config.name}: Linking plugin ${R(e.path)}`),await n.link(e.path,{install:t.install}),L.ux.action.stop()}};g();var z=b(F(),1);import{rm as Et}from"node:fs/promises";import{join as pe}from"node:path";var H=class i extends z.Command{static flags={hard:z.Flags.boolean({summary:"Delete node_modules and package manager related files in addition to uninstalling plugins."}),reinstall:z.Flags.boolean({summary:"Reinstall all plugins after uninstalling."})};static summary="Remove all user-installed and linked plugins.";async run(){let{flags:e}=await this.parse(i),t=new h({config:this.config}),n=await t.list();this.log(`Found ${n.length} plugin${n.length===0?"":"s"}:`);for(let s of n)this.log(`- ${s.name} ${k(this.config.plugins.get(s.name)?.version??"")} ${k(`(${s.type})`)}`);if(e.hard){let s=[pe(this.config.dataDir,"node_modules"),pe(this.config.dataDir,"package.json"),pe(this.config.dataDir,"yarn.lock"),pe(this.config.dataDir,"package-lock.json")];this.log("\u2705 Removed the following files:");for(let r of s)this.log(`- ${r}`);await Promise.all(s.map(r=>Et(r,{force:!0,recursive:!0})));for(let r of n)this.log(`\u2705 ${r.type==="link"?"Unlinked":"Uninstalled"} ${r.name}`)}else for(let s of n)try{await t.uninstall(s.name),this.log(`\u2705 ${s.type==="link"?"Unlinked":"Uninstalled"} ${s.name}`)}catch{this.warn(`Failed to uninstall ${s.name}`)}if(e.reinstall){this.log("Reinstall flag passed:");for(let s of n){if(s.type==="link")try{let r=await t.link(s.root,{install:!1}),c=k(`-> ${r.version}`);this.log(`\u2705 Relinked ${s.name} ${c}`)}catch{this.warn(`Failed to relink ${s.name}`)}if(s.type==="user")try{let r=s.url?await t.install(s.url):await t.install(s.name,{tag:s.tag}),c=k(`-> ${r.version}`),o=s.tag?`@${s.tag}`:s.url?` (${s.url})`:"";this.log(`\u2705 Reinstalled ${s.name}${o} ${c}`)}catch{this.warn(`Failed to reinstall ${s.name}`)}}}}};g();var N=b(F(),1);function Te(i){if(i.includes("@")){let e=i.split("@");return!e.at(-1)?.includes("/")&&e.length>1&&e.pop(),e.join("@")}return i}var M=class i extends N.Command{static aliases=["plugins:unlink","plugins:remove"];static args={plugin:N.Args.string({description:"plugin to uninstall"})};static description="Removes a plugin from the CLI.";static examples=['<%= config.bin %> <%= command.id %> <%- config.pjson.oclif.examplePlugin || "myplugin" %>'];static flags={help:N.Flags.help({char:"h"}),verbose:N.Flags.boolean({char:"v"})};static strict=!1;async run(){let{argv:e,flags:t}=await this.parse(i),n=new h({config:this.config,logLevel:O(this.config,t,"silent")}),s=[];e.length===0&&e.push(".");for(let r of e){let c=Te(n.friendlyName(r)),o=await n.hasPlugin(Te(r));if(!o){let l=this.config.getPluginsList().find(f=>f.name===r);return l?.parent?this.error(`${c} is installed via plugin ${l.parent.name}, uninstall ${l.parent.name} instead`):this.error(`${c} is not installed`)}try{let{name:l}=o,f=c==="."?l:c??l;N.ux.action.start(`${this.config.name}: Uninstalling ${f}`),await n.uninstall(l),s.push(l)}catch(l){throw N.ux.action.stop(E.red("failed")),l}N.ux.action.stop()}for(let r of s)this.config.plugins.delete(r);await this.config.runHook("plugins:postuninstall",{})}};g();var S=b(F(),1);var Y=class i extends S.Command{static description="Update installed plugins.";static flags={help:S.Flags.help({char:"h"}),verbose:S.Flags.boolean({char:"v"})};async run(){let{flags:e}=await this.parse(i),t=new h({config:this.config,logLevel:O(this.config,e,"silent")});S.ux.action.start(`${this.config.name}: Updating plugins`),await t.update(),S.ux.action.stop()}};g();var _e=async function(){let i=new h({config:this.config});try{await i.update()}catch(e){e instanceof Error&&this.error(e.message)}};var ps={plugins:W,"plugins:inspect":q,"plugins:install":V,"plugins:link":G,"plugins:reset":H,"plugins:uninstall":M,"plugins:update":Y},ds={update:_e};export{ps as a,ds as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as k,b as N,c as w}from"./chunk-UYXEA3Y6.js";import{n as F}from"./chunk-XONFGLJQ.js";import{a as T,b as D}from"./chunk-XULPJ6UG.js";import{O as A,P,a as O}from"./chunk-6G6TMKXF.js";import{g as b}from"./chunk-M56NDIMD.js";import{Ia as _,La as U,Pa as I,Qb as u,Ua as p,xa as x,za as y}from"./chunk-N5PQPIBF.js";import{f as h}from"./chunk-YTNDFQJT.js";import{d as m,i as l,j as S}from"./chunk-IU2ZQ6TE.js";import{g as f}from"./chunk-VPRTJUIN.js";f();f();import{fileURLToPath as M}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as q,execFileSync as z}from"child_process";var v="2024.8.2",B=`https://github.com/cloudflare/cloudflared/releases/download/${v}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},$={linux:W,darwin:G,win32:V};function X(e=process.platform,t=process.arch){if(!Object.keys($).includes(e))throw new Error(`Unsupported system platform: ${e}`);let n=$[e][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(e=process.env,t=process.platform){return e.SHOPIFY_CLI_CLOUDFLARED_PATH?e.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(M(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(e=process.env,t=process.platform,r=process.arch){if(e.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,r),o=Z(e,t);if(p(o))try{let a=z(o,["--version"],{encoding:"utf8"}).split(" "),i=a.length>2?a[2]:"0.0.0";if(!J(v,i)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(e,t){let[r,n,o]=e.split(".").map(Number),[a,i,c]=t.split(".").map(Number);return r!==a?(r??0)>(a??0):n!==i?(n??0)>(i??0):(o??0)>(c??0)}async function K(e,t){await C(e,t),await I(t,"755")}async function Q(e,t){await C(e,t)}async function tt(e,t){await C(e,`${t}.tgz`);let r=S(`${t}.tgz`);q(`tar -xzf ${r}`,{cwd:l(t)}),_(`${t}.tgz`),await y(`${l(t)}/cloudflared`,t)}async function C(e,t){p(l(t))||x(l(t));let r=Y.promisify(j),n=await F(e,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${e} (${n.status} ${n.statusText})`);let o=U(t);return await r(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as rt}from"url";var kt=N({provider:w,action:st}),nt=h()?.2:40,ot=5;async function st(e){try{let t=new R(e);return await t.startTunnel(),T(t)}catch(t){let r=new k("unknown",t.message);return D(r)}}var R=class{constructor(t){this.provider=w,this.currentStatus={status:"not-started"},this.abortController=void 0,this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new O;let r=!1;if(t>=ot){r=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],a=!1,i;this.currentStatus={status:"starting"},setTimeout(()=>{if(!r){r=!0;let s=[...new Set(o)].slice(-5).join(`
|
|
2
|
+
`);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},nt*1e3);let c=this,E=new et({write(s,ft,H){if(u(s.toString()),r)return;i??(i=it(s)),ut(s)&&(a=!0),a&&(i?(r=!0,c.currentStatus={status:"connected",url:i}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=at(s);L&&o.push(L),H()}});A(ct(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(r)throw new b(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await P(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function it(e){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${dt()})`),r=e.toString().match(t)??void 0;return r&&r[1]}function at(e){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(e.toString())))return`Could not start Cloudflare tunnel: ${lt(e.toString())}`}function lt(e){let t=/^[0-9TZ:-]+ (ERR )?/g,r=/connIndex.*/g;return e.replace(t,"").replace(r,"")}function ut(e){let t=e.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function ct(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(rt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{kt as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as r}from"./chunk-XONFGLJQ.js";import{r as o}from"./chunk-LDGAHMS7.js";import{f as t,q as n}from"./chunk-IU2ZQ6TE.js";import{e as s,g as a}from"./chunk-VPRTJUIN.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{b as C}from"./chunk-MHWV5RQV.js";import{b as f}from"./chunk-XOTA6JTZ.js";import{A as S,u as i,y as x}from"./chunk-6G6TMKXF.js";import{d as v}from"./chunk-M56NDIMD.js";import{Qb as I}from"./chunk-N5PQPIBF.js";import{g as a}from"./chunk-VPRTJUIN.js";a();a();a();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};a();function p(o=W()){return!!o.get("autocorrectEnabled")}function y(o,n=W()){n.set("autocorrectEnabled",o)}function W(){return b??(b=new C({projectName:"did-you-mean"})),b}var b;var A,s=class extends f{async run(){y(!0),i({body:m.on})}};A=s;s.summary="Enable autocorrect. Off by default.";s.descriptionWithMarkdown=`Enable autocorrect. Off by default.
|
|
2
|
+
|
|
3
|
+
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
4
|
+
|
|
5
|
+
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
6
|
+
`;s.description=A.descriptionWithoutMarkdown();var E=s;a();var k,u=class extends f{async run(){y(!1),i({body:m.off})}};k=u;u.summary="Disable autocorrect. Off by default.";u.descriptionWithMarkdown=`Disable autocorrect. Off by default.
|
|
7
|
+
|
|
8
|
+
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
9
|
+
|
|
10
|
+
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
11
|
+
`;u.description=k.descriptionWithoutMarkdown();var D=u;a();var M,d=class extends f{async run(){p()?i({body:m.on}):i({body:m.off})}};M=d;d.summary="Check whether autocorrect is enabled or disabled. On by default.";d.descriptionWithMarkdown=`Check whether autocorrect is enabled or disabled. On by default.
|
|
12
|
+
|
|
13
|
+
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
14
|
+
|
|
15
|
+
When autocorrection is disabled, you need to confirm that you want to run corrections for mistyped commands.
|
|
16
|
+
`;d.description=M.descriptionWithoutMarkdown();var N=d;a();var g=O(2),ao=O(3);function O(o){if(typeof o!="number"||Number.isNaN(o)||o<1||o===Number.POSITIVE_INFINITY)throw new Error("`"+o+"` is not a valid argument for `n-gram`");return n;function n(t){let c=[];if(t==null)return c;let e=typeof t.slice=="function"?t:String(t),r=e.length-o+1;if(r<1)return c;for(;r--;)c[r]=e.slice(r,r+o);return c}}function h(o){return o.replace(/:/g," ")}function F(o,n){let t={};o.forEach(e=>{t[e]=t[e]?t[e]+1:1});let c=[];for(let e of n)e in t&&t[e]>0&&(c.push(e),t[e]=t[e]-1);return c.length}function L(o){if(o.id.length<2)return;let n=new Set(o.config.commands.filter(r=>r.hidden).map(r=>r.id)),t=Array.from(new Set([...o.config.commandIDs,...o.config.commands.flatMap(r=>r.aliases)].filter(r=>!n.has(r)))),c=g(o.id),e=t.map(r=>{let l=g(r);return{score:F(l,c),cmd:r}}).filter(({score:r})=>r>=2).sort((r,l)=>{let w=l.score-r.score;return w!==0?w:r.cmd.length-l.cmd.length});if(I(`'Did you mean' options: ${JSON.stringify(e)}`),e.length>0){let{cmd:r}=e[0];return r}}async function Y(o,n){return p()?(i({body:["Autocorrecting",{command:h(n)},"to",{command:h(o)},{char:"."}]}),!0):S({message:["Command",{command:n},"not found. Did you mean",{command:h(o)},{char:"?"}]})}var bo={"config:autocorrect:off":D,"config:autocorrect:status":N,"config:autocorrect:on":E},go=async function(o){let n=L(o),t=h(o.id);if(o.argv&&(o.argv.includes("-f")||o.argv.includes("--force"))||!n){x(new v(`Command '${t}' not found.`));return}await Y(n,t)&&await this.config.runCommand(n,o.argv)};export{L as a,Y as b,bo as c,go as d};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{b as f,e as c}from"./chunk-7ESSIN27.js";import{d as s}from"./chunk-M56NDIMD.js";import{$ as l,Ta as i,qa as m,wa as p}from"./chunk-N5PQPIBF.js";import{d as o}from"./chunk-IU2ZQ6TE.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function v(t,r){let n=t?.path??"",e=o(r,n);if(!await i(e))throw new s(`
|
|
2
|
+
The extension is not available for ${t?.value}`);return e}async function P({name:t,app:r}){let n=l(t),e=o(r.directory,c.extensions.directoryName,n);if(await i(e))throw new s(`
|
|
3
|
+
A directory with this name (${n}) already exists.
|
|
4
|
+
Choose a new name for your extension.`);return await p(e),await m(o(e,f.lockFile)),e}async function b({localApp:t,developerPlatformClient:r,apiKey:n,organizationId:e}){let{dashboardManagedExtensionRegistrations:h}=(await r.appExtensionRegistrations({id:n,apiKey:n,organizationId:e})).app;return h.length>0||t.allExtensions.filter(x=>x.isThemeExtension).length>0||t.allExtensions.length>0}export{v as a,P as b,b as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-NMBBTTIH.js";import{Fa as i}from"./chunk-XONFGLJQ.js";import{b as s}from"./chunk-XOTA6JTZ.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 k}from"./chunk-EKXY5COY.js";import{ua as b,va as c,xa as s}from"./chunk-XONFGLJQ.js";import{F as _}from"./chunk-6G6TMKXF.js";import{d as N}from"./chunk-M56NDIMD.js";import{Qb as E,T as D}from"./chunk-N5PQPIBF.js";import{g as l}from"./chunk-VPRTJUIN.js";l();var M=/gid:\/\/shopify\/\w*\/(\d+)/,T="development",W="live",Y="unpublished";function Z(e){return e.role===T}async function J(e){let i=await D("creative");return _({message:e,defaultValue:i})}function F(e){return`gid://shopify/OnlineStoreTheme/${e}`}function h(e){let i=M.exec(e);if(i&&i[1]!==void 0)return parseInt(i[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var S;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(S||(S={}));l();function y(e){if(!e)return;e.processing??(e.processing=!1),e.createdAtRuntime??(e.createdAtRuntime=!1);let{id:i,name:a,role:n,processing:d,createdAtRuntime:t}=e;return{id:i,name:a,processing:d,createdAtRuntime:t,role:n==="main"?"live":n}}function te(e){if(!e)return;let{key:i,checksum:a,attachment:n,value:d}=e,t={size:(d||n||"").length,mtime:Date.now()};return{key:i,checksum:a,attachment:n,value:d,stats:t}}l();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var w={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var $="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0};async function an(e,i){let a=F(e);s("theme-api:fetch-theme");try{let{theme:n}=await k({query:q,session:i,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(n)return y({id:h(n.id),processing:n.processing,role:n.role.toLowerCase(),name:n.name})}catch(n){c(n),E(`Error fetching theme with ID: ${e}`)}}async function tn(e){let i=[],a=null;for(s("theme-api:fetch-themes");;){let n=await k({query:L,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});n.themes||r("Failed to fetch themes");let{nodes:d,pageInfo:t}=n.themes;if(d.forEach(m=>{let o=y({id:h(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&i.push(o)}),!t.hasNextPage)return i;a=t.endCursor}}async function dn(e,i){s("theme-api:find-development-theme-by-name");let{themes:a}=await k({query:R,session:i,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw c(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:n,processing:d,role:t,name:m}=a.nodes[0];return y({id:h(n),processing:d,role:t.toLowerCase(),name:m})}}async function ln(e,i){let a=e.src??$;s("theme-api:create-theme");let{themeCreate:n}=await k({query:I,session:i,variables:{name:e.name??"",source:a,role:(e.role??T).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});n||r("Failed to create theme");let{theme:d,userErrors:t}=n;if(t.length){let m=n.userErrors.map(o=>o.message).join(", ");throw c(new N(m))}return d||r("Failed to create theme"),y({id:h(d.id),name:d.name,role:d.role.toLowerCase()})}async function mn(e,i,a){let n=[],d=null;for(s("theme-api:fetch-assets");;){let t=await k({query:A,session:a,variables:{id:g(e),filenames:i,after:d},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t.theme?.files?.nodes||!t.theme?.files?.pageInfo){let u=t.theme?.files?.userErrors.map(f=>f.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=t.theme.files;if(n.push(...await Promise.all(m.map(async u=>{let{attachment:f,value:v}=await X(u.body);return{attachment:f,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return n;d=o.endCursor}}async function on(e,i,a){let d=[];s("theme-api:delete-assets");for(let t=0;t<i.length;t+=50){let m=i.slice(t,t+50),{themeFilesDelete:o}=await k({query:P,session:a,variables:{themeId:F(e),files:m},preferredBehaviour:p});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:f}=o;u&&u.forEach(v=>{d.push({key:v.filename,success:!0,operation:S.Delete})}),f.length>0&&f.forEach(v=>{v.filename?(c(`Asset deletion failed for ${v.filename}: ${v.message}`),d.push({key:v.filename,success:!1,operation:S.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return d}async function rn(e,i,a){let n=[];s("theme-api:bulk-upload-assets");for(let d=0;d<i.length;d+=50){let t=i.slice(d,d+50),m=z(t);b("theme-api:upload-files");let o=await H(e,m,a);b("theme-api:upload-files"),n.push(...j(o))}return n}function z(e){return e.map(i=>i.attachment?{filename:i.key,body:{type:"BASE64",value:i.attachment}}:{filename:i.key,body:{type:"TEXT",value:i.value??""}})}async function H(e,i,a){return k({query:C,session:a,variables:{themeId:g(e),files:i},preferredBehaviour:p})}function j(e){let{themeFilesUpsert:i}=e;i||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:n}=i,d=[];return a?.forEach(t=>{d.push({key:t.filename,success:!0,operation:S.Upload})}),n.forEach(t=>{t.filename||r(`Error uploading theme files: ${t.message}`),c(`Asset upload failed for ${t.filename}: ${t.message}`),d.push({key:t.filename,success:!1,operation:S.Upload,errors:{asset:[t.message]}})}),d}async function sn(e,i){let a=[],n=null;for(s("theme-api:fetch-checksums");;){let d=await k({query:B,session:i,variables:{id:g(e),after:n},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d?.theme?.files?.nodes||!d?.theme?.files?.pageInfo){let o=d.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw c(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:t,pageInfo:m}=d.theme.files;if(a.push(...t.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;n=m.endCursor}}async function kn(e,i,a){let n=i.name,d={};n&&(d.name=n),s("theme-api:update-theme");let{themeUpdate:t}=await k({query:V,session:a,variables:{id:F(e),input:d},preferredBehaviour:p});t||r("Failed to update theme");let{theme:m,userErrors:o}=t;if(o.length){let u=t.userErrors.map(f=>f.message).join(", ");throw c(new N(u))}return m||r("Failed to update theme"),y({id:h(m.id),name:m.name,role:m.role.toLowerCase()})}async function un(e,i){s("theme-api:publish-theme");let{themePublish:a}=await k({query:O,session:i,variables:{id:F(e)},preferredBehaviour:p});a||r("Failed to update theme");let{theme:n,userErrors:d}=a;if(d.length){let t=a.userErrors.map(m=>m.message).join(", ");throw c(new N(t))}return n||r("Failed to update theme"),y({id:h(n.id),name:n.name,role:n.role.toLowerCase()})}async function cn(e,i){s("theme-api:delete-theme");let{themeDelete:a}=await k({query:w,session:i,variables:{id:F(e)},preferredBehaviour:p});a||r("Failed to update theme");let{deletedThemeId:n,userErrors:d}=a;if(d.length){let t=a.userErrors.map(m=>m.message).join(", ");throw c(new N(t))}return n||r("Failed to update theme"),!0}async function pn(e,i,a){let n;s("theme-api:duplicate-theme");let{themeDuplicate:d}=await k({query:x,session:a,variables:{id:F(e),name:i},preferredBehaviour:p,responseOptions:{onResponse:u=>{n=u.headers.get("x-request-id")??void 0}}});if(!d)return c("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:n};let{newTheme:t,userErrors:m}=d;return m.length>0?{theme:void 0,userErrors:m,requestId:n}:t?{theme:y({id:h(t.id),name:t.name,role:t.role.toLowerCase()}),userErrors:[],requestId:n}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:n}}async function vn(e,i){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await k({query:U,session:i,variables:{ownerType:e}});return a.nodes.map(n=>({key:n.key,namespace:n.namespace,name:n.name,description:n.description,type:{name:n.type.name,category:n.type.category}}))}async function Nn(e){s("theme-api:check-password-protection");let{onlineStore:i}=await k({query:G,session:e});i||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=i;return a.enabled}function r(e){throw c(new N(e))}function g(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function X(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw c(new N(`Error downloading content from URL: ${e.url}`))}}}export{te as a,T as b,W as c,Y as d,Z as e,J as f,an as g,tn as h,dn as i,ln as j,mn as k,on as l,rn as m,sn as n,kn as o,un as p,cn as q,pn as r,vn as s,Nn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as n,c as s,d as h}from"./chunk-XITQULK4.js";import{a as r}from"./chunk-SXTMSGUE.js";import{d as m}from"./chunk-M56NDIMD.js";import{g as o}from"./chunk-VPRTJUIN.js";o();var p=t=>`Development theme #${t} could not be found. Please create a new development theme.`,d="No development theme ID has been set. Please create a development theme first.",i=class extends r{constructor(e){super(e);this.context="Development";this.themeId=n()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?p(this.themeId):d);return e}setTheme(e){s(e)}removeTheme(){h()}};export{i as a};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{a as Eu,c as p,d as ne,e as pu,g as n}from"./chunk-VPRTJUIN.js";var Lu=p((Nr,uu)=>{n();uu.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&uu.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&uu.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Wu=p((_r,$)=>{n();var a=global.process,S=function(u){return u&&typeof u=="object"&&typeof u.removeListener=="function"&&typeof u.emit=="function"&&typeof u.reallyExit=="function"&&typeof u.listeners=="function"&&typeof u.kill=="function"&&typeof u.pid=="number"&&typeof u.on=="function"};S(a)?(ju=Eu("assert"),I=Lu(),Mu=/^win/i.test(a.platform),Y=Eu("events"),typeof Y!="function"&&(Y=Y.EventEmitter),a.__signal_exit_emitter__?d=a.__signal_exit_emitter__:(d=a.__signal_exit_emitter__=new Y,d.count=0,d.emitted={}),d.infinite||(d.setMaxListeners(1/0),d.infinite=!0),$.exports=function(u,D){if(!S(global.process))return function(){};ju.equal(typeof u,"function","a callback must be provided for exit handler"),_===!1&&du();var e="exit";D&&D.alwaysLast&&(e="afterexit");var t=function(){d.removeListener(e,u),d.listeners("exit").length===0&&d.listeners("afterexit").length===0&&Du()};return d.on(e,u),t},Du=function(){!_||!S(global.process)||(_=!1,I.forEach(function(D){try{a.removeListener(D,eu[D])}catch{}}),a.emit=tu,a.reallyExit=Bu,d.count-=1)},$.exports.unload=Du,v=function(D,e,t){d.emitted[D]||(d.emitted[D]=!0,d.emit(D,e,t))},eu={},I.forEach(function(u){eu[u]=function(){if(S(global.process)){var e=a.listeners(u);e.length===d.count&&(Du(),v("exit",null,u),v("afterexit",null,u),Mu&&u==="SIGHUP"&&(u="SIGINT"),a.kill(a.pid,u))}}}),$.exports.signals=function(){return I},_=!1,du=function(){_||!S(global.process)||(_=!0,d.count+=1,I=I.filter(function(D){try{return a.on(D,eu[D]),!0}catch{return!1}}),a.emit=Gu,a.reallyExit=ku)},$.exports.load=du,Bu=a.reallyExit,ku=function(D){S(global.process)&&(a.exitCode=D||0,v("exit",a.exitCode,null),v("afterexit",a.exitCode,null),Bu.call(a,a.exitCode))},tu=a.emit,Gu=function(D,e){if(D==="exit"&&S(global.process)){e!==void 0&&(a.exitCode=e);var t=tu.apply(this,arguments);return v("exit",a.exitCode,null),v("afterexit",a.exitCode,null),t}else return tu.apply(this,arguments)}):$.exports=function(){return function(){}};var ju,I,Mu,Y,d,Du,v,eu,_,du,Bu,ku,tu,Gu});var qu=p((Zr,Yu)=>{n();Yu.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var He=p((Lo,cD)=>{n();function Ke(u){var D=typeof u;return u!=null&&(D=="object"||D=="function")}cD.exports=Ke});var TD=p((fn,xD)=>{n();var Rt=typeof global=="object"&&global&&global.Object===Object&&global;xD.exports=Rt});var wD=p((pn,yD)=>{n();var Nt=TD(),It=typeof self=="object"&&self&&self.Object===Object&&self,_t=Nt||It||Function("return this")();yD.exports=_t});var vu=p((Bn,SD)=>{n();var $t=wD(),Lt=$t.Symbol;SD.exports=Lt});var ND=p((gn,RD)=>{n();var vD=vu(),OD=Object.prototype,jt=OD.hasOwnProperty,Mt=OD.toString,Z=vD?vD.toStringTag:void 0;function kt(u){var D=jt.call(u,Z),e=u[Z];try{u[Z]=void 0;var t=!0}catch{}var r=Mt.call(u);return t&&(D?u[Z]=e:delete u[Z]),r}RD.exports=kt});var _D=p((bn,ID)=>{n();var Gt=Object.prototype,Wt=Gt.toString;function Pt(u){return Wt.call(u)}ID.exports=Pt});var MD=p((xn,jD)=>{n();var $D=vu(),Ut=ND(),Vt=_D(),Yt="[object Null]",qt="[object Undefined]",LD=$D?$D.toStringTag:void 0;function Kt(u){return u==null?u===void 0?qt:Yt:LD&&LD in Object(u)?Ut(u):Vt(u)}jD.exports=Kt});var GD=p((yn,kD)=>{n();function Ht(u){return u!=null&&typeof u=="object"}kD.exports=Ht});var Zt=p((Sn,WD)=>{n();var zt=MD(),Jt=GD(),Xt="[object Symbol]";function Qt(u){return typeof u=="symbol"||Jt(u)&&zt(u)==Xt}WD.exports=Qt});var UD=p((On,Ou)=>{"use strict";n();var PD=(u,D)=>{for(let e of Reflect.ownKeys(D))Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(D,e));return u};Ou.exports=PD;Ou.exports.default=PD});var YD=p((Nn,Cu)=>{"use strict";n();var ur=UD(),cu=new WeakMap,VD=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let e,t=0,r=u.displayName||u.name||"<anonymous>",o=function(...F){if(cu.set(o,++t),t===1)e=u.apply(this,F),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return e};return ur(o,u),cu.set(o,t),o};Cu.exports=VD;Cu.exports.default=VD;Cu.exports.callCount=u=>{if(!cu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return cu.get(u)}});var XD=p((Xn,fr)=>{fr.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Er=p((Qn,_u)=>{"use strict";n();var QD=XD();_u.exports=QD;_u.exports.default=QD});var ue=p((uF,ZD)=>{"use strict";n();var pr=/[|\\{}()[\]^$+*?.-]/g;ZD.exports=u=>{if(typeof u!="string")throw new TypeError("Expected a string");return u.replace(pr,"\\$&")}});var br=p((eF,te)=>{"use strict";n();var dr=ue(),Br=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",ee=[].concat(Eu("module").builtinModules,"bootstrap_node","node").map(u=>new RegExp(`(?:\\((?:node:)?${u}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${u}(?:\\.js)?:\\d+:\\d+$)`));ee.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var $u=class u{constructor(D){D={ignoredPackages:[],...D},"internals"in D||(D.internals=u.nodeInternals()),"cwd"in D||(D.cwd=Br),this._cwd=D.cwd.replace(/\\/g,"/"),this._internals=[].concat(D.internals,hr(D.ignoredPackages)),this._wrapCallSite=D.wrapCallSite||!1}static nodeInternals(){return[...ee]}clean(D,e=0){e=" ".repeat(e),Array.isArray(D)||(D=D.split(`
|
|
2
|
+
`)),!/^\s*at /.test(D[0])&&/^\s*at /.test(D[1])&&(D=D.slice(1));let t=!1,r=null,o=[];return D.forEach(F=>{if(F=F.replace(/\\/g,"/"),this._internals.some(l=>l.test(F)))return;let i=/^\s*at /.test(F);t?F=F.trimEnd().replace(/^(\s+)at /,"$1"):(F=F.trim(),i&&(F=F.slice(3))),F=F.replace(`${this._cwd}/`,""),F&&(i?(r&&(o.push(r),r=null),o.push(F)):(t=!0,r=F))}),o.map(F=>`${e}${F}
|
|
3
|
+
`).join("")}captureString(D,e=this.captureString){typeof D=="function"&&(e=D,D=1/0);let{stackTraceLimit:t}=Error;D&&(Error.stackTraceLimit=D);let r={};Error.captureStackTrace(r,e);let{stack:o}=r;return Error.stackTraceLimit=t,this.clean(o)}capture(D,e=this.capture){typeof D=="function"&&(e=D,D=1/0);let{prepareStackTrace:t,stackTraceLimit:r}=Error;Error.prepareStackTrace=(i,l)=>this._wrapCallSite?l.map(this._wrapCallSite):l,D&&(Error.stackTraceLimit=D);let o={};Error.captureStackTrace(o,e);let{stack:F}=o;return Object.assign(Error,{prepareStackTrace:t,stackTraceLimit:r}),F}at(D=this.at){let[e]=this.capture(1,D);if(!e)return{};let t={line:e.getLineNumber(),column:e.getColumnNumber()};De(t,e.getFileName(),this._cwd),e.isConstructor()&&Object.defineProperty(t,"constructor",{value:!0,configurable:!0}),e.isEval()&&(t.evalOrigin=e.getEvalOrigin()),e.isNative()&&(t.native=!0);let r;try{r=e.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(t.type=r);let o=e.getFunctionName();o&&(t.function=o);let F=e.getMethodName();return F&&o!==F&&(t.method=F),t}parseLine(D){let e=D&&D.match(gr);if(!e)return null;let t=e[1]==="new",r=e[2],o=e[3],F=e[4],i=Number(e[5]),l=Number(e[6]),E=e[7],N=e[8],g=e[9],A=e[10]==="native",h=e[11]===")",m,B={};if(N&&(B.line=Number(N)),g&&(B.column=Number(g)),h&&E){let y=0;for(let w=E.length-1;w>0;w--)if(E.charAt(w)===")")y++;else if(E.charAt(w)==="("&&E.charAt(w-1)===" "&&(y--,y===-1&&E.charAt(w-1)===" ")){let oe=E.slice(0,w-1);E=E.slice(w+1),r+=` (${oe}`;break}}if(r){let y=r.match(mr);y&&(r=y[1],m=y[2])}return De(B,E,this._cwd),t&&Object.defineProperty(B,"constructor",{value:!0,configurable:!0}),o&&(B.evalOrigin=o,B.evalLine=i,B.evalColumn=l,B.evalFile=F&&F.replace(/\\/g,"/")),A&&(B.native=!0),r&&(B.function=r),m&&r!==m&&(B.method=m),B}};function De(u,D,e){D&&(D=D.replace(/\\/g,"/"),D.startsWith(`${e}/`)&&(D=D.slice(e.length+1)),u.file=D)}function hr(u){if(u.length===0)return[];let D=u.map(e=>dr(e));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${D.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var gr=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),mr=/^(.*?) \[as (.*?)\]$/;te.exports=$u});n();n();function U({onlyFirst:u=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,u?void 0:"g")}var Fe=U();function V(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Fe,"")}n();n();n();n();var ru=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],ou=[12288,12288,65281,65376,65504,65510],hu=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],gu=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],q=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];n();var nu=(u,D)=>{let e=0,t=Math.floor(u.length/2)-1;for(;e<=t;){let r=Math.floor((e+t)/2),o=r*2;if(D<u[o])t=r-1;else if(D>u[o+1])e=r+1;else return!0}return!1};var ie=ru[0],se=ru.at(-1),le=ou[0],ae=ou.at(-1),Pr=hu[0],Ur=hu.at(-1),Vr=gu[0],Yr=gu.at(-1),ce=q[0],Ce=q.at(-1),Pu=19968,[fe,Ee]=pe(q);function pe(u){let D=u[0],e=u[1];for(let t=0;t<u.length;t+=2){let r=u[t],o=u[t+1];if(Pu>=r&&Pu<=o)return[r,o];o-r>e-D&&(D=r,e=o)}return[D,e]}var Uu=u=>u<ie||u>se?!1:nu(ru,u),K=u=>u<le||u>ae?!1:nu(ou,u);var H=u=>u>=fe&&u<=Ee?!0:u<ce||u>Ce?!1:nu(q,u);function de(u){if(!Number.isSafeInteger(u))throw new TypeError(`Expected a code point, got \`${typeof u}\`.`)}function Vu(u,{ambiguousAsWide:D=!1}={}){return de(u),K(u)||H(u)||D&&Uu(u)?2:1}var Ku=pu(qu(),1),Be=new Intl.Segmenter,he=/^\p{Default_Ignorable_Code_Point}$/u;function O(u,D={}){if(typeof u!="string"||u.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=D;if(t||(u=V(u)),u.length===0)return 0;let r=0,o={ambiguousAsWide:!e};for(let{segment:F}of Be.segment(u)){let i=F.codePointAt(0);if(!(i<=31||i>=127&&i<=159)&&!(i>=8203&&i<=8207||i===65279)&&!(i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071)&&!(i>=55296&&i<=57343)&&!(i>=65024&&i<=65039)&&!he.test(F)){if((0,Ku.default)().test(F)){r+=2;continue}r+=Vu(i,o)}}return r}n();n();var Hu=(u=0)=>D=>`\x1B[${D+u}m`,zu=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,Ju=(u=0)=>(D,e,t)=>`\x1B[${38+u};2;${D};${e};${t}m`,c={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},oo=Object.keys(c.modifier),ge=Object.keys(c.color),me=Object.keys(c.bgColor),no=[...ge,...me];function be(){let u=new Map;for(let[D,e]of Object.entries(c)){for(let[t,r]of Object.entries(e))c[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[t]=c[t],u.set(r[0],r[1]);Object.defineProperty(c,D,{value:e,enumerable:!1})}return Object.defineProperty(c,"codes",{value:u,enumerable:!1}),c.color.close="\x1B[39m",c.bgColor.close="\x1B[49m",c.color.ansi=Hu(),c.color.ansi256=zu(),c.color.ansi16m=Ju(),c.bgColor.ansi=Hu(10),c.bgColor.ansi256=zu(10),c.bgColor.ansi16m=Ju(10),Object.defineProperties(c,{rgbToAnsi256:{value(D,e,t){return D===e&&e===t?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(D){let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!e)return[0,0,0];let[t]=e;t.length===3&&(t=[...t].map(o=>o+o).join(""));let r=Number.parseInt(t,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>c.rgbToAnsi256(...c.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value(D){if(D<8)return 30+D;if(D<16)return 90+(D-8);let e,t,r;if(D>=232)e=((D-232)*10+8)/255,t=e,r=e;else{D-=16;let i=D%36;e=Math.floor(D/36)/5,t=Math.floor(i/6)/5,r=i%6/5}let o=Math.max(e,t,r)*2;if(o===0)return 30;let F=30+(Math.round(r)<<2|Math.round(t)<<1|Math.round(e));return o===2&&(F+=60),F},enumerable:!1},rgbToAnsi:{value:(D,e,t)=>c.ansi256ToAnsi(c.rgbToAnsi256(D,e,t)),enumerable:!1},hexToAnsi:{value:D=>c.ansi256ToAnsi(c.hexToAnsi256(D)),enumerable:!1}}),c}var Ae=be(),x=Ae;var iu=new Set(["\x1B","\x9B"]),xe=39,bu="\x07",Zu="[",Te="]",uD="m",Fu=`${Te}8;;`,Xu=u=>`${iu.values().next().value}${Zu}${u}${uD}`,Qu=u=>`${iu.values().next().value}${Fu}${u}${bu}`,ye=u=>u.split(" ").map(D=>O(D)),mu=(u,D,e)=>{let t=[...D],r=!1,o=!1,F=O(V(u.at(-1)));for(let[i,l]of t.entries()){let E=O(l);if(F+E<=e?u[u.length-1]+=l:(u.push(l),F=0),iu.has(l)&&(r=!0,o=t.slice(i+1,i+1+Fu.length).join("")===Fu),r){o?l===bu&&(r=!1,o=!1):l===uD&&(r=!1);continue}F+=E,F===e&&i<t.length-1&&(u.push(""),F=0)}!F&&u.at(-1).length>0&&u.length>1&&(u[u.length-2]+=u.pop())},we=u=>{let D=u.split(" "),e=D.length;for(;e>0&&!(O(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},Se=(u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let t="",r,o,F=ye(u),i=[""];for(let[g,A]of u.split(" ").entries()){e.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let h=O(i.at(-1));if(g!==0&&(h>=D&&(e.wordWrap===!1||e.trim===!1)&&(i.push(""),h=0),(h>0||e.trim===!1)&&(i[i.length-1]+=" ",h++)),e.hard&&F[g]>D){let m=D-h,B=1+Math.floor((F[g]-m-1)/D);Math.floor((F[g]-1)/D)<B&&i.push(""),mu(i,A,D);continue}if(h+F[g]>D&&h>0&&F[g]>0){if(e.wordWrap===!1&&h<D){mu(i,A,D);continue}i.push("")}if(h+F[g]>D&&e.wordWrap===!1){mu(i,A,D);continue}i[i.length-1]+=A}e.trim!==!1&&(i=i.map(g=>we(g)));let l=i.join(`
|
|
4
|
+
`),E=[...l],N=0;for(let[g,A]of E.entries()){if(t+=A,iu.has(A)){let{groups:m}=new RegExp(`(?:\\${Zu}(?<code>\\d+)m|\\${Fu}(?<uri>.*)${bu})`).exec(l.slice(N))||{groups:{}};if(m.code!==void 0){let B=Number.parseFloat(m.code);r=B===xe?void 0:B}else m.uri!==void 0&&(o=m.uri.length===0?void 0:m.uri)}let h=x.codes.get(Number(r));E[g+1]===`
|
|
5
|
+
`?(o&&(t+=Qu("")),r&&h&&(t+=Xu(h))):A===`
|
|
6
|
+
`&&(r&&h&&(t+=Xu(r)),o&&(t+=Qu(o))),N+=A.length}return t};function ve(u,D,e){return String(u).normalize().replaceAll(`\r
|
|
7
|
+
`,`
|
|
8
|
+
`).split(`
|
|
9
|
+
`).map(t=>Se(t,D,e)).join(`
|
|
10
|
+
`)}n();var Oe=U();function Re(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return!u.includes("\x1B")&&!u.includes("\x9B")?u:u.replace(Oe,"")}n();n();var DD=(u=0)=>D=>`\x1B[${D+u}m`,eD=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,tD=(u=0)=>(D,e,t)=>`\x1B[${38+u};2;${D};${e};${t}m`,C={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Bo=Object.keys(C.modifier),Ne=Object.keys(C.color),Ie=Object.keys(C.bgColor),ho=[...Ne,...Ie];function _e(){let u=new Map;for(let[D,e]of Object.entries(C)){for(let[t,r]of Object.entries(e))C[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[t]=C[t],u.set(r[0],r[1]);Object.defineProperty(C,D,{value:e,enumerable:!1})}return Object.defineProperty(C,"codes",{value:u,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=DD(),C.color.ansi256=eD(),C.color.ansi16m=tD(),C.bgColor.ansi=DD(10),C.bgColor.ansi256=eD(10),C.bgColor.ansi16m=tD(10),Object.defineProperties(C,{rgbToAnsi256:{value(D,e,t){return D===e&&e===t?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(D){let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!e)return[0,0,0];let[t]=e;t.length===3&&(t=[...t].map(o=>o+o).join(""));let r=Number.parseInt(t,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>C.rgbToAnsi256(...C.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value(D){if(D<8)return 30+D;if(D<16)return 90+(D-8);let e,t,r;if(D>=232)e=((D-232)*10+8)/255,t=e,r=e;else{D-=16;let i=D%36;e=Math.floor(D/36)/5,t=Math.floor(i/6)/5,r=i%6/5}let o=Math.max(e,t,r)*2;if(o===0)return 30;let F=30+(Math.round(r)<<2|Math.round(t)<<1|Math.round(e));return o===2&&(F+=60),F},enumerable:!1},rgbToAnsi:{value:(D,e,t)=>C.ansi256ToAnsi(C.rgbToAnsi256(D,e,t)),enumerable:!1},hexToAnsi:{value:D=>C.ansi256ToAnsi(C.hexToAnsi256(D)),enumerable:!1}}),C}var $e=_e(),T=$e;n();import Au from"node:process";import Le from"node:os";import rD from"node:tty";function b(u,D=globalThis.Deno?globalThis.Deno.args:Au.argv){let e=u.startsWith("-")?"":u.length===1?"-":"--",t=D.indexOf(e+u),r=D.indexOf("--");return t!==-1&&(r===-1||t<r)}var{env:f}=Au,su;b("no-color")||b("no-colors")||b("color=false")||b("color=never")?su=0:(b("color")||b("colors")||b("color=true")||b("color=always"))&&(su=1);function je(){if("FORCE_COLOR"in f)return f.FORCE_COLOR==="true"?1:f.FORCE_COLOR==="false"?0:f.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(f.FORCE_COLOR,10),3)}function Me(u){return u===0?!1:{level:u,hasBasic:!0,has256:u>=2,has16m:u>=3}}function ke(u,{streamIsTTY:D,sniffFlags:e=!0}={}){let t=je();t!==void 0&&(su=t);let r=e?su:t;if(r===0)return 0;if(e){if(b("color=16m")||b("color=full")||b("color=truecolor"))return 3;if(b("color=256"))return 2}if("TF_BUILD"in f&&"AGENT_NAME"in f)return 1;if(u&&!D&&r===void 0)return 0;let o=r||0;if(f.TERM==="dumb")return o;if(Au.platform==="win32"){let F=Le.release().split(".");return Number(F[0])>=10&&Number(F[2])>=10586?Number(F[2])>=14931?3:2:1}if("CI"in f)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(F=>F in f)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(F=>F in f)||f.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in f)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(f.TEAMCITY_VERSION)?1:0;if(f.COLORTERM==="truecolor"||f.TERM==="xterm-kitty"||f.TERM==="xterm-ghostty"||f.TERM==="wezterm")return 3;if("TERM_PROGRAM"in f){let F=Number.parseInt((f.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(f.TERM_PROGRAM){case"iTerm.app":return F>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(f.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(f.TERM)||"COLORTERM"in f?1:o}function oD(u,D={}){let e=ke(u,{streamIsTTY:u&&u.isTTY,...D});return Me(e)}var Ge={stdout:oD({isTTY:rD.isatty(1)}),stderr:oD({isTTY:rD.isatty(2)})},nD=Ge;n();function FD(u,D,e){let t=u.indexOf(D);if(t===-1)return u;let r=D.length,o=0,F="";do F+=u.slice(o,t)+D+e,o=t+r,t=u.indexOf(D,o);while(t!==-1);return F+=u.slice(o),F}function iD(u,D,e,t){let r=0,o="";do{let F=u[t-1]==="\r";o+=u.slice(r,F?t-1:t)+D+(F?`\r
|
|
11
|
+
`:`
|
|
12
|
+
`)+e,r=t+1,t=u.indexOf(`
|
|
13
|
+
`,r)}while(t!==-1);return o+=u.slice(r),o}var{stdout:sD,stderr:lD}=nD,xu=Symbol("GENERATOR"),L=Symbol("STYLER"),z=Symbol("IS_EMPTY"),aD=["ansi","ansi","ansi256","ansi16m"],j=Object.create(null),We=(u,D={})=>{if(D.level&&!(Number.isInteger(D.level)&&D.level>=0&&D.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let e=sD?sD.level:0;u.level=D.level===void 0?e:D.level};var Pe=u=>{let D=(...e)=>e.join(" ");return We(D,u),Object.setPrototypeOf(D,J.prototype),D};function J(u){return Pe(u)}Object.setPrototypeOf(J.prototype,Function.prototype);for(let[u,D]of Object.entries(T))j[u]={get(){let e=lu(this,yu(D.open,D.close,this[L]),this[z]);return Object.defineProperty(this,u,{value:e}),e}};j.visible={get(){let u=lu(this,this[L],!0);return Object.defineProperty(this,"visible",{value:u}),u}};var Tu=(u,D,e,...t)=>u==="rgb"?D==="ansi16m"?T[e].ansi16m(...t):D==="ansi256"?T[e].ansi256(T.rgbToAnsi256(...t)):T[e].ansi(T.rgbToAnsi(...t)):u==="hex"?Tu("rgb",D,e,...T.hexToRgb(...t)):T[e][u](...t),Ue=["rgb","hex","ansi256"];for(let u of Ue){j[u]={get(){let{level:e}=this;return function(...t){let r=yu(Tu(u,aD[e],"color",...t),T.color.close,this[L]);return lu(this,r,this[z])}}};let D="bg"+u[0].toUpperCase()+u.slice(1);j[D]={get(){let{level:e}=this;return function(...t){let r=yu(Tu(u,aD[e],"bgColor",...t),T.bgColor.close,this[L]);return lu(this,r,this[z])}}}}var Ve=Object.defineProperties(()=>{},{...j,level:{enumerable:!0,get(){return this[xu].level},set(u){this[xu].level=u}}}),yu=(u,D,e)=>{let t,r;return e===void 0?(t=u,r=D):(t=e.openAll+u,r=D+e.closeAll),{open:u,close:D,openAll:t,closeAll:r,parent:e}},lu=(u,D,e)=>{let t=(...r)=>Ye(t,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(t,Ve),t[xu]=u,t[L]=D,t[z]=e,t},Ye=(u,D)=>{if(u.level<=0||!D)return u[z]?"":D;let e=u[L];if(e===void 0)return D;let{openAll:t,closeAll:r}=e;if(D.includes("\x1B"))for(;e!==void 0;)D=FD(D,e.close,e.open),e=e.parent;let o=D.indexOf(`
|
|
14
|
+
`);return o!==-1&&(D=iD(D,r,t,o)),t+D+r};Object.defineProperties(J.prototype,j);var qe=J(),No=J({level:lD?lD.level:0});var Io=qe;var mD={};ne(mD,{ConEmu:()=>gD,beep:()=>xt,beginSynchronizedOutput:()=>dD,clearScreen:()=>dt,clearTerminal:()=>gt,clearViewport:()=>Bt,cursorBackward:()=>et,cursorDown:()=>ut,cursorForward:()=>Dt,cursorGetPosition:()=>ot,cursorHide:()=>it,cursorLeft:()=>ED,cursorMove:()=>Ze,cursorNextLine:()=>nt,cursorPrevLine:()=>Ft,cursorRestorePosition:()=>rt,cursorSavePosition:()=>tt,cursorShow:()=>st,cursorTo:()=>Qe,cursorUp:()=>fD,endSynchronizedOutput:()=>BD,enterAlternativeScreen:()=>mt,eraseDown:()=>Ct,eraseEndLine:()=>at,eraseLine:()=>pD,eraseLines:()=>lt,eraseScreen:()=>au,eraseStartLine:()=>ct,eraseUp:()=>ft,exitAlternativeScreen:()=>bt,iTerm:()=>hD,image:()=>yt,link:()=>Tt,scrollDown:()=>pt,scrollUp:()=>Et,setCwd:()=>wt,synchronizedOutput:()=>At});n();import k from"node:process";import ze from"node:os";n();var M=globalThis.window?.document!==void 0,Mo=globalThis.process?.versions?.node!==void 0,ko=globalThis.process?.versions?.bun!==void 0,Go=globalThis.Deno?.version?.deno!==void 0,Wo=globalThis.process?.versions?.electron!==void 0,Po=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Uo=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Vo=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Yo=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,qo=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,X=globalThis.navigator?.userAgentData?.platform,Ko=X==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Ho=X==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",zo=X==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Jo=X==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Xo=X==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var s="\x1B[",G="\x1B]",R="\x07",Q=";",CD=!M&&k.env.TERM_PROGRAM==="Apple_Terminal",Je=!M&&k.platform==="win32",Xe=!M&&(k.env.TERM?.startsWith("screen")||k.env.TERM?.startsWith("tmux")||k.env.TMUX!==void 0),wu=M?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:k.cwd,W=u=>Xe?"\x1BPtmux;"+u.replaceAll("\x1B","\x1B\x1B")+"\x1B\\":u,Qe=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");return typeof D!="number"?s+(u+1)+"G":s+(D+1)+Q+(u+1)+"H"},Ze=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");let e="";return u<0?e+=s+-u+"D":u>0&&(e+=s+u+"C"),D<0?e+=s+-D+"A":D>0&&(e+=s+D+"B"),e},fD=(u=1)=>s+u+"A",ut=(u=1)=>s+u+"B",Dt=(u=1)=>s+u+"C",et=(u=1)=>s+u+"D",ED=s+"G",tt=CD?"\x1B7":s+"s",rt=CD?"\x1B8":s+"u",ot=s+"6n",nt=s+"E",Ft=s+"F",it=s+"?25l",st=s+"?25h",lt=u=>{let D="";for(let e=0;e<u;e++)D+=pD+(e<u-1?fD():"");return u&&(D+=ED),D},at=s+"K",ct=s+"1K",pD=s+"2K",Ct=s+"J",ft=s+"1J",au=s+"2J",Et=s+"S",pt=s+"T",dt="\x1Bc",Bt=`${au}${s}H`,ht=()=>{if(M||!Je)return!1;let u=ze.release().split("."),D=Number(u[0]),e=Number(u[2]??0);return D<10||D===10&&e<10586},gt=ht()?`${au}${s}0f`:`${au}${s}3J${s}H`,mt=s+"?1049h",bt=s+"?1049l",dD=s+"?2026h",BD=s+"?2026l",At=u=>dD+u+BD,xt=R,Tt=(u,D)=>{let e=W(`${G}8${Q}${Q}${D}${R}`),t=W(`${G}8${Q}${Q}${R}`);return e+u+t},yt=(u,D={})=>{let e=`${G}1337;File=inline=1`;D.width&&(e+=`;width=${D.width}`),D.height&&(e+=`;height=${D.height}`),D.preserveAspectRatio===!1&&(e+=";preserveAspectRatio=0");let t=Buffer.from(u);return W(e+`;size=${t.byteLength}:`+t.toString("base64")+R)},hD={setCwd:(u=wu())=>W(`${G}50;CurrentDir=${u}${R}`),annotation(u,D={}){let e=`${G}1337;`,t=D.x!==void 0,r=D.y!==void 0;if((t||r)&&!(t&&r&&D.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return u=u.replaceAll("|",""),e+=D.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",D.length>0?e+=(t?[u,D.length,D.x,D.y]:[D.length,u]).join("|"):e+=u,W(e+R)}},gD={setCwd:(u=wu())=>W(`${G}9;9;${u}${R}`)},wt=(u=wu())=>hD.setCwd(u)+gD.setCwd(u);n();n();var St=u=>{let D=new Set;do for(let e of Reflect.ownKeys(u))D.add([u,e]);while((u=Reflect.getPrototypeOf(u))&&u!==Object.prototype);return D};function vt(u,{include:D,exclude:e}={}){let t=r=>{let o=F=>typeof F=="string"?r===F:F.test(r);return D?D.some(o):e?!e.some(o):!0};for(let[r,o]of St(u.constructor.prototype)){if(o==="constructor"||!t(o))continue;let F=Reflect.getOwnPropertyDescriptor(r,o);F&&typeof F.value=="function"&&(u[o]=u[o].bind(u))}return u}n();import{PassThrough as bD}from"node:stream";var AD=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],Su={},Ot=u=>{let D=new bD,e=new bD;D.write=r=>{u("stdout",r)},e.write=r=>{u("stderr",r)};let t=new console.Console(D,e);for(let r of AD)Su[r]=console[r],console[r]=t[r];return()=>{for(let r of AD)console[r]=Su[r];Su={}}},an=Ot;n();import zD from"node:process";n();var qD=pu(YD(),1),KD=pu(Wu(),1);import Dr from"node:process";var er=(0,qD.default)(()=>{(0,KD.default)(()=>{Dr.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),HD=er;var fu=!1,P={};P.show=(u=zD.stderr)=>{u.isTTY&&(fu=!1,u.write("\x1B[?25h"))};P.hide=(u=zD.stderr)=>{u.isTTY&&(HD(),fu=!0,u.write("\x1B[?25l"))};P.toggle=(u,D)=>{u!==void 0&&(fu=u),fu?P.show(D):P.hide(D)};var kn=P;n();function tr(u,D=1,e={}){let{indent:t=" ",includeEmptyLines:r=!1}=e;if(typeof u!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof u}\``);if(typeof D!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof D}\``);if(D<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${D}\``);if(typeof t!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t}\``);if(D===0)return u;let o=r?/^/gm:/^(?!\s*$)/gm;return u.replace(o,t.repeat(D))}n();function Ru(u){return Number.isInteger(u)?K(u)||H(u):!1}n();var rr=new Set([27,155]),or="0".codePointAt(0),nr="9".codePointAt(0),Fr=19,Iu=new Set,Nu=new Map;for(let[u,D]of x.codes)Iu.add(x.color.ansi(D)),Nu.set(x.color.ansi(u),x.color.ansi(D));function ir(u){if(Iu.has(u))return u;if(Nu.has(u))return Nu.get(u);u=u.slice(2),u.includes(";")&&(u=u[0]+"0");let D=x.codes.get(Number.parseInt(u,10));return D?x.color.ansi(D):x.reset.open}function sr(u){for(let D=0;D<u.length;D++){let e=u.codePointAt(D);if(e>=or&&e<=nr)return D}return-1}function lr(u,D){u=u.slice(D,D+Fr);let e=sr(u);if(e!==-1){let t=u.indexOf("m",e);return t===-1&&(t=u.length),u.slice(0,t+1)}}function ar(u,D=Number.POSITIVE_INFINITY){let e=[],t=0,r=0;for(;t<u.length;){let o=u.codePointAt(t);if(rr.has(o)){let l=lr(u,t);if(l){e.push({type:"ansi",code:l,endCode:ir(l)}),t+=l.length;continue}}let F=Ru(o),i=String.fromCodePoint(o);if(e.push({type:"character",value:i,isFullWidth:F}),t+=i.length,r+=F?2:i.length,r>=D)break}return e}function JD(u){let D=[];for(let e of u)e.code===x.reset.open?D=[]:Iu.has(e.code)?D=D.filter(t=>t.endCode!==e.code):(D=D.filter(t=>t.endCode!==e.endCode),D.push(e));return D}function cr(u){return JD(u).map(({endCode:t})=>t).reverse().join("")}function Cr(u,D,e){let t=ar(u,e),r=[],o=0,F="",i=!1;for(let l of t){if(e!==void 0&&o>=e)break;l.type==="ansi"?(r.push(l),i&&(F+=l.code)):(!i&&o>=D&&(i=!0,r=JD(r),F=r.map(({code:E})=>E).join("")),i&&(F+=l.value),o+=l.isFullWidth?2:l.value.length)}return F+=cr(r),F}n();n();var Ar=(u,D=2)=>u.replace(/^\t+/gm,e=>" ".repeat(e.length*D)),re=Ar;var xr=(u,D)=>{let e=[],t=u-D,r=u+D;for(let o=t;o<=r;o++)e.push(o);return e},Tr=(u,D,e={})=>{var t;if(typeof u!="string")throw new TypeError("Source code is missing.");if(!D||D<1)throw new TypeError("Line number must start from `1`.");let r=re(u).split(/\r?\n/);if(!(D>r.length))return xr(D,(t=e.around)!==null&&t!==void 0?t:3).filter(o=>r[o-1]!==void 0).map(o=>({line:o,value:r[o-1]}))},FF=Tr;export{TD as a,wD as b,vu as c,MD as d,He as e,GD as f,Zt as g,mD as h,vt as i,Wu as j,an as k,V as l,Vu as m,O as n,x as o,ve as p,Re as q,Ru as r,Cr as s,tr as t,Er as u,Io as v,kn as w,br as x,FF as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l,ga as o,ha as h,ia as c,v as s,w as q,z as f}from"./chunk-XONFGLJQ.js";import{b as g}from"./chunk-4LNCYIS3.js";import{b as m}from"./chunk-ZSBA6VIC.js";import{e as i,g as a}from"./chunk-VPRTJUIN.js";a();var y=i(c()),x=new y.default({minTime:150,maxConcurrent:10});async function v(e){let n="App Management",r=`https://${await s()}/app_management/unstable/graphql.json`;return{token:e,api:n,url:r,responseOptions:{onResponse:d}}}var A=e=>l(e),T=async(e,n,t)=>{let u=`https://${await s()}/app_management/unstable/organizations/${e}/app_logs/poll`;return h(u,n,t)};async function U(e){let n=e.cacheOptions?.cacheExtraKey??"",t=e.cacheOptions?{...e.cacheOptions,cacheExtraKey:n}:void 0;return x.schedule(async()=>o({...await v(e.token),query:e.query,variables:e.variables,cacheOptions:t,preferredBehaviour:e.requestOptions?.requestMode,unauthorizedHandler:e.unauthorizedHandler}))}function d(e){if(!e.extensions)return;let n=[];for(let t of e.extensions.deprecations)t.supportedUntilDate&&n.push(new Date(t.supportedUntilDate));g(n)}a();var D=i(c()),z=new D.default({minTime:150,maxConcurrent:10});async function L(e){let n="App Dev",t=f(e.shopFqdn),u=`https://${await q(t)}/app_dev/unstable/graphql.json`,p=m()==="local"?{"x-forwarded-host":t}:void 0;return z.schedule(()=>o({query:e.query,api:n,url:u,token:e.token,addedHeaders:p,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler,preferredBehaviour:e.requestOptions?.requestMode}))}a();var b=i(c()),k=new b.default({minTime:150,maxConcurrent:10});async function R(e,n,t){let r="Functions",p=`https://${await s()}/functions/unstable/organizations/${e}/${t}/graphql`;return{token:n,api:r,url:p,responseOptions:{onResponse:d}}}async function P(e){return await k.schedule(async()=>o({...await R(e.organizationId,e.token,e.appId),query:e.query,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}a();var w=i(c()),H=new w.default({minTime:150,maxConcurrent:10});async function Z(e){let n="Webhooks",r=`https://${await s()}/webhooks/unstable/organizations/${e.organizationId}/graphql.json`;return H.schedule(()=>o({query:e.query,api:n,url:r,token:e.token,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}export{A as a,T as b,U as c,L as d,P as e,Z as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as i,c,d as f}from"./chunk-JAO53IH2.js";import{b as w}from"./chunk-XITQULK4.js";import{d as s,f as d,j as S}from"./chunk-CBXSPL4W.js";import{B as h}from"./chunk-6G6TMKXF.js";import{d as u}from"./chunk-M56NDIMD.js";import{U as a}from"./chunk-N5PQPIBF.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 @@
|
|
|
1
|
+
import{d as o}from"./chunk-XR6GMMEU.js";import{b as s}from"./chunk-XOTA6JTZ.js";import{g as e}from"./chunk-VPRTJUIN.js";e();var t=class extends s{static{this.description="Clear the CLI cache, used to store some API responses and handle notifications status"}static{this.hidden=!0}async run(){await o()}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as R}from"./chunk-XONFGLJQ.js";import{a as T,b as k}from"./chunk-XULPJ6UG.js";import{f as G}from"./chunk-WSDN25F5.js";import{d as l}from"./chunk-M56NDIMD.js";import{Gb as u,Ib as h,Oa as y,Pa as x,Qb as f,ka as $,ua as b,wa as g}from"./chunk-N5PQPIBF.js";import{d,i as w}from"./chunk-IU2ZQ6TE.js";import{g as m}from"./chunk-VPRTJUIN.js";m();function U(a){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(a);if(!t){let v=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return k(new Error(`Parsing the url ${a} failed. Supported formats are ${v.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",r=e==="github"?"github.com":e,s=t[4],i=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),o=t[7],p=o?`#${o}`:"",c=`git@${r}:${s}/${i}`,H=`https://${r}/${s}/${i}`,P=["https:/",r,s,i,n].join("/").concat(p);return T({full:P,site:r,user:s,name:i,ref:o,subDirectory:n,ssh:c,http:H})}function A(a){let t=new URL(a),e=t.hash?t.hash.slice(1):void 0,[r,s,i,...n]=t.pathname.split("/"),o=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${s}/${i}`,branch:e,filePath:o}}async function B(a,t,e,r){let s=`https://github.com/${a}/releases/download/${t}/${e}`;return G("cmd_all_timing_network_ms")(async()=>{f(h`Downloading ${u.link(e,s)}`),await $(async i=>{let n=d(i,e),o;try{if(o=await R(s,void 0,"slow-request"),!o.ok)throw new l(`Failed to download ${e}: ${o.statusText}`)}catch(c){throw new l(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let p=await o.arrayBuffer();await b(n,Buffer.from(p)),await x(n,493),await g(w(r)),await y(n,r)}),f(h`${u.successIcon()} Successfully downloaded ${u.path(r)}`)})}export{U as a,A as b,B as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as f,fa as v,ga as A,h as d,k as w,s as m}from"./chunk-XONFGLJQ.js";import{b as l}from"./chunk-ZSBA6VIC.js";import{d as p,g as F}from"./chunk-M56NDIMD.js";import{Gb as g,Ib as h}from"./chunk-N5PQPIBF.js";import{j as q}from"./chunk-ULQG3XQS.js";import{g as c}from"./chunk-VPRTJUIN.js";c();c();var V={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e){let o="Admin",a=await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,a,r);return v({query:t,api:o,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:n,preferredBehaviour:s}=t,i=a??S.get(e.storeFqdn);i??(i=await b(e,s));let u=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=u,u=new m().host("app"));let D={url:x(u,i,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:n,unauthorizedHandler:y,preferredBehaviour:s})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:V,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${g.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as m}from"./chunk-MHWV5RQV.js";import{Ib as t,Qb as o}from"./chunk-N5PQPIBF.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VPRTJUIN.js";I();var o="4.1.0";export{o as a};
|