@xwiki/cristal-electron-authentication-github-renderer 0.17.0 → 0.18.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @xwiki/cristal-electron-authentication-github-renderer
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Cristal 0.18 Release
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @xwiki/cristal-api@0.18.0
13
+ - @xwiki/cristal-authentication-api@0.18.0
14
+ - @xwiki/cristal-authentication-github-state@0.18.0
15
+
3
16
  ## 0.17.0
4
17
 
5
18
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -1,31 +1,31 @@
1
1
  import { GitHubAuthenticationState as u } from "@xwiki/cristal-authentication-github-state";
2
2
  import { GitHubAuthenticationState as I } from "@xwiki/cristal-authentication-github-state";
3
3
  import { injectable as h, inject as s } from "inversify";
4
- var g = Object.defineProperty, d = Object.getOwnPropertyDescriptor, w = (i, t, e, o) => {
5
- for (var a = o > 1 ? void 0 : o ? d(t, e) : t, n = i.length - 1, r; n >= 0; n--)
6
- (r = i[n]) && (a = (o ? r(t, e, a) : r(a)) || a);
7
- return o && a && g(t, e, a), a;
8
- }, l = (i, t) => (e, o) => t(e, o, i);
9
- let c = class {
10
- constructor(i, t) {
11
- this.cristalApp = i, this.authenticationState = t, this.localStorageDeviceCode = "authentication.device_code", this.localStorageUserCode = "authentication.user_code", this.localStorageExpiresIn = "authentication.expires_in", this.localStorageInterval = "authentication.interval";
4
+ var g = Object.getOwnPropertyDescriptor, d = (e, t, i, a) => {
5
+ for (var o = a > 1 ? void 0 : a ? g(t, i) : t, n = e.length - 1, c; n >= 0; n--)
6
+ (c = e[n]) && (o = c(o) || o);
7
+ return o;
8
+ }, l = (e, t) => (i, a) => t(i, a, e);
9
+ let r = class {
10
+ constructor(e, t) {
11
+ this.cristalApp = e, this.authenticationState = t, this.localStorageDeviceCode = "authentication.device_code", this.localStorageUserCode = "authentication.user_code", this.localStorageExpiresIn = "authentication.expires_in", this.localStorageInterval = "authentication.interval";
12
12
  }
13
13
  async start() {
14
- const i = new URL(
14
+ const e = new URL(
15
15
  `${this.cristalApp.getWikiConfig().authenticationBaseURL}/device-login`
16
- ), e = await (await fetch(i)).json();
16
+ ), i = await (await fetch(e)).json();
17
17
  window.localStorage.setItem(
18
18
  this.localStorageDeviceCode,
19
- e.device_code
19
+ i.device_code
20
20
  ), window.localStorage.setItem(
21
21
  this.localStorageUserCode,
22
- e.user_code
22
+ i.user_code
23
23
  ), window.localStorage.setItem(
24
24
  this.localStorageExpiresIn,
25
- e.expires_in.toString()
25
+ i.expires_in.toString()
26
26
  ), window.localStorage.setItem(
27
27
  this.localStorageInterval,
28
- e.interval.toString()
28
+ i.interval.toString()
29
29
  ), this.authenticationState.modalOpened.value = !0;
30
30
  }
31
31
  async callback() {
@@ -38,8 +38,8 @@ let c = class {
38
38
  }
39
39
  async getAuthorizationHeader() {
40
40
  if (await this.isAuthenticated()) {
41
- const { tokenType: t, accessToken: e } = await window.authenticationGitHub.getAuthorizationValue();
42
- return `${t} ${e}`;
41
+ const { tokenType: t, accessToken: i } = await window.authenticationGitHub.getAuthorizationValue();
42
+ return `${t} ${i}`;
43
43
  }
44
44
  }
45
45
  async isAuthenticated() {
@@ -52,18 +52,18 @@ let c = class {
52
52
  await window.authenticationGitHub.logout();
53
53
  }
54
54
  };
55
- c = w([
55
+ r = d([
56
56
  h(),
57
57
  l(0, s("CristalApp")),
58
58
  l(1, s(u))
59
- ], c);
60
- class v {
59
+ ], r);
60
+ class p {
61
61
  constructor(t) {
62
- t.bind("AuthenticationManager").to(c).inSingletonScope().whenNamed("GitHub"), t.bind(u).toSelf().inSingletonScope();
62
+ t.bind("AuthenticationManager").to(r).inSingletonScope().whenNamed("GitHub"), t.bind(u).toSelf().inSingletonScope();
63
63
  }
64
64
  }
65
65
  export {
66
- v as ComponentInit,
66
+ p as ComponentInit,
67
67
  I as GitHubAuthenticationState
68
68
  };
69
69
  //# sourceMappingURL=index.es.js.map
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(n,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@xwiki/cristal-authentication-github-state"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/cristal-authentication-github-state","inversify"],a):(n=typeof globalThis<"u"?globalThis:n||self,a(n["cristal_authentication-github-renderer"]={},n.cristalAuthenticationGithubState,n.inversify))})(this,function(n,a,r){"use strict";var d=Object.defineProperty,g=Object.getOwnPropertyDescriptor,w=(i,t,e,c)=>{for(var o=c>1?void 0:c?g(t,e):t,l=i.length-1,u;l>=0;l--)(u=i[l])&&(o=(c?u(t,e,o):u(o))||o);return c&&o&&d(t,e,o),o},h=(i,t)=>(e,c)=>t(e,c,i);let s=class{constructor(i,t){this.cristalApp=i,this.authenticationState=t,this.localStorageDeviceCode="authentication.device_code",this.localStorageUserCode="authentication.user_code",this.localStorageExpiresIn="authentication.expires_in",this.localStorageInterval="authentication.interval"}async start(){const i=new URL(`${this.cristalApp.getWikiConfig().authenticationBaseURL}/device-login`),e=await(await fetch(i)).json();window.localStorage.setItem(this.localStorageDeviceCode,e.device_code),window.localStorage.setItem(this.localStorageUserCode,e.user_code),window.localStorage.setItem(this.localStorageExpiresIn,e.expires_in.toString()),window.localStorage.setItem(this.localStorageInterval,e.interval.toString()),this.authenticationState.modalOpened.value=!0}async callback(){return window.authenticationGitHub.login(this.cristalApp.getWikiConfig().authenticationBaseURL,window.localStorage.getItem(this.localStorageDeviceCode),window.localStorage.getItem(this.localStorageInterval),window.localStorage.getItem(this.localStorageExpiresIn))}async getAuthorizationHeader(){if(await this.isAuthenticated()){const{tokenType:t,accessToken:e}=await window.authenticationGitHub.getAuthorizationValue();return`${t} ${e}`}}async isAuthenticated(){return window.authenticationGitHub.isLoggedIn()}async getUserDetails(){return window.authenticationGitHub.getUserDetails()}async logout(){await window.authenticationGitHub.logout()}};s=w([r.injectable(),h(0,r.inject("CristalApp")),h(1,r.inject(a.GitHubAuthenticationState))],s);class p{constructor(t){t.bind("AuthenticationManager").to(s).inSingletonScope().whenNamed("GitHub"),t.bind(a.GitHubAuthenticationState).toSelf().inSingletonScope()}}Object.defineProperty(n,"GitHubAuthenticationState",{enumerable:!0,get:()=>a.GitHubAuthenticationState}),n.ComponentInit=p,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@xwiki/cristal-authentication-github-state"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/cristal-authentication-github-state","inversify"],a):(n=typeof globalThis<"u"?globalThis:n||self,a(n["cristal_authentication-github-renderer"]={},n.cristalAuthenticationGithubState,n.inversify))})(this,function(n,a,r){"use strict";var d=Object.getOwnPropertyDescriptor,g=(e,t,i,o)=>{for(var c=o>1?void 0:o?d(t,i):t,l=e.length-1,h;l>=0;l--)(h=e[l])&&(c=h(c)||c);return c},u=(e,t)=>(i,o)=>t(i,o,e);let s=class{constructor(e,t){this.cristalApp=e,this.authenticationState=t,this.localStorageDeviceCode="authentication.device_code",this.localStorageUserCode="authentication.user_code",this.localStorageExpiresIn="authentication.expires_in",this.localStorageInterval="authentication.interval"}async start(){const e=new URL(`${this.cristalApp.getWikiConfig().authenticationBaseURL}/device-login`),i=await(await fetch(e)).json();window.localStorage.setItem(this.localStorageDeviceCode,i.device_code),window.localStorage.setItem(this.localStorageUserCode,i.user_code),window.localStorage.setItem(this.localStorageExpiresIn,i.expires_in.toString()),window.localStorage.setItem(this.localStorageInterval,i.interval.toString()),this.authenticationState.modalOpened.value=!0}async callback(){return window.authenticationGitHub.login(this.cristalApp.getWikiConfig().authenticationBaseURL,window.localStorage.getItem(this.localStorageDeviceCode),window.localStorage.getItem(this.localStorageInterval),window.localStorage.getItem(this.localStorageExpiresIn))}async getAuthorizationHeader(){if(await this.isAuthenticated()){const{tokenType:t,accessToken:i}=await window.authenticationGitHub.getAuthorizationValue();return`${t} ${i}`}}async isAuthenticated(){return window.authenticationGitHub.isLoggedIn()}async getUserDetails(){return window.authenticationGitHub.getUserDetails()}async logout(){await window.authenticationGitHub.logout()}};s=g([r.injectable(),u(0,r.inject("CristalApp")),u(1,r.inject(a.GitHubAuthenticationState))],s);class w{constructor(t){t.bind("AuthenticationManager").to(s).inSingletonScope().whenNamed("GitHub"),t.bind(a.GitHubAuthenticationState).toSelf().inSingletonScope()}}Object.defineProperty(n,"GitHubAuthenticationState",{enumerable:!0,get:()=>a.GitHubAuthenticationState}),n.ComponentInit=w,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/GitHubAuthenticationManager.ts","../src/index.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { UserDetails } from \"@xwiki/cristal-authentication-api\";\nimport { GitHubAuthenticationState } from \"@xwiki/cristal-authentication-github-state\";\nimport { inject, injectable } from \"inversify\";\nimport type { CristalApp } from \"@xwiki/cristal-api\";\nimport type { AuthenticationManager } from \"@xwiki/cristal-authentication-api\";\n\ninterface AuthenticationWindow extends Window {\n authenticationGitHub: {\n login: (\n baseUrl: string,\n deviceCode: string,\n interval: string,\n expiresIn: string,\n ) => Promise<void>;\n\n isLoggedIn(): Promise<boolean>;\n\n getUserDetails(): Promise<UserDetails>;\n\n getAuthorizationValue(): Promise<{\n tokenType: string;\n accessToken: string;\n }>;\n\n logout(): Promise<void>;\n };\n}\ndeclare const window: AuthenticationWindow;\n\n@injectable()\nclass GitHubAuthenticationManager implements AuthenticationManager {\n constructor(\n @inject(\"CristalApp\") private readonly cristalApp: CristalApp,\n @inject(GitHubAuthenticationState)\n private readonly authenticationState: GitHubAuthenticationState,\n ) {}\n\n private readonly localStorageDeviceCode = \"authentication.device_code\";\n\n private readonly localStorageUserCode = \"authentication.user_code\";\n\n private readonly localStorageExpiresIn = \"authentication.expires_in\";\n\n private readonly localStorageInterval = \"authentication.interval\";\n\n async start(): Promise<void> {\n const authorizationUrl = new URL(\n `${this.cristalApp.getWikiConfig().authenticationBaseURL}/device-login`,\n );\n\n const response = await fetch(authorizationUrl);\n const jsonResponse: {\n device_code: string;\n user_code: string;\n expires_in: number;\n interval: number;\n } = await response.json();\n\n window.localStorage.setItem(\n this.localStorageDeviceCode,\n jsonResponse.device_code,\n );\n window.localStorage.setItem(\n this.localStorageUserCode,\n jsonResponse.user_code,\n );\n window.localStorage.setItem(\n this.localStorageExpiresIn,\n jsonResponse.expires_in.toString(),\n );\n window.localStorage.setItem(\n this.localStorageInterval,\n jsonResponse.interval.toString(),\n );\n this.authenticationState.modalOpened.value = true;\n }\n\n async callback(): Promise<void> {\n return window.authenticationGitHub.login(\n this.cristalApp.getWikiConfig().authenticationBaseURL!,\n window.localStorage.getItem(this.localStorageDeviceCode)!,\n window.localStorage.getItem(this.localStorageInterval)!,\n window.localStorage.getItem(this.localStorageExpiresIn)!,\n );\n }\n\n async getAuthorizationHeader(): Promise<string | undefined> {\n const authenticated = await this.isAuthenticated();\n if (authenticated) {\n const { tokenType, accessToken } =\n await window.authenticationGitHub.getAuthorizationValue();\n return `${tokenType} ${accessToken}`;\n }\n }\n\n async isAuthenticated(): Promise<boolean> {\n return window.authenticationGitHub.isLoggedIn();\n }\n\n async getUserDetails(): Promise<UserDetails> {\n return window.authenticationGitHub.getUserDetails();\n }\n\n async logout(): Promise<void> {\n await window.authenticationGitHub.logout();\n }\n}\n\nexport { GitHubAuthenticationManager };\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { GitHubAuthenticationManager } from \"./GitHubAuthenticationManager\";\nimport { GitHubAuthenticationState } from \"@xwiki/cristal-authentication-github-state\";\nimport type { AuthenticationManager } from \"@xwiki/cristal-authentication-api\";\nimport type { Container } from \"inversify\";\n\nclass ComponentInit {\n constructor(container: Container) {\n container\n .bind<AuthenticationManager>(\"AuthenticationManager\")\n .to(GitHubAuthenticationManager)\n .inSingletonScope()\n .whenNamed(\"GitHub\");\n container\n .bind<GitHubAuthenticationState>(GitHubAuthenticationState)\n .toSelf()\n .inSingletonScope();\n }\n}\n\nexport { ComponentInit, GitHubAuthenticationState };\n"],"names":["GitHubAuthenticationManager","cristalApp","authenticationState","authorizationUrl","jsonResponse","tokenType","accessToken","__decorateClass","injectable","__decorateParam","GitHubAuthenticationState","ComponentInit","container"],"mappings":"ipBAkDA,IAAMA,EAAN,KAAmE,CACjE,YACyCC,EAEtBC,EACjB,CAHuC,KAAA,WAAAD,EAEtB,KAAA,oBAAAC,EAGnB,KAAiB,uBAAyB,6BAE1C,KAAiB,qBAAuB,2BAExC,KAAiB,sBAAwB,4BAEzC,KAAiB,qBAAuB,yBAAA,CAExC,MAAM,OAAuB,CAC3B,MAAMC,EAAmB,IAAI,IAC3B,GAAG,KAAK,WAAW,gBAAgB,qBAAqB,eAC1D,EAGMC,EAKF,MANa,MAAM,MAAMD,CAAgB,GAM1B,KAAK,EAExB,OAAO,aAAa,QAClB,KAAK,uBACLC,EAAa,WACf,EACA,OAAO,aAAa,QAClB,KAAK,qBACLA,EAAa,SACf,EACA,OAAO,aAAa,QAClB,KAAK,sBACLA,EAAa,WAAW,SAAS,CACnC,EACA,OAAO,aAAa,QAClB,KAAK,qBACLA,EAAa,SAAS,SAAS,CACjC,EACK,KAAA,oBAAoB,YAAY,MAAQ,EAAA,CAG/C,MAAM,UAA0B,CAC9B,OAAO,OAAO,qBAAqB,MACjC,KAAK,WAAW,cAAA,EAAgB,sBAChC,OAAO,aAAa,QAAQ,KAAK,sBAAsB,EACvD,OAAO,aAAa,QAAQ,KAAK,oBAAoB,EACrD,OAAO,aAAa,QAAQ,KAAK,qBAAqB,CACxD,CAAA,CAGF,MAAM,wBAAsD,CAE1D,GADsB,MAAM,KAAK,gBAAgB,EAC9B,CACjB,KAAM,CAAE,UAAAC,EAAW,YAAAC,CAAA,EACjB,MAAM,OAAO,qBAAqB,sBAAsB,EACnD,MAAA,GAAGD,CAAS,IAAIC,CAAW,EAAA,CACpC,CAGF,MAAM,iBAAoC,CACjC,OAAA,OAAO,qBAAqB,WAAW,CAAA,CAGhD,MAAM,gBAAuC,CACpC,OAAA,OAAO,qBAAqB,eAAe,CAAA,CAGpD,MAAM,QAAwB,CACtB,MAAA,OAAO,qBAAqB,OAAO,CAAA,CAE7C,EA5EMN,EAANO,EAAA,CADCC,aAAW,EAGPC,aAAO,YAAY,CAAA,EACnBA,aAAOC,2BAAyB,CAAA,CAAA,EAH/BV,CAAA,ECzBN,MAAMW,CAAc,CAClB,YAAYC,EAAsB,CAE7BA,EAAA,KAA4B,uBAAuB,EACnD,GAAGZ,CAA2B,EAC9B,iBAAA,EACA,UAAU,QAAQ,EACrBY,EACG,KAAgCF,EAAAA,yBAAyB,EACzD,OAAA,EACA,iBAAiB,CAAA,CAExB"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/GitHubAuthenticationManager.ts","../src/index.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { UserDetails } from \"@xwiki/cristal-authentication-api\";\nimport { GitHubAuthenticationState } from \"@xwiki/cristal-authentication-github-state\";\nimport { inject, injectable } from \"inversify\";\nimport type { CristalApp } from \"@xwiki/cristal-api\";\nimport type { AuthenticationManager } from \"@xwiki/cristal-authentication-api\";\n\ninterface AuthenticationWindow extends Window {\n authenticationGitHub: {\n login: (\n baseUrl: string,\n deviceCode: string,\n interval: string,\n expiresIn: string,\n ) => Promise<void>;\n\n isLoggedIn(): Promise<boolean>;\n\n getUserDetails(): Promise<UserDetails>;\n\n getAuthorizationValue(): Promise<{\n tokenType: string;\n accessToken: string;\n }>;\n\n logout(): Promise<void>;\n };\n}\ndeclare const window: AuthenticationWindow;\n\n@injectable()\nclass GitHubAuthenticationManager implements AuthenticationManager {\n constructor(\n @inject(\"CristalApp\") private readonly cristalApp: CristalApp,\n @inject(GitHubAuthenticationState)\n private readonly authenticationState: GitHubAuthenticationState,\n ) {}\n\n private readonly localStorageDeviceCode = \"authentication.device_code\";\n\n private readonly localStorageUserCode = \"authentication.user_code\";\n\n private readonly localStorageExpiresIn = \"authentication.expires_in\";\n\n private readonly localStorageInterval = \"authentication.interval\";\n\n async start(): Promise<void> {\n const authorizationUrl = new URL(\n `${this.cristalApp.getWikiConfig().authenticationBaseURL}/device-login`,\n );\n\n const response = await fetch(authorizationUrl);\n const jsonResponse: {\n device_code: string;\n user_code: string;\n expires_in: number;\n interval: number;\n } = await response.json();\n\n window.localStorage.setItem(\n this.localStorageDeviceCode,\n jsonResponse.device_code,\n );\n window.localStorage.setItem(\n this.localStorageUserCode,\n jsonResponse.user_code,\n );\n window.localStorage.setItem(\n this.localStorageExpiresIn,\n jsonResponse.expires_in.toString(),\n );\n window.localStorage.setItem(\n this.localStorageInterval,\n jsonResponse.interval.toString(),\n );\n this.authenticationState.modalOpened.value = true;\n }\n\n async callback(): Promise<void> {\n return window.authenticationGitHub.login(\n this.cristalApp.getWikiConfig().authenticationBaseURL!,\n window.localStorage.getItem(this.localStorageDeviceCode)!,\n window.localStorage.getItem(this.localStorageInterval)!,\n window.localStorage.getItem(this.localStorageExpiresIn)!,\n );\n }\n\n async getAuthorizationHeader(): Promise<string | undefined> {\n const authenticated = await this.isAuthenticated();\n if (authenticated) {\n const { tokenType, accessToken } =\n await window.authenticationGitHub.getAuthorizationValue();\n return `${tokenType} ${accessToken}`;\n }\n }\n\n async isAuthenticated(): Promise<boolean> {\n return window.authenticationGitHub.isLoggedIn();\n }\n\n async getUserDetails(): Promise<UserDetails> {\n return window.authenticationGitHub.getUserDetails();\n }\n\n async logout(): Promise<void> {\n await window.authenticationGitHub.logout();\n }\n}\n\nexport { GitHubAuthenticationManager };\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { GitHubAuthenticationManager } from \"./GitHubAuthenticationManager\";\nimport { GitHubAuthenticationState } from \"@xwiki/cristal-authentication-github-state\";\nimport type { AuthenticationManager } from \"@xwiki/cristal-authentication-api\";\nimport type { Container } from \"inversify\";\n\nclass ComponentInit {\n constructor(container: Container) {\n container\n .bind<AuthenticationManager>(\"AuthenticationManager\")\n .to(GitHubAuthenticationManager)\n .inSingletonScope()\n .whenNamed(\"GitHub\");\n container\n .bind<GitHubAuthenticationState>(GitHubAuthenticationState)\n .toSelf()\n .inSingletonScope();\n }\n}\n\nexport { ComponentInit, GitHubAuthenticationState };\n"],"names":["GitHubAuthenticationManager","cristalApp","authenticationState","authorizationUrl","jsonResponse","tokenType","accessToken","__decorateClass","injectable","__decorateParam","GitHubAuthenticationState","ComponentInit","container"],"mappings":"6lBAkDA,IAAMA,EAAN,KAAmE,CACjE,YACyCC,EAEtBC,EACjB,CAHuC,KAAA,WAAAD,EAEtB,KAAA,oBAAAC,EAGnB,KAAiB,uBAAyB,6BAE1C,KAAiB,qBAAuB,2BAExC,KAAiB,sBAAwB,4BAEzC,KAAiB,qBAAuB,yBAAA,CAExC,MAAM,OAAuB,CAC3B,MAAMC,EAAmB,IAAI,IAC3B,GAAG,KAAK,WAAW,gBAAgB,qBAAqB,eAC1D,EAGMC,EAKF,MANa,MAAM,MAAMD,CAAgB,GAM1B,KAAK,EAExB,OAAO,aAAa,QAClB,KAAK,uBACLC,EAAa,WACf,EACA,OAAO,aAAa,QAClB,KAAK,qBACLA,EAAa,SACf,EACA,OAAO,aAAa,QAClB,KAAK,sBACLA,EAAa,WAAW,SAAS,CACnC,EACA,OAAO,aAAa,QAClB,KAAK,qBACLA,EAAa,SAAS,SAAS,CACjC,EACK,KAAA,oBAAoB,YAAY,MAAQ,EAAA,CAG/C,MAAM,UAA0B,CAC9B,OAAO,OAAO,qBAAqB,MACjC,KAAK,WAAW,cAAA,EAAgB,sBAChC,OAAO,aAAa,QAAQ,KAAK,sBAAsB,EACvD,OAAO,aAAa,QAAQ,KAAK,oBAAoB,EACrD,OAAO,aAAa,QAAQ,KAAK,qBAAqB,CACxD,CAAA,CAGF,MAAM,wBAAsD,CAE1D,GADsB,MAAM,KAAK,gBAAgB,EAC9B,CACjB,KAAM,CAAE,UAAAC,EAAW,YAAAC,CAAA,EACjB,MAAM,OAAO,qBAAqB,sBAAsB,EACnD,MAAA,GAAGD,CAAS,IAAIC,CAAW,EAAA,CACpC,CAGF,MAAM,iBAAoC,CACjC,OAAA,OAAO,qBAAqB,WAAW,CAAA,CAGhD,MAAM,gBAAuC,CACpC,OAAA,OAAO,qBAAqB,eAAe,CAAA,CAGpD,MAAM,QAAwB,CACtB,MAAA,OAAO,qBAAqB,OAAO,CAAA,CAE7C,EA5EMN,EAANO,EAAA,CADCC,aAAW,EAGPC,aAAO,YAAY,CAAA,EACnBA,aAAOC,2BAAyB,CAAA,CAAA,EAH/BV,CAAA,ECzBN,MAAMW,CAAc,CAClB,YAAYC,EAAsB,CAE7BA,EAAA,KAA4B,uBAAuB,EACnD,GAAGZ,CAA2B,EAC9B,iBAAA,EACA,UAAU,QAAQ,EACrBY,EACG,KAAgCF,EAAAA,yBAAyB,EACzD,OAAA,EACA,iBAAiB,CAAA,CAExB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-electron-authentication-github-renderer",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -22,20 +22,20 @@
22
22
  },
23
23
  "main": "./dist/index.es.js",
24
24
  "dependencies": {
25
- "inversify": "7.5.0",
26
- "@xwiki/cristal-authentication-github-state": "0.17.0",
27
- "@xwiki/cristal-api": "0.17.0",
28
- "@xwiki/cristal-authentication-api": "0.17.0"
25
+ "inversify": "7.5.1",
26
+ "@xwiki/cristal-api": "0.18.0",
27
+ "@xwiki/cristal-authentication-github-state": "0.18.0",
28
+ "@xwiki/cristal-authentication-api": "0.18.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "reflect-metadata": "0.2.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "reflect-metadata": "0.2.2",
35
- "typescript": "5.8.2",
36
- "vite": "6.2.6",
35
+ "typescript": "5.8.3",
36
+ "vite": "6.3.5",
37
37
  "vue": "3.5.13",
38
- "@xwiki/cristal-dev-config": "0.17.0"
38
+ "@xwiki/cristal-dev-config": "0.18.0"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc --project tsconfig.json && vite build",