@ehildt/depbadge 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +19 -6
  2. package/package.json +5 -1
package/dist/index.mjs CHANGED
@@ -4759,7 +4759,10 @@ var jsYaml = {
4759
4759
  var computeStateIntegrity = useCtxCallback((store, ...rest) => {
4760
4760
  const payloadStringified = JSON.stringify(rest);
4761
4761
  const hash = crypto.createHash("sha256");
4762
- const yml = jsYaml.dump({ ...JSON.parse(JSON.stringify(store)), integrity: null });
4762
+ const yml = jsYaml.dump({
4763
+ ...JSON.parse(JSON.stringify(store)),
4764
+ integrity: null
4765
+ });
4763
4766
  hash.update(`${yml} --- ${payloadStringified}`, "utf8");
4764
4767
  return hash.digest("hex");
4765
4768
  });
@@ -4844,12 +4847,16 @@ var mapBadgesToMarkdown = useCtxCallback(
4844
4847
  const urlSearchParams = new URLSearchParams({
4845
4848
  ...badge.isError && { isError: "true" },
4846
4849
  ...badge.labelColor && { labelColor: badge.labelColor },
4847
- ...badge.cacheSeconds && { cacheSeconds: badge.cacheSeconds?.toString() },
4850
+ ...badge.cacheSeconds && {
4851
+ cacheSeconds: badge.cacheSeconds?.toString()
4852
+ },
4848
4853
  ...badge.namedLogo && { logo: badge.namedLogo },
4849
4854
  ...badge.logoColor && { logoColor: badge.logoColor },
4850
4855
  ...badge.logoWidth && { logoWidth: badge.logoWidth.toString() },
4851
4856
  ...badge.style && { style: badge.style },
4852
- ...badge.logoSvg && { logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}` }
4857
+ ...badge.logoSvg && {
4858
+ logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}`
4859
+ }
4853
4860
  }).toString();
4854
4861
  const dependency = encodeLabel(name);
4855
4862
  const message = encodeMessage(badge.message);
@@ -4876,7 +4883,9 @@ function mapGithubStatusBadgeToMarkdown(badge) {
4876
4883
  ...badge?.namedLogo && { logo: badge.namedLogo },
4877
4884
  ...badge?.logoColor && { logoColor: badge.logoColor },
4878
4885
  ...badge?.logoWidth && { logoWidth: badge.logoWidth.toString() },
4879
- ...badge?.logoSvg && { logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}` },
4886
+ ...badge?.logoSvg && {
4887
+ logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}`
4888
+ },
4880
4889
  ...badge.branch && { branch: badge.branch }
4881
4890
  }).toString();
4882
4891
  const label = badge.name;
@@ -4897,7 +4906,9 @@ function mapDockerHubStatusBadgeToMarkdown(badge) {
4897
4906
  ...badge.style && { style: badge.style },
4898
4907
  ...badge?.cacheSeconds && { cacheSeconds: badge.cacheSeconds.toString() },
4899
4908
  ...badge?.color && { color: badge.color },
4900
- ...badge?.logoSvg && { logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}` },
4909
+ ...badge?.logoSvg && {
4910
+ logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}`
4911
+ },
4901
4912
  ...badge.tag && badge.metric === "v" && { tag: badge.tag }
4902
4913
  }).toString();
4903
4914
  const label = badge.name;
@@ -4918,7 +4929,9 @@ function mapCodecovStatusBadgeToMarkdown(badge) {
4918
4929
  ...badge?.logoWidth && { logoWidth: badge.logoWidth.toString() },
4919
4930
  ...badge.style && { style: badge.style },
4920
4931
  ...badge?.color && { color: badge.color },
4921
- ...badge?.logoSvg && { logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}` },
4932
+ ...badge?.logoSvg && {
4933
+ logo: `data:image/svg+xml;utf8,${encodeURIComponent(badge.logoSvg)}`
4934
+ },
4922
4935
  ...badge.branch && { branch: badge.branch }
4923
4936
  }).toString();
4924
4937
  const label = badge.name;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ehildt/depbadge",
3
3
  "description": "A tool that creates shieldio badges",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.mjs",
@@ -15,6 +15,9 @@
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
18
+ "bin": {
19
+ "depbadge": "./dist/index.mjs"
20
+ },
18
21
  "author": {
19
22
  "email": "eugen.hildt@gmail.com",
20
23
  "name": "Eugen Hildt"
@@ -44,6 +47,7 @@
44
47
  "lint:unused": "npx ts-unused-exports ./tsconfig.exclude.json --maxIssues=0"
45
48
  },
46
49
  "dependencies": {
50
+ "@ehildt/depbadge": "^1.0.0",
47
51
  "@iarna/toml": "^2.2.5",
48
52
  "chalk": "^5.6.2",
49
53
  "colord": "^2.9.3",