@effected/sbom 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/SigstoreSigner.js +10 -8
  2. package/package.json +3 -3
package/SigstoreSigner.js CHANGED
@@ -72,15 +72,17 @@ const make = (identity, options) => ({ sign: Effect.fn("SigstoreSigner.sign")(fu
72
72
  kind: "identity",
73
73
  cause
74
74
  })));
75
+ const signer = options.signer ?? new FulcioSigner({
76
+ identityProvider: { getToken: () => Promise.resolve(Redacted.value(token)) },
77
+ ...options.fulcioBaseUrl !== void 0 && { fulcioBaseURL: options.fulcioBaseUrl }
78
+ });
79
+ const witnesses = options.witnesses ?? [new RekorWitness({
80
+ entryType: "dsse",
81
+ ...options.rekorBaseUrl !== void 0 && { rekorBaseURL: options.rekorBaseUrl }
82
+ })];
75
83
  const builder = new DSSEBundleBuilder({
76
- signer: options.signer ?? new FulcioSigner({
77
- identityProvider: { getToken: () => Promise.resolve(Redacted.value(token)) },
78
- ...options.fulcioBaseUrl !== void 0 && { fulcioBaseURL: options.fulcioBaseUrl }
79
- }),
80
- witnesses: [...options.witnesses ?? [new RekorWitness({
81
- entryType: "dsse",
82
- ...options.rekorBaseUrl !== void 0 && { rekorBaseURL: options.rekorBaseUrl }
83
- })]]
84
+ signer,
85
+ witnesses: [...witnesses]
84
86
  });
85
87
  const bundle = yield* Effect.tryPromise({
86
88
  try: () => builder.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/sbom",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "description": "CycloneDX 1.6 SBOM construction, SLSA provenance, NTIA validation and Sigstore signing as typed services.",
6
6
  "keywords": [
@@ -39,8 +39,8 @@
39
39
  "./package.json": "./package.json"
40
40
  },
41
41
  "dependencies": {
42
- "@effected/package-json": "~0.6.1",
43
- "@effected/spdx": "~0.1.1",
42
+ "@effected/package-json": "^0.7.2",
43
+ "@effected/spdx": "^0.1.2",
44
44
  "@sigstore/bundle": "^5.0.0",
45
45
  "@sigstore/sign": "^5.0.0"
46
46
  },