octalens-mentions 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,3 +26,4 @@ const App = () => {
26
26
  ] });
27
27
  };
28
28
  exports.App = App;
29
+ //# sourceMappingURL=App-B-QcAxW7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App-B-QcAxW7.js","sources":["../../admin/src/pages/HomePage.tsx","../../admin/src/pages/App.tsx"],"sourcesContent":["import { Main, Box, Typography } from '@strapi/design-system';\nimport { MentionsTable } from '../components/MentionsTable';\nimport { useMentions } from '../hooks/useMentions';\n\nconst HomePage = () => {\n const { mentions, loading, error } = useMentions();\n\n return (\n <Main>\n <Box padding={8}>\n <Typography variant=\"alpha\">\n Mentions\n </Typography>\n </Box>\n <Box paddingLeft={8} paddingRight={8}> \n {loading && <Typography>Loading mentions...</Typography>}\n {error && <Typography textColor=\"danger600\">Error: {error.message}</Typography>}\n {!loading && !error && <MentionsTable mentions={mentions} />}\n </Box>\n </Main>\n );\n};\n\nexport { HomePage };\n","import { Page } from '@strapi/strapi/admin';\nimport { Routes, Route } from 'react-router-dom';\n\nimport { HomePage } from './HomePage';\n\nconst App = () => {\n return (\n <Routes>\n <Route index element={<HomePage />} />\n <Route path=\"*\" element={<Page.Error />} />\n </Routes>\n );\n};\n\nexport { App };\n"],"names":["useMentions","Main","jsx","Box","Typography","jsxs","MentionsTable","Routes","Route","Page"],"mappings":";;;;;;;AAIA,MAAM,WAAW,MAAM;AACrB,QAAM,EAAE,UAAU,SAAS,MAAA,IAAUA,MAAAA,YAAA;AAErC,yCACGC,mBAAA,EACC,UAAA;AAAA,IAAAC,2BAAAA,IAACC,aAAAA,KAAA,EAAI,SAAS,GACZ,UAAAD,2BAAAA,IAACE,2BAAW,SAAQ,SAAQ,sBAE5B,EAAA,CACF;AAAA,IACAC,2BAAAA,KAACF,aAAAA,KAAA,EAAI,aAAa,GAAG,cAAc,GAChC,UAAA;AAAA,MAAA,WAAWD,2BAAAA,IAACE,aAAAA,cAAW,UAAA,sBAAA,CAAmB;AAAA,MAC1C,SAASC,2BAAAA,KAACD,aAAAA,YAAA,EAAW,WAAU,aAAY,UAAA;AAAA,QAAA;AAAA,QAAQ,MAAM;AAAA,MAAA,GAAQ;AAAA,MACjE,CAAC,WAAW,CAAC,SAASF,2BAAAA,IAACI,MAAAA,iBAAc,SAAA,CAAoB;AAAA,IAAA,EAAA,CAC5D;AAAA,EAAA,GACF;AAEJ;AChBA,MAAM,MAAM,MAAM;AAChB,yCACGC,uBAAA,EACC,UAAA;AAAA,IAAAL,+BAACM,eAAAA,SAAM,OAAK,MAAC,SAASN,+BAAC,YAAS,GAAI;AAAA,IACpCA,+BAACM,eAAAA,SAAM,MAAK,KAAI,SAASN,2BAAAA,IAACO,MAAAA,KAAK,OAAL,CAAA,CAAW,EAAA,CAAI;AAAA,EAAA,GAC3C;AAEJ;;"}
@@ -26,3 +26,4 @@ const App = () => {
26
26
  export {
27
27
  App
28
28
  };
29
+ //# sourceMappingURL=App-DjWYlFjn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App-DjWYlFjn.mjs","sources":["../../admin/src/pages/HomePage.tsx","../../admin/src/pages/App.tsx"],"sourcesContent":["import { Main, Box, Typography } from '@strapi/design-system';\nimport { MentionsTable } from '../components/MentionsTable';\nimport { useMentions } from '../hooks/useMentions';\n\nconst HomePage = () => {\n const { mentions, loading, error } = useMentions();\n\n return (\n <Main>\n <Box padding={8}>\n <Typography variant=\"alpha\">\n Mentions\n </Typography>\n </Box>\n <Box paddingLeft={8} paddingRight={8}> \n {loading && <Typography>Loading mentions...</Typography>}\n {error && <Typography textColor=\"danger600\">Error: {error.message}</Typography>}\n {!loading && !error && <MentionsTable mentions={mentions} />}\n </Box>\n </Main>\n );\n};\n\nexport { HomePage };\n","import { Page } from '@strapi/strapi/admin';\nimport { Routes, Route } from 'react-router-dom';\n\nimport { HomePage } from './HomePage';\n\nconst App = () => {\n return (\n <Routes>\n <Route index element={<HomePage />} />\n <Route path=\"*\" element={<Page.Error />} />\n </Routes>\n );\n};\n\nexport { App };\n"],"names":[],"mappings":";;;;;AAIA,MAAM,WAAW,MAAM;AACrB,QAAM,EAAE,UAAU,SAAS,MAAA,IAAU,YAAA;AAErC,8BACG,MAAA,EACC,UAAA;AAAA,IAAA,oBAAC,KAAA,EAAI,SAAS,GACZ,UAAA,oBAAC,cAAW,SAAQ,SAAQ,sBAE5B,EAAA,CACF;AAAA,IACA,qBAAC,KAAA,EAAI,aAAa,GAAG,cAAc,GAChC,UAAA;AAAA,MAAA,WAAW,oBAAC,cAAW,UAAA,sBAAA,CAAmB;AAAA,MAC1C,SAAS,qBAAC,YAAA,EAAW,WAAU,aAAY,UAAA;AAAA,QAAA;AAAA,QAAQ,MAAM;AAAA,MAAA,GAAQ;AAAA,MACjE,CAAC,WAAW,CAAC,SAAS,oBAAC,iBAAc,SAAA,CAAoB;AAAA,IAAA,EAAA,CAC5D;AAAA,EAAA,GACF;AAEJ;AChBA,MAAM,MAAM,MAAM;AAChB,8BACG,QAAA,EACC,UAAA;AAAA,IAAA,oBAAC,SAAM,OAAK,MAAC,SAAS,oBAAC,YAAS,GAAI;AAAA,IACpC,oBAAC,SAAM,MAAK,KAAI,SAAS,oBAAC,KAAK,OAAL,CAAA,CAAW,EAAA,CAAI;AAAA,EAAA,GAC3C;AAEJ;"}
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const en = {};
4
4
  exports.default = en;
5
+ //# sourceMappingURL=en-B4KWt_jN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-B4KWt_jN.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -2,3 +2,4 @@ const en = {};
2
2
  export {
3
3
  en as default
4
4
  };
5
+ //# sourceMappingURL=en-Byx4XI2L.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-Byx4XI2L.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -176,3 +176,4 @@ const index = {
176
176
  exports.MentionsTable = MentionsTable;
177
177
  exports.index = index;
178
178
  exports.useMentions = useMentions;
179
+ //# sourceMappingURL=index-QtHFaCQE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-QtHFaCQE.js","sources":["../../admin/src/pluginId.ts","../../admin/src/components/Initializer.tsx","../../admin/src/components/PluginIcon.tsx","../../admin/src/constants.ts","../../admin/src/hooks/useMentions.ts","../../admin/src/components/MentionsTable/index.tsx","../../admin/src/components/MentionsWidget/index.tsx","../../admin/src/index.ts"],"sourcesContent":["export const PLUGIN_ID = 'octalens-mentions';\n","import { useEffect, useRef } from 'react';\n\nimport { PLUGIN_ID } from '../pluginId';\n\ntype InitializerProps = {\n setPlugin: (id: string) => void;\n};\n\nconst Initializer = ({ setPlugin }: InitializerProps) => {\n const ref = useRef(setPlugin);\n\n useEffect(() => {\n ref.current(PLUGIN_ID);\n }, []);\n\n return null;\n};\n\nexport { Initializer };\n","import { Globe } from '@strapi/icons';\n\nconst PluginIcon = () => <Globe />;\n\nexport { PluginIcon };\n","const BASE_PATH = '/octalens-mentions';\n\nexport const CONSTANTS = {\n routes: {\n MENTIONS_URL: BASE_PATH + '/mentions',\n },\n};\n","import { useEffect, useState } from 'react';\nimport { useFetchClient } from '@strapi/strapi/admin';\nimport type { IMention } from '../types';\nimport { CONSTANTS } from '../constants';\n\nexport function useMentions() {\n const { get } = useFetchClient();\n const [mentions, setMentions] = useState<IMention[]>([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n const fetchMentions = async () => {\n try {\n setLoading(true);\n setError(null);\n const { data } = await get(CONSTANTS.routes.MENTIONS_URL);\n const mentions = data?.data;\n setMentions(mentions || []);\n } catch (error) {\n console.error('Error fetching mentions:', error);\n setError(error instanceof Error ? error : new Error('Failed to fetch mentions'));\n } finally {\n setLoading(false);\n }\n };\n\n fetchMentions();\n }, [get]);\n\n return { mentions, loading, error };\n}\n","import {\n Table,\n Thead,\n Tbody,\n Tr,\n Td,\n Th,\n Typography,\n Checkbox,\n VisuallyHidden,\n Flex,\n Box,\n IconButton,\n} from '@strapi/design-system';\nimport { Pencil, Trash, Eye } from '@strapi/icons';\nimport type { IMention } from '../../types';\n\nconst COL_COUNT = 7;\n\ninterface MentionsTableProps {\n readonly mentions: IMention[];\n}\n\nexport function MentionsTable({ mentions }: MentionsTableProps) {\n return (\n <Table colCount={COL_COUNT} rowCount={mentions.length}>\n <Thead>\n <Tr>\n <Th>\n <Checkbox aria-label=\"Select all entries\" />\n </Th>\n <Th>\n <Typography variant=\"sigma\">Title</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Source</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Keyword</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Relevance Score</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Comment</Typography>\n </Th>\n <Th>\n <VisuallyHidden>Actions</VisuallyHidden>\n </Th>\n </Tr>\n </Thead>\n <Tbody>\n {mentions.map((mention) => (\n <Tr key={mention.documentId}>\n <Td>\n <Checkbox aria-label={`Select ${mention.title}`} />\n </Td>\n <Td>\n <Typography textColor=\"neutral800\" fontWeight=\"bold\">\n {mention.title || 'Untitled'}\n </Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{mention.source}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{mention.keyword}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{mention.relevanceScore}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral600\" ellipsis>\n {mention.relevanceComment?.substring(0, 50)}\n {mention.relevanceComment?.length > 50 ? '...' : ''}\n </Typography>\n </Td>\n <Td>\n <Flex>\n {mention.url && (\n <IconButton\n tag=\"a\"\n href={mention.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n label=\"View source\"\n borderWidth={0}\n >\n <Eye />\n </IconButton>\n )}\n <Box paddingLeft={1}>\n <IconButton\n onClick={() => console.log('edit', mention.documentId)}\n label=\"Edit\"\n borderWidth={0}\n >\n <Pencil />\n </IconButton>\n </Box>\n <Box paddingLeft={1}>\n <IconButton\n onClick={() => console.log('delete', mention.documentId)}\n label=\"Delete\"\n borderWidth={0}\n >\n <Trash />\n </IconButton>\n </Box>\n </Flex>\n </Td>\n </Tr>\n ))}\n </Tbody>\n </Table>\n );\n}\n","import { Box, Typography } from '@strapi/design-system';\nimport { useMentions } from '../../hooks/useMentions';\nimport { MentionsTable } from '../MentionsTable';\n\nexport function MentionsWidget() {\n const { mentions, loading, error } = useMentions();\n\n if (loading) {\n return (\n <Box padding={4}>\n <Typography>Loading mentions...</Typography>\n </Box>\n );\n }\n\n if (error) {\n return (\n <Box padding={4}>\n <Typography textColor=\"danger600\">Error: {error.message}</Typography>\n </Box>\n );\n }\n\n return (\n <Box padding={4}>\n <MentionsTable mentions={mentions} />\n </Box>\n );\n}\n","import { Globe } from \"@strapi/icons\";\n\nimport { PLUGIN_ID } from './pluginId';\nimport { Initializer } from './components/Initializer';\nimport { PluginIcon } from './components/PluginIcon';\nimport { MentionsWidget } from \"./components/MentionsWidget\";\n\nexport default {\n register(app: any) {\n app.addMenuLink({\n to: `plugins/${PLUGIN_ID}`,\n icon: PluginIcon,\n intlLabel: {\n id: `${PLUGIN_ID}.plugin.name`,\n defaultMessage: PLUGIN_ID,\n },\n Component: async () => {\n const { App } = await import('./pages/App');\n\n return App;\n },\n });\n\n app.widgets.register({\n icon: Globe,\n title: {\n id: `${PLUGIN_ID}.mentions-widget.title`,\n defaultMessage: \"Social Mentions\"\n },\n component: () => Promise.resolve(MentionsWidget),\n pluginId: PLUGIN_ID,\n id: \"mentions-widget\"\n })\n\n app.registerPlugin({\n id: PLUGIN_ID,\n initializer: Initializer,\n isReady: false,\n name: PLUGIN_ID,\n });\n\n },\n\n async registerTrads({ locales }: { locales: string[] }) {\n return Promise.all(\n locales.map(async (locale) => {\n try {\n const { default: data } = await import(`./translations/${locale}.json`);\n\n return { data, locale };\n } catch {\n return { data: {}, locale };\n }\n })\n );\n },\n};\n"],"names":["useRef","useEffect","jsx","Globe","useFetchClient","useState","mentions","error","Table","Thead","Tr","Th","Checkbox","Typography","VisuallyHidden","Tbody","Td","jsxs","Flex","IconButton","Eye","Box","Pencil","Trash"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,YAAY;ACQzB,MAAM,cAAc,CAAC,EAAE,gBAAkC;AACvD,QAAM,MAAMA,MAAAA,OAAO,SAAS;AAE5BC,QAAAA,UAAU,MAAM;AACd,QAAI,QAAQ,SAAS;AAAA,EACvB,GAAG,CAAA,CAAE;AAEL,SAAO;AACT;ACdA,MAAM,aAAa,MAAMC,2BAAAA,IAACC,MAAAA,OAAA,EAAM;ACFhC,MAAM,YAAY;AAEX,MAAM,YAAY;AAAA,EACvB,QAAQ;AAAA,IACN,cAAc,YAAY;AAAA,EAAA;AAE9B;ACDO,SAAS,cAAc;AAC5B,QAAM,EAAE,IAAA,IAAQC,qBAAA;AAChB,QAAM,CAAC,UAAU,WAAW,IAAIC,MAAAA,SAAqB,CAAA,CAAE;AACvD,QAAM,CAAC,SAAS,UAAU,IAAIA,MAAAA,SAAS,IAAI;AAC3C,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAuB,IAAI;AAErDJ,QAAAA,UAAU,MAAM;AACd,UAAM,gBAAgB,YAAY;AAChC,UAAI;AACF,mBAAW,IAAI;AACf,iBAAS,IAAI;AACb,cAAM,EAAE,KAAA,IAAS,MAAM,IAAI,UAAU,OAAO,YAAY;AACxD,cAAMK,YAAW,MAAM;AACvB,oBAAYA,aAAY,EAAE;AAAA,MAC5B,SAASC,QAAO;AACd,gBAAQ,MAAM,4BAA4BA,MAAK;AAC/C,iBAASA,kBAAiB,QAAQA,SAAQ,IAAI,MAAM,0BAA0B,CAAC;AAAA,MACjF,UAAA;AACE,mB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;AAAA,MAElB,WAAW,YAAY;AACrB,cAAM,EAAE,IAAA,IAAQ,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,mBAAa,CAAA;AAE1C,eAAO;AAAA,MACT;AAAA,IAAA,CACD;AAED,QAAI,QAAQ,SAAS;AAAA,MACnB,MAAMC,MAAAA;AAAAA,MACN,OAAO;AAAA,QACL,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,WAAW,MAAM,QAAQ,QAAQ,cAAc;AAAA,MAC/C,UAAU;AAAA,MACV,IAAI;AAAA,IAAA,CACL;AAED,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ,aAAa;AAAA,MACb,SAAS;AAAA,MACT,MAAM;AAAA,IAAA,CACP;AAAA,EAEH;AAAA,EAEA,MAAM,cAAc,EAAE,WAAkC;AACtD,WAAO,QAAQ;AAAA,MACb,QAAQ,IAAI,OAAO,WAAW;AAC5B,YAAI;AACF,gBAAM,EAAE,SAAS,KAAA,IAAS,MAAM,qCAAA,uBAAA,OAAA,EAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,kBAAA,CAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,SAAA,CAAA;AAEhC,iBAAO,EAAE,MAAM,OAAA;AAAA,QACjB,QAAQ;AACN,iBAAO,EAAE,MAAM,CAAA,GAAI,OAAA;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IAAA;AAAA,EAEL;AACF;;;;"}
@@ -177,3 +177,4 @@ export {
177
177
  index as i,
178
178
  useMentions as u
179
179
  };
180
+ //# sourceMappingURL=index-S3IY0oBe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-S3IY0oBe.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/components/Initializer.tsx","../../admin/src/components/PluginIcon.tsx","../../admin/src/constants.ts","../../admin/src/hooks/useMentions.ts","../../admin/src/components/MentionsTable/index.tsx","../../admin/src/components/MentionsWidget/index.tsx","../../admin/src/index.ts"],"sourcesContent":["export const PLUGIN_ID = 'octalens-mentions';\n","import { useEffect, useRef } from 'react';\n\nimport { PLUGIN_ID } from '../pluginId';\n\ntype InitializerProps = {\n setPlugin: (id: string) => void;\n};\n\nconst Initializer = ({ setPlugin }: InitializerProps) => {\n const ref = useRef(setPlugin);\n\n useEffect(() => {\n ref.current(PLUGIN_ID);\n }, []);\n\n return null;\n};\n\nexport { Initializer };\n","import { Globe } from '@strapi/icons';\n\nconst PluginIcon = () => <Globe />;\n\nexport { PluginIcon };\n","const BASE_PATH = '/octalens-mentions';\n\nexport const CONSTANTS = {\n routes: {\n MENTIONS_URL: BASE_PATH + '/mentions',\n },\n};\n","import { useEffect, useState } from 'react';\nimport { useFetchClient } from '@strapi/strapi/admin';\nimport type { IMention } from '../types';\nimport { CONSTANTS } from '../constants';\n\nexport function useMentions() {\n const { get } = useFetchClient();\n const [mentions, setMentions] = useState<IMention[]>([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n const fetchMentions = async () => {\n try {\n setLoading(true);\n setError(null);\n const { data } = await get(CONSTANTS.routes.MENTIONS_URL);\n const mentions = data?.data;\n setMentions(mentions || []);\n } catch (error) {\n console.error('Error fetching mentions:', error);\n setError(error instanceof Error ? error : new Error('Failed to fetch mentions'));\n } finally {\n setLoading(false);\n }\n };\n\n fetchMentions();\n }, [get]);\n\n return { mentions, loading, error };\n}\n","import {\n Table,\n Thead,\n Tbody,\n Tr,\n Td,\n Th,\n Typography,\n Checkbox,\n VisuallyHidden,\n Flex,\n Box,\n IconButton,\n} from '@strapi/design-system';\nimport { Pencil, Trash, Eye } from '@strapi/icons';\nimport type { IMention } from '../../types';\n\nconst COL_COUNT = 7;\n\ninterface MentionsTableProps {\n readonly mentions: IMention[];\n}\n\nexport function MentionsTable({ mentions }: MentionsTableProps) {\n return (\n <Table colCount={COL_COUNT} rowCount={mentions.length}>\n <Thead>\n <Tr>\n <Th>\n <Checkbox aria-label=\"Select all entries\" />\n </Th>\n <Th>\n <Typography variant=\"sigma\">Title</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Source</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Keyword</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Relevance Score</Typography>\n </Th>\n <Th>\n <Typography variant=\"sigma\">Comment</Typography>\n </Th>\n <Th>\n <VisuallyHidden>Actions</VisuallyHidden>\n </Th>\n </Tr>\n </Thead>\n <Tbody>\n {mentions.map((mention) => (\n <Tr key={mention.documentId}>\n <Td>\n <Checkbox aria-label={`Select ${mention.title}`} />\n </Td>\n <Td>\n <Typography textColor=\"neutral800\" fontWeight=\"bold\">\n {mention.title || 'Untitled'}\n </Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{mention.source}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{mention.keyword}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral800\">{mention.relevanceScore}</Typography>\n </Td>\n <Td>\n <Typography textColor=\"neutral600\" ellipsis>\n {mention.relevanceComment?.substring(0, 50)}\n {mention.relevanceComment?.length > 50 ? '...' : ''}\n </Typography>\n </Td>\n <Td>\n <Flex>\n {mention.url && (\n <IconButton\n tag=\"a\"\n href={mention.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n label=\"View source\"\n borderWidth={0}\n >\n <Eye />\n </IconButton>\n )}\n <Box paddingLeft={1}>\n <IconButton\n onClick={() => console.log('edit', mention.documentId)}\n label=\"Edit\"\n borderWidth={0}\n >\n <Pencil />\n </IconButton>\n </Box>\n <Box paddingLeft={1}>\n <IconButton\n onClick={() => console.log('delete', mention.documentId)}\n label=\"Delete\"\n borderWidth={0}\n >\n <Trash />\n </IconButton>\n </Box>\n </Flex>\n </Td>\n </Tr>\n ))}\n </Tbody>\n </Table>\n );\n}\n","import { Box, Typography } from '@strapi/design-system';\nimport { useMentions } from '../../hooks/useMentions';\nimport { MentionsTable } from '../MentionsTable';\n\nexport function MentionsWidget() {\n const { mentions, loading, error } = useMentions();\n\n if (loading) {\n return (\n <Box padding={4}>\n <Typography>Loading mentions...</Typography>\n </Box>\n );\n }\n\n if (error) {\n return (\n <Box padding={4}>\n <Typography textColor=\"danger600\">Error: {error.message}</Typography>\n </Box>\n );\n }\n\n return (\n <Box padding={4}>\n <MentionsTable mentions={mentions} />\n </Box>\n );\n}\n","import { Globe } from \"@strapi/icons\";\n\nimport { PLUGIN_ID } from './pluginId';\nimport { Initializer } from './components/Initializer';\nimport { PluginIcon } from './components/PluginIcon';\nimport { MentionsWidget } from \"./components/MentionsWidget\";\n\nexport default {\n register(app: any) {\n app.addMenuLink({\n to: `plugins/${PLUGIN_ID}`,\n icon: PluginIcon,\n intlLabel: {\n id: `${PLUGIN_ID}.plugin.name`,\n defaultMessage: PLUGIN_ID,\n },\n Component: async () => {\n const { App } = await import('./pages/App');\n\n return App;\n },\n });\n\n app.widgets.register({\n icon: Globe,\n title: {\n id: `${PLUGIN_ID}.mentions-widget.title`,\n defaultMessage: \"Social Mentions\"\n },\n component: () => Promise.resolve(MentionsWidget),\n pluginId: PLUGIN_ID,\n id: \"mentions-widget\"\n })\n\n app.registerPlugin({\n id: PLUGIN_ID,\n initializer: Initializer,\n isReady: false,\n name: PLUGIN_ID,\n });\n\n },\n\n async registerTrads({ locales }: { locales: string[] }) {\n return Promise.all(\n locales.map(async (locale) => {\n try {\n const { default: data } = await import(`./translations/${locale}.json`);\n\n return { data, locale };\n } catch {\n return { data: {}, locale };\n }\n })\n );\n },\n};\n"],"names":["mentions","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,YAAY;ACQzB,MAAM,cAAc,CAAC,EAAE,gBAAkC;AACvD,QAAM,MAAM,OAAO,SAAS;AAE5B,YAAU,MAAM;AACd,QAAI,QAAQ,SAAS;AAAA,EACvB,GAAG,CAAA,CAAE;AAEL,SAAO;AACT;ACdA,MAAM,aAAa,MAAM,oBA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AAM;AAAA,MACN,WAAW;AAAA,QACT,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,WAAW,YAAY;AACrB,cAAM,EAAE,IAAA,IAAQ,MAAM,OAAO,oBAAa;AAE1C,eAAO;AAAA,MACT;AAAA,IAAA,CACD;AAED,QAAI,QAAQ,SAAS;AAAA,MACnB,MAAM;AAAA,MACN,OAAO;AAAA,QACL,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,WAAW,MAAM,QAAQ,QAAQ,cAAc;AAAA,MAC/C,UAAU;AAAA,MACV,IAAI;AAAA,IAAA,CACL;AAED,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ,aAAa;AAAA,MACb,SAAS;AAAA,MACT,MAAM;AAAA,IAAA,CACP;AAAA,EAEH;AAAA,EAEA,MAAM,cAAc,EAAE,WAAkC;AACtD,WAAO,QAAQ;AAAA,MACb,QAAQ,IAAI,OAAO,WAAW;AAC5B,YAAI;AACF,gBAAM,EAAE,SAAS,KAAA,IAAS,MAAM,qCAAA,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,mBAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,SAAA,CAAA;AAEhC,iBAAO,EAAE,MAAM,OAAA;AAAA,QACjB,QAAQ;AACN,iBAAO,EAAE,MAAM,CAAA,GAAI,OAAA;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IAAA;AAAA,EAEL;AACF;"}
@@ -2,3 +2,4 @@
2
2
  const index = require("../_chunks/index-QtHFaCQE.js");
3
3
  require("@strapi/icons");
4
4
  module.exports = index.index;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -3,3 +3,4 @@ import "@strapi/icons";
3
3
  export {
4
4
  i as default
5
5
  };
6
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -4,19 +4,6 @@ const bootstrap = ({ strapi }) => {
4
4
  const destroy = ({ strapi }) => {
5
5
  };
6
6
  const register = ({ strapi }) => {
7
- strapi.server.use(async (ctx, next) => {
8
- if (ctx.path === "/api/octalens-mentions/ingest" && ctx.method === "POST") {
9
- console.log("=== INGEST REQUEST RECEIVED ===");
10
- console.log("Path:", ctx.path);
11
- console.log("Method:", ctx.method);
12
- console.log("Content-Type:", ctx.request.headers["content-type"]);
13
- if (ctx.request.body) {
14
- console.log("Parsed Body:", JSON.stringify(ctx.request.body, null, 2));
15
- }
16
- console.log("=================================");
17
- }
18
- await next();
19
- });
20
7
  };
21
8
  const config = {
22
9
  default: {},
@@ -127,13 +114,8 @@ function getMentionTitle(title, body) {
127
114
  }
128
115
  const controller = ({ strapi }) => ({
129
116
  async ingest(ctx) {
130
- console.log("Raw request body:", JSON.stringify(ctx.request.body, null, 2));
131
- console.log("###############################");
132
- console.log("Raw mention data:", ctx.request.body);
133
- console.log("###############################");
134
117
  const requestBody = ctx.request.body;
135
118
  if (!requestBody?.data) return ctx.badRequest("Missing data in request body");
136
- ctx.body = { data: requestBody?.data };
137
119
  const rawTitle = requestBody.data?.title || "";
138
120
  const rawBody = requestBody.data?.body || "";
139
121
  const generatedTitle = getMentionTitle(rawTitle, rawBody);
@@ -158,9 +140,6 @@ const controller = ({ strapi }) => ({
158
140
  viewName: requestBody.data?.viewName || "",
159
141
  subreddit: requestBody.data?.subreddit || ""
160
142
  };
161
- console.log("###############################");
162
- console.log("Parsed mention data:", mentionData);
163
- console.log("###############################");
164
143
  try {
165
144
  const mention2 = await strapi.service("plugin::octalens-mentions.mention").create({
166
145
  data: mentionData
@@ -176,26 +155,7 @@ const controllers = {
176
155
  mention: mention$1,
177
156
  ingest: controller
178
157
  };
179
- const logRawBody = (config2, { strapi }) => {
180
- return async (ctx, next) => {
181
- if (ctx.path === "/api/octalens-mentions/ingest" && ctx.method === "POST") {
182
- const chunks = [];
183
- ctx.req.on("data", (chunk) => {
184
- chunks.push(chunk);
185
- });
186
- ctx.req.on("end", () => {
187
- const rawBody = Buffer.concat(chunks).toString("utf8");
188
- console.log("=== RAW REQUEST BODY ===");
189
- console.log(rawBody);
190
- console.log("=== END RAW REQUEST BODY ===");
191
- });
192
- }
193
- await next();
194
- };
195
- };
196
- const middlewares = {
197
- logRawBody
198
- };
158
+ const middlewares = {};
199
159
  const policies = {};
200
160
  const adminApiRoutes = [
201
161
  {
@@ -282,3 +242,4 @@ const index = {
282
242
  middlewares
283
243
  };
284
244
  module.exports = index;
245
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../server/src/bootstrap.ts","../../server/src/destroy.ts","../../server/src/register.ts","../../server/src/config/index.ts","../../server/src/content-types/mention/index.ts","../../server/src/content-types/index.ts","../../server/src/controllers/mention/index.ts","../../server/src/controllers/ingest/index.ts","../../server/src/controllers/index.ts","../../server/src/middlewares/index.ts","../../server/src/policies/index.ts","../../server/src/routes/admin-api.ts","../../server/src/routes/content-api.ts","../../server/src/routes/index.ts","../../server/src/services/mention/index.ts","../../server/src/services/index.ts","../../server/src/index.ts"],"sourcesContent":["import type { Core } from '@strapi/strapi';\n\nconst bootstrap = ({ strapi }: { strapi: Core.Strapi }) => {\n // bootstrap phase\n};\n\nexport default bootstrap;\n","import type { Core } from '@strapi/strapi';\n\nconst destroy = ({ strapi }: { strapi: Core.Strapi }) => {\n // destroy phase\n};\n\nexport default destroy;\n","import type { Core } from '@strapi/strapi';\n\nconst register = ({ strapi }: { strapi: Core.Strapi }) => {\n // register phase\n};\n\nexport default register;\n","export default {\n default: {},\n validator() {},\n};\n","import schema from './schema.json';\n\nexport default {\n schema,\n};","import mention from './mention';\n\nexport default {\n mention,\n};","'use strict';\n\n/**\n * mention controller\n */\n\nconst { createCoreController } = require('@strapi/strapi').factories;\n\nexport default createCoreController('plugin::octalens-mentions.mention');","import type { Core } from '@strapi/strapi';\n\n/**\n * Gets the display title for a mention.\n * If title is empty or \"Untitled\", uses the first 100 characters from body.\n */\nfunction getMentionTitle(title: string, body: string): string {\n if (!title || title.trim() === '' || title.toLowerCase() === 'untitled') {\n if (!body) return 'Untitled';\n\n const excerpt = body.substring(0, 100).trim();\n return excerpt.length === 100 ? `${excerpt}...` : excerpt;\n }\n\n return title;\n}\n\nconst controller = ({ strapi }: { strapi: Core.Strapi }) => ({\n async ingest(ctx) {\n const requestBody = ctx.request.body;\n\n if (!requestBody?.data) return ctx.badRequest('Missing data in request body');\n\n const rawTitle = requestBody.data?.title || '';\n const rawBody = requestBody.data?.body || '';\n const generatedTitle = getMentionTitle(rawTitle, rawBody);\n\n const mentionData = {\n action: requestBody.action,\n title: generatedTitle,\n body: rawBody,\n url: requestBody.data?.url || '',\n timestamp: requestBody.data?.timestamp || '',\n imageUrl: requestBody.data?.imageUrl || '',\n author: requestBody.data?.author || '',\n authorProfileLink: requestBody.data?.authorProfileLink || '',\n source: requestBody.data?.source || '',\n sourceId: requestBody.data?.sourceId || '',\n relevanceScore: requestBody.data?.relevanceScore || '',\n relevanceComment: requestBody.data?.relevanceComment || '',\n keyword: requestBody.data?.keyword || '',\n bookmarked: requestBody.data?.bookmarked || false,\n language: requestBody.data?.language || '',\n sentimentLabel: requestBody.data?.sentimentLabel || '',\n viewId: requestBody.data?.viewId || null,\n viewName: requestBody.data?.viewName || '',\n subreddit: requestBody.data?.subreddit || '',\n };\n\n try {\n const mention = await strapi.service('plugin::octalens-mentions.mention').create({\n data: mentionData,\n });\n\n ctx.body = { data: mention };\n } catch (error) {\n console.error('Error creating mention:', error);\n ctx.throw(500, 'Failed to create mention');\n }\n },\n});\n\nexport default controller;\n","import mention from './mention';\nimport ingest from './ingest';\n\nexport default {\n mention,\n ingest\n};","export default {};\n","export default {};\n","export default [\n {\n method: 'GET',\n path: '/mentions',\n handler: 'mention.find',\n config: {\n policies: ['admin::isAuthenticatedAdmin'],\n },\n },\n];\n","export default [\n {\n method: 'GET',\n path: '/mentions',\n handler: 'mention.find',\n config: {\n policies: [],\n },\n },\n {\n method: 'GET',\n path: '/mentions/:id',\n handler: 'mention.findOne',\n config: {\n policies: [],\n },\n },\n {\n method: 'DELETE',\n path: '/mentions/:id',\n handler: 'mention.delete',\n config: {\n policies: [],\n },\n },\n {\n method: 'PUT',\n path: '/mentions/:id',\n handler: 'mention.update',\n config: {\n policies: [],\n },\n },\n {\n method: 'POST',\n path: '/mentions',\n handler: 'mention.create',\n config: {\n policies: [],\n },\n },\n {\n method: 'POST',\n path: '/ingest',\n handler: 'ingest.ingest'\n }\n];\n","\"use strict\";\n\nimport adminApiRoutes from \"./admin-api\";\nimport contentApiRoutes from \"./content-api\";\n\n\nexport default {\n \"admin-api\": {\n type: \"admin\",\n routes: [...adminApiRoutes],\n },\n \"content-api\": {\n type: \"content-api\",\n routes: [...contentApiRoutes],\n },\n};","'use strict';\n\n/**\n * mention service\n */\n\nconst { createCoreService } = require('@strapi/strapi').factories;\n\nexport default createCoreService('plugin::octalens-mentions.mention');\n","import mention from './mention';\n\nexport default {\n mention,\n};\n","/**\n * Application methods\n */\nimport bootstrap from './bootstrap';\nimport destroy from './destroy';\nimport register from './register';\n\n/**\n * Plugin server methods\n */\nimport config from './config';\nimport contentTypes from './content-types';\nimport controllers from './controllers';\nimport middlewares from './middlewares';\nimport policies from './policies';\nimport routes from './routes';\nimport services from './services';\n\nexport default {\n register,\n bootstrap,\n destroy,\n config,\n controllers,\n routes,\n services,\n contentTypes,\n policies,\n middlewares,\n};\n"],"names":["mention","ingest"],"mappings":";AAEA,MAAM,YAAY,CAAC,EAAE,aAAsC;AAE3D;ACFA,MAAM,UAAU,CAAC,EAAE,aAAsC;AAEzD;ACFA,MAAM,WAAW,CAAC,EAAE,aAAsC;AAE1D;ACJA,MAAA,SAAe;AAAA,EACb,SAAS,CAAA;AAAA,EACT,YAAY;AAAA,EAAC;AACf;;;;;;;;;;;;;;;;;;;;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,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,MACN,UAAU,CAAA;AAAA,IAAC;AAAA,EACb;AAAA,EAEF;AAAA,IACE,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,MACN,UAAU,CAAA;AAAA,IAAC;AAAA,EACb;AAAA,EAEF;AAAA,IACE,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;ACxCA,MAAA,SAAe;AAAA,EACb,aAAa;AAAA,IACX,MAAM;AAAA,IACN,QAAQ,CAAC,GAAG,cAAc;AAAA,EAAA;AAAA,EAE5B,eAAe;AAAA,IACb,MAAM;AAAA,IACN,QAAQ,CAAC,GAAG,gBAAgB;AAAA,EAAA;AAEhC;ACTA,MAAM,EAAE,kBAAA,IAAsB,QAAQ,gBAAgB,EAAE;AAExD,MAAA,UAAe,kBAAkB,mCAAmC;ACNpE,MAAA,WAAe;AAAA,EACb;AACF;ACcA,MAAA,QAAe;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;"}
@@ -3,19 +3,6 @@ const bootstrap = ({ strapi }) => {
3
3
  const destroy = ({ strapi }) => {
4
4
  };
5
5
  const register = ({ strapi }) => {
6
- strapi.server.use(async (ctx, next) => {
7
- if (ctx.path === "/api/octalens-mentions/ingest" && ctx.method === "POST") {
8
- console.log("=== INGEST REQUEST RECEIVED ===");
9
- console.log("Path:", ctx.path);
10
- console.log("Method:", ctx.method);
11
- console.log("Content-Type:", ctx.request.headers["content-type"]);
12
- if (ctx.request.body) {
13
- console.log("Parsed Body:", JSON.stringify(ctx.request.body, null, 2));
14
- }
15
- console.log("=================================");
16
- }
17
- await next();
18
- });
19
6
  };
20
7
  const config = {
21
8
  default: {},
@@ -126,13 +113,8 @@ function getMentionTitle(title, body) {
126
113
  }
127
114
  const controller = ({ strapi }) => ({
128
115
  async ingest(ctx) {
129
- console.log("Raw request body:", JSON.stringify(ctx.request.body, null, 2));
130
- console.log("###############################");
131
- console.log("Raw mention data:", ctx.request.body);
132
- console.log("###############################");
133
116
  const requestBody = ctx.request.body;
134
117
  if (!requestBody?.data) return ctx.badRequest("Missing data in request body");
135
- ctx.body = { data: requestBody?.data };
136
118
  const rawTitle = requestBody.data?.title || "";
137
119
  const rawBody = requestBody.data?.body || "";
138
120
  const generatedTitle = getMentionTitle(rawTitle, rawBody);
@@ -157,9 +139,6 @@ const controller = ({ strapi }) => ({
157
139
  viewName: requestBody.data?.viewName || "",
158
140
  subreddit: requestBody.data?.subreddit || ""
159
141
  };
160
- console.log("###############################");
161
- console.log("Parsed mention data:", mentionData);
162
- console.log("###############################");
163
142
  try {
164
143
  const mention2 = await strapi.service("plugin::octalens-mentions.mention").create({
165
144
  data: mentionData
@@ -175,26 +154,7 @@ const controllers = {
175
154
  mention: mention$1,
176
155
  ingest: controller
177
156
  };
178
- const logRawBody = (config2, { strapi }) => {
179
- return async (ctx, next) => {
180
- if (ctx.path === "/api/octalens-mentions/ingest" && ctx.method === "POST") {
181
- const chunks = [];
182
- ctx.req.on("data", (chunk) => {
183
- chunks.push(chunk);
184
- });
185
- ctx.req.on("end", () => {
186
- const rawBody = Buffer.concat(chunks).toString("utf8");
187
- console.log("=== RAW REQUEST BODY ===");
188
- console.log(rawBody);
189
- console.log("=== END RAW REQUEST BODY ===");
190
- });
191
- }
192
- await next();
193
- };
194
- };
195
- const middlewares = {
196
- logRawBody
197
- };
157
+ const middlewares = {};
198
158
  const policies = {};
199
159
  const adminApiRoutes = [
200
160
  {
@@ -283,3 +243,4 @@ const index = {
283
243
  export {
284
244
  index as default
285
245
  };
246
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../server/src/bootstrap.ts","../../server/src/destroy.ts","../../server/src/register.ts","../../server/src/config/index.ts","../../server/src/content-types/mention/index.ts","../../server/src/content-types/index.ts","../../server/src/controllers/mention/index.ts","../../server/src/controllers/ingest/index.ts","../../server/src/controllers/index.ts","../../server/src/middlewares/index.ts","../../server/src/policies/index.ts","../../server/src/routes/admin-api.ts","../../server/src/routes/content-api.ts","../../server/src/routes/index.ts","../../server/src/services/mention/index.ts","../../server/src/services/index.ts","../../server/src/index.ts"],"sourcesContent":["import type { Core } from '@strapi/strapi';\n\nconst bootstrap = ({ strapi }: { strapi: Core.Strapi }) => {\n // bootstrap phase\n};\n\nexport default bootstrap;\n","import type { Core } from '@strapi/strapi';\n\nconst destroy = ({ strapi }: { strapi: Core.Strapi }) => {\n // destroy phase\n};\n\nexport default destroy;\n","import type { Core } from '@strapi/strapi';\n\nconst register = ({ strapi }: { strapi: Core.Strapi }) => {\n // register phase\n};\n\nexport default register;\n","export default {\n default: {},\n validator() {},\n};\n","import schema from './schema.json';\n\nexport default {\n schema,\n};","import mention from './mention';\n\nexport default {\n mention,\n};","'use strict';\n\n/**\n * mention controller\n */\n\nconst { createCoreController } = require('@strapi/strapi').factories;\n\nexport default createCoreController('plugin::octalens-mentions.mention');","import type { Core } from '@strapi/strapi';\n\n/**\n * Gets the display title for a mention.\n * If title is empty or \"Untitled\", uses the first 100 characters from body.\n */\nfunction getMentionTitle(title: string, body: string): string {\n if (!title || title.trim() === '' || title.toLowerCase() === 'untitled') {\n if (!body) return 'Untitled';\n\n const excerpt = body.substring(0, 100).trim();\n return excerpt.length === 100 ? `${excerpt}...` : excerpt;\n }\n\n return title;\n}\n\nconst controller = ({ strapi }: { strapi: Core.Strapi }) => ({\n async ingest(ctx) {\n const requestBody = ctx.request.body;\n\n if (!requestBody?.data) return ctx.badRequest('Missing data in request body');\n\n const rawTitle = requestBody.data?.title || '';\n const rawBody = requestBody.data?.body || '';\n const generatedTitle = getMentionTitle(rawTitle, rawBody);\n\n const mentionData = {\n action: requestBody.action,\n title: generatedTitle,\n body: rawBody,\n url: requestBody.data?.url || '',\n timestamp: requestBody.data?.timestamp || '',\n imageUrl: requestBody.data?.imageUrl || '',\n author: requestBody.data?.author || '',\n authorProfileLink: requestBody.data?.authorProfileLink || '',\n source: requestBody.data?.source || '',\n sourceId: requestBody.data?.sourceId || '',\n relevanceScore: requestBody.data?.relevanceScore || '',\n relevanceComment: requestBody.data?.relevanceComment || '',\n keyword: requestBody.data?.keyword || '',\n bookmarked: requestBody.data?.bookmarked || false,\n language: requestBody.data?.language || '',\n sentimentLabel: requestBody.data?.sentimentLabel || '',\n viewId: requestBody.data?.viewId || null,\n viewName: requestBody.data?.viewName || '',\n subreddit: requestBody.data?.subreddit || '',\n };\n\n try {\n const mention = await strapi.service('plugin::octalens-mentions.mention').create({\n data: mentionData,\n });\n\n ctx.body = { data: mention };\n } catch (error) {\n console.error('Error creating mention:', error);\n ctx.throw(500, 'Failed to create mention');\n }\n },\n});\n\nexport default controller;\n","import mention from './mention';\nimport ingest from './ingest';\n\nexport default {\n mention,\n ingest\n};","export default {};\n","export default {};\n","export default [\n {\n method: 'GET',\n path: '/mentions',\n handler: 'mention.find',\n config: {\n policies: ['admin::isAuthenticatedAdmin'],\n },\n },\n];\n","export default [\n {\n method: 'GET',\n path: '/mentions',\n handler: 'mention.find',\n config: {\n policies: [],\n },\n },\n {\n method: 'GET',\n path: '/mentions/:id',\n handler: 'mention.findOne',\n config: {\n policies: [],\n },\n },\n {\n method: 'DELETE',\n path: '/mentions/:id',\n handler: 'mention.delete',\n config: {\n policies: [],\n },\n },\n {\n method: 'PUT',\n path: '/mentions/:id',\n handler: 'mention.update',\n config: {\n policies: [],\n },\n },\n {\n method: 'POST',\n path: '/mentions',\n handler: 'mention.create',\n config: {\n policies: [],\n },\n },\n {\n method: 'POST',\n path: '/ingest',\n handler: 'ingest.ingest'\n }\n];\n","\"use strict\";\n\nimport adminApiRoutes from \"./admin-api\";\nimport contentApiRoutes from \"./content-api\";\n\n\nexport default {\n \"admin-api\": {\n type: \"admin\",\n routes: [...adminApiRoutes],\n },\n \"content-api\": {\n type: \"content-api\",\n routes: [...contentApiRoutes],\n },\n};","'use strict';\n\n/**\n * mention service\n */\n\nconst { createCoreService } = require('@strapi/strapi').factories;\n\nexport default createCoreService('plugin::octalens-mentions.mention');\n","import mention from './mention';\n\nexport default {\n mention,\n};\n","/**\n * Application methods\n */\nimport bootstrap from './bootstrap';\nimport destroy from './destroy';\nimport register from './register';\n\n/**\n * Plugin server methods\n */\nimport config from './config';\nimport contentTypes from './content-types';\nimport controllers from './controllers';\nimport middlewares from './middlewares';\nimport policies from './policies';\nimport routes from './routes';\nimport services from './services';\n\nexport default {\n register,\n bootstrap,\n destroy,\n config,\n controllers,\n routes,\n services,\n contentTypes,\n policies,\n middlewares,\n};\n"],"names":["mention","ingest"],"mappings":"AAEA,MAAM,YAAY,CAAC,EAAE,aAAsC;AAE3D;ACFA,MAAM,UAAU,CAAC,EAAE,aAAsC;AAEzD;ACFA,MAAM,WAAW,CAAC,EAAE,aAAsC;AAE1D;ACJA,MAAA,SAAe;AAAA,EACb,SAAS,CAAA;AAAA,EACT,YAAY;AAAA,EAAC;AACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACDA,MAAA,YAAe;AAAA,EACb;AACF;ACFA,MAAA,eAAe;AAAA,EAAA,SACbA;AACF;ACEA,MAAM,EAAE,qBAAA,IAAyB,QAAQ,gBAAgB,EAAE;AAE3D,MAAA,YAAe,qBAAqB,mCAAmC;ACFvE,SAAS,gBAAgB,OAAe,MAAsB;AAC5D,MAAI,CAAC,SAAS,MAAM,KAAA,MAAW,MAAM,MAAM,YAAA,MAAkB,YAAY;AACvE,QAAI,CAAC,KAAM,QAAO;AAElB,UAAM,UAAU,KAAK,UAAU,GAAG,GAAG,EAAE,KAAA;AACvC,WAAO,QAAQ,WAAW,MAAM,GAAG,OAAO,QAAQ;AAAA,EACpD;AAEA,SAAO;AACT;AAEA,MAAM,aAAa,CAAC,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AE;AAExD,MAAA,UAAe,kBAAkB,mCAAmC;ACNpE,MAAA,WAAe;AAAA,EACb;AACF;ACcA,MAAA,QAAe;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -137,10 +137,6 @@ declare const _default: {
137
137
  };
138
138
  };
139
139
  policies: {};
140
- middlewares: {
141
- logRawBody: (config: any, { strapi }: {
142
- strapi: import("@strapi/types/dist/core").Strapi;
143
- }) => (ctx: any, next: any) => Promise<void>;
144
- };
140
+ middlewares: {};
145
141
  };
146
142
  export default _default;
@@ -1,6 +1,2 @@
1
- declare const _default: {
2
- logRawBody: (config: any, { strapi }: {
3
- strapi: import("@strapi/types/dist/core").Strapi;
4
- }) => (ctx: any, next: any) => Promise<void>;
5
- };
1
+ declare const _default: {};
6
2
  export default _default;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.8",
2
+ "version": "0.0.10",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "exports": {
@@ -1,5 +0,0 @@
1
- import type { Core } from '@strapi/strapi';
2
- declare const _default: (config: any, { strapi }: {
3
- strapi: Core.Strapi;
4
- }) => (ctx: any, next: any) => Promise<void>;
5
- export default _default;