UNPKG

@shopify/shopify-app-remix

Version:

Shopify Remix - to simplify the building of Shopify Apps with Remix

1 lines 873 B
{"version":3,"file":"ensure-valid-offline-session.mjs","sources":["../../../../../src/server/helpers/ensure-valid-offline-session.ts"],"sourcesContent":["import {BasicParams} from '../types';\n\nimport {createOrLoadOfflineSession} from './create-or-load-offline-session';\nimport {ensureOfflineTokenIsNotExpired} from './ensure-offline-token-is-not-expired';\n\nexport async function ensureValidOfflineSession(\n params: BasicParams,\n shop: string,\n) {\n const session = await createOrLoadOfflineSession(params, shop);\n\n if (!session) return undefined;\n\n return ensureOfflineTokenIsNotExpired(session, params, shop);\n}\n"],"names":[],"mappings":";;;AAKO,eAAe,yBAAyB,CAC7C,MAAmB,EACnB,IAAY,EAAA;IAEZ,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,MAAM,EAAE,IAAI,CAAC;AAE9D,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAO,SAAS;IAE9B,OAAO,8BAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC;AAC9D;;;;"}