@gw2me/client 0.7.0 → 0.8.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.
- package/dist/dpop.d.ts +11 -0
- package/dist/dpop.js +1 -0
- package/dist/index.d.ts +43 -17
- package/dist/index.js +1 -1
- package/dist/pkce.js +1 -1
- package/package.json +12 -7
package/dist/dpop.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare function generateDPoPKeyPair(): Promise<CryptoKeyPair>;
|
|
2
|
+
interface DPoPOptions {
|
|
3
|
+
htm: 'GET' | 'POST' | (string & {});
|
|
4
|
+
htu: string;
|
|
5
|
+
nonce?: string;
|
|
6
|
+
accessToken?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function createDPoPJwt({ htm, htu, nonce, accessToken }: DPoPOptions, keyPair: CryptoKeyPair): Promise<string>;
|
|
9
|
+
declare function jwkThumbprint(key: CryptoKey): Promise<string>;
|
|
10
|
+
|
|
11
|
+
export { createDPoPJwt, generateDPoPKeyPair, jwkThumbprint };
|
package/dist/dpop.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var h=(t,r)=>{for(var e in r)u(t,e,{get:r[e],enumerable:!0})},A=(t,r,e,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of w(r))!l.call(t,n)&&n!==e&&u(t,n,{get:()=>r[n],enumerable:!(o=d(r,n))||o.enumerable});return t};var P=t=>A(u({},"__esModule",{value:!0}),t);var E={};h(E,{createDPoPJwt:()=>m,generateDPoPKeyPair:()=>b,jwkThumbprint:()=>C});module.exports=P(E);function a(t){let r=t instanceof ArrayBuffer?new Uint8Array(t):t;return btoa(String.fromCharCode(...r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function b(){return crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])}async function m({htm:t,htu:r,nonce:e,accessToken:o},n){let c=JSON.stringify({alg:"ES256",typ:"dpop+jwt",jwk:await p(n.publicKey)}),y=JSON.stringify({iat:Math.floor(Date.now()/1e3),jti:a(crypto.getRandomValues(new Uint8Array(32))),htm:t,htu:r,nonce:e,ath:o?a(await crypto.subtle.digest("SHA-256",i(o))):void 0}),s=`${a(i(c))}.${a(i(y))}`,g={name:"ECDSA",hash:"SHA-256"},f=a(await crypto.subtle.sign(g,n.privateKey,i(s)));return`${s}.${f}`}var S=new TextEncoder;function i(t){return S.encode(t)}async function p(t){let{kty:r,e,k:o,n,x:c,y,crv:s}=await crypto.subtle.exportKey("jwk",t);return{e,k:o,crv:s,kty:r,n,x:c,y}}async function C(t){let r=JSON.stringify(await p(t)),e=await crypto.subtle.digest("SHA-256",i(r));return a(e)}0&&(module.exports={createDPoPJwt,generateDPoPKeyPair,jwkThumbprint});
|
package/dist/index.d.ts
CHANGED
|
@@ -48,11 +48,14 @@ interface SubtokenResponse {
|
|
|
48
48
|
subtoken: string;
|
|
49
49
|
expiresAt: string;
|
|
50
50
|
}
|
|
51
|
+
interface ApiOptions extends Options {
|
|
52
|
+
dpopKeyPair?: CryptoKeyPair;
|
|
53
|
+
}
|
|
51
54
|
declare class Gw2MeApi {
|
|
52
55
|
#private;
|
|
53
56
|
private access_token;
|
|
54
57
|
private options?;
|
|
55
|
-
constructor(access_token: string, options?: Partial<
|
|
58
|
+
constructor(access_token: string, options?: Partial<ApiOptions> | undefined);
|
|
56
59
|
user(): Promise<UserResponse>;
|
|
57
60
|
saveSettings(settings: unknown): Promise<void>;
|
|
58
61
|
accounts(): Promise<AccountsResponse>;
|
|
@@ -83,25 +86,33 @@ interface AuthorizationUrlParams {
|
|
|
83
86
|
state?: string;
|
|
84
87
|
code_challenge?: string;
|
|
85
88
|
code_challenge_method?: 'S256';
|
|
89
|
+
dpop_jkt?: string;
|
|
86
90
|
prompt?: 'none' | 'consent';
|
|
87
91
|
include_granted_scopes?: boolean;
|
|
88
92
|
verified_accounts_only?: boolean;
|
|
89
93
|
}
|
|
94
|
+
interface PushedAuthorizationRequestParams extends AuthorizationUrlParams {
|
|
95
|
+
dpopKeyPair?: CryptoKeyPair;
|
|
96
|
+
}
|
|
90
97
|
interface AuthorizationUrlRequestUriParams {
|
|
91
98
|
request_uri: string;
|
|
92
99
|
}
|
|
93
100
|
interface AuthTokenParams {
|
|
94
101
|
code: string;
|
|
102
|
+
token_type?: 'Bearer' | 'DPoP';
|
|
95
103
|
redirect_uri: string;
|
|
96
104
|
code_verifier?: string;
|
|
105
|
+
dpopKeyPair?: CryptoKeyPair;
|
|
97
106
|
}
|
|
98
107
|
interface RefreshTokenParams {
|
|
99
108
|
refresh_token: string;
|
|
109
|
+
refresh_token_type?: 'Bearer' | 'DPoP';
|
|
110
|
+
dpopKeyPair?: CryptoKeyPair;
|
|
100
111
|
}
|
|
101
112
|
interface TokenResponse {
|
|
102
113
|
access_token: string;
|
|
103
114
|
issued_token_type: 'urn:ietf:params:oauth:token-type:access_token';
|
|
104
|
-
token_type: 'Bearer';
|
|
115
|
+
token_type: 'Bearer' | 'DPoP';
|
|
105
116
|
expires_in: number;
|
|
106
117
|
refresh_token?: string;
|
|
107
118
|
scope: string;
|
|
@@ -112,15 +123,30 @@ interface RevokeTokenParams {
|
|
|
112
123
|
interface IntrospectTokenParams {
|
|
113
124
|
token: string;
|
|
114
125
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
declare namespace IntrospectTokenResponse {
|
|
127
|
+
interface Inactive {
|
|
128
|
+
active: false;
|
|
129
|
+
}
|
|
130
|
+
namespace Active {
|
|
131
|
+
interface Common {
|
|
132
|
+
active: true;
|
|
133
|
+
scope: string;
|
|
134
|
+
client_id: string;
|
|
135
|
+
exp?: number;
|
|
136
|
+
}
|
|
137
|
+
interface Bearer extends Common {
|
|
138
|
+
token_type: 'Bearer';
|
|
139
|
+
}
|
|
140
|
+
interface DPoP extends Common {
|
|
141
|
+
token_type: 'DPoP';
|
|
142
|
+
cnf: {
|
|
143
|
+
jkt: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
type Active = Active.Bearer | Active.DPoP;
|
|
148
|
+
}
|
|
149
|
+
type IntrospectTokenResponse = IntrospectTokenResponse.Inactive | IntrospectTokenResponse.Active;
|
|
124
150
|
interface PushedAuthorizationRequestResponse {
|
|
125
151
|
request_uri: string;
|
|
126
152
|
expires_in: number;
|
|
@@ -128,11 +154,11 @@ interface PushedAuthorizationRequestResponse {
|
|
|
128
154
|
declare class Gw2MeClient {
|
|
129
155
|
#private;
|
|
130
156
|
private options?;
|
|
131
|
-
constructor(
|
|
157
|
+
constructor(client: ClientInfo, options?: Partial<Options> | undefined);
|
|
132
158
|
getAuthorizationUrl(params: AuthorizationUrlParams | AuthorizationUrlRequestUriParams): string;
|
|
133
|
-
pushAuthorizationRequest(params:
|
|
134
|
-
getAccessToken({ code, redirect_uri, code_verifier }: AuthTokenParams): Promise<TokenResponse>;
|
|
135
|
-
refreshToken({ refresh_token }: RefreshTokenParams): Promise<TokenResponse>;
|
|
159
|
+
pushAuthorizationRequest(params: PushedAuthorizationRequestParams): Promise<PushedAuthorizationRequestResponse>;
|
|
160
|
+
getAccessToken({ code, token_type, redirect_uri, code_verifier, dpopKeyPair }: AuthTokenParams): Promise<TokenResponse>;
|
|
161
|
+
refreshToken({ refresh_token, refresh_token_type, dpopKeyPair }: RefreshTokenParams): Promise<TokenResponse>;
|
|
136
162
|
revokeToken({ token }: RevokeTokenParams): Promise<void>;
|
|
137
163
|
introspectToken({ token }: IntrospectTokenParams): Promise<IntrospectTokenResponse>;
|
|
138
164
|
/**
|
|
@@ -145,7 +171,7 @@ declare class Gw2MeClient {
|
|
|
145
171
|
code: string;
|
|
146
172
|
state: string | undefined;
|
|
147
173
|
};
|
|
148
|
-
api(access_token: string): Gw2MeApi;
|
|
174
|
+
api(access_token: string, options?: Partial<Omit<ApiOptions, keyof Options>>): Gw2MeApi;
|
|
149
175
|
get fedCM(): Gw2MeFedCM;
|
|
150
176
|
}
|
|
151
177
|
|
|
@@ -158,4 +184,4 @@ declare class Gw2MeOAuthError extends Gw2MeError {
|
|
|
158
184
|
constructor(error: string, error_description?: string | undefined, error_uri?: string | undefined);
|
|
159
185
|
}
|
|
160
186
|
|
|
161
|
-
export { type AccountsResponse, type AuthTokenParams, type AuthorizationUrlParams, type AuthorizationUrlRequestUriParams, type ClientInfo, type FedCMRequestOptions, Gw2MeApi, Gw2MeClient, Gw2MeError, Gw2MeFedCM, Gw2MeOAuthError, type IntrospectTokenParams,
|
|
187
|
+
export { type AccountsResponse, type ApiOptions, type AuthTokenParams, type AuthorizationUrlParams, type AuthorizationUrlRequestUriParams, type ClientInfo, type FedCMRequestOptions, Gw2MeApi, Gw2MeClient, Gw2MeError, Gw2MeFedCM, Gw2MeOAuthError, type IntrospectTokenParams, IntrospectTokenResponse, type Options, type PushedAuthorizationRequestParams, type PushedAuthorizationRequestResponse, type RefreshTokenParams, type RevokeTokenParams, Scope, type SubtokenOptions, type SubtokenResponse, type TokenResponse, type UserResponse };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var z=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var E=r=>{throw TypeError(r)};var N=(r,e)=>{for(var t in e)z(r,t,{get:e[t],enumerable:!0})},H=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of L(e))!M.call(r,o)&&o!==t&&z(r,o,{get:()=>e[o],enumerable:!(n=J(e,o))||n.enumerable});return r};var F=r=>H(z({},"__esModule",{value:!0}),r);var D=(r,e,t)=>e.has(r)||E("Cannot "+t);var c=(r,e,t)=>(D(r,e,"read from private field"),t?t.call(r):e.get(r)),m=(r,e,t)=>e.has(r)?E("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),k=(r,e,t,n)=>(D(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),s=(r,e,t)=>(D(r,e,"access private method"),t);var Q={};N(Q,{Gw2MeApi:()=>v,Gw2MeClient:()=>$,Gw2MeError:()=>f,Gw2MeOAuthError:()=>T,Scope:()=>j});module.exports=F(Q);var j=(d=>(d.Identify="identify",d.Email="email",d.Accounts="accounts",d.Accounts_Verified="accounts.verified",d.Accounts_DisplayName="accounts.displayName",d.GW2_Account="gw2:account",d.GW2_Inventories="gw2:inventories",d.GW2_Characters="gw2:characters",d.GW2_Tradingpost="gw2:tradingpost",d.GW2_Wallet="gw2:wallet",d.GW2_Unlocks="gw2:unlocks",d.GW2_Pvp="gw2:pvp",d.GW2_Wvw="gw2:wvw",d.GW2_Builds="gw2:builds",d.GW2_Progression="gw2:progression",d.GW2_Guilds="gw2:guilds",d))(j||{});function _(r){let e=r instanceof ArrayBuffer?new Uint8Array(r):r;return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function x({htm:r,htu:e,nonce:t,accessToken:n},o){let i=JSON.stringify({alg:"ES256",typ:"dpop+jwt",jwk:await G(o.publicKey)}),a=JSON.stringify({iat:Math.floor(Date.now()/1e3),jti:_(crypto.getRandomValues(new Uint8Array(32))),htm:r,htu:e,nonce:t,ath:n?_(await crypto.subtle.digest("SHA-256",A(n))):void 0}),h=`${_(A(i))}.${_(A(a))}`,y={name:"ECDSA",hash:"SHA-256"},U=_(await crypto.subtle.sign(y,o.privateKey,A(h)));return`${h}.${U}`}var V=new TextEncoder;function A(r){return V.encode(r)}async function G(r){let{kty:e,e:t,k:n,n:o,x:i,y:a,crv:h}=await crypto.subtle.exportKey("jwk",r);return{e:t,k:n,crv:h,kty:e,n:o,x:i,y:a}}async function W(r){let e=JSON.stringify(await G(r)),t=await crypto.subtle.digest("SHA-256",A(e));return _(t)}var f=class extends Error{},T=class extends f{constructor(t,n,o){super(`Received ${t}`+(n?`: ${n}`:"")+(o?` (${o})`:""));this.error=t;this.error_description=n;this.error_uri=o}};async function g(r){if(await q(r),!(r.headers.get("Content-Type")==="application/json"))throw new f("gw2.me did not return a valid JSON response");return r.json()}async function q(r){if(!r.ok){let e;throw r.headers.get("Content-Type")==="application/json"&&(e=(await r.json()).error_description),new f(`gw2.me returned an error: ${e??"Unknown error"}`)}}var l,K,b,v=class{constructor(e,t){this.access_token=e;this.options=t;m(this,l)}user(){return s(this,l,b).call(this,"api/user").then(e=>fetch(e)).then(g)}saveSettings(e){return s(this,l,b).call(this,"api/user/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>fetch(t)).then(q)}accounts(){return s(this,l,b).call(this,"api/accounts").then(e=>fetch(e)).then(g)}subtoken(e,t){let n=s(this,l,K).call(this,`api/accounts/${e}/subtoken`);return t?.permissions&&n.searchParams.set("permissions",t.permissions.join(",")),s(this,l,b).call(this,n).then(o=>fetch(o)).then(g)}};l=new WeakSet,K=function(e){return new URL(e,this.options?.url||"https://gw2.me/")},b=async function(e,t){let n=e instanceof URL?e:s(this,l,K).call(this,e),o=this.options?.dpopKeyPair,i=new Headers(t?.headers);if(i.set("Authorization",`${o?"DPoP":"Bearer"} ${this.access_token}`),o){let a=await x({htm:t?.method??"GET",htu:n.toString(),accessToken:this.access_token},o);i.set("DPoP",a)}return new Request(n,{cache:"no-cache",...t,headers:i})};var O,C,I=class{constructor(e,t){m(this,O);m(this,C);k(this,O,e),k(this,C,t)}isSupported(){return typeof window<"u"&&"IdentityCredential"in window}request({scopes:e,mediation:t,signal:n,mode:o,code_challenge:i,code_challenge_method:a}){if(!this.isSupported())throw new f("FedCM is not supported");return navigator.credentials.get({mediation:t,signal:n,identity:{providers:[{configURL:c(this,O),clientId:c(this,C),fields:[e.includes("identify")&&"name",e.includes("email")&&"email"].filter(Boolean),nonce:`${a}:${i}`,params:{scope:e.join(" "),code_challenge:i,code_challenge_method:a}}],mode:o}})}};O=new WeakMap,C=new WeakMap;var p,S,u,P,R,$=class{constructor(e,t){this.options=t;m(this,u);m(this,p);m(this,S);k(this,p,e),k(this,S,new I(s(this,u,P).call(this,"/fed-cm/config.json"),e.client_id))}getAuthorizationUrl(e){let t="request_uri"in e?new URLSearchParams({client_id:c(this,p).client_id,response_type:"code",request_uri:e.request_uri}):B(c(this,p).client_id,e);return s(this,u,P).call(this,`/oauth2/authorize?${t.toString()}`).toString()}async pushAuthorizationRequest(e){let t=s(this,u,P).call(this,"/oauth2/par"),n={"Content-Type":"application/x-www-form-urlencoded"};e.dpopKeyPair&&(n.DPoP=await x({htm:"POST",htu:t.toString()},e.dpopKeyPair),e.dpop_jkt=await W(e.dpopKeyPair.publicKey));let o=B(c(this,p).client_id,e);return c(this,p).client_secret&&(n.Authorization=s(this,u,R).call(this)),await fetch(t,{method:"POST",headers:n,body:o,cache:"no-store"}).then(g)}async getAccessToken({code:e,token_type:t,redirect_uri:n,code_verifier:o,dpopKeyPair:i}){let a=new URLSearchParams({grant_type:"authorization_code",code:e,client_id:c(this,p).client_id,redirect_uri:n}),h={"Content-Type":"application/x-www-form-urlencoded"};c(this,p).client_secret&&(h.Authorization=s(this,u,R).call(this)),o&&a.set("code_verifier",o);let y=s(this,u,P).call(this,"/api/token");return i&&(h.DPoP=await x({htm:"POST",htu:y.toString(),accessToken:t==="DPoP"?e:void 0},i)),await fetch(y,{method:"POST",headers:h,body:a,cache:"no-store"}).then(g)}async refreshToken({refresh_token:e,refresh_token_type:t,dpopKeyPair:n}){let o=new URLSearchParams({grant_type:"refresh_token",refresh_token:e,client_id:c(this,p).client_id}),i={"Content-Type":"application/x-www-form-urlencoded"};c(this,p).client_secret&&(i.Authorization=s(this,u,R).call(this));let a=s(this,u,P).call(this,"/api/token");return n&&(i.DPoP=await x({htm:"POST",htu:a.toString(),accessToken:t==="DPoP"?e:void 0},n)),await fetch(a,{method:"POST",headers:i,body:o,cache:"no-store"}).then(g)}async revokeToken({token:e}){let t=new URLSearchParams({token:e}),n={"Content-Type":"application/x-www-form-urlencoded"};c(this,p).client_secret&&(n.Authorization=s(this,u,R).call(this)),await fetch(s(this,u,P).call(this,"/api/token/revoke"),{method:"POST",cache:"no-store",headers:n,body:t}).then(g)}async introspectToken({token:e}){let t=new URLSearchParams({token:e}),n={"Content-Type":"application/x-www-form-urlencoded"};return c(this,p).client_secret&&(n.Authorization=s(this,u,R).call(this)),await fetch(s(this,u,P).call(this,"/api/token/introspect"),{method:"POST",cache:"no-store",headers:n,body:t}).then(g)}parseAuthorizationResponseSearchParams(e){let t=s(this,u,P).call(this,"/").origin,n=e.get("iss");if(!n)throw new f("Issuer Identifier verification failed: parameter `iss` is missing");if(n!==t)throw new f(`Issuer Identifier verification failed: expected "${t}", got "${n}"`);let o=e.get("error");if(o){let h=e.get("error_description")??void 0,y=e.get("error_uri")??void 0;throw new T(o,h,y)}let i=e.get("code");if(!i)throw new f("Parameter `code` is missing");let a=e.get("state")||void 0;return{code:i,state:a}}api(e,t){return new v(e,{...this.options,...t})}get fedCM(){return c(this,S)}};p=new WeakMap,S=new WeakMap,u=new WeakSet,P=function(e){return new URL(e,this.options?.url||"https://gw2.me/")},R=function(){if(!c(this,p).client_secret)throw new f("client_secret is required");return`Basic ${btoa(`${c(this,p).client_id}:${c(this,p).client_secret}`)}`};function B(r,{redirect_uri:e,scopes:t,state:n,code_challenge:o,code_challenge_method:i,dpop_jkt:a,prompt:h,include_granted_scopes:y,verified_accounts_only:U}){let w=new URLSearchParams({client_id:r,response_type:"code",redirect_uri:e,scope:t.join(" ")});return n&&w.append("state",n),o&&i&&(w.append("code_challenge",o),w.append("code_challenge_method",i)),a&&w.append("dpop_jkt",a),h&&w.append("prompt",h),y&&w.append("include_granted_scopes","true"),U&&w.append("verified_accounts_only","true"),w}0&&(module.exports={Gw2MeApi,Gw2MeClient,Gw2MeError,Gw2MeOAuthError,Scope});
|
package/dist/pkce.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(e,r)=>{for(var n in r)o(e,n,{get:r[n],enumerable:!0})},f=(e,r,n,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of i(r))!d.call(e,a)&&a!==n&&o(e,a,{get:()=>r[a],enumerable:!(c=l(r,a))||c.enumerable});return e};var s=e=>f(o({},"__esModule",{value:!0}),e);var u={};g(u,{generatePKCEPair:()=>h});module.exports=s(u);function t(e){let r=e instanceof ArrayBuffer?new Uint8Array(e):e;return btoa(String.fromCharCode(...r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function h(){let e=new Uint8Array(32);crypto.getRandomValues(e);let r=t(e),n=new TextEncoder,c=await crypto.subtle.digest("SHA-256",n.encode(r));return{code_verifier:r,challenge:{code_challenge_method:"S256",code_challenge:t(new Uint8Array(c))}}}0&&(module.exports={generatePKCEPair});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gw2me/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "gw2.me client library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"default": "./dist/index.js"
|
|
12
12
|
},
|
|
13
|
+
"./dpop": {
|
|
14
|
+
"types": "./dist/dpop.d.ts",
|
|
15
|
+
"default": "./dist/dpop.js"
|
|
16
|
+
},
|
|
13
17
|
"./pkce": {
|
|
14
18
|
"types": "./dist/pkce.d.ts",
|
|
15
19
|
"default": "./dist/pkce.js"
|
|
@@ -36,18 +40,19 @@
|
|
|
36
40
|
},
|
|
37
41
|
"homepage": "https://github.com/gw2treasures/gw2.me#readme",
|
|
38
42
|
"devDependencies": {
|
|
39
|
-
"@gw2treasures/eslint-config": "0.0
|
|
43
|
+
"@gw2treasures/eslint-config": "0.1.0",
|
|
40
44
|
"@gw2treasures/publish-package": "0.1.0-rc.0",
|
|
41
45
|
"@gw2treasures/tsconfig": "0.0.1",
|
|
42
|
-
"eslint": "
|
|
46
|
+
"eslint": "9.25.1",
|
|
43
47
|
"tsup": "8.4.0",
|
|
44
|
-
"typescript": "5.8.
|
|
45
|
-
"
|
|
48
|
+
"typescript": "5.8.3",
|
|
49
|
+
"typescript-eslint": "8.31.0",
|
|
50
|
+
"undici-types": "7.8.0"
|
|
46
51
|
},
|
|
47
52
|
"scripts": {
|
|
48
53
|
"build": "pnpm run clean && if test $CI; then pnpm run build:ci; else pnpm run build:local; fi",
|
|
49
|
-
"build:local": "tsup src/index.ts src/pkce.ts && tsc --emitDeclarationOnly --declaration --declarationMap",
|
|
50
|
-
"build:ci": "tsup src/index.ts src/pkce.ts --minify --dts",
|
|
54
|
+
"build:local": "tsup src/index.ts src/dpop.ts src/pkce.ts && tsc --emitDeclarationOnly --declaration --declarationMap",
|
|
55
|
+
"build:ci": "tsup src/index.ts src/dpop.ts src/pkce.ts --minify --dts",
|
|
51
56
|
"clean": "rm -rf dist/",
|
|
52
57
|
"lint": "eslint src",
|
|
53
58
|
"publish-package": "gw2treasures-publish-package"
|