@xwiki/cristal-electron-authentication-github-preload 0.19.0 → 0.20.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,27 @@
1
1
  # @xwiki/cristal-electron-authentication-github-preload
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Cristal 0.20 Release
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @xwiki/cristal-authentication-api@0.20.0
13
+
14
+ ## 0.20.0-rc.0
15
+
16
+ ### Minor Changes
17
+
18
+ - Cristal 0.20-rc-1 Release
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+ - @xwiki/cristal-authentication-api@0.20.0-rc.0
24
+
3
25
  ## 0.19.0
4
26
 
5
27
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -2,17 +2,22 @@ function l(e) {
2
2
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
3
3
  var t = e.default;
4
4
  if (typeof t == "function") {
5
- var r = function n() {
6
- return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
5
+ var r = function o() {
6
+ var n = !1;
7
+ try {
8
+ n = this instanceof o;
9
+ } catch {
10
+ }
11
+ return n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
7
12
  };
8
13
  r.prototype = t.prototype;
9
14
  } else r = {};
10
- return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
11
- var o = Object.getOwnPropertyDescriptor(e, n);
12
- Object.defineProperty(r, n, o.get ? o : {
15
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
16
+ var n = Object.getOwnPropertyDescriptor(e, o);
17
+ Object.defineProperty(r, o, n.get ? n : {
13
18
  enumerable: !0,
14
19
  get: function() {
15
- return e[n];
20
+ return e[o];
16
21
  }
17
22
  });
18
23
  }), r;
@@ -20,30 +25,30 @@ function l(e) {
20
25
  const s = {}, p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21
26
  __proto__: null,
22
27
  default: s
23
- }, Symbol.toStringTag, { value: "Module" })), u = /* @__PURE__ */ l(p);
24
- var a, c;
28
+ }, Symbol.toStringTag, { value: "Module" })), c = /* @__PURE__ */ l(p);
29
+ var a, u;
25
30
  function d() {
26
- if (c) return a;
27
- c = 1;
28
- const e = u, t = u, r = t.join(__dirname, "path.txt");
29
- function n() {
30
- let o;
31
- if (e.existsSync(r) && (o = e.readFileSync(r, "utf-8")), process.env.ELECTRON_OVERRIDE_DIST_PATH)
32
- return t.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, o || "electron");
33
- if (o)
34
- return t.join(__dirname, "dist", o);
31
+ if (u) return a;
32
+ u = 1;
33
+ const e = c, t = c, r = t.join(__dirname, "path.txt");
34
+ function o() {
35
+ let n;
36
+ if (e.existsSync(r) && (n = e.readFileSync(r, "utf-8")), process.env.ELECTRON_OVERRIDE_DIST_PATH)
37
+ return t.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, n || "electron");
38
+ if (n)
39
+ return t.join(__dirname, "dist", n);
35
40
  throw new Error("Electron failed to install correctly, please delete node_modules/electron and try installing again");
36
41
  }
37
- return a = n(), a;
42
+ return a = o(), a;
38
43
  }
39
44
  var i = d();
40
45
  i.contextBridge.exposeInMainWorld("authenticationGitHub", {
41
- login: async (e, t, r, n) => {
46
+ login: async (e, t, r, o) => {
42
47
  await i.ipcRenderer.invoke("authentication:github:login", {
43
48
  baseUrl: e,
44
49
  deviceCode: t,
45
50
  interval: r,
46
- expiresIn: n
51
+ expiresIn: o
47
52
  });
48
53
  },
49
54
  isLoggedIn() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../__vite-browser-external","../../../../../node_modules/.pnpm/electron@36.4.0/node_modules/electron/index.js","../src/index.ts"],"sourcesContent":["export default {}","const fs = require('fs');\nconst path = require('path');\n\nconst pathFile = path.join(__dirname, 'path.txt');\n\nfunction getElectronPath () {\n let executablePath;\n if (fs.existsSync(pathFile)) {\n executablePath = fs.readFileSync(pathFile, 'utf-8');\n }\n if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {\n return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath || 'electron');\n }\n if (executablePath) {\n return path.join(__dirname, 'dist', executablePath);\n } else {\n throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');\n }\n}\n\nmodule.exports = getElectronPath();\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 { UserDetails } from \"@xwiki/cristal-authentication-api\";\nimport { contextBridge, ipcRenderer } from \"electron\";\n\ncontextBridge.exposeInMainWorld(\"authenticationGitHub\", {\n login: async (\n baseUrl: string,\n deviceCode: string,\n interval: string,\n expiresIn: string,\n ): Promise<void> => {\n await ipcRenderer.invoke(\"authentication:github:login\", {\n baseUrl,\n deviceCode,\n interval,\n expiresIn,\n });\n },\n isLoggedIn(): Promise<boolean> {\n return ipcRenderer.invoke(\"authentication:github:isLoggedIn\");\n },\n\n getUserDetails(): Promise<UserDetails> {\n return ipcRenderer.invoke(\"authentication:github:userDetails\");\n },\n\n getAuthorizationValue(): Promise<{ tokenType: string; accessToken: string }> {\n return ipcRenderer.invoke(\"authentication:github:authorizationValue\");\n },\n\n async logout(): Promise<void> {\n await ipcRenderer.invoke(\"authentication:github:logout\");\n },\n});\n"],"names":["__viteBrowserExternal","fs","require$$0","path","require$$1","pathFile","getElectronPath","executablePath","electron","contextBridge","baseUrl","deviceCode","interval","expiresIn","ipcRenderer"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAeA,IAAA,CAAA;;;;;;;;ACAf,QAAMC,IAAKC,GACLC,IAAOC,GAEPC,IAAWF,EAAK,KAAK,WAAW,UAAU;AAEhD,WAASG,IAAmB;AAC1B,QAAIC;AAIJ,QAHIN,EAAG,WAAWI,CAAQ,MACxBE,IAAiBN,EAAG,aAAaI,GAAU,OAAO,IAEhD,QAAQ,IAAI;AACd,aAAOF,EAAK,KAAK,QAAQ,IAAI,6BAA6BI,KAAkB,UAAU;AAExF,QAAIA;AACF,aAAOJ,EAAK,KAAK,WAAW,QAAQI,CAAc;AAElD,UAAM,IAAI,MAAM,oGAAoG;AAAA,EAExH;AAEc,SAAAC,IAAGF,EAAiB;;;ACGlCG,EAAAA,cAAc,kBAAkB,wBAAwB;AAAA,EACtD,OAAO,OACLC,GACAC,GACAC,GACAC,MACkB;AACZ,UAAAC,EAAA,YAAY,OAAO,+BAA+B;AAAA,MACtD,SAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,UAAAC;AAAA,MACA,WAAAC;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,aAA+B;AACtB,WAAAC,EAAA,YAAY,OAAO,kCAAkC;AAAA,EAC9D;AAAA,EAEA,iBAAuC;AAC9B,WAAAA,EAAA,YAAY,OAAO,mCAAmC;AAAA,EAC/D;AAAA,EAEA,wBAA6E;AACpE,WAAAA,EAAA,YAAY,OAAO,0CAA0C;AAAA,EACtE;AAAA,EAEA,MAAM,SAAwB;AACtB,UAAAA,EAAA,YAAY,OAAO,8BAA8B;AAAA,EAAA;AAE3D,CAAC;","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"index.es.js","sources":["../__vite-browser-external","../../../../../node_modules/.pnpm/electron@37.1.0/node_modules/electron/index.js","../src/index.ts"],"sourcesContent":["export default {}","const fs = require('fs');\nconst path = require('path');\n\nconst pathFile = path.join(__dirname, 'path.txt');\n\nfunction getElectronPath () {\n let executablePath;\n if (fs.existsSync(pathFile)) {\n executablePath = fs.readFileSync(pathFile, 'utf-8');\n }\n if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {\n return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath || 'electron');\n }\n if (executablePath) {\n return path.join(__dirname, 'dist', executablePath);\n } else {\n throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');\n }\n}\n\nmodule.exports = getElectronPath();\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 { UserDetails } from \"@xwiki/cristal-authentication-api\";\nimport { contextBridge, ipcRenderer } from \"electron\";\n\ncontextBridge.exposeInMainWorld(\"authenticationGitHub\", {\n login: async (\n baseUrl: string,\n deviceCode: string,\n interval: string,\n expiresIn: string,\n ): Promise<void> => {\n await ipcRenderer.invoke(\"authentication:github:login\", {\n baseUrl,\n deviceCode,\n interval,\n expiresIn,\n });\n },\n isLoggedIn(): Promise<boolean> {\n return ipcRenderer.invoke(\"authentication:github:isLoggedIn\");\n },\n\n getUserDetails(): Promise<UserDetails> {\n return ipcRenderer.invoke(\"authentication:github:userDetails\");\n },\n\n getAuthorizationValue(): Promise<{ tokenType: string; accessToken: string }> {\n return ipcRenderer.invoke(\"authentication:github:authorizationValue\");\n },\n\n async logout(): Promise<void> {\n await ipcRenderer.invoke(\"authentication:github:logout\");\n },\n});\n"],"names":["__viteBrowserExternal","fs","require$$0","path","require$$1","pathFile","getElectronPath","executablePath","electron","contextBridge","baseUrl","deviceCode","interval","expiresIn","ipcRenderer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAeA,IAAA,CAAA;;;;;;;;ACAf,QAAMC,IAAKC,GACLC,IAAOC,GAEPC,IAAWF,EAAK,KAAK,WAAW,UAAU;AAEhD,WAASG,IAAmB;AAC1B,QAAIC;AAIJ,QAHIN,EAAG,WAAWI,CAAQ,MACxBE,IAAiBN,EAAG,aAAaI,GAAU,OAAO,IAEhD,QAAQ,IAAI;AACd,aAAOF,EAAK,KAAK,QAAQ,IAAI,6BAA6BI,KAAkB,UAAU;AAExF,QAAIA;AACF,aAAOJ,EAAK,KAAK,WAAW,QAAQI,CAAc;AAElD,UAAM,IAAI,MAAM,oGAAoG;AAAA,EAExH;AAEc,SAAAC,IAAGF,EAAiB;;;ACGlCG,EAAAA,cAAc,kBAAkB,wBAAwB;AAAA,EACtD,OAAO,OACLC,GACAC,GACAC,GACAC,MACkB;AACZ,UAAAC,EAAA,YAAY,OAAO,+BAA+B;AAAA,MACtD,SAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,UAAAC;AAAA,MACA,WAAAC;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,aAA+B;AACtB,WAAAC,EAAA,YAAY,OAAO,kCAAkC;AAAA,EAC9D;AAAA,EAEA,iBAAuC;AAC9B,WAAAA,EAAA,YAAY,OAAO,mCAAmC;AAAA,EAC/D;AAAA,EAEA,wBAA6E;AACpE,WAAAA,EAAA,YAAY,OAAO,0CAA0C;AAAA,EACtE;AAAA,EAEA,MAAM,SAAwB;AACtB,UAAAA,EAAA,YAAY,OAAO,8BAA8B;AAAA,EAAA;AAE3D,CAAC;","x_google_ignoreList":[1]}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(a){typeof define=="function"&&define.amd?define(a):a()})(function(){"use strict";function a(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}const c=a(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var u,l;function s(){if(l)return u;l=1;const e=c,t=c,n=t.join(__dirname,"path.txt");function r(){let i;if(e.existsSync(n)&&(i=e.readFileSync(n,"utf-8")),process.env.ELECTRON_OVERRIDE_DIST_PATH)return t.join(process.env.ELECTRON_OVERRIDE_DIST_PATH,i||"electron");if(i)return t.join(__dirname,"dist",i);throw new Error("Electron failed to install correctly, please delete node_modules/electron and try installing again")}return u=r(),u}var o=s();o.contextBridge.exposeInMainWorld("authenticationGitHub",{login:async(e,t,n,r)=>{await o.ipcRenderer.invoke("authentication:github:login",{baseUrl:e,deviceCode:t,interval:n,expiresIn:r})},isLoggedIn(){return o.ipcRenderer.invoke("authentication:github:isLoggedIn")},getUserDetails(){return o.ipcRenderer.invoke("authentication:github:userDetails")},getAuthorizationValue(){return o.ipcRenderer.invoke("authentication:github:authorizationValue")},async logout(){await o.ipcRenderer.invoke("authentication:github:logout")}})});
1
+ (function(a){typeof define=="function"&&define.amd?define(a):a()})(function(){"use strict";function a(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}const u=a(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var c,s;function l(){if(s)return c;s=1;const e=u,t=u,n=t.join(__dirname,"path.txt");function i(){let r;if(e.existsSync(n)&&(r=e.readFileSync(n,"utf-8")),process.env.ELECTRON_OVERRIDE_DIST_PATH)return t.join(process.env.ELECTRON_OVERRIDE_DIST_PATH,r||"electron");if(r)return t.join(__dirname,"dist",r);throw new Error("Electron failed to install correctly, please delete node_modules/electron and try installing again")}return c=i(),c}var o=l();o.contextBridge.exposeInMainWorld("authenticationGitHub",{login:async(e,t,n,i)=>{await o.ipcRenderer.invoke("authentication:github:login",{baseUrl:e,deviceCode:t,interval:n,expiresIn:i})},isLoggedIn(){return o.ipcRenderer.invoke("authentication:github:isLoggedIn")},getUserDetails(){return o.ipcRenderer.invoke("authentication:github:userDetails")},getAuthorizationValue(){return o.ipcRenderer.invoke("authentication:github:authorizationValue")},async logout(){await o.ipcRenderer.invoke("authentication:github:logout")}})});
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../__vite-browser-external","../../../../../node_modules/.pnpm/electron@36.4.0/node_modules/electron/index.js","../src/index.ts"],"sourcesContent":["export default {}","const fs = require('fs');\nconst path = require('path');\n\nconst pathFile = path.join(__dirname, 'path.txt');\n\nfunction getElectronPath () {\n let executablePath;\n if (fs.existsSync(pathFile)) {\n executablePath = fs.readFileSync(pathFile, 'utf-8');\n }\n if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {\n return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath || 'electron');\n }\n if (executablePath) {\n return path.join(__dirname, 'dist', executablePath);\n } else {\n throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');\n }\n}\n\nmodule.exports = getElectronPath();\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 { UserDetails } from \"@xwiki/cristal-authentication-api\";\nimport { contextBridge, ipcRenderer } from \"electron\";\n\ncontextBridge.exposeInMainWorld(\"authenticationGitHub\", {\n login: async (\n baseUrl: string,\n deviceCode: string,\n interval: string,\n expiresIn: string,\n ): Promise<void> => {\n await ipcRenderer.invoke(\"authentication:github:login\", {\n baseUrl,\n deviceCode,\n interval,\n expiresIn,\n });\n },\n isLoggedIn(): Promise<boolean> {\n return ipcRenderer.invoke(\"authentication:github:isLoggedIn\");\n },\n\n getUserDetails(): Promise<UserDetails> {\n return ipcRenderer.invoke(\"authentication:github:userDetails\");\n },\n\n getAuthorizationValue(): Promise<{ tokenType: string; accessToken: string }> {\n return ipcRenderer.invoke(\"authentication:github:authorizationValue\");\n },\n\n async logout(): Promise<void> {\n await ipcRenderer.invoke(\"authentication:github:logout\");\n },\n});\n"],"names":["fs","require$$0","path","require$$1","pathFile","getElectronPath","executablePath","electron","contextBridge","baseUrl","deviceCode","interval","expiresIn","ipcRenderer"],"mappings":"yoBAAe,CAAA,iFCAf,MAAMA,EAAKC,EACLC,EAAOC,EAEPC,EAAWF,EAAK,KAAK,UAAW,UAAU,EAEhD,SAASG,GAAmB,CAC1B,IAAIC,EAIJ,GAHIN,EAAG,WAAWI,CAAQ,IACxBE,EAAiBN,EAAG,aAAaI,EAAU,OAAO,GAEhD,QAAQ,IAAI,4BACd,OAAOF,EAAK,KAAK,QAAQ,IAAI,4BAA6BI,GAAkB,UAAU,EAExF,GAAIA,EACF,OAAOJ,EAAK,KAAK,UAAW,OAAQI,CAAc,EAElD,MAAM,IAAI,MAAM,oGAAoG,CAExH,CAEc,OAAAC,EAAGF,EAAiB,cCGlCG,EAAAA,cAAc,kBAAkB,uBAAwB,CACtD,MAAO,MACLC,EACAC,EACAC,EACAC,IACkB,CACZ,MAAAC,EAAA,YAAY,OAAO,8BAA+B,CACtD,QAAAJ,EACA,WAAAC,EACA,SAAAC,EACA,UAAAC,CAAA,CACD,CACH,EACA,YAA+B,CACtB,OAAAC,EAAA,YAAY,OAAO,kCAAkC,CAC9D,EAEA,gBAAuC,CAC9B,OAAAA,EAAA,YAAY,OAAO,mCAAmC,CAC/D,EAEA,uBAA6E,CACpE,OAAAA,EAAA,YAAY,OAAO,0CAA0C,CACtE,EAEA,MAAM,QAAwB,CACtB,MAAAA,EAAA,YAAY,OAAO,8BAA8B,CAAA,CAE3D,CAAC","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"index.umd.js","sources":["../__vite-browser-external","../../../../../node_modules/.pnpm/electron@37.1.0/node_modules/electron/index.js","../src/index.ts"],"sourcesContent":["export default {}","const fs = require('fs');\nconst path = require('path');\n\nconst pathFile = path.join(__dirname, 'path.txt');\n\nfunction getElectronPath () {\n let executablePath;\n if (fs.existsSync(pathFile)) {\n executablePath = fs.readFileSync(pathFile, 'utf-8');\n }\n if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {\n return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath || 'electron');\n }\n if (executablePath) {\n return path.join(__dirname, 'dist', executablePath);\n } else {\n throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again');\n }\n}\n\nmodule.exports = getElectronPath();\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 { UserDetails } from \"@xwiki/cristal-authentication-api\";\nimport { contextBridge, ipcRenderer } from \"electron\";\n\ncontextBridge.exposeInMainWorld(\"authenticationGitHub\", {\n login: async (\n baseUrl: string,\n deviceCode: string,\n interval: string,\n expiresIn: string,\n ): Promise<void> => {\n await ipcRenderer.invoke(\"authentication:github:login\", {\n baseUrl,\n deviceCode,\n interval,\n expiresIn,\n });\n },\n isLoggedIn(): Promise<boolean> {\n return ipcRenderer.invoke(\"authentication:github:isLoggedIn\");\n },\n\n getUserDetails(): Promise<UserDetails> {\n return ipcRenderer.invoke(\"authentication:github:userDetails\");\n },\n\n getAuthorizationValue(): Promise<{ tokenType: string; accessToken: string }> {\n return ipcRenderer.invoke(\"authentication:github:authorizationValue\");\n },\n\n async logout(): Promise<void> {\n await ipcRenderer.invoke(\"authentication:github:logout\");\n },\n});\n"],"names":["fs","require$$0","path","require$$1","pathFile","getElectronPath","executablePath","electron","contextBridge","baseUrl","deviceCode","interval","expiresIn","ipcRenderer"],"mappings":"iqBAAe,CAAA,iFCAf,MAAMA,EAAKC,EACLC,EAAOC,EAEPC,EAAWF,EAAK,KAAK,UAAW,UAAU,EAEhD,SAASG,GAAmB,CAC1B,IAAIC,EAIJ,GAHIN,EAAG,WAAWI,CAAQ,IACxBE,EAAiBN,EAAG,aAAaI,EAAU,OAAO,GAEhD,QAAQ,IAAI,4BACd,OAAOF,EAAK,KAAK,QAAQ,IAAI,4BAA6BI,GAAkB,UAAU,EAExF,GAAIA,EACF,OAAOJ,EAAK,KAAK,UAAW,OAAQI,CAAc,EAElD,MAAM,IAAI,MAAM,oGAAoG,CAExH,CAEc,OAAAC,EAAGF,EAAiB,cCGlCG,EAAAA,cAAc,kBAAkB,uBAAwB,CACtD,MAAO,MACLC,EACAC,EACAC,EACAC,IACkB,CACZ,MAAAC,EAAA,YAAY,OAAO,8BAA+B,CACtD,QAAAJ,EACA,WAAAC,EACA,SAAAC,EACA,UAAAC,CAAA,CACD,CACH,EACA,YAA+B,CACtB,OAAAC,EAAA,YAAY,OAAO,kCAAkC,CAC9D,EAEA,gBAAuC,CAC9B,OAAAA,EAAA,YAAY,OAAO,mCAAmC,CAC/D,EAEA,uBAA6E,CACpE,OAAAA,EAAA,YAAY,OAAO,0CAA0C,CACtE,EAEA,MAAM,QAAwB,CACtB,MAAAA,EAAA,YAAY,OAAO,8BAA8B,CAAA,CAE3D,CAAC","x_google_ignoreList":[1]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-electron-authentication-github-preload",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -21,15 +21,15 @@
21
21
  },
22
22
  "main": "./dist/index.umd.js",
23
23
  "dependencies": {
24
- "@xwiki/cristal-authentication-api": "0.19.0"
24
+ "@xwiki/cristal-authentication-api": "0.20.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "electron": "36.4.0"
27
+ "electron": "37.1.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "typescript": "5.8.3",
31
- "vite": "6.3.5",
32
- "@xwiki/cristal-dev-config": "0.19.0"
31
+ "vite": "7.0.0",
32
+ "@xwiki/cristal-dev-config": "0.20.0"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsc --project tsconfig.json && vite build",