shopify 3.94.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +5 -1
- package/dist/analytics-6IHHYAV6.js +1 -0
- package/dist/analytics-KKVP5DT3.js +1 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chunk-22PCRFG4.js +1 -0
- package/dist/chunk-26D72ZNV.js +1 -0
- package/dist/chunk-2APPXD5Z.js +2 -0
- package/dist/chunk-2I4PRX2I.js +1 -0
- package/dist/chunk-2VQJQ36C.js +103 -0
- package/dist/chunk-323UTVMM.js +1 -0
- package/dist/chunk-3DQIVE24.js +9 -0
- package/dist/chunk-3F6NZK7S.js +2 -0
- package/dist/chunk-3LVGAQB4.js +1 -0
- package/dist/chunk-3TNEIDOD.js +1 -0
- package/dist/chunk-3VZEETAV.js +1 -0
- package/dist/chunk-4G7J6HIV.js +1 -0
- package/dist/chunk-4HHXSMD7.js +10 -0
- package/dist/chunk-4LNCYIS3.js +1 -0
- package/dist/chunk-4ZGSSQC6.js +1 -0
- package/dist/chunk-52GC6XUT.js +1 -0
- package/dist/chunk-5CH3B62S.js +2 -0
- package/dist/chunk-5Y7GIF2W.js +1 -0
- package/dist/chunk-66RJ5T7A.js +102 -0
- package/dist/chunk-6B53BWJW.js +1 -0
- package/dist/chunk-6BMMB2UO.js +1 -0
- package/dist/chunk-6HBRBQAN.js +6 -0
- package/dist/chunk-6M3ZYNGO.js +451 -0
- package/dist/chunk-6TZAAS5H.js +1 -0
- package/dist/chunk-72F3YBNA.js +1 -0
- package/dist/chunk-74HYYXXE.js +17 -0
- package/dist/chunk-75VPUOC5.js +1 -0
- package/dist/chunk-7BGM2GAH.js +1 -0
- package/dist/chunk-7UYZQN4V.js +18 -0
- package/dist/chunk-A74GETYC.js +1 -0
- package/dist/chunk-AIV5RI3X.js +1 -0
- package/dist/chunk-ALKTLKQ6.js +5 -0
- package/dist/chunk-B2EHO7ZC.js +847 -0
- package/dist/chunk-B2IVY4V5.js +1 -0
- package/dist/chunk-BDVAE5MS.js +28 -0
- package/dist/chunk-CERXUPGC.js +14 -0
- package/dist/chunk-D3TSJA5S.js +1 -0
- package/dist/chunk-D6JARNEH.js +1 -0
- package/dist/chunk-DFMQWJQ3.js +3 -0
- package/dist/chunk-DJONKJSZ.js +1 -0
- package/dist/chunk-DJQVNH7P.js +567 -0
- package/dist/chunk-DU4WR4OP.js +1 -0
- package/dist/chunk-ELVFJ7BR.js +4 -0
- package/dist/chunk-ELYP4KFP.js +8 -0
- package/dist/chunk-FFQ5EWII.js +294 -0
- package/dist/chunk-FUOIGXI4.js +1 -0
- package/dist/chunk-GD7FWXJ5.js +2 -0
- package/dist/chunk-GFEAKSGV.js +374 -0
- package/dist/chunk-GFJ7UV74.js +1 -0
- package/dist/chunk-GNPS5SBU.js +1 -0
- package/dist/chunk-GOJ2QHSR.js +1 -0
- package/dist/chunk-HSK7YMRE.js +359 -0
- package/dist/chunk-HUZUORYM.js +19 -0
- package/dist/chunk-HZA6IAA4.js +1 -0
- package/dist/chunk-IASVAERO.js +1 -0
- package/dist/chunk-IIIVWD4R.js +1 -0
- package/dist/chunk-INEU4XKS.js +6 -0
- package/dist/chunk-IOLVEXM6.js +1 -0
- package/dist/chunk-IU2ZQ6TE.js +2 -0
- package/dist/chunk-IX5ICOBV.js +7 -0
- package/dist/chunk-J3KVONB3.js +6 -0
- package/dist/chunk-JGXWQULI.js +1 -0
- package/dist/chunk-JHPRFW5B.js +19 -0
- package/dist/chunk-JLBH7RCF.js +4 -0
- package/dist/chunk-JPGO36XP.js +1 -0
- package/dist/chunk-JUVAGMIH.js +1 -0
- package/dist/chunk-JVIKCGDY.js +1 -0
- package/dist/chunk-K2WUCOQJ.js +32 -0
- package/dist/chunk-K5YV6UVF.js +4 -0
- package/dist/chunk-KBQ4LGFB.js +1 -0
- package/dist/chunk-KGXQS7LS.js +1 -0
- package/dist/chunk-KL5Z3T6L.js +1 -0
- package/dist/chunk-KLMDWDT2.js +1 -0
- package/dist/chunk-KNVM7N3U.js +1 -0
- package/dist/chunk-KWJ562F2.js +12 -0
- package/dist/chunk-LALIKZPS.js +5 -0
- package/dist/chunk-LAZJ47DZ.js +6 -0
- package/dist/chunk-LDGAHMS7.js +159 -0
- package/dist/chunk-LNHLDRC5.js +1 -0
- package/dist/chunk-LW7U753G.js +1 -0
- package/dist/chunk-LX3ZOW52.js +12 -0
- package/dist/chunk-LXFJDCNG.js +1 -0
- package/dist/chunk-MBAFWQSZ.js +7 -0
- package/dist/chunk-MOA33ZFO.js +1 -0
- package/dist/chunk-MQNYGGAM.js +1 -0
- package/dist/chunk-N5YIPQ6J.js +1 -0
- package/dist/chunk-N7RBSKYT.js +1 -0
- package/dist/chunk-NF2ABOOU.js +1 -0
- package/dist/chunk-NRAFVIU3.js +1 -0
- package/dist/chunk-OCOY5MV2.js +1 -0
- package/dist/chunk-ODNGDO4H.js +50 -0
- package/dist/chunk-OHY4ZL3U.js +2 -0
- package/dist/chunk-OLZHWPZP.js +1 -0
- package/dist/chunk-OUOYKNMY.js +1 -0
- package/dist/chunk-OXPWCC7I.js +64 -0
- package/dist/chunk-P5VVOLGV.js +1 -0
- package/dist/chunk-P6XE4MH5.js +1 -0
- package/dist/chunk-P7R7FBY2.js +3 -0
- package/dist/chunk-PD5ZHJWI.js +1 -0
- package/dist/chunk-PIBY5DDZ.js +1 -0
- package/dist/chunk-Q7ING5F5.js +1 -0
- package/dist/chunk-QFWIDATO.js +1 -0
- package/dist/chunk-QRRNOVJ3.js +1 -0
- package/dist/chunk-QSTEVZFQ.js +1 -0
- package/dist/chunk-R466TU3N.js +2 -0
- package/dist/chunk-RF2DPBA6.js +1 -0
- package/dist/chunk-RFG5RMPL.js +1 -0
- package/dist/chunk-RM5SJJN6.js +559 -0
- package/dist/chunk-RVNMVBPM.js +1 -0
- package/dist/chunk-SBEZBZM7.js +144 -0
- package/dist/chunk-SGQ6D3LU.js +15 -0
- package/dist/chunk-SRCQVUMC.js +1 -0
- package/dist/chunk-TFSBQ4RY.js +5 -0
- package/dist/chunk-TQYMC7TH.js +1 -0
- package/dist/chunk-UGDBJTLP.js +6 -0
- package/dist/chunk-UGXYQ23Y.js +1411 -0
- package/dist/chunk-UWJ73J4B.js +1 -0
- package/dist/chunk-V2CNCPIE.js +2 -0
- package/dist/chunk-VBUZWRUL.js +1 -0
- package/dist/chunk-VS3T5YOG.js +264 -0
- package/dist/chunk-VWYM4OWK.js +1 -0
- package/dist/chunk-VY6SNDKW.js +3 -0
- package/dist/chunk-WDC3KIZT.js +2 -0
- package/dist/chunk-WFXRSKRK.js +1 -0
- package/dist/chunk-WXVZJJOR.js +16 -0
- package/dist/chunk-WZBSLU4Q.js +6 -0
- package/dist/chunk-XBXMPFXM.js +1 -0
- package/dist/chunk-XEFQQPL4.js +1 -0
- package/dist/chunk-XLELNRFF.js +3 -0
- package/dist/chunk-XNO6DZYP.js +1 -0
- package/dist/chunk-Y5JKV2AI.js +1 -0
- package/dist/chunk-YC6G4MHD.js +3 -0
- package/dist/chunk-YI232QLS.js +1 -0
- package/dist/chunk-YMWHHINU.js +1 -0
- package/dist/chunk-YOZNRLFC.js +1 -0
- package/dist/chunk-YZDDTYTU.js +11 -0
- package/dist/chunk-Z35BTAM6.js +2 -0
- package/dist/chunk-ZR76GGZ6.js +5 -0
- package/dist/chunk-ZTMSBSYD.js +1 -0
- package/dist/chunk-ZV6NCNI4.js +586 -0
- package/dist/chunk-ZVJVDCIM.js +1 -0
- package/dist/cli/commands/app/app-logs/sources.js +2 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +9 -0
- package/dist/cli/commands/app/bulk/status.js +5 -0
- package/dist/cli/commands/app/config/link.js +4 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +3 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +22 -0
- package/dist/cli/commands/app/dev/clean.js +5 -0
- package/dist/cli/commands/app/dev.js +320 -0
- package/dist/cli/commands/app/env/pull.js +11 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +16 -0
- package/dist/cli/commands/app/function/replay.js +5 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +5 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +11 -0
- package/dist/cli/commands/app/init.js +10 -0
- package/dist/cli/commands/app/logs.js +2 -0
- package/dist/cli/commands/app/release.js +4 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +25 -0
- package/dist/cli/commands/auth/login.js +1 -20
- package/dist/cli/commands/auth/logout.js +1 -12
- package/dist/cli/commands/cache/clear.js +1 -11
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
- package/dist/cli/commands/config/autoupgrade/off.js +1 -22
- package/dist/cli/commands/config/autoupgrade/on.js +1 -22
- package/dist/cli/commands/config/autoupgrade/status.js +1 -30
- package/dist/cli/commands/debug/command-flags.js +1 -79
- package/dist/cli/commands/docs/generate.js +1 -157
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
- package/dist/cli/commands/doctor-release/theme/index.js +1 -56
- package/dist/cli/commands/help.js +1 -26
- package/dist/cli/commands/kitchen-sink/async.js +1 -16
- package/dist/cli/commands/kitchen-sink/index.js +1 -21
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
- package/dist/cli/commands/kitchen-sink/static.js +1 -16
- package/dist/cli/commands/notifications/generate.js +1 -11
- package/dist/cli/commands/notifications/list.js +1 -33
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.js +1 -27
- package/dist/cli/commands/theme/check.js +1 -0
- package/dist/cli/commands/theme/console.js +15 -0
- package/dist/cli/commands/theme/delete.js +7 -0
- package/dist/cli/commands/theme/dev.js +26 -0
- package/dist/cli/commands/theme/duplicate.js +32 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +8 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +3 -0
- package/dist/cli/commands/theme/open.js +8 -0
- package/dist/cli/commands/theme/package.js +7 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +3 -0
- package/dist/cli/commands/theme/publish.js +7 -0
- package/dist/cli/commands/theme/pull.js +3 -0
- package/dist/cli/commands/theme/push.js +28 -0
- package/dist/cli/commands/theme/rename.js +6 -0
- package/dist/cli/commands/theme/share.js +3 -0
- package/dist/cli/commands/upgrade.js +1 -17
- package/dist/cli/commands/version.js +1 -10
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-U5ZITKJN.js +1 -0
- package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
- package/dist/deprecations-TU5UQJVV.js +1 -0
- package/dist/dist-2Z5TND4U.js +1 -0
- package/dist/dist-GYHFDHKP.js +1 -0
- package/dist/environments-Z5PR7DSI.js +1 -0
- package/dist/error-IJGNYKZ3.js +1 -0
- package/dist/error-handler-WSCGNS2P.js +1 -0
- package/dist/fs-5BDEA2KD.js +1 -0
- package/dist/hooks/app-init.d.ts +9 -0
- package/dist/hooks/app-init.js +1 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
- package/dist/index.js +254 -3668
- package/dist/is-global-V4ZRHQG2.js +1 -0
- package/dist/latest-version-EFWBOTWM.js +49 -0
- package/dist/lib-5L7UKDEK.js +1 -0
- package/dist/lib-C3VO2BQW.js +1 -0
- package/dist/lib-QB6I6CTC.js +1 -0
- package/dist/local-6QPX4GCJ.js +1 -0
- package/dist/local-storage-JLXBZVWO.js +1 -0
- package/dist/metadata-UDMOTRS7.js +1 -0
- package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
- package/dist/node-package-manager-HAFRYGUM.js +1 -0
- package/dist/notifications-system-MP7WDOCS.js +1 -0
- package/dist/npa-ICFSA3NL.js +1 -0
- package/dist/output-YGMHXEIS.js +1 -0
- package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
- package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
- package/dist/system-KLXD4FXF.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-K5CWIA4V.js +1 -0
- package/dist/ui-GHG3UGB3.js +1 -0
- package/dist/upgrade-OPZGPM5J.js +1 -0
- package/dist/version-D5PJZIRW.js +1 -0
- package/dist/version-KRQBMYCH.js +1 -0
- package/dist/workerd-L2EJKIAQ.js +18 -0
- package/oclif.manifest.json +5247 -6056
- package/package.json +17 -41
- package/dist/chunk-2E6Y4J4T.js +0 -3
- package/dist/chunk-45T5XUIM.js +0 -1
- package/dist/chunk-52KHWFYF.js +0 -1
- package/dist/chunk-FU2Y2M3M.js +0 -5
- package/dist/chunk-JBSYWYIP.js +0 -2
- package/dist/chunk-KVWHPGOA.js +0 -415
- package/dist/chunk-LH4VO6EV.js +0 -63
- package/dist/chunk-PRNHS74J.js +0 -847
- package/dist/chunk-RXF32AET.js +0 -396
- package/dist/chunk-SVA22NZQ.js +0 -607
- package/dist/chunk-YPE4BWWD.js +0 -3
- package/dist/error-handler-CRWXGODM.js +0 -1
- package/dist/http-proxy-node16-TTURN6MD.js +0 -38
- package/dist/lib-3WHF5XD3.js +0 -1
- package/dist/local-7MUCLBBI.js +0 -1
- package/dist/node-package-manager-GFIGZZ24.js +0 -1
- package/dist/npa-OKDXXRCU.js +0 -1
- package/dist/ui-AOFJCTTO.js +0 -1
- package/dist/workerd-VBG5LYNX.js +0 -18
- /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
|
@@ -1,30 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { autoUpgradeStatus } from './constants.js';
|
|
3
|
-
import { getAutoUpgradeEnabled } from '@shopify/cli-kit/node/upgrade';
|
|
4
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
5
|
-
import { renderInfo } from '@shopify/cli-kit/node/ui';
|
|
6
|
-
class AutoupgradeStatus extends Command {
|
|
7
|
-
async run() {
|
|
8
|
-
const enabled = getAutoUpgradeEnabled();
|
|
9
|
-
if (enabled === undefined) {
|
|
10
|
-
renderInfo({ body: autoUpgradeStatus.notConfigured });
|
|
11
|
-
}
|
|
12
|
-
else if (enabled) {
|
|
13
|
-
renderInfo({ body: autoUpgradeStatus.on });
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
renderInfo({ body: autoUpgradeStatus.off });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
_a = AutoupgradeStatus;
|
|
21
|
-
AutoupgradeStatus.summary = 'Check whether auto-upgrade is enabled, disabled, or not yet configured.';
|
|
22
|
-
AutoupgradeStatus.descriptionWithMarkdown = `Check whether auto-upgrade is enabled, disabled, or not yet configured.
|
|
23
|
-
|
|
24
|
-
When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
|
|
25
|
-
|
|
26
|
-
Run \`shopify config autoupgrade on\` or \`shopify config autoupgrade off\` to configure it.
|
|
27
|
-
`;
|
|
28
|
-
AutoupgradeStatus.description = _a.descriptionWithoutMarkdown();
|
|
29
|
-
export default AutoupgradeStatus;
|
|
30
|
-
//# sourceMappingURL=status.js.map
|
|
1
|
+
import{a}from"../../../../chunk-UGDBJTLP.js";import"../../../../chunk-OCOY5MV2.js";import"../../../../chunk-ELVFJ7BR.js";import"../../../../chunk-52GC6XUT.js";import"../../../../chunk-XLELNRFF.js";import"../../../../chunk-B2EHO7ZC.js";import"../../../../chunk-4LNCYIS3.js";import"../../../../chunk-LAZJ47DZ.js";import"../../../../chunk-PRKBO42R.js";import"../../../../chunk-GOJ2QHSR.js";import"../../../../chunk-7BGM2GAH.js";import"../../../../chunk-XNO6DZYP.js";import"../../../../chunk-3TNEIDOD.js";import"../../../../chunk-4HHXSMD7.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import"../../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,79 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { outputResult } from '@shopify/cli-kit/node/output';
|
|
3
|
-
import { renderTable } from '@shopify/cli-kit/node/ui';
|
|
4
|
-
import { Flags } from '@oclif/core';
|
|
5
|
-
class CommandFlags extends Command {
|
|
6
|
-
async run() {
|
|
7
|
-
const { flags } = await this.parse(CommandFlags);
|
|
8
|
-
const data = [];
|
|
9
|
-
for (const [_, plugin] of this.config.plugins) {
|
|
10
|
-
for (const command of plugin.commands) {
|
|
11
|
-
// We have to load the command, otherwise OCLIF will just use the manifest, and we need the actual class
|
|
12
|
-
// eslint-disable-next-line no-await-in-loop
|
|
13
|
-
const loaded = await command.load();
|
|
14
|
-
let pluginName;
|
|
15
|
-
if (plugin.name.startsWith('@shopify')) {
|
|
16
|
-
pluginName = plugin.name.substring('@shopify/'.length);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
pluginName = plugin.name.startsWith('@oclif') ? plugin.name.substring('@oclif/'.length) : plugin.name;
|
|
20
|
-
}
|
|
21
|
-
const flags = loaded.flags;
|
|
22
|
-
if (flags) {
|
|
23
|
-
for (const [flagName, flagConfig] of Object.entries(flags)) {
|
|
24
|
-
data.push({
|
|
25
|
-
pluginName,
|
|
26
|
-
command: command.id,
|
|
27
|
-
flagName: `--${flagName}`,
|
|
28
|
-
flagChar: flagConfig.char ? `-${flagConfig.char}` : '',
|
|
29
|
-
flagEnv: flagConfig.env,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (flags.csv) {
|
|
36
|
-
const columns = ['pluginName', 'command', 'flagName', 'flagChar', 'flagEnv'];
|
|
37
|
-
const header = `${columns.join(',')}\n`;
|
|
38
|
-
const rows = data.map((obj) => columns.map((key) => obj[key]).join(',')).join('\n');
|
|
39
|
-
const csvString = `${header}${rows}\n`;
|
|
40
|
-
outputResult(csvString);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
renderTable({
|
|
44
|
-
rows: data,
|
|
45
|
-
columns: {
|
|
46
|
-
pluginName: {
|
|
47
|
-
header: 'plugin',
|
|
48
|
-
color: 'red',
|
|
49
|
-
},
|
|
50
|
-
command: {},
|
|
51
|
-
flagName: {
|
|
52
|
-
header: 'long flag',
|
|
53
|
-
color: 'green',
|
|
54
|
-
},
|
|
55
|
-
flagChar: {
|
|
56
|
-
header: 'short flag',
|
|
57
|
-
color: 'green',
|
|
58
|
-
},
|
|
59
|
-
flagEnv: {
|
|
60
|
-
header: 'env variable',
|
|
61
|
-
color: 'blueBright',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
CommandFlags.description = 'View all the available command flags';
|
|
69
|
-
CommandFlags.hidden = true;
|
|
70
|
-
CommandFlags.flags = {
|
|
71
|
-
// Similar options as the `commands` command from `plugin-commands`
|
|
72
|
-
csv: Flags.boolean({
|
|
73
|
-
description: 'Output as CSV',
|
|
74
|
-
env: 'SHOPIFY_FLAG_OUTPUT_CSV',
|
|
75
|
-
default: false,
|
|
76
|
-
}),
|
|
77
|
-
};
|
|
78
|
-
export default CommandFlags;
|
|
79
|
-
//# sourceMappingURL=command-flags.js.map
|
|
1
|
+
import{a}from"../../../chunk-JLBH7RCF.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,157 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mkdir, rmdir, writeFile } from '@shopify/cli-kit/node/fs';
|
|
3
|
-
import { cwd, joinPath } from '@shopify/cli-kit/node/path';
|
|
4
|
-
import { outputInfo } from '@shopify/cli-kit/node/output';
|
|
5
|
-
const docsPath = joinPath(cwd(), '/docs-shopify.dev/commands');
|
|
6
|
-
class DocsGenerate extends Command {
|
|
7
|
-
async run() {
|
|
8
|
-
const commands = this.config.commands;
|
|
9
|
-
// Remove all files and recreate the folder. To make sure we don't leave any orphaned files.
|
|
10
|
-
await rmdir(docsPath);
|
|
11
|
-
await mkdir(docsPath);
|
|
12
|
-
// Short by length to ensure that we first generate the interfaces for the parent topics to detect hidden ones.
|
|
13
|
-
const sortedCommands = commands
|
|
14
|
-
.sort((ca, cb) => ca.id.length - cb.id.length)
|
|
15
|
-
.filter((command) => !isHidden(command));
|
|
16
|
-
const promises = sortedCommands.flatMap((command) => {
|
|
17
|
-
const commandData = extractCommandData(command);
|
|
18
|
-
return [
|
|
19
|
-
writeCommandFlagInterface(command, commandData),
|
|
20
|
-
writeCommandUsageExampleFile(command, commandData),
|
|
21
|
-
writeCommandDocumentation(command, commandData),
|
|
22
|
-
];
|
|
23
|
-
});
|
|
24
|
-
await Promise.all(promises);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
DocsGenerate.description = 'Generate CLI commands documentation';
|
|
28
|
-
DocsGenerate.hidden = true;
|
|
29
|
-
export default DocsGenerate;
|
|
30
|
-
// By default we hide oclif commands that are not part of the Shopify CLI documentation
|
|
31
|
-
const hiddenTopics = ['commands', 'help', 'plugins'];
|
|
32
|
-
// Topics that are included in the general commands category
|
|
33
|
-
const generalTopics = ['config', 'auth', 'organization'];
|
|
34
|
-
function isHidden(command) {
|
|
35
|
-
// Some commands rely on the hidden property of the parent topic, but is not returned in the oclif command object
|
|
36
|
-
if (command.hidden) {
|
|
37
|
-
hiddenTopics.push(command.id);
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
// User plugins are installed locally and are not part of the Shopify CLI documentation
|
|
41
|
-
if (command.pluginType === 'user')
|
|
42
|
-
return true;
|
|
43
|
-
return hiddenTopics.some((topic) => command.id.startsWith(`${topic}:`));
|
|
44
|
-
}
|
|
45
|
-
export function extractCommandData(command) {
|
|
46
|
-
const commandName = command.id.replace(/[:]/g, ' ');
|
|
47
|
-
const fileName = command.id.replace(/[:]/g, '-');
|
|
48
|
-
const interfaceName = command.id.replace(/[:-]/g, '');
|
|
49
|
-
const hasTopic = command.id.includes(':');
|
|
50
|
-
const topic = command.id.split(':')[0];
|
|
51
|
-
const hasFlags = command.flags && Object.keys(command.flags).length > 0;
|
|
52
|
-
return { commandName, fileName, interfaceName, hasTopic, topic, hasFlags };
|
|
53
|
-
}
|
|
54
|
-
// Generates the documentation for a command and writes it to a file (also a file with an example usage of the command)
|
|
55
|
-
export async function writeCommandDocumentation(command, { commandName, fileName, interfaceName, hasTopic, topic, hasFlags }) {
|
|
56
|
-
const flagDoc = `
|
|
57
|
-
{
|
|
58
|
-
title: 'Flags',
|
|
59
|
-
description: 'The following flags are available for the \`${commandName}\` command:',
|
|
60
|
-
type: '${interfaceName}',
|
|
61
|
-
},`;
|
|
62
|
-
const description = command.descriptionWithMarkdown ?? command.description ?? command.summary ?? '';
|
|
63
|
-
const cleanDescription = description?.replace(/`/g, '\\`').replace(/https:\/\/shopify\.dev/g, '');
|
|
64
|
-
const previewDescription = command.summary ?? description ?? '';
|
|
65
|
-
const cleanPreview = previewDescription.replace(/`/g, '\\`').replace(/https:\/\/shopify\.dev/g, '');
|
|
66
|
-
const category = hasTopic && !generalTopics.includes(topic) ? topic : 'general commands';
|
|
67
|
-
const docString = `// This is an autogenerated file. Don't edit this file manually.
|
|
68
|
-
import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'
|
|
69
|
-
|
|
70
|
-
const data: ReferenceEntityTemplateSchema = {
|
|
71
|
-
name: '${commandName}',
|
|
72
|
-
description: \`${cleanDescription}\`,
|
|
73
|
-
overviewPreviewDescription: \`${cleanPreview}\`,
|
|
74
|
-
type: 'command',
|
|
75
|
-
isVisualComponent: false,
|
|
76
|
-
defaultExample: {
|
|
77
|
-
codeblock: {
|
|
78
|
-
tabs: [
|
|
79
|
-
{
|
|
80
|
-
title: '${commandName}',
|
|
81
|
-
code: './examples/${fileName}.example.sh',
|
|
82
|
-
language: 'bash',
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
title: '${commandName}',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
definitions: [${hasFlags ? flagDoc : ''}
|
|
89
|
-
],
|
|
90
|
-
category: '${category}',
|
|
91
|
-
related: [
|
|
92
|
-
],
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export default data`;
|
|
96
|
-
const updatedDocString = docString.replace(/<%= config\.bin %>/g, 'shopify');
|
|
97
|
-
await writeFile(`${docsPath}/${fileName}.doc.ts`, updatedDocString);
|
|
98
|
-
outputInfo(`Generated docs for ${commandName}`);
|
|
99
|
-
}
|
|
100
|
-
// Generates an interface for the flags of a command and writes it to a file
|
|
101
|
-
export async function writeCommandFlagInterface(command, { commandName, fileName, interfaceName }) {
|
|
102
|
-
const flagsDetails = Object.keys(command.flags)
|
|
103
|
-
.map((flagName) => {
|
|
104
|
-
const flag = command.flags[flagName];
|
|
105
|
-
if (!flag)
|
|
106
|
-
return;
|
|
107
|
-
if (flag.hidden)
|
|
108
|
-
return;
|
|
109
|
-
const flagDescription = flag.description ?? '';
|
|
110
|
-
const char = flag.char ? `-${flag.char}, ` : '';
|
|
111
|
-
const type = flag.type === 'option' ? 'string' : "''";
|
|
112
|
-
const value = flag.type === 'option' ? ' <value>' : '';
|
|
113
|
-
const optional = flag.required ? '' : '?';
|
|
114
|
-
// eslint-disable-next-line no-negated-condition
|
|
115
|
-
const envValue = flag.env !== undefined ? ` @environment ${flag.env}` : '';
|
|
116
|
-
const flagContent = ` /**
|
|
117
|
-
* ${flagDescription}
|
|
118
|
-
*${envValue}
|
|
119
|
-
*/
|
|
120
|
-
'${char}--${flagName}${value}'${optional}: ${type}`;
|
|
121
|
-
// Example output: '-c, --config <value>'?: string
|
|
122
|
-
return flagContent;
|
|
123
|
-
})
|
|
124
|
-
.filter((str) => str && str?.length > 0)
|
|
125
|
-
.join('\n\n');
|
|
126
|
-
const commandContent = `// This is an autogenerated file. Don't edit this file manually.
|
|
127
|
-
/**
|
|
128
|
-
* The following flags are available for the \`${commandName}\` command:
|
|
129
|
-
* @publicDocs
|
|
130
|
-
*/
|
|
131
|
-
export interface ${interfaceName} {
|
|
132
|
-
${flagsDetails}
|
|
133
|
-
}
|
|
134
|
-
`;
|
|
135
|
-
await mkdir(`${docsPath}/interfaces`);
|
|
136
|
-
await writeFile(`${docsPath}/interfaces/${fileName}.interface.ts`, commandContent);
|
|
137
|
-
}
|
|
138
|
-
// Generates a file with an example usage of a command
|
|
139
|
-
export async function writeCommandUsageExampleFile(command, { fileName, commandName }) {
|
|
140
|
-
let usage = '';
|
|
141
|
-
const hasFlags = command.flags && Object.keys(command.flags).length > 0;
|
|
142
|
-
if (typeof command.usage === 'string') {
|
|
143
|
-
usage = prependShopify(command.usage);
|
|
144
|
-
}
|
|
145
|
-
else if (Array.isArray(command.usage)) {
|
|
146
|
-
usage = command.usage.map((usage) => prependShopify(usage)).join('\n\n');
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
usage = `${prependShopify(commandName)}${hasFlags ? ' [flags]' : ''}`;
|
|
150
|
-
}
|
|
151
|
-
await mkdir(`${docsPath}/examples`);
|
|
152
|
-
await writeFile(`${docsPath}/examples/${fileName}.example.sh`, usage);
|
|
153
|
-
}
|
|
154
|
-
function prependShopify(command) {
|
|
155
|
-
return command.startsWith('shopify ') ? command : `shopify ${command}`;
|
|
156
|
-
}
|
|
157
|
-
//# sourceMappingURL=generate.js.map
|
|
1
|
+
import{a,b,c,d,e}from"../../../chunk-ODNGDO4H.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default,b as extractCommandData,c as writeCommandDocumentation,d as writeCommandFlagInterface,e as writeCommandUsageExampleFile};
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { canRunDoctorRelease } from '@shopify/cli-kit/node/context/local';
|
|
3
|
-
import { renderInfo } from '@shopify/cli-kit/node/ui';
|
|
4
|
-
class DoctorRelease extends Command {
|
|
5
|
-
async run() {
|
|
6
|
-
if (!canRunDoctorRelease()) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
renderInfo({
|
|
10
|
-
headline: 'Shopify CLI Doctor Release.',
|
|
11
|
-
body: [
|
|
12
|
-
'Available doctor-release commands:',
|
|
13
|
-
'',
|
|
14
|
-
' shopify doctor-release theme -e <environment> Run all theme command tests',
|
|
15
|
-
'',
|
|
16
|
-
'The -e/--environment flag is required to specify the store configuration.',
|
|
17
|
-
'Use --help with any command for more options.',
|
|
18
|
-
],
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
DoctorRelease.description = 'Run CLI doctor-release tests';
|
|
23
|
-
DoctorRelease.hidden = true;
|
|
24
|
-
export default DoctorRelease;
|
|
25
|
-
//# sourceMappingURL=doctor-release.js.map
|
|
1
|
+
import{a}from"../../../chunk-JGXWQULI.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,56 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { runThemeDoctor } from '../../../services/doctor-release/theme/runner.js';
|
|
3
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
4
|
-
import { globalFlags } from '@shopify/cli-kit/node/cli';
|
|
5
|
-
import { Flags } from '@oclif/core';
|
|
6
|
-
import { resolvePath, cwd } from '@shopify/cli-kit/node/path';
|
|
7
|
-
import { canRunDoctorRelease } from '@shopify/cli-kit/node/context/local';
|
|
8
|
-
class DoctorReleaseTheme extends Command {
|
|
9
|
-
async run() {
|
|
10
|
-
if (!canRunDoctorRelease()) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const { flags } = await this.parse(_a);
|
|
14
|
-
const results = await runThemeDoctor({
|
|
15
|
-
path: flags.path,
|
|
16
|
-
environment: flags.environment,
|
|
17
|
-
store: flags.store,
|
|
18
|
-
password: flags.password,
|
|
19
|
-
});
|
|
20
|
-
// Exit with error code if any tests failed
|
|
21
|
-
const failed = results.some((result) => result.status === 'failed');
|
|
22
|
-
if (failed) {
|
|
23
|
-
process.exitCode = 1;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
_a = DoctorReleaseTheme;
|
|
28
|
-
DoctorReleaseTheme.description = 'Run all theme command doctor-release tests';
|
|
29
|
-
DoctorReleaseTheme.hidden = true;
|
|
30
|
-
DoctorReleaseTheme.flags = {
|
|
31
|
-
...globalFlags,
|
|
32
|
-
path: Flags.string({
|
|
33
|
-
char: 'p',
|
|
34
|
-
description: 'The path to run tests in. Defaults to current directory.',
|
|
35
|
-
env: 'SHOPIFY_FLAG_PATH',
|
|
36
|
-
parse: async (input) => resolvePath(input),
|
|
37
|
-
default: async () => cwd(),
|
|
38
|
-
}),
|
|
39
|
-
environment: Flags.string({
|
|
40
|
-
char: 'e',
|
|
41
|
-
description: 'The environment to use from shopify.theme.toml (required for store-connected tests).',
|
|
42
|
-
env: 'SHOPIFY_FLAG_ENVIRONMENT',
|
|
43
|
-
required: true,
|
|
44
|
-
}),
|
|
45
|
-
store: Flags.string({
|
|
46
|
-
char: 's',
|
|
47
|
-
description: 'Store URL (overrides environment).',
|
|
48
|
-
env: 'SHOPIFY_FLAG_STORE',
|
|
49
|
-
}),
|
|
50
|
-
password: Flags.string({
|
|
51
|
-
description: 'Password from Theme Access app (overrides environment).',
|
|
52
|
-
env: 'SHOPIFY_FLAG_PASSWORD',
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
export default DoctorReleaseTheme;
|
|
56
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{a}from"../../../../chunk-P5VVOLGV.js";import"../../../../chunk-323UTVMM.js";import"../../../../chunk-YZDDTYTU.js";import"../../../../chunk-MOA33ZFO.js";import"../../../../chunk-JUVAGMIH.js";import"../../../../chunk-BDVAE5MS.js";import"../../../../chunk-P6XE4MH5.js";import"../../../../chunk-KLMDWDT2.js";import"../../../../chunk-5CH3B62S.js";import"../../../../chunk-QUTQDXSL.js";import"../../../../chunk-IASVAERO.js";import"../../../../chunk-JPGO36XP.js";import"../../../../chunk-PD5ZHJWI.js";import"../../../../chunk-LDGAHMS7.js";import"../../../../chunk-ZR76GGZ6.js";import"../../../../chunk-EENHXSWU.js";import"../../../../chunk-FUOIGXI4.js";import"../../../../chunk-6M3ZYNGO.js";import"../../../../chunk-QYR5VPQA.js";import"../../../../chunk-V2CNCPIE.js";import"../../../../chunk-GFEAKSGV.js";import"../../../../chunk-CERXUPGC.js";import"../../../../chunk-T4M5CWAO.js";import"../../../../chunk-PRVQAHWI.js";import"../../../../chunk-YC6G4MHD.js";import"../../../../chunk-N7RBSKYT.js";import"../../../../chunk-IU2ZQ6TE.js";import"../../../../chunk-PIBY5DDZ.js";import"../../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
class HelpCommand extends Command {
|
|
4
|
-
async run() {
|
|
5
|
-
const { argv, flags } = await this.parse(HelpCommand);
|
|
6
|
-
const Help = await loadHelpClass(this.config);
|
|
7
|
-
const help = new Help(this.config, { all: flags['nested-commands'] });
|
|
8
|
-
await help.showHelp(argv);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
HelpCommand.args = {
|
|
12
|
-
command: Args.string({ description: 'Command to show help for.', required: false }),
|
|
13
|
-
};
|
|
14
|
-
HelpCommand.description = 'Display help for Shopify CLI';
|
|
15
|
-
HelpCommand.usage = `help [command] [flags]`;
|
|
16
|
-
HelpCommand.flags = {
|
|
17
|
-
'nested-commands': Flags.boolean({
|
|
18
|
-
char: 'n',
|
|
19
|
-
description: 'Include all nested commands in the output.',
|
|
20
|
-
env: 'SHOPIFY_FLAG_CLI_NESTED_COMMANDS',
|
|
21
|
-
default: false,
|
|
22
|
-
}),
|
|
23
|
-
};
|
|
24
|
-
HelpCommand.strict = false;
|
|
25
|
-
export default HelpCommand;
|
|
26
|
-
//# sourceMappingURL=help.js.map
|
|
1
|
+
import{a}from"../../chunk-D6JARNEH.js";import"../../chunk-YZDDTYTU.js";import"../../chunk-MOA33ZFO.js";import"../../chunk-JUVAGMIH.js";import"../../chunk-BDVAE5MS.js";import"../../chunk-P6XE4MH5.js";import"../../chunk-KLMDWDT2.js";import"../../chunk-5CH3B62S.js";import"../../chunk-QUTQDXSL.js";import"../../chunk-IASVAERO.js";import"../../chunk-JPGO36XP.js";import"../../chunk-PD5ZHJWI.js";import"../../chunk-LDGAHMS7.js";import"../../chunk-ZR76GGZ6.js";import"../../chunk-EENHXSWU.js";import"../../chunk-FUOIGXI4.js";import"../../chunk-6M3ZYNGO.js";import"../../chunk-QYR5VPQA.js";import"../../chunk-V2CNCPIE.js";import"../../chunk-GFEAKSGV.js";import"../../chunk-CERXUPGC.js";import"../../chunk-T4M5CWAO.js";import"../../chunk-PRVQAHWI.js";import"../../chunk-YC6G4MHD.js";import"../../chunk-N7RBSKYT.js";import"../../chunk-IU2ZQ6TE.js";import"../../chunk-PIBY5DDZ.js";import"../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
/**
|
|
4
|
-
* This command is used to output all the async UI components of the CLI.
|
|
5
|
-
* It's useful to test how they behave under different terminal sizes
|
|
6
|
-
* and to help update the documentation when they change.
|
|
7
|
-
*/
|
|
8
|
-
class KitchenSinkAsync extends Command {
|
|
9
|
-
async run() {
|
|
10
|
-
await asyncTasks();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
KitchenSinkAsync.description = 'View the UI kit components that process async tasks';
|
|
14
|
-
KitchenSinkAsync.hidden = true;
|
|
15
|
-
export default KitchenSinkAsync;
|
|
16
|
-
//# sourceMappingURL=async.js.map
|
|
1
|
+
import{a}from"../../../chunk-DU4WR4OP.js";import"../../../chunk-JVIKCGDY.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,21 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { staticService } from '../../services/kitchen-sink/static.js';
|
|
3
|
-
import { prompts } from '../../services/kitchen-sink/prompts.js';
|
|
4
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
5
|
-
/**
|
|
6
|
-
* This command is used to output all the UI components of the CLI.
|
|
7
|
-
* It's useful to test how they behave under different terminal sizes
|
|
8
|
-
* and to help update the documentation when they change.
|
|
9
|
-
*/
|
|
10
|
-
class KitchenSinkAll extends Command {
|
|
11
|
-
async run() {
|
|
12
|
-
await staticService();
|
|
13
|
-
await prompts();
|
|
14
|
-
await asyncTasks();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
KitchenSinkAll.description = 'View all the available UI kit components';
|
|
18
|
-
KitchenSinkAll.hiddenAliases = ['kitchen-sink all'];
|
|
19
|
-
KitchenSinkAll.hidden = true;
|
|
20
|
-
export default KitchenSinkAll;
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{a}from"../../../chunk-MQNYGGAM.js";import"../../../chunk-A74GETYC.js";import"../../../chunk-4ZGSSQC6.js";import"../../../chunk-MBAFWQSZ.js";import"../../../chunk-JVIKCGDY.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
/**
|
|
4
|
-
* This command is used to output all the UI prompt components of the CLI.
|
|
5
|
-
* It's useful to test how they behave under different terminal sizes
|
|
6
|
-
* and to help update the documentation when they change.
|
|
7
|
-
*/
|
|
8
|
-
class KitchenSinkPrompts extends Command {
|
|
9
|
-
async run() {
|
|
10
|
-
await prompts();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
KitchenSinkPrompts.description = 'View the UI kit components prompts';
|
|
14
|
-
KitchenSinkPrompts.hidden = true;
|
|
15
|
-
export default KitchenSinkPrompts;
|
|
16
|
-
//# sourceMappingURL=prompts.js.map
|
|
1
|
+
import{a}from"../../../chunk-SRCQVUMC.js";import"../../../chunk-A74GETYC.js";import"../../../chunk-4ZGSSQC6.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
/**
|
|
4
|
-
* This command is used to output all the banner UI components of the CLI.
|
|
5
|
-
* It's useful to test how they behave under different terminal sizes
|
|
6
|
-
* and to help update the documentation when they change.
|
|
7
|
-
*/
|
|
8
|
-
class KitchenSinkStatic extends Command {
|
|
9
|
-
async run() {
|
|
10
|
-
await staticService();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
KitchenSinkStatic.description = 'View the UI kit components that display static output';
|
|
14
|
-
KitchenSinkStatic.hidden = true;
|
|
15
|
-
export default KitchenSinkStatic;
|
|
16
|
-
//# sourceMappingURL=static.js.map
|
|
1
|
+
import{a}from"../../../chunk-GNPS5SBU.js";import"../../../chunk-MBAFWQSZ.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
class Generate extends Command {
|
|
4
|
-
async run() {
|
|
5
|
-
await generate();
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
Generate.description = 'Generate a notifications.json file for the the CLI, appending a new notification to the current file.';
|
|
9
|
-
Generate.hidden = true;
|
|
10
|
-
export default Generate;
|
|
11
|
-
//# sourceMappingURL=generate.js.map
|
|
1
|
+
import{a}from"../../../chunk-GFJ7UV74.js";import"../../../chunk-2APPXD5Z.js";import"../../../chunk-XLELNRFF.js";import"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Flags } from '@oclif/core';
|
|
3
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
4
|
-
import { sendErrorToBugsnag } from '@shopify/cli-kit/node/error-handler';
|
|
5
|
-
class List extends Command {
|
|
6
|
-
async run() {
|
|
7
|
-
const { flags } = await this.parse(List);
|
|
8
|
-
try {
|
|
9
|
-
await list();
|
|
10
|
-
}
|
|
11
|
-
catch (error) {
|
|
12
|
-
let message = `Error fetching notifications`;
|
|
13
|
-
if (error instanceof Error) {
|
|
14
|
-
message = message.concat(`: ${error.message}`);
|
|
15
|
-
}
|
|
16
|
-
await sendErrorToBugsnag(message, 'expected_error');
|
|
17
|
-
if (!flags['ignore-errors']) {
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
List.description = 'List current notifications configured for the CLI.';
|
|
24
|
-
List.hidden = true;
|
|
25
|
-
List.flags = {
|
|
26
|
-
'ignore-errors': Flags.boolean({
|
|
27
|
-
hidden: false,
|
|
28
|
-
description: "Don't fail if an error occurs.",
|
|
29
|
-
env: 'SHOPIFY_FLAG_IGNORE_ERRORS',
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
export default List;
|
|
33
|
-
//# sourceMappingURL=list.js.map
|
|
1
|
+
import{a}from"../../../chunk-22PCRFG4.js";import"../../../chunk-2APPXD5Z.js";import"../../../chunk-XLELNRFF.js";import"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as f,U as g,V as p}from"../../../chunk-DJQVNH7P.js";import"../../../chunk-XBXMPFXM.js";import"../../../chunk-52GC6XUT.js";import"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import{b as c,c as d}from"../../../chunk-323UTVMM.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import{b as m}from"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import{C as e}from"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import{Mb as r}from"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import{g as a}from"../../../chunk-VPRTJUIN.js";a();a();async function u(t){let i;try{i=await p()}catch(o){if(t.json&&o instanceof g){r(JSON.stringify({organizations:[]},null,2));return}throw o}if(t.json){let o={organizations:i.map(n=>({id:n.id,gid:f(n.id),name:n.businessName}))};r(JSON.stringify(o,null,2));return}l(i)}function l(t){let i=t.map(o=>({id:o.id,name:o.businessName}));e({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var s=class t extends m{static{this.summary="List Shopify organizations you have access to."}static{this.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs."}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...c,...d}}async run(){let{flags:i}=await this.parse(t);await u({json:i.json})}};export{s as default};
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
import { Args } from '@oclif/core';
|
|
4
|
-
class Search extends Command {
|
|
5
|
-
async run() {
|
|
6
|
-
const { args } = await this.parse(Search);
|
|
7
|
-
await searchService(args.query);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
Search.description = 'Starts a search on shopify.dev.';
|
|
11
|
-
Search.usage = `search [query]`;
|
|
12
|
-
Search.examples = [
|
|
13
|
-
`# open the search modal on Shopify.dev
|
|
14
|
-
shopify search
|
|
15
|
-
|
|
16
|
-
# search for a term on Shopify.dev
|
|
17
|
-
shopify search <query>
|
|
18
|
-
|
|
19
|
-
# search for a phrase on Shopify.dev
|
|
20
|
-
shopify search "<a search query separated by spaces>"
|
|
21
|
-
`,
|
|
22
|
-
];
|
|
23
|
-
Search.args = {
|
|
24
|
-
query: Args.string(),
|
|
25
|
-
};
|
|
26
|
-
export default Search;
|
|
27
|
-
//# sourceMappingURL=search.js.map
|
|
1
|
+
import{a}from"../../chunk-3DQIVE24.js";import"../../chunk-YZDDTYTU.js";import"../../chunk-MOA33ZFO.js";import"../../chunk-JUVAGMIH.js";import"../../chunk-BDVAE5MS.js";import"../../chunk-P6XE4MH5.js";import"../../chunk-KLMDWDT2.js";import"../../chunk-5CH3B62S.js";import"../../chunk-QUTQDXSL.js";import"../../chunk-IASVAERO.js";import"../../chunk-JPGO36XP.js";import"../../chunk-PD5ZHJWI.js";import"../../chunk-LDGAHMS7.js";import"../../chunk-ZR76GGZ6.js";import"../../chunk-EENHXSWU.js";import"../../chunk-FUOIGXI4.js";import"../../chunk-6M3ZYNGO.js";import"../../chunk-QYR5VPQA.js";import"../../chunk-V2CNCPIE.js";import"../../chunk-GFEAKSGV.js";import"../../chunk-CERXUPGC.js";import"../../chunk-T4M5CWAO.js";import"../../chunk-PRVQAHWI.js";import"../../chunk-YC6G4MHD.js";import"../../chunk-N7RBSKYT.js";import"../../chunk-IU2ZQ6TE.js";import"../../chunk-PIBY5DDZ.js";import"../../chunk-VPRTJUIN.js";export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../../../chunk-JHPRFW5B.js";import"../../../chunk-DFMQWJQ3.js";import"../../../chunk-KBQ4LGFB.js";import"../../../chunk-UGXYQ23Y.js";import"../../../chunk-QSTEVZFQ.js";import"../../../chunk-5Y7GIF2W.js";import"../../../chunk-HUZUORYM.js";import"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import"../../../chunk-323UTVMM.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import"../../../chunk-VPRTJUIN.js";export{a as default,b as runThemeCheck};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{a as C}from"../../../chunk-LW7U753G.js";import{c as A,i as P,m as k}from"../../../chunk-KWJ562F2.js";import{e as T,f as R,g as I,k as q,q as L}from"../../../chunk-DFMQWJQ3.js";import"../../../chunk-IX5ICOBV.js";import{a as b}from"../../../chunk-YMWHHINU.js";import"../../../chunk-QFWIDATO.js";import{b as E,m as x}from"../../../chunk-RFG5RMPL.js";import"../../../chunk-KBQ4LGFB.js";import"../../../chunk-TQYMC7TH.js";import"../../../chunk-HUZUORYM.js";import{xa as w}from"../../../chunk-B2EHO7ZC.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-LAZJ47DZ.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-GOJ2QHSR.js";import{a as v}from"../../../chunk-7BGM2GAH.js";import"../../../chunk-XNO6DZYP.js";import{b as S}from"../../../chunk-323UTVMM.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-4HHXSMD7.js";import"../../../chunk-YZDDTYTU.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import"../../../chunk-BDVAE5MS.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-IASVAERO.js";import{d as a}from"../../../chunk-JPGO36XP.js";import"../../../chunk-PD5ZHJWI.js";import{r as V}from"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-V2CNCPIE.js";import{Gb as c,Ib as m,Nb as i,Qb as l}from"../../../chunk-GFEAKSGV.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YC6G4MHD.js";import"../../../chunk-N7RBSKYT.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import{e as U,g as o}from"../../../chunk-VPRTJUIN.js";o();o();o();var d=class extends b{constructor(t){super(t);this.context="REPL";this.themeId=T()}async create(t,s){let r=await super.create(t,s);return await this.uploadThemeAssets(r),r}async findOrCreate(){let t=await this.fetch();if(!t){let s=`Liquid Console (${v})`;t=await this.create(E,s)}return t}setTheme(t){R(t)}removeTheme(){I()}async uploadThemeAssets(t){let s=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await x(t.id,s,this.adminSession)}};o();o();async function O(e){return await G(e)??await _(e)??await H(e)??await Y(e)??void 0}async function G(e){l(`Evaluating snippet - ${e.snippet}`);let n=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,t=await f({...e,snippet:n}),s=await t.text();return j(t.status,s)?K(s):void 0}async function _(e){l(`Evaluating context - ${e.snippet}`);let n=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,t=await f({...e,snippet:n}),s=await t.text();j(t.status,s)&&e.replSession.push(JSON.parse(n))}async function H(e){if(l(`Evaluating assignment context - ${e.snippet}`),re(e.snippet))return e.snippet=`assign ${e.snippet}`,i(m`${c.gray(`> ${e.snippet}`)}`),_(e)}async function Y(e){l(`Evaluating syntax error - ${e.snippet}`);let n="";if(Q(e.snippet)||(n=await(await f({...e,snippet:`{{ ${e.snippet} }}`})).text()),h(n)||(n=await(await f({...e,snippet:`{% ${e.snippet} %}`})).text()),h(n)){let t=n.replace(/ \(snippets\/eval line \d+\)/,"");z(e.snippet,t)}}function z(e,n){if(n.includes("Unknown tag")){i(m`${c.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let t=$(n);t&&i(m`${c.errorText(t)}`)}async function f(e){let n=B(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let t=await P(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
|
|
2
|
+
${n}
|
|
3
|
+
`}});return X(t)&&te(),Z(t)&&ne(),ee(t)&&se(),t}function B(e){return`[${[...e.replSession.map(t=>JSON.stringify(t)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function K(e){let n=$(e);if(n)return JSON.parse(n)?.find(s=>s.type==="display")?.value}function $(e){let n=e.split(`
|
|
4
|
+
`).slice(1,-1);if(n.length!==0)return n.join("")}function h(e){return e.includes("Liquid syntax error")}function Q(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function X(e){return e.status===401||e.status===403}function Z(e){return e.status===430||e.status===429}function ee(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function te(){throw new a("Session expired. Please initiate a new one.")}function ne(){throw new a("Evaluations limit reached. Try again later.")}function se(){throw new a("Page not found. Please provide a valid --url value!")}function re(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function j(e,n){return e===200&&!h(n)}o();function D(e){if(M(e)){i("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){F("null");return}let n=JSON.stringify(e,null,2);F(n)}function M(e){if(Array.isArray(e))return e.length>0?M(e[0]):!1;if(e&&typeof e=="object"){let t=e.error;return typeof t=="string"&&t.includes("json not allowed for this object")}return!1}function F(e){return i(m`${c.cyan(e)}`)}import{createInterface as oe}from"readline";var ie=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
|
|
5
|
+
Please use 'collections.first' instead of '{{ collections.first }}'.`;async function N(e,n,t){process.stdin.isTTY&&process.stdin.ref();let s=oe({input:process.stdin,output:process.stdout}),r=[];s.on("line",u=>{ae(u,e,n,t,s,r)}),s.prompt()}async function ae(e,n,t,s,r,u){try{if(ue(e))return i(ie),r.prompt();let p=await O({snippet:e,themeSession:n,themeId:t,url:s,replSession:u});D(p),r.prompt()}catch(p){throw r.close(),p instanceof Error?(l(p.stack??"Error backtrace not found"),new a(p.message)):new a("An unknown error occurred. Please try again.")}}function ue(e){return/^\s*(\{\{|{%)/.test(e)}async function W(e,n){let t=await pe(e),s=await A(e)?await C(n,e.storeFqdn):void 0;return{themeId:t,storePassword:s}}async function pe(e){return(await new d(e).findOrCreate()).id.toString()}async function J(e,n,t,s,r){if(i(`Welcome to Shopify Liquid console
|
|
6
|
+
(press Ctrl + C to exit)`),s?.startsWith("shpat_"))throw new a("Unable to use Admin API tokens with the console command",`To use this command with the --password flag you must:
|
|
7
|
+
|
|
8
|
+
1. Install the Theme Access app on your shop
|
|
9
|
+
2. Generate a new password
|
|
10
|
+
|
|
11
|
+
Alternatively, you can authenticate normally by not passing the --password flag.
|
|
12
|
+
|
|
13
|
+
Learn more: https://shopify.dev/docs/storefronts/themes/tools/theme-access`);let u=await k(n,e,s,r);return N(u,n,t)}var g=U(V(),1);var y=class extends L{static{this.summary="Shopify Liquid REPL (read-eval-print loop) tool"}static{this.usage=["theme console","theme console --url /products/classic-leather-jacket"]}static{this.descriptionWithMarkdown=`Starts the Shopify Liquid REPL (read-eval-print loop) tool. This tool provides an interactive terminal interface for evaluating Liquid code and exploring Liquid objects, filters, and tags using real store data.
|
|
14
|
+
|
|
15
|
+
You can also provide context to the console using a URL, as some Liquid objects are context-specific`}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...S,...q,url:g.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":g.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"})}}static{this.multiEnvironmentsFlags=null}async command(n,t){let{url:s,password:r}=n,{themeId:u,storePassword:p}=await W(t,n["store-password"]);w("theme-command:console:single-env:authenticated"),await J(t,u,s,r,p)}};export{y as default};
|