@gw2me/client 0.9.0 → 0.9.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/dpop.js +1 -1
  2. package/package.json +12 -8
package/dist/dpop.js CHANGED
@@ -1 +1 @@
1
- import{a as e}from"./chunk-EXOYQILJ.js";import"./chunk-OSZ7DOEH.js";function d(){return crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])}async function m({htm:t,htu:n,nonce:r,accessToken:a},i){let y=JSON.stringify({alg:"ES256",typ:"dpop+jwt",jwk:await u(i.publicKey)}),c=JSON.stringify({iat:Math.floor(Date.now()/1e3),jti:e(crypto.getRandomValues(new Uint8Array(32))),htm:t,htu:n,nonce:r,ath:a?e(await crypto.subtle.digest("SHA-256",o(a))):void 0}),s=`${e(o(y))}.${e(o(c))}`,p={name:"ECDSA",hash:"SHA-256"},g=e(await crypto.subtle.sign(p,i.privateKey,o(s)));return`${s}.${g}`}var w=new TextEncoder;function o(t){return w.encode(t)}async function u(t){let{kty:n,e:r,k:a,n:i,x:y,y:c,crv:s}=await crypto.subtle.exportKey("jwk",t);return{e:r,k:a,crv:s,kty:n,n:i,x:y,y:c}}async function P(t){let n=JSON.stringify(await u(t)),r=await crypto.subtle.digest("SHA-256",o(n));return e(r)}export{m as createDPoPJwt,d as generateDPoPKeyPair,P as jwkThumbprint};
1
+ import{a as e}from"./chunk-EXOYQILJ.js";import"./chunk-OSZ7DOEH.js";function d(){return crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])}async function m({htm:t,htu:n,nonce:r,accessToken:a},s){let c=JSON.stringify({alg:"ES256",typ:"dpop+jwt",jwk:await u(s.publicKey)}),y=JSON.stringify({iat:Math.floor(Date.now()/1e3),jti:e(crypto.getRandomValues(new Uint8Array(32))),htm:t,htu:n,nonce:r,ath:a?e(await crypto.subtle.digest("SHA-256",o(a))):void 0}),i=`${e(o(c))}.${e(o(y))}`,p={name:"ECDSA",hash:"SHA-256"},g=e(await crypto.subtle.sign(p,s.privateKey,o(i)));return`${i}.${g}`}var w=new TextEncoder;function o(t){return w.encode(t)}async function u(t){let{kty:n,e:r,k:a,n:s,x:c,y,crv:i}=await crypto.subtle.exportKey("jwk",t);return{e:r,k:a,crv:i,kty:n,n:s,x:c,y}}async function P(t){let n=JSON.stringify(await u(t)),r=await crypto.subtle.digest("SHA-256",o(n));return e(r)}export{m as createDPoPJwt,d as generateDPoPKeyPair,P as jwkThumbprint};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gw2me/client",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "gw2.me client library",
5
5
  "type": "module",
6
6
  "exports": {
@@ -39,21 +39,25 @@
39
39
  },
40
40
  "homepage": "https://github.com/gw2treasures/gw2.me#readme",
41
41
  "devDependencies": {
42
- "@gw2treasures/eslint-config": "0.1.0",
42
+ "@gw2treasures/eslint-config": "0.2.0",
43
43
  "@gw2treasures/publish-package": "0.1.0-rc.0",
44
44
  "@gw2treasures/tsconfig": "0.0.1",
45
- "eslint": "9.27.0",
46
- "tsup": "8.5.0",
47
- "typescript": "5.8.3",
48
- "typescript-eslint": "8.32.1",
49
- "undici-types": "7.10.0"
45
+ "eslint": "9.39.1",
46
+ "tsup": "8.5.1",
47
+ "typescript": "5.9.3",
48
+ "typescript-eslint": "8.47.0",
49
+ "undici-types": "7.16.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public",
53
+ "provenance": true
50
54
  },
51
55
  "scripts": {
52
56
  "build": "pnpm run clean && if test $CI; then pnpm run build:ci; else pnpm run build:local; fi",
53
57
  "build:local": "tsup src/index.ts src/dpop.ts src/pkce.ts --format esm && tsc --emitDeclarationOnly --declaration --declarationMap",
54
58
  "build:ci": "tsup src/index.ts src/dpop.ts src/pkce.ts --format esm --minify --dts",
55
59
  "clean": "rm -rf dist/",
56
- "lint": "eslint src",
60
+ "lint": "eslint .",
57
61
  "publish-package": "gw2treasures-publish-package"
58
62
  }
59
63
  }