{"version":3,"file":"flags.mjs","sources":["../../../../src/future/flags.ts"],"sourcesContent":["import {Shopify} from '@shopify/shopify-api';\n\nimport {AppConfigInterface} from '../config-types';\n\n/**\n * Logs a startup hint for each future flag that is currently disabled, so\n * developers can discover opt-in features.\n */\nexport function logDisabledFutureFlags(\n  config: AppConfigInterface,\n  logger: Shopify['logger'],\n): void {\n  const logFlag = (flag: string, message: string) =>\n    logger.info(`Future flag ${flag} is disabled.\\n\\n  ${message}\\n`);\n\n  if (!config.future?.tokenExchange) {\n    logFlag(\n      'tokenExchange',\n      'Enable this to use OAuth token exchange instead of the Auth Code flow for embedded apps. ' +\n        'Your app must use Shopify managed installation: https://shopify.dev/docs/apps/auth/installation',\n    );\n  }\n\n  if (!config.future?.expiringOfflineAccessTokens) {\n    logFlag(\n      'expiringOfflineAccessTokens',\n      'Enable this to use expiring offline access tokens and automatically refresh them before they expire.',\n    );\n  }\n}\n"],"names":[],"mappings":"AAIA;;;AAGG;AACG,SAAU,sBAAsB,CACpC,MAA0B,EAC1B,MAAyB,EAAA;AAEzB,IAAA,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,OAAe,KAC5C,MAAM,CAAC,IAAI,CAAC,CAAA,YAAA,EAAe,IAAI,sBAAsB,OAAO,CAAA,EAAA,CAAI,CAAC;AAEnE,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE;QACjC,OAAO,CACL,eAAe,EACf,2FAA2F;AACzF,YAAA,iGAAiG,CACpG;IACH;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,2BAA2B,EAAE;AAC/C,QAAA,OAAO,CACL,6BAA6B,EAC7B,sGAAsG,CACvG;IACH;AACF;;;;"}