UNPKG

adastra-cli

Version:

Adastra CLI ✨ is a CLI toolkit built on top of Shopify CLI 3.X, this means that existing Adastra commands are the same as Shopify's. The goal from this package is to allow developers to use one CLI intefrace between the Vite and Shopify development server

44 lines (42 loc) 1.32 kB
// src/utilities/flags.ts import { Flags } from "@oclif/core"; import { normalizeStoreFqdn } from "@shopify/cli-kit/node/context/fqdn"; import { resolvePath } from "@shopify/cli-kit/node/path"; var globalFlags = { environment: Flags.string({ hidden: true, description: "The environment to apply to the current command.", env: "SHOPIFY_FLAG_ENVIRONMENT" }), verbose: Flags.boolean({ hidden: false, description: "Increase the verbosity of the logs.", env: "SHOPIFY_FLAG_VERBOSE" }) }; var themeFlags = { path: Flags.string({ hidden: false, description: "The path to your theme directory.", // eslint-disable-next-line parse: (input, _) => Promise.resolve(resolvePath(input)), env: "SHOPIFY_FLAG_PATH", default: "." }), password: Flags.string({ hidden: false, description: "Password generated from the Theme Access app.", env: "SHOPIFY_CLI_THEME_TOKEN" }), store: Flags.string({ char: "s", description: "Store URL. It can be the store prefix (johns-apparel) or the full myshopify.com URL (johns-apparel.myshopify.com, https://johns-apparel.myshopify.com).", env: "SHOPIFY_FLAG_STORE", // eslint-disable-next-line parse: (input, _) => Promise.resolve(normalizeStoreFqdn(input)) }) }; export { globalFlags, themeFlags };