@effected/github 0.13.0 → 0.14.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.
@@ -1,5 +1,6 @@
1
- import { Encoding, Result } from "effect";
1
+ import { Result } from "effect";
2
2
  import blakejs from "blakejs";
3
+ import * as Base64 from "effect/encoding/Base64";
3
4
  import nacl from "tweetnacl";
4
5
 
5
6
  //#region src/internal/crypto.ts
@@ -29,7 +30,7 @@ const utf8 = new TextEncoder();
29
30
  *
30
31
  * ## Nothing here is Node-specific
31
32
  *
32
- * Base64 goes through core's `Encoding` and text through `TextEncoder`, so this
33
+ * Base64 goes through core's `Base64` and text through `TextEncoder`, so this
33
34
  * module imports **no builtin**. That is deliberate: an earlier draft used
34
35
  * `node:buffer` and was the only thing in this package's reachable graph tying
35
36
  * it to a runtime — neither `blakejs` (pure JS; its `util` is a *relative*
@@ -46,7 +47,7 @@ const utf8 = new TextEncoder();
46
47
  *
47
48
  * @internal
48
49
  */
49
- const encryptSecret = (publicKey, secretValue) => Result.map(Encoding.decodeBase64(publicKey), (publicKeyBytes) => {
50
+ const encryptSecret = (publicKey, secretValue) => Result.map(Base64.decode(publicKey), (publicKeyBytes) => {
50
51
  const ephemeralKeyPair = nacl.box.keyPair();
51
52
  const nonceInput = /* @__PURE__ */ new Uint8Array(64);
52
53
  nonceInput.set(ephemeralKeyPair.publicKey);
@@ -56,7 +57,7 @@ const encryptSecret = (publicKey, secretValue) => Result.map(Encoding.decodeBase
56
57
  const sealed = new Uint8Array(ephemeralKeyPair.publicKey.length + ciphertext.length);
57
58
  sealed.set(ephemeralKeyPair.publicKey);
58
59
  sealed.set(ciphertext, ephemeralKeyPair.publicKey.length);
59
- return Encoding.encodeBase64(sealed);
60
+ return Base64.encode(sealed);
60
61
  });
61
62
 
62
63
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/github",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "private": false,
5
5
  "description": "Typed GitHub REST and GraphQL services over the octokit core request surface, with app auth and resource helpers.",
6
6
  "keywords": [
@@ -38,8 +38,8 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "dependencies": {
41
- "@effected/github-references": "^0.5.0",
42
- "@effected/semver": "^0.9.0",
41
+ "@effected/github-references": "^0.6.0",
42
+ "@effected/semver": "^0.10.0",
43
43
  "@octokit/core": "^7.0.6",
44
44
  "@octokit/plugin-paginate-rest": "^15.0.0",
45
45
  "@octokit/types": "^18.0.0",
@@ -48,7 +48,7 @@
48
48
  "universal-github-app-jwt": "^2.2.2"
49
49
  },
50
50
  "peerDependencies": {
51
- "effect": "4.0.0-rc.117"
51
+ "effect": "4.0.0-rc.118"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=24.11.0"