@signature-kit/a1 0.4.0 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## @signature-kit/a1@0.4.1
2
+
3
+ ### Publish the worker signing runtime
4
+
5
+ Publish `@signature-kit/signatures/session`, which `@signature-kit/react` 0.1.2 imports to sign A1 documents in a Domain RPC worker. Without it, bundlers fail to resolve the react worker entry.
6
+
7
+ A1 signing makes the WebCrypto sign step uninterruptible. CMS builds the signing-certificate-v2 attribute directly with asn1js. All packages move to Effect 4.1.0 so applications load a single Effect runtime.
8
+
1
9
  ## @signature-kit/a1@0.4.0
2
10
 
3
11
  ### Publish A1 with Node-resolvable imports
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,iBAAiB,EAKlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAsB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGhG,OAAO,EAAS,MAAM,EAAE,KAAK,EAA2B,MAAM,QAAQ,CAAC;AAEvE,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,aAAa,CAAC;AAyLrB,eAAO,MAAM,qBAAqB,gBAAiB,WAAW,KAAG,aA8DhE,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,eAAe,KACvB,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,iBAAiB,CACmB,CAAC;AAErE,eAAO,MAAM,yBAAyB,YAC3B,eAAe,KACvB,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,iBAAiB,CACa,CAAC;AAEtE,eAAO,MAAM,iBAAiB,YACnB,eAAe,KACvB,KAAK,CAAC,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AC,MAAM,CAAC,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,CAkChE,CAAC;AAuBJ,eAAO,MAAM,wBAAwB,WAC3B,cAAc,KACrB,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,CAI9D,CAAC;AAEJ,eAAO,MAAM,gCAAgC,WACnC,cAAc,KACrB,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,mBAAmB,CACO,CAAC"}
package/dist/signer.js CHANGED
@@ -35,14 +35,14 @@ const importPrivateKey = (privateKey, algorithm) => pemToDer(Redacted.value(priv
35
35
  })), Effect.flatMap((keyData) => importKey("pkcs8", keyData, algorithm, "sign")));
36
36
  const importPublicKey = (publicKeyDer, algorithm) => importKey("spki", publicKeyDer, algorithm, "verify");
37
37
  const signWithKey = (key, algorithm, content) => Effect.gen(function* () {
38
- const signature = yield* Effect.tryPromise({
38
+ const signature = yield* Effect.uninterruptible(Effect.tryPromise({
39
39
  try: () => crypto.subtle.sign(rsaAlgorithm(algorithm).name, key, toBufferSource(content)),
40
40
  catch: () => new SignatureKitError({
41
41
  code: SignatureKitErrorCodeValue.signFailed,
42
42
  retryable: false,
43
43
  operation: SignatureKitOperationValue.cryptoSign,
44
44
  }),
45
- });
45
+ }));
46
46
  return new Uint8Array(signature);
47
47
  });
48
48
  const verifyWithKey = (key, algorithm, signature, content) => Effect.tryPromise({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signature-kit/a1",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,8 +34,8 @@
34
34
  "@signature-kit/certificates": "^0.3.0",
35
35
  "@signature-kit/crypto": "^0.2.1",
36
36
  "@signature-kit/http": "^0.1.0",
37
- "@signature-kit/signatures": "^0.2.0",
38
- "effect": "4.0.5"
37
+ "@signature-kit/signatures": "^0.3.0",
38
+ "effect": "4.1.0"
39
39
  },
40
40
  "nx": {
41
41
  "targets": {