{"version":3,"file":"index.mjs","sources":["../../../server/src/preview/index.ts"],"sourcesContent":["import type { Plugin } from '@strapi/types';\n\nimport { routes } from './routes';\nimport { controllers } from './controllers';\nimport { services } from './services';\nimport { getService } from './utils';\n\n/**\n * Check once if the feature is enabled before loading it,\n * so that we can assume it is enabled in the other files.\n */\nconst getFeature = (): Partial => {\n return {\n register() {\n const config = getService(strapi, 'preview-config');\n config.validate();\n config.register();\n },\n bootstrap() {},\n routes,\n controllers,\n services,\n };\n};\n\nexport default getFeature();\n"],"names":["getFeature","register","config","getService","strapi","validate","bootstrap","routes","controllers","services"],"mappings":";;;;;AAOA;;;AAGC,IACD,MAAMA,UAAa,GAAA,IAAA;IACjB,OAAO;AACLC,QAAAA,QAAAA,CAAAA,GAAAA;YACE,MAAMC,MAAAA,GAASC,WAAWC,MAAQ,EAAA,gBAAA,CAAA;AAClCF,YAAAA,MAAAA,CAAOG,QAAQ,EAAA;AACfH,YAAAA,MAAAA,CAAOD,QAAQ,EAAA;AACjB,SAAA;QACAK,SAAa,CAAA,GAAA,EAAA;AACbC,QAAAA,MAAAA;AACAC,QAAAA,WAAAA;AACAC,QAAAA;AACF,KAAA;AACF,CAAA;AAEA,cAAeT,UAAa,EAAA;;;;"}