@backstage-community/plugin-jfrog-artifactory 1.15.0 → 1.15.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  ### Dependencies
2
2
 
3
+ ## 1.15.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 6a59fcf: remove support and lifecycle keywords in package.json
8
+
9
+ ## 1.15.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 172353e: Replaced internal usage of `formatByteSize` with a local implementation using the `filesize` library, matching the original output format.
14
+
3
15
  ## 1.15.0
4
16
 
5
17
  ### Minor Changes
@@ -4,9 +4,10 @@ import { useAsync } from 'react-use';
4
4
  import { Progress, Table, Link } from '@backstage/core-components';
5
5
  import { useApi } from '@backstage/core-plugin-api';
6
6
  import { makeStyles, Box, Chip } from '@material-ui/core';
7
- import { formatDate, formatByteSize } from '@janus-idp/shared-react';
7
+ import { formatDate } from '@janus-idp/shared-react';
8
8
  import { jfrogArtifactoryApiRef } from '../../api/index.esm.js';
9
9
  import { useStyles, columns } from './tableHeading.esm.js';
10
+ import { formatByteSize } from '../../utils.esm.js';
10
11
 
11
12
  const useLocalStyles = makeStyles({
12
13
  chip: {
@@ -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 { 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,&nbsp;\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,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epository/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 { 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 { formatDate } from '@janus-idp/shared-react';\n\nimport { jfrogArtifactoryApiRef } from '../../api';\nimport { Edge } from '../../types';\nimport { columns, useStyles } from './tableHeading';\nimport { formatByteSize } from '../../utils';\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,&nbsp;\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":";;;;;;;;;;;AA8BA,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,2BAAQ,QAAS,EAAA,EAAA,CAAA;AA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C,IAAA;AAAA,MACA,OAAA;AAAA,MACA,YACE,kBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,QAAQ,KAAO,EAAA,QAAA,EAAA;AAAA,QAAA,4BAAA;AAAA,wBAE5B,GAAA,CAAA,IAAA,EAAA,EAAK,EAAG,EAAA,uBAAA,EAAwB,QAAqB,EAAA,uBAAA,EAAA,CAAA;AAAA,QAAO;AAAA,OAC/D,EAAA;AAAA;AAAA,GAGN,EAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,9 @@
1
+ import { filesize } from 'filesize';
2
+
3
+ function formatByteSize(sizeInBytes) {
4
+ if (!sizeInBytes) return "N/A";
5
+ return filesize(sizeInBytes);
6
+ }
7
+
8
+ export { formatByteSize };
9
+ //# sourceMappingURL=utils.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.esm.js","sources":["../src/utils.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 */\n\nimport { filesize } from 'filesize';\n\nexport function formatByteSize(sizeInBytes: number | undefined): string {\n if (!sizeInBytes) return 'N/A';\n\n return filesize(sizeInBytes);\n}\n"],"names":[],"mappings":";;AAkBO,SAAS,eAAe,WAAyC,EAAA;AACtE,EAAI,IAAA,CAAC,aAAoB,OAAA,KAAA;AAEzB,EAAA,OAAO,SAAS,WAAW,CAAA;AAC7B;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-jfrog-artifactory",
3
- "version": "1.15.0",
3
+ "version": "1.15.2",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -11,7 +11,6 @@
11
11
  },
12
12
  "backstage": {
13
13
  "role": "frontend-plugin",
14
- "supported-versions": "1.32.2",
15
14
  "pluginId": "jfrog-artifactory",
16
15
  "pluginPackage": "@backstage-community/plugin-jfrog-artifactory",
17
16
  "pluginPackages": [
@@ -38,6 +37,7 @@
38
37
  "@janus-idp/shared-react": "^2.16.0",
39
38
  "@material-ui/core": "^4.9.13",
40
39
  "@material-ui/icons": "^4.11.3",
40
+ "filesize": "^10.1.6",
41
41
  "react-use": "^17.4.0"
42
42
  },
43
43
  "peerDependencies": {
@@ -59,7 +59,6 @@
59
59
  },
60
60
  "files": [
61
61
  "dist",
62
- "dist-scalprum",
63
62
  "config.d.ts",
64
63
  "app-config.yaml"
65
64
  ],
@@ -70,8 +69,6 @@
70
69
  "directory": "workspaces/jfrog-artifactory/plugins/jfrog-artifactory"
71
70
  },
72
71
  "keywords": [
73
- "support:tech-preview",
74
- "lifecycle:active",
75
72
  "backstage",
76
73
  "plugin"
77
74
  ],