@strapi/data-transfer
Version:
Data transfer capabilities for Strapi
1 lines • 788 B
Source Map (JSON)
{"version":3,"file":"providers.mjs","sources":["../../src/utils/providers.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { ProviderInitializationError } from '../errors/providers';\n\nexport type ValidStrapiAssertion = (strapi: unknown, msg?: string) => asserts strapi is Core.Strapi;\n\nexport const assertValidStrapi: ValidStrapiAssertion = (strapi?: unknown, msg = '') => {\n if (!strapi) {\n throw new ProviderInitializationError(`${msg}. Strapi instance not found.`);\n }\n};\n"],"names":["assertValidStrapi","strapi","msg","ProviderInitializationError"],"mappings":";;AAMaA,MAAAA,iBAAAA,GAA0C,CAACC,MAAAA,EAAkBC,MAAM,EAAE,GAAA;AAChF,IAAA,IAAI,CAACD,MAAQ,EAAA;AACX,QAAA,MAAM,IAAIE,2BAA4B,CAAA,CAAC,EAAED,GAAAA,CAAI,4BAA4B,CAAC,CAAA;AAC5E;AACF;;;;"}