UNPKG

@strapi/data-transfer

Version:

Data transfer capabilities for Strapi

1 lines 790 B
{"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,2BAAAA,CAA4B,CAAGD,EAAAA,GAAAA,CAAI,4BAA4B,CAAC,CAAA;AAC5E;AACF;;;;"}