@backstage-community/plugin-jfrog-artifactory 1.10.6 → 1.11.0
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.
- package/CHANGELOG.md +6 -0
- package/dist/api/index.esm.js.map +1 -1
- package/dist/components/JfrogArtifactoryDashboardPage/JfrogArtifactoryDashboardPage.esm.js.map +1 -1
- package/dist/components/JfrogArtifactoryRepository/JfrogArtifactoryRepository.esm.js.map +1 -1
- package/dist/components/JfrogArtifactoryRepository/tableHeading.esm.js.map +1 -1
- package/dist/components/useJfrogArtifactoryAppData.esm.js.map +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/package.json +17 -10
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ConfigApi,\n createApiRef,\n DiscoveryApi,\n IdentityApi,\n} from '@backstage/core-plugin-api';\n\nimport { TagsResponse } from '../types';\n\nconst DEFAULT_PROXY_PATH = '/jfrog-artifactory/api';\n\nexport interface JfrogArtifactoryApiV1 {\n getTags(repo: string): Promise<TagsResponse>;\n}\n\nexport const jfrogArtifactoryApiRef = createApiRef<JfrogArtifactoryApiV1>({\n id: 'plugin.jfrog-artifactory.service',\n});\n\nexport type Options = {\n discoveryApi: DiscoveryApi;\n configApi: ConfigApi;\n identityApi: IdentityApi;\n};\n\nexport class JfrogArtifactoryApiClient implements JfrogArtifactoryApiV1 {\n // @ts-ignore\n private readonly discoveryApi: DiscoveryApi;\n\n private readonly configApi: ConfigApi;\n\n private readonly identityApi: IdentityApi;\n\n constructor(options: Options) {\n this.discoveryApi = options.discoveryApi;\n this.configApi = options.configApi;\n this.identityApi = options.identityApi;\n }\n\n private async getBaseUrl() {\n const proxyPath =\n this.configApi.getOptionalString('jfrogArtifactory.proxyPath') ||\n DEFAULT_PROXY_PATH;\n return `${await this.discoveryApi.getBaseUrl('proxy')}${proxyPath}`;\n }\n\n private async fetcher(url: string, query: string) {\n const { token: idToken } = await this.identityApi.getCredentials();\n const response = await fetch(url, {\n headers: {\n 'Content-Type': 'application/json',\n ...(idToken && { Authorization: `Bearer ${idToken}` }),\n },\n method: 'POST',\n body: query,\n });\n if (!response.ok) {\n throw new Error(\n `failed to fetch data, status ${response.status}: ${response.statusText}`,\n );\n }\n return await response.json();\n }\n\n async getTags(repo: string) {\n const proxyUrl = await this.getBaseUrl();\n const tagQuery = {\n query:\n 'query ($filter: VersionFilter!, $first: Int, $orderBy: VersionOrder) { versions (filter: $filter, first: $first, orderBy: $orderBy) { edges { node { name, created, modified, package { id }, repos { name, type, leadFilePath }, licenses { name, source }, size, stats { downloadCount }, vulnerabilities { critical, high, medium, low, info, unknown, skipped }, files { name, lead, size, md5, sha1, sha256, mimeType } } } } }',\n variables: {\n filter: {\n packageId: `docker://${repo}`,\n name: '*',\n ignorePreRelease: false,\n },\n first: 100,\n orderBy: {\n field: 'NAME_SEMVER',\n direction: 'DESC',\n },\n },\n };\n\n return (await this.fetcher(\n `${proxyUrl}/metadata/api/v1/query`,\n JSON.stringify(tagQuery),\n )) as TagsResponse;\n }\n}\n"],"names":[],"mappings":";;AAwBA,MAAM,kBAAqB,GAAA,wBAAA
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ConfigApi,\n createApiRef,\n DiscoveryApi,\n IdentityApi,\n} from '@backstage/core-plugin-api';\n\nimport { TagsResponse } from '../types';\n\nconst DEFAULT_PROXY_PATH = '/jfrog-artifactory/api';\n\nexport interface JfrogArtifactoryApiV1 {\n getTags(repo: string): Promise<TagsResponse>;\n}\n\nexport const jfrogArtifactoryApiRef = createApiRef<JfrogArtifactoryApiV1>({\n id: 'plugin.jfrog-artifactory.service',\n});\n\nexport type Options = {\n discoveryApi: DiscoveryApi;\n configApi: ConfigApi;\n identityApi: IdentityApi;\n};\n\nexport class JfrogArtifactoryApiClient implements JfrogArtifactoryApiV1 {\n // @ts-ignore\n private readonly discoveryApi: DiscoveryApi;\n\n private readonly configApi: ConfigApi;\n\n private readonly identityApi: IdentityApi;\n\n constructor(options: Options) {\n this.discoveryApi = options.discoveryApi;\n this.configApi = options.configApi;\n this.identityApi = options.identityApi;\n }\n\n private async getBaseUrl() {\n const proxyPath =\n this.configApi.getOptionalString('jfrogArtifactory.proxyPath') ||\n DEFAULT_PROXY_PATH;\n return `${await this.discoveryApi.getBaseUrl('proxy')}${proxyPath}`;\n }\n\n private async fetcher(url: string, query: string) {\n const { token: idToken } = await this.identityApi.getCredentials();\n const response = await fetch(url, {\n headers: {\n 'Content-Type': 'application/json',\n ...(idToken && { Authorization: `Bearer ${idToken}` }),\n },\n method: 'POST',\n body: query,\n });\n if (!response.ok) {\n throw new Error(\n `failed to fetch data, status ${response.status}: ${response.statusText}`,\n );\n }\n return await response.json();\n }\n\n async getTags(repo: string) {\n const proxyUrl = await this.getBaseUrl();\n const tagQuery = {\n query:\n 'query ($filter: VersionFilter!, $first: Int, $orderBy: VersionOrder) { versions (filter: $filter, first: $first, orderBy: $orderBy) { edges { node { name, created, modified, package { id }, repos { name, type, leadFilePath }, licenses { name, source }, size, stats { downloadCount }, vulnerabilities { critical, high, medium, low, info, unknown, skipped }, files { name, lead, size, md5, sha1, sha256, mimeType } } } } }',\n variables: {\n filter: {\n packageId: `docker://${repo}`,\n name: '*',\n ignorePreRelease: false,\n },\n first: 100,\n orderBy: {\n field: 'NAME_SEMVER',\n direction: 'DESC',\n },\n },\n };\n\n return (await this.fetcher(\n `${proxyUrl}/metadata/api/v1/query`,\n JSON.stringify(tagQuery),\n )) as TagsResponse;\n }\n}\n"],"names":[],"mappings":";;AAwBA,MAAM,kBAAqB,GAAA,wBAAA;AAMpB,MAAM,yBAAyB,YAAoC,CAAA;AAAA,EACxE,EAAI,EAAA;AACN,CAAC;AAQM,MAAM,yBAA2D,CAAA;AAAA;AAAA,EAErD,YAAA;AAAA,EAEA,SAAA;AAAA,EAEA,WAAA;AAAA,EAEjB,YAAY,OAAkB,EAAA;AAC5B,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA;AAC5B,IAAA,IAAA,CAAK,YAAY,OAAQ,CAAA,SAAA;AACzB,IAAA,IAAA,CAAK,cAAc,OAAQ,CAAA,WAAA;AAAA;AAC7B,EAEA,MAAc,UAAa,GAAA;AACzB,IAAA,MAAM,SACJ,GAAA,IAAA,CAAK,SAAU,CAAA,iBAAA,CAAkB,4BAA4B,CAC7D,IAAA,kBAAA;AACF,IAAO,OAAA,CAAA,EAAG,MAAM,IAAK,CAAA,YAAA,CAAa,WAAW,OAAO,CAAC,GAAG,SAAS,CAAA,CAAA;AAAA;AACnE,EAEA,MAAc,OAAQ,CAAA,GAAA,EAAa,KAAe,EAAA;AAChD,IAAA,MAAM,EAAE,KAAO,EAAA,OAAA,KAAY,MAAM,IAAA,CAAK,YAAY,cAAe,EAAA;AACjE,IAAM,MAAA,QAAA,GAAW,MAAM,KAAA,CAAM,GAAK,EAAA;AAAA,MAChC,OAAS,EAAA;AAAA,QACP,cAAgB,EAAA,kBAAA;AAAA,QAChB,GAAI,OAAW,IAAA,EAAE,aAAe,EAAA,CAAA,OAAA,EAAU,OAAO,CAAG,CAAA;AAAA,OACtD;AAAA,MACA,MAAQ,EAAA,MAAA;AAAA,MACR,IAAM,EAAA;AAAA,KACP,CAAA;AACD,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAgC,6BAAA,EAAA,QAAA,CAAS,MAAM,CAAA,EAAA,EAAK,SAAS,UAAU,CAAA;AAAA,OACzE;AAAA;AAEF,IAAO,OAAA,MAAM,SAAS,IAAK,EAAA;AAAA;AAC7B,EAEA,MAAM,QAAQ,IAAc,EAAA;AAC1B,IAAM,MAAA,QAAA,GAAW,MAAM,IAAA,CAAK,UAAW,EAAA;AACvC,IAAA,MAAM,QAAW,GAAA;AAAA,MACf,KACE,EAAA,saAAA;AAAA,MACF,SAAW,EAAA;AAAA,QACT,MAAQ,EAAA;AAAA,UACN,SAAA,EAAW,YAAY,IAAI,CAAA,CAAA;AAAA,UAC3B,IAAM,EAAA,GAAA;AAAA,UACN,gBAAkB,EAAA;AAAA,SACpB;AAAA,QACA,KAAO,EAAA,GAAA;AAAA,QACP,OAAS,EAAA;AAAA,UACP,KAAO,EAAA,aAAA;AAAA,UACP,SAAW,EAAA;AAAA;AACb;AACF,KACF;AAEA,IAAA,OAAQ,MAAM,IAAK,CAAA,OAAA;AAAA,MACjB,GAAG,QAAQ,CAAA,sBAAA,CAAA;AAAA,MACX,IAAA,CAAK,UAAU,QAAQ;AAAA,KACzB;AAAA;AAEJ;;;;"}
|
package/dist/components/JfrogArtifactoryDashboardPage/JfrogArtifactoryDashboardPage.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JfrogArtifactoryDashboardPage.esm.js","sources":["../../../src/components/JfrogArtifactoryDashboardPage/JfrogArtifactoryDashboardPage.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport { JfrogArtifactoryRepository } from '../JfrogArtifactoryRepository';\nimport { useJfrogArtifactoryAppData } from '../useJfrogArtifactoryAppData';\n\nexport const JfrogArtifactoryDashboardPage = () => {\n const { entity } = useEntity();\n const { imageName } = useJfrogArtifactoryAppData({ entity });\n\n return <JfrogArtifactoryRepository image={imageName} />;\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,gCAAgC,MAAM;AACjD,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA
|
|
1
|
+
{"version":3,"file":"JfrogArtifactoryDashboardPage.esm.js","sources":["../../../src/components/JfrogArtifactoryDashboardPage/JfrogArtifactoryDashboardPage.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport { JfrogArtifactoryRepository } from '../JfrogArtifactoryRepository';\nimport { useJfrogArtifactoryAppData } from '../useJfrogArtifactoryAppData';\n\nexport const JfrogArtifactoryDashboardPage = () => {\n const { entity } = useEntity();\n const { imageName } = useJfrogArtifactoryAppData({ entity });\n\n return <JfrogArtifactoryRepository image={imageName} />;\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,gCAAgC,MAAM;AACjD,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,EAAE,SAAU,EAAA,GAAI,0BAA2B,CAAA,EAAE,QAAQ,CAAA;AAE3D,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,0BAA2B,EAAA,EAAA,KAAA,EAAO,SAAW,EAAA,CAAA;AACvD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JfrogArtifactoryRepository.esm.js","sources":["../../../src/components/JfrogArtifactoryRepository/JfrogArtifactoryRepository.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { useState } from 'react';\nimport { useAsync } from 'react-use';\n\nimport { Link, Progress, Table } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nimport { Box, Chip, makeStyles } from '@material-ui/core';\n\nimport { formatByteSize, formatDate } from '@janus-idp/shared-react';\n\nimport { jfrogArtifactoryApiRef } from '../../api';\nimport { Edge } from '../../types';\nimport { columns, useStyles } from './tableHeading';\n\nconst useLocalStyles = makeStyles({\n chip: {\n margin: 0,\n marginRight: '.2em',\n height: '1.5em',\n '& > span': {\n padding: '.3em',\n },\n },\n});\n\nexport function JfrogArtifactoryRepository({ image }: RepositoryProps) {\n const jfrogArtifactoryClient = useApi(jfrogArtifactoryApiRef);\n const classes = useStyles();\n const localClasses = useLocalStyles();\n const [edges, setEdges] = useState<Edge[]>([]);\n const titleprop = `Jfrog Artifactory repository: ${image}`;\n\n const { loading } = useAsync(async () => {\n const tagsResponse = await jfrogArtifactoryClient.getTags(image);\n\n setEdges(tagsResponse.data.versions.edges);\n\n return tagsResponse;\n });\n\n if (loading) {\n return <Progress />;\n }\n\n const data = edges?.map((edge: Edge) => {\n const shortHash = edge.node.files\n .find(manifest => manifest.name === 'manifest.json')\n ?.sha256.substring(0, 12);\n return {\n name: edge.node.name,\n last_modified: formatDate(edge.node.modified),\n size: formatByteSize(Number(edge.node.size)),\n manifest_digest: (\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <Chip label=\"sha256\" className={localClasses.chip} />\n {shortHash}\n </Box>\n ),\n repositories:\n `${edge.node.repos.length}` +\n ' | ' +\n `${edge.node.repos.map(repo => repo.name).join('| ')}`,\n };\n });\n\n return (\n <div style={{ border: '1px solid #ddd' }}>\n <Table\n title={titleprop}\n options={{ paging: true, padding: 'dense' }}\n data={data}\n columns={columns}\n emptyContent={\n <div className={classes.empty}>\n No data was added yet, \n <Link to=\"https://backstage.io/\">learn how to add data</Link>.\n </div>\n }\n />\n </div>\n );\n}\n\ninterface RepositoryProps {\n image: string;\n}\n"],"names":[],"mappings":";;;;;;;;;AA6BA,MAAM,iBAAiB,UAAW,CAAA;AAAA,EAChC,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,CAAA;AAAA,IACR,WAAa,EAAA,MAAA;AAAA,IACb,MAAQ,EAAA,OAAA;AAAA,IACR,UAAY,EAAA;AAAA,MACV,OAAS,EAAA
|
|
1
|
+
{"version":3,"file":"JfrogArtifactoryRepository.esm.js","sources":["../../../src/components/JfrogArtifactoryRepository/JfrogArtifactoryRepository.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { useState } from 'react';\nimport { useAsync } from 'react-use';\n\nimport { Link, Progress, Table } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nimport { Box, Chip, makeStyles } from '@material-ui/core';\n\nimport { formatByteSize, formatDate } from '@janus-idp/shared-react';\n\nimport { jfrogArtifactoryApiRef } from '../../api';\nimport { Edge } from '../../types';\nimport { columns, useStyles } from './tableHeading';\n\nconst useLocalStyles = makeStyles({\n chip: {\n margin: 0,\n marginRight: '.2em',\n height: '1.5em',\n '& > span': {\n padding: '.3em',\n },\n },\n});\n\nexport function JfrogArtifactoryRepository({ image }: RepositoryProps) {\n const jfrogArtifactoryClient = useApi(jfrogArtifactoryApiRef);\n const classes = useStyles();\n const localClasses = useLocalStyles();\n const [edges, setEdges] = useState<Edge[]>([]);\n const titleprop = `Jfrog Artifactory repository: ${image}`;\n\n const { loading } = useAsync(async () => {\n const tagsResponse = await jfrogArtifactoryClient.getTags(image);\n\n setEdges(tagsResponse.data.versions.edges);\n\n return tagsResponse;\n });\n\n if (loading) {\n return <Progress />;\n }\n\n const data = edges?.map((edge: Edge) => {\n const shortHash = edge.node.files\n .find(manifest => manifest.name === 'manifest.json')\n ?.sha256.substring(0, 12);\n return {\n name: edge.node.name,\n last_modified: formatDate(edge.node.modified),\n size: formatByteSize(Number(edge.node.size)),\n manifest_digest: (\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <Chip label=\"sha256\" className={localClasses.chip} />\n {shortHash}\n </Box>\n ),\n repositories:\n `${edge.node.repos.length}` +\n ' | ' +\n `${edge.node.repos.map(repo => repo.name).join('| ')}`,\n };\n });\n\n return (\n <div style={{ border: '1px solid #ddd' }}>\n <Table\n title={titleprop}\n options={{ paging: true, padding: 'dense' }}\n data={data}\n columns={columns}\n emptyContent={\n <div className={classes.empty}>\n No data was added yet, \n <Link to=\"https://backstage.io/\">learn how to add data</Link>.\n </div>\n }\n />\n </div>\n );\n}\n\ninterface RepositoryProps {\n image: string;\n}\n"],"names":[],"mappings":";;;;;;;;;AA6BA,MAAM,iBAAiB,UAAW,CAAA;AAAA,EAChC,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,CAAA;AAAA,IACR,WAAa,EAAA,MAAA;AAAA,IACb,MAAQ,EAAA,OAAA;AAAA,IACR,UAAY,EAAA;AAAA,MACV,OAAS,EAAA;AAAA;AACX;AAEJ,CAAC,CAAA;AAEe,SAAA,0BAAA,CAA2B,EAAE,KAAA,EAA0B,EAAA;AACrE,EAAM,MAAA,sBAAA,GAAyB,OAAO,sBAAsB,CAAA;AAC5D,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAA,MAAM,eAAe,cAAe,EAAA;AACpC,EAAA,MAAM,CAAC,KAAO,EAAA,QAAQ,CAAI,GAAA,QAAA,CAAiB,EAAE,CAAA;AAC7C,EAAM,MAAA,SAAA,GAAY,iCAAiC,KAAK,CAAA,CAAA;AAExD,EAAA,MAAM,EAAE,OAAA,EAAY,GAAA,QAAA,CAAS,YAAY;AACvC,IAAA,MAAM,YAAe,GAAA,MAAM,sBAAuB,CAAA,OAAA,CAAQ,KAAK,CAAA;AAE/D,IAAS,QAAA,CAAA,YAAA,CAAa,IAAK,CAAA,QAAA,CAAS,KAAK,CAAA;AAEzC,IAAO,OAAA,YAAA;AAAA,GACR,CAAA;AAED,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA;AAAA;AAGnB,EAAA,MAAM,IAAO,GAAA,KAAA,EAAO,GAAI,CAAA,CAAC,IAAe,KAAA;AACtC,IAAA,MAAM,SAAY,GAAA,IAAA,CAAK,IAAK,CAAA,KAAA,CACzB,IAAK,CAAA,CAAA,QAAA,KAAY,QAAS,CAAA,IAAA,KAAS,eAAe,CAAA,EACjD,MAAO,CAAA,SAAA,CAAU,GAAG,EAAE,CAAA;AAC1B,IAAO,OAAA;AAAA,MACL,IAAA,EAAM,KAAK,IAAK,CAAA,IAAA;AAAA,MAChB,aAAe,EAAA,UAAA,CAAW,IAAK,CAAA,IAAA,CAAK,QAAQ,CAAA;AAAA,MAC5C,MAAM,cAAe,CAAA,MAAA,CAAO,IAAK,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,MAC3C,iCACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,IAAI,EAAE,OAAA,EAAS,QAAQ,UAAY,EAAA,QAAA,EACtC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,KAAM,EAAA,QAAA,EAAS,WAAW,YAAa,CAAA,IAAA,EAAM,GAClD,SACH,CAAA;AAAA,MAEF,cACE,CAAG,EAAA,IAAA,CAAK,IAAK,CAAA,KAAA,CAAM,MAAM,CAEtB,GAAA,EAAA,IAAA,CAAK,IAAK,CAAA,KAAA,CAAM,IAAI,CAAQ,IAAA,KAAA,IAAA,CAAK,IAAI,CAAE,CAAA,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,KACxD;AAAA,GACD,CAAA;AAED,EAAA,2CACG,KAAI,EAAA,EAAA,KAAA,EAAO,EAAE,MAAA,EAAQ,kBACpB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,SAAA;AAAA,MACP,OAAS,EAAA,EAAE,MAAQ,EAAA,IAAA,EAAM,SAAS,OAAQ,EAAA;AAAA,MAC1C,IAAA;AAAA,MACA,OAAA;AAAA,MACA,YACE,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAQ,CAAA,KAAA,EAAA,EAAO,4BAE7B,kBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,EAAA,EAAG,uBAAwB,EAAA,EAAA,uBAAqB,GAAO,GAC/D;AAAA;AAAA,GAGN,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableHeading.esm.js","sources":["../../../src/components/JfrogArtifactoryRepository/tableHeading.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TableColumn } from '@backstage/core-components';\n\nimport makeStyles from '@material-ui/core/styles/makeStyles';\n\nexport const columns: TableColumn[] = [\n {\n title: 'Version',\n field: 'name',\n type: 'string',\n highlight: true,\n },\n {\n title: 'Repositories',\n field: 'repositories',\n type: 'string',\n },\n {\n title: 'Manifest',\n field: 'manifest_digest',\n type: 'string',\n },\n {\n title: 'Modified',\n field: 'last_modified',\n type: 'date',\n },\n {\n title: 'Size',\n field: 'size',\n type: 'string',\n },\n];\n\nexport const useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n"],"names":[],"mappings":";;AAmBO,MAAM,OAAyB,GAAA;AAAA,EACpC;AAAA,IACE,KAAO,EAAA,SAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,SAAW,EAAA
|
|
1
|
+
{"version":3,"file":"tableHeading.esm.js","sources":["../../../src/components/JfrogArtifactoryRepository/tableHeading.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TableColumn } from '@backstage/core-components';\n\nimport makeStyles from '@material-ui/core/styles/makeStyles';\n\nexport const columns: TableColumn[] = [\n {\n title: 'Version',\n field: 'name',\n type: 'string',\n highlight: true,\n },\n {\n title: 'Repositories',\n field: 'repositories',\n type: 'string',\n },\n {\n title: 'Manifest',\n field: 'manifest_digest',\n type: 'string',\n },\n {\n title: 'Modified',\n field: 'last_modified',\n type: 'date',\n },\n {\n title: 'Size',\n field: 'size',\n type: 'string',\n },\n];\n\nexport const useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n"],"names":[],"mappings":";;AAmBO,MAAM,OAAyB,GAAA;AAAA,EACpC;AAAA,IACE,KAAO,EAAA,SAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,SAAW,EAAA;AAAA,GACb;AAAA,EACA;AAAA,IACE,KAAO,EAAA,cAAA;AAAA,IACP,KAAO,EAAA,cAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,KAAO,EAAA,UAAA;AAAA,IACP,KAAO,EAAA,iBAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,KAAO,EAAA,UAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,IACP,IAAM,EAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,KAAO,EAAA,MAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,IAAM,EAAA;AAAA;AAEV;AAEa,MAAA,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EAC5C,KAAO,EAAA;AAAA,IACL,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA;AAAA;AAEpB,CAAE,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useJfrogArtifactoryAppData.esm.js","sources":["../../src/components/useJfrogArtifactoryAppData.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity } from '@backstage/catalog-model';\n\nexport const JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME =\n 'jfrog-artifactory/image-name';\n\nexport const useJfrogArtifactoryAppData = ({ entity }: { entity: Entity }) => {\n const imageName =\n entity?.metadata.annotations?.[JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME] ??\n '';\n\n if (!imageName) {\n throw new Error(\"'Jfrog Artifactory' annotations are missing\");\n }\n return { imageName };\n};\n"],"names":[],"mappings":"AAiBO,MAAM,uCACX,GAAA
|
|
1
|
+
{"version":3,"file":"useJfrogArtifactoryAppData.esm.js","sources":["../../src/components/useJfrogArtifactoryAppData.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity } from '@backstage/catalog-model';\n\nexport const JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME =\n 'jfrog-artifactory/image-name';\n\nexport const useJfrogArtifactoryAppData = ({ entity }: { entity: Entity }) => {\n const imageName =\n entity?.metadata.annotations?.[JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME] ??\n '';\n\n if (!imageName) {\n throw new Error(\"'Jfrog Artifactory' annotations are missing\");\n }\n return { imageName };\n};\n"],"names":[],"mappings":"AAiBO,MAAM,uCACX,GAAA;AAEK,MAAM,0BAA6B,GAAA,CAAC,EAAE,MAAA,EAAiC,KAAA;AAC5E,EAAA,MAAM,SACJ,GAAA,MAAA,EAAQ,QAAS,CAAA,WAAA,GAAc,uCAAuC,CACtE,IAAA,EAAA;AAEF,EAAA,IAAI,CAAC,SAAW,EAAA;AACd,IAAM,MAAA,IAAI,MAAM,6CAA6C,CAAA;AAAA;AAE/D,EAAA,OAAO,EAAE,SAAU,EAAA;AACrB;;;;"}
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity } from '@backstage/catalog-model';\nimport {\n configApiRef,\n createApiFactory,\n createComponentExtension,\n createPlugin,\n discoveryApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { JfrogArtifactoryApiClient, jfrogArtifactoryApiRef } from './api';\nimport { JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME } from './components/useJfrogArtifactoryAppData';\nimport { rootRouteRef } from './routes';\n\n/**\n * @public\n */\nexport const jfrogArtifactoryPlugin = createPlugin({\n id: 'jfrog-artifactory',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: jfrogArtifactoryApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n configApi: configApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, configApi, identityApi }) =>\n new JfrogArtifactoryApiClient({ discoveryApi, configApi, identityApi }),\n }),\n ],\n});\n\n/**\n * @public\n */\nexport const JfrogArtifactoryPage = jfrogArtifactoryPlugin.provide(\n createComponentExtension({\n name: 'JfrogArtifactoryPage',\n component: {\n lazy: () =>\n import('./components/JfrogArtifactoryDashboardPage').then(\n m => m.JfrogArtifactoryDashboardPage,\n ),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const isJfrogArtifactoryAvailable = (entity: Entity) =>\n Boolean(\n entity?.metadata.annotations?.[JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME],\n );\n"],"names":[],"mappings":";;;;;AAgCO,MAAM,yBAAyB,YAAa,CAAA;AAAA,EACjD,EAAI,EAAA,mBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity } from '@backstage/catalog-model';\nimport {\n configApiRef,\n createApiFactory,\n createComponentExtension,\n createPlugin,\n discoveryApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { JfrogArtifactoryApiClient, jfrogArtifactoryApiRef } from './api';\nimport { JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME } from './components/useJfrogArtifactoryAppData';\nimport { rootRouteRef } from './routes';\n\n/**\n * @public\n */\nexport const jfrogArtifactoryPlugin = createPlugin({\n id: 'jfrog-artifactory',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: jfrogArtifactoryApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n configApi: configApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, configApi, identityApi }) =>\n new JfrogArtifactoryApiClient({ discoveryApi, configApi, identityApi }),\n }),\n ],\n});\n\n/**\n * @public\n */\nexport const JfrogArtifactoryPage = jfrogArtifactoryPlugin.provide(\n createComponentExtension({\n name: 'JfrogArtifactoryPage',\n component: {\n lazy: () =>\n import('./components/JfrogArtifactoryDashboardPage').then(\n m => m.JfrogArtifactoryDashboardPage,\n ),\n },\n }),\n);\n\n/**\n * @public\n */\nexport const isJfrogArtifactoryAvailable = (entity: Entity) =>\n Boolean(\n entity?.metadata.annotations?.[JFROG_ARTIFACTORY_ANNOTATION_IMAGE_NAME],\n );\n"],"names":[],"mappings":";;;;;AAgCO,MAAM,yBAAyB,YAAa,CAAA;AAAA,EACjD,EAAI,EAAA,mBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA,GACR;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,sBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,SAAW,EAAA,YAAA;AAAA,QACX,WAAa,EAAA;AAAA,OACf;AAAA,MACA,OAAS,EAAA,CAAC,EAAE,YAAA,EAAc,SAAW,EAAA,WAAA,EACnC,KAAA,IAAI,yBAA0B,CAAA,EAAE,YAAc,EAAA,SAAA,EAAW,aAAa;AAAA,KACzE;AAAA;AAEL,CAAC;AAKM,MAAM,uBAAuB,sBAAuB,CAAA,OAAA;AAAA,EACzD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,sBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,yDAA4C,CAAE,CAAA,IAAA;AAAA,QACnD,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAKa,MAAA,2BAAA,GAA8B,CAAC,MAC1C,KAAA,OAAA;AAAA,EACE,MAAA,EAAQ,QAAS,CAAA,WAAA,GAAc,uCAAuC;AACxE;;;;"}
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'jfrog-artifactory',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'jfrog-artifactory',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-jfrog-artifactory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"main": "dist/index.esm.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"tsc": "tsc"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@backstage/catalog-model": "^1.7.
|
|
34
|
-
"@backstage/core-components": "^0.
|
|
35
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
36
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
37
|
-
"@backstage/theme": "^0.6.
|
|
33
|
+
"@backstage/catalog-model": "^1.7.2",
|
|
34
|
+
"@backstage/core-components": "^0.16.2",
|
|
35
|
+
"@backstage/core-plugin-api": "^1.10.2",
|
|
36
|
+
"@backstage/plugin-catalog-react": "^1.15.0",
|
|
37
|
+
"@backstage/theme": "^0.6.3",
|
|
38
38
|
"@janus-idp/shared-react": "^2.13.1",
|
|
39
39
|
"@material-ui/core": "^4.9.13",
|
|
40
40
|
"@material-ui/icons": "^4.11.3",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@backstage/cli": "^0.
|
|
50
|
-
"@backstage/core-app-api": "^1.15.
|
|
51
|
-
"@backstage/dev-utils": "^1.1.
|
|
52
|
-
"@backstage/test-utils": "^1.7.
|
|
49
|
+
"@backstage/cli": "^0.29.4",
|
|
50
|
+
"@backstage/core-app-api": "^1.15.3",
|
|
51
|
+
"@backstage/dev-utils": "^1.1.5",
|
|
52
|
+
"@backstage/test-utils": "^1.7.3",
|
|
53
53
|
"@redhat-developer/red-hat-developer-hub-theme": "0.4.0",
|
|
54
54
|
"@testing-library/jest-dom": "6.6.3",
|
|
55
55
|
"@testing-library/react": "14.3.1",
|
|
@@ -80,5 +80,12 @@
|
|
|
80
80
|
"homepage": "https://red.ht/rhdh",
|
|
81
81
|
"bugs": "https://github.com/backstage/community-plugins/issues",
|
|
82
82
|
"author": "Red Hat",
|
|
83
|
+
"typesVersions": {
|
|
84
|
+
"*": {
|
|
85
|
+
"index": [
|
|
86
|
+
"dist/index.d.ts"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
83
90
|
"module": "./dist/index.esm.js"
|
|
84
91
|
}
|