@xwiki/cristal-sharedworker-impl 0.24.0-rc-1 → 0.25.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,5 @@
1
- import { CristalApp, Logger } from '@xwiki/cristal-api';
2
1
  import { QueueWorker } from '@xwiki/cristal-sharedworker-api';
2
+ import { CristalApp, Logger } from '@xwiki/platform-api';
3
3
  export default class DefaultQueueWorker implements QueueWorker {
4
4
  private workerInstance;
5
5
  private cristalApp;
@@ -1,5 +1,5 @@
1
- import { WikiConfig } from '@xwiki/cristal-api';
2
1
  import { MyWorker } from '@xwiki/cristal-sharedworker-api';
2
+ import { WikiConfig } from '@xwiki/platform-api';
3
3
  export declare class Worker implements MyWorker {
4
4
  private currentNumber;
5
5
  private queue;
@@ -1,5 +1,5 @@
1
- import { CristalApp, Logger, LoggerConfig, PageData, SkinManager, WikiConfig } from '@xwiki/cristal-api';
2
- import { Configurations } from '@xwiki/cristal-configuration-api';
1
+ import { CristalApp, Logger, LoggerConfig, PageData, SkinManager, WikiConfig } from '@xwiki/platform-api';
2
+ import { Configurations } from '@xwiki/platform-configuration-api';
3
3
  import { Container } from 'inversify';
4
4
  import { App, Component } from 'vue';
5
5
  import { Router } from 'vue-router';
package/dist/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
- import { name as d } from "@xwiki/cristal-document-api";
1
+ import { name as d } from "@xwiki/platform-document-api";
2
2
  import * as i from "comlink";
3
3
  import { injectable as g, inject as c } from "inversify";
4
4
  function w(e) {
5
5
  return new SharedWorker(
6
- "/assets/worker-nlKZI9V5.js",
6
+ "/assets/worker-BK0WYMnC.js",
7
7
  {
8
8
  type: "module",
9
9
  name: e?.name
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/components/defaultQueueWorker.ts","../src/components/componentsInit.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 { default as Worker } from \"./worker?sharedworker\";\nimport { name as documentServiceName } from \"@xwiki/cristal-document-api\";\nimport * as Comlink from \"comlink\";\nimport { inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger } from \"@xwiki/cristal-api\";\nimport type { DocumentService } from \"@xwiki/cristal-document-api\";\nimport type { MyWorker, QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\n\n@injectable()\nexport default class DefaultQueueWorker implements QueueWorker {\n // TODO remove use of any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private workerInstance: any;\n private cristalApp: CristalApp;\n private logger: Logger;\n\n public constructor(\n @inject(\"Logger\") logger: Logger,\n @inject(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.initialize();\n this.logger = logger;\n this.cristalApp = cristalApp;\n }\n\n async pageLoaded(page: string): Promise<void> {\n try {\n this.logger.debug(\n \"Received callback that new document has been loaded\",\n page,\n );\n // We need to access the DocumentService lasily as otherwise the\n // internal pinia instance is initialized too early.\n const documentService = this.cristalApp\n .getContainer()\n .get<DocumentService>(documentServiceName);\n\n await documentService.refreshCurrentDocument();\n\n this.logger.debug(\n \"Done callback that new document has been loaded\",\n page,\n );\n } catch (e) {\n this.logger.error(\"Error calling loadPage\", e);\n }\n }\n\n public initialize(): void {\n try {\n if (this.workerInstance == null) {\n // this.workerInstance = new ComlinkWorker<typeof import('./worker')>(new URL('./worker',\n // import.meta.url), {/* normal Worker options*/})\n const sworker = new Worker({\n name: \"cristal-sharedworker\",\n });\n this.workerInstance = Comlink.wrap<MyWorker>(sworker.port);\n // TODO get rid of aliasing\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this;\n\n this.workerInstance.setPageLoadedCallback(\n Comlink.proxy(async (page: string) => {\n await that.pageLoaded(page);\n }),\n );\n\n console.debug(\"Worker initialized\", this.workerInstance);\n } else {\n console.debug(\"Already initialized\");\n }\n } catch (e) {\n console.error(\"Failed to initialize shared worker\", e);\n }\n }\n\n public getStatus(): boolean {\n if (this.workerInstance != null) {\n console.log(\"workerInstance is ready\");\n return true;\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n return false;\n }\n }\n\n public async increment(): Promise<number> {\n if (this.workerInstance == null) {\n console.log(\"workerInstance is null. Cannot call\");\n return -1;\n } else {\n const result = await this.workerInstance.add(1);\n console.log(\"Results from shared worker: \", result);\n return result;\n }\n }\n\n public async addToQueue(page: string): Promise<void> {\n console.log(\"worker Calling addToQueue\", page);\n if (this.workerInstance != null) {\n await this.workerInstance.addToQueue(page);\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n }\n }\n\n public async getQueueSize(): Promise<number> {\n console.log(\"worker Calling getQueueSize\");\n if (this.workerInstance == null) {\n return -1;\n } else {\n return await this.workerInstance.getQueueSize();\n }\n }\n}\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 DefaultQueueWorker from \"./defaultQueueWorker\";\nimport type { QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\nimport type { Container } from \"inversify\";\n\n/**\n * @beta\n */\nexport default class ComponentInit {\n constructor(container: Container) {\n container.bind<QueueWorker>(\"QueueWorker\").to(DefaultQueueWorker);\n }\n}\n"],"names":["DefaultQueueWorker","logger","cristalApp","page","documentServiceName","e","sworker","Worker","Comlink","that","result","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,IAAqBA,IAArB,MAA+D;AAAA;AAAA;AAAA,EAGrD;AAAA,EACA;AAAA,EACA;AAAA,EAED,YACaC,GACIC,GACtB;AACA,SAAK,WAAA,GACL,KAAK,SAASD,GACd,KAAK,aAAaC;AAAA,EACpB;AAAA,EAEA,MAAM,WAAWC,GAA6B;AAC5C,QAAI;AACF,WAAK,OAAO;AAAA,QACV;AAAA,QACAA;AAAA,MAAA,GAQF,MAJwB,KAAK,WAC1B,aAAA,EACA,IAAqBC,CAAmB,EAErB,uBAAA,GAEtB,KAAK,OAAO;AAAA,QACV;AAAA,QACAD;AAAA,MAAA;AAAA,IAEJ,SAASE,GAAG;AACV,WAAK,OAAO,MAAM,0BAA0BA,CAAC;AAAA,IAC/C;AAAA,EACF;AAAA,EAEO,aAAmB;AACxB,QAAI;AACF,UAAI,KAAK,kBAAkB,MAAM;AAG/B,cAAMC,IAAU,IAAIC,EAAO;AAAA,UACzB,MAAM;AAAA,QAAA,CACP;AACD,aAAK,iBAAiBC,EAAQ,KAAeF,EAAQ,IAAI;AAGzD,cAAMG,IAAO;AAEb,aAAK,eAAe;AAAA,UAClBD,EAAQ,MAAM,OAAOL,MAAiB;AACpC,kBAAMM,EAAK,WAAWN,CAAI;AAAA,UAC5B,CAAC;AAAA,QAAA,GAGH,QAAQ,MAAM,sBAAsB,KAAK,cAAc;AAAA,MACzD;AACE,gBAAQ,MAAM,qBAAqB;AAAA,IAEvC,SAAS,GAAG;AACV,cAAQ,MAAM,sCAAsC,CAAC;AAAA,IACvD;AAAA,EACF;AAAA,EAEO,YAAqB;AAC1B,WAAI,KAAK,kBAAkB,QACzB,QAAQ,IAAI,yBAAyB,GAC9B,OAEP,QAAQ,IAAI,qCAAqC,GAC1C;AAAA,EAEX;AAAA,EAEA,MAAa,YAA6B;AACxC,QAAI,KAAK,kBAAkB;AACzB,qBAAQ,IAAI,qCAAqC,GAC1C;AACF;AACL,YAAMO,IAAS,MAAM,KAAK,eAAe,IAAI,CAAC;AAC9C,qBAAQ,IAAI,gCAAgCA,CAAM,GAC3CA;AAAA,IACT;AAAA,EACF;AAAA,EAEA,MAAa,WAAWP,GAA6B;AACnD,YAAQ,IAAI,6BAA6BA,CAAI,GACzC,KAAK,kBAAkB,OACzB,MAAM,KAAK,eAAe,WAAWA,CAAI,IAEzC,QAAQ,IAAI,qCAAqC;AAAA,EAErD;AAAA,EAEA,MAAa,eAAgC;AAE3C,WADA,QAAQ,IAAI,6BAA6B,GACrC,KAAK,kBAAkB,OAClB,KAEA,MAAM,KAAK,eAAe,aAAA;AAAA,EAErC;AACF;AAzGqBH,IAArBW,EAAA;AAAA,EADCC,EAAA;AAAA,EASIC,OAAO,QAAQ,CAAA;AAAA,EACfA,OAAO,YAAY,CAAA;AAAA,GATHb,CAAA;ACFrB,MAAqBc,EAAc;AAAA,EACjC,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAkB,aAAa,EAAE,GAAGf,CAAkB;AAAA,EAClE;AACF;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/components/defaultQueueWorker.ts","../src/components/componentsInit.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 { default as Worker } from \"./worker?sharedworker\";\nimport { name as documentServiceName } from \"@xwiki/platform-document-api\";\nimport * as Comlink from \"comlink\";\nimport { inject, injectable } from \"inversify\";\nimport type { MyWorker, QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\nimport type { CristalApp, Logger } from \"@xwiki/platform-api\";\nimport type { DocumentService } from \"@xwiki/platform-document-api\";\n\n@injectable()\nexport default class DefaultQueueWorker implements QueueWorker {\n // TODO remove use of any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private workerInstance: any;\n private cristalApp: CristalApp;\n private logger: Logger;\n\n public constructor(\n @inject(\"Logger\") logger: Logger,\n @inject(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.initialize();\n this.logger = logger;\n this.cristalApp = cristalApp;\n }\n\n async pageLoaded(page: string): Promise<void> {\n try {\n this.logger.debug(\n \"Received callback that new document has been loaded\",\n page,\n );\n // We need to access the DocumentService lasily as otherwise the\n // internal pinia instance is initialized too early.\n const documentService = this.cristalApp\n .getContainer()\n .get<DocumentService>(documentServiceName);\n\n await documentService.refreshCurrentDocument();\n\n this.logger.debug(\n \"Done callback that new document has been loaded\",\n page,\n );\n } catch (e) {\n this.logger.error(\"Error calling loadPage\", e);\n }\n }\n\n public initialize(): void {\n try {\n if (this.workerInstance == null) {\n // this.workerInstance = new ComlinkWorker<typeof import('./worker')>(new URL('./worker',\n // import.meta.url), {/* normal Worker options*/})\n const sworker = new Worker({\n name: \"cristal-sharedworker\",\n });\n this.workerInstance = Comlink.wrap<MyWorker>(sworker.port);\n // TODO get rid of aliasing\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this;\n\n this.workerInstance.setPageLoadedCallback(\n Comlink.proxy(async (page: string) => {\n await that.pageLoaded(page);\n }),\n );\n\n console.debug(\"Worker initialized\", this.workerInstance);\n } else {\n console.debug(\"Already initialized\");\n }\n } catch (e) {\n console.error(\"Failed to initialize shared worker\", e);\n }\n }\n\n public getStatus(): boolean {\n if (this.workerInstance != null) {\n console.log(\"workerInstance is ready\");\n return true;\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n return false;\n }\n }\n\n public async increment(): Promise<number> {\n if (this.workerInstance == null) {\n console.log(\"workerInstance is null. Cannot call\");\n return -1;\n } else {\n const result = await this.workerInstance.add(1);\n console.log(\"Results from shared worker: \", result);\n return result;\n }\n }\n\n public async addToQueue(page: string): Promise<void> {\n console.log(\"worker Calling addToQueue\", page);\n if (this.workerInstance != null) {\n await this.workerInstance.addToQueue(page);\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n }\n }\n\n public async getQueueSize(): Promise<number> {\n console.log(\"worker Calling getQueueSize\");\n if (this.workerInstance == null) {\n return -1;\n } else {\n return await this.workerInstance.getQueueSize();\n }\n }\n}\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 DefaultQueueWorker from \"./defaultQueueWorker\";\nimport type { QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\nimport type { Container } from \"inversify\";\n\n/**\n * @beta\n */\nexport default class ComponentInit {\n constructor(container: Container) {\n container.bind<QueueWorker>(\"QueueWorker\").to(DefaultQueueWorker);\n }\n}\n"],"names":["DefaultQueueWorker","logger","cristalApp","page","documentServiceName","e","sworker","Worker","Comlink","that","result","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,IAAqBA,IAArB,MAA+D;AAAA;AAAA;AAAA,EAGrD;AAAA,EACA;AAAA,EACA;AAAA,EAED,YACaC,GACIC,GACtB;AACA,SAAK,WAAA,GACL,KAAK,SAASD,GACd,KAAK,aAAaC;AAAA,EACpB;AAAA,EAEA,MAAM,WAAWC,GAA6B;AAC5C,QAAI;AACF,WAAK,OAAO;AAAA,QACV;AAAA,QACAA;AAAA,MAAA,GAQF,MAJwB,KAAK,WAC1B,aAAA,EACA,IAAqBC,CAAmB,EAErB,uBAAA,GAEtB,KAAK,OAAO;AAAA,QACV;AAAA,QACAD;AAAA,MAAA;AAAA,IAEJ,SAASE,GAAG;AACV,WAAK,OAAO,MAAM,0BAA0BA,CAAC;AAAA,IAC/C;AAAA,EACF;AAAA,EAEO,aAAmB;AACxB,QAAI;AACF,UAAI,KAAK,kBAAkB,MAAM;AAG/B,cAAMC,IAAU,IAAIC,EAAO;AAAA,UACzB,MAAM;AAAA,QAAA,CACP;AACD,aAAK,iBAAiBC,EAAQ,KAAeF,EAAQ,IAAI;AAGzD,cAAMG,IAAO;AAEb,aAAK,eAAe;AAAA,UAClBD,EAAQ,MAAM,OAAOL,MAAiB;AACpC,kBAAMM,EAAK,WAAWN,CAAI;AAAA,UAC5B,CAAC;AAAA,QAAA,GAGH,QAAQ,MAAM,sBAAsB,KAAK,cAAc;AAAA,MACzD;AACE,gBAAQ,MAAM,qBAAqB;AAAA,IAEvC,SAAS,GAAG;AACV,cAAQ,MAAM,sCAAsC,CAAC;AAAA,IACvD;AAAA,EACF;AAAA,EAEO,YAAqB;AAC1B,WAAI,KAAK,kBAAkB,QACzB,QAAQ,IAAI,yBAAyB,GAC9B,OAEP,QAAQ,IAAI,qCAAqC,GAC1C;AAAA,EAEX;AAAA,EAEA,MAAa,YAA6B;AACxC,QAAI,KAAK,kBAAkB;AACzB,qBAAQ,IAAI,qCAAqC,GAC1C;AACF;AACL,YAAMO,IAAS,MAAM,KAAK,eAAe,IAAI,CAAC;AAC9C,qBAAQ,IAAI,gCAAgCA,CAAM,GAC3CA;AAAA,IACT;AAAA,EACF;AAAA,EAEA,MAAa,WAAWP,GAA6B;AACnD,YAAQ,IAAI,6BAA6BA,CAAI,GACzC,KAAK,kBAAkB,OACzB,MAAM,KAAK,eAAe,WAAWA,CAAI,IAEzC,QAAQ,IAAI,qCAAqC;AAAA,EAErD;AAAA,EAEA,MAAa,eAAgC;AAE3C,WADA,QAAQ,IAAI,6BAA6B,GACrC,KAAK,kBAAkB,OAClB,KAEA,MAAM,KAAK,eAAe,aAAA;AAAA,EAErC;AACF;AAzGqBH,IAArBW,EAAA;AAAA,EADCC,EAAA;AAAA,EASIC,OAAO,QAAQ,CAAA;AAAA,EACfA,OAAO,YAAY,CAAA;AAAA,GATHb,CAAA;ACFrB,MAAqBc,EAAc;AAAA,EACjC,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAkB,aAAa,EAAE,GAAGf,CAAkB;AAAA,EAClE;AACF;"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@xwiki/cristal-document-api"),require("comlink"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/cristal-document-api","comlink","inversify"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.cristal_impl={},n.cristalDocumentApi,n.Comlink,n.inversify))})(this,(function(n,i,w,s){"use strict";function k(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const u=k(w);function p(e){return new SharedWorker("/assets/worker-nlKZI9V5.js",{type:"module",name:e?.name})}var h=Object.getOwnPropertyDescriptor,f=(e,t,r,o)=>{for(var a=o>1?void 0:o?h(t,r):t,c=e.length-1,g;c>=0;c--)(g=e[c])&&(a=g(a)||a);return a},d=(e,t)=>(r,o)=>t(r,o,e);let l=class{workerInstance;cristalApp;logger;constructor(e,t){this.initialize(),this.logger=e,this.cristalApp=t}async pageLoaded(e){try{this.logger.debug("Received callback that new document has been loaded",e),await this.cristalApp.getContainer().get(i.name).refreshCurrentDocument(),this.logger.debug("Done callback that new document has been loaded",e)}catch(t){this.logger.error("Error calling loadPage",t)}}initialize(){try{if(this.workerInstance==null){const e=new p({name:"cristal-sharedworker"});this.workerInstance=u.wrap(e.port);const t=this;this.workerInstance.setPageLoadedCallback(u.proxy(async r=>{await t.pageLoaded(r)})),console.debug("Worker initialized",this.workerInstance)}else console.debug("Already initialized")}catch(e){console.error("Failed to initialize shared worker",e)}}getStatus(){return this.workerInstance!=null?(console.log("workerInstance is ready"),!0):(console.log("workerInstance is null. Cannot call"),!1)}async increment(){if(this.workerInstance==null)return console.log("workerInstance is null. Cannot call"),-1;{const e=await this.workerInstance.add(1);return console.log("Results from shared worker: ",e),e}}async addToQueue(e){console.log("worker Calling addToQueue",e),this.workerInstance!=null?await this.workerInstance.addToQueue(e):console.log("workerInstance is null. Cannot call")}async getQueueSize(){return console.log("worker Calling getQueueSize"),this.workerInstance==null?-1:await this.workerInstance.getQueueSize()}};l=f([s.injectable(),d(0,s.inject("Logger")),d(1,s.inject("CristalApp"))],l);class m{constructor(t){t.bind("QueueWorker").to(l)}}n.ComponentInit=m,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(n,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@xwiki/platform-document-api"),require("comlink"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/platform-document-api","comlink","inversify"],a):(n=typeof globalThis<"u"?globalThis:n||self,a(n.cristal_impl={},n.platformDocumentApi,n.Comlink,n.inversify))})(this,(function(n,a,p,s){"use strict";function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const u=w(p);function f(e){return new SharedWorker("/assets/worker-BK0WYMnC.js",{type:"module",name:e?.name})}var k=Object.getOwnPropertyDescriptor,h=(e,t,r,o)=>{for(var i=o>1?void 0:o?k(t,r):t,c=e.length-1,g;c>=0;c--)(g=e[c])&&(i=g(i)||i);return i},d=(e,t)=>(r,o)=>t(r,o,e);let l=class{workerInstance;cristalApp;logger;constructor(e,t){this.initialize(),this.logger=e,this.cristalApp=t}async pageLoaded(e){try{this.logger.debug("Received callback that new document has been loaded",e),await this.cristalApp.getContainer().get(a.name).refreshCurrentDocument(),this.logger.debug("Done callback that new document has been loaded",e)}catch(t){this.logger.error("Error calling loadPage",t)}}initialize(){try{if(this.workerInstance==null){const e=new f({name:"cristal-sharedworker"});this.workerInstance=u.wrap(e.port);const t=this;this.workerInstance.setPageLoadedCallback(u.proxy(async r=>{await t.pageLoaded(r)})),console.debug("Worker initialized",this.workerInstance)}else console.debug("Already initialized")}catch(e){console.error("Failed to initialize shared worker",e)}}getStatus(){return this.workerInstance!=null?(console.log("workerInstance is ready"),!0):(console.log("workerInstance is null. Cannot call"),!1)}async increment(){if(this.workerInstance==null)return console.log("workerInstance is null. Cannot call"),-1;{const e=await this.workerInstance.add(1);return console.log("Results from shared worker: ",e),e}}async addToQueue(e){console.log("worker Calling addToQueue",e),this.workerInstance!=null?await this.workerInstance.addToQueue(e):console.log("workerInstance is null. Cannot call")}async getQueueSize(){return console.log("worker Calling getQueueSize"),this.workerInstance==null?-1:await this.workerInstance.getQueueSize()}};l=h([s.injectable(),d(0,s.inject("Logger")),d(1,s.inject("CristalApp"))],l);class m{constructor(t){t.bind("QueueWorker").to(l)}}n.ComponentInit=m,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/components/defaultQueueWorker.ts","../src/components/componentsInit.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 { default as Worker } from \"./worker?sharedworker\";\nimport { name as documentServiceName } from \"@xwiki/cristal-document-api\";\nimport * as Comlink from \"comlink\";\nimport { inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger } from \"@xwiki/cristal-api\";\nimport type { DocumentService } from \"@xwiki/cristal-document-api\";\nimport type { MyWorker, QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\n\n@injectable()\nexport default class DefaultQueueWorker implements QueueWorker {\n // TODO remove use of any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private workerInstance: any;\n private cristalApp: CristalApp;\n private logger: Logger;\n\n public constructor(\n @inject(\"Logger\") logger: Logger,\n @inject(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.initialize();\n this.logger = logger;\n this.cristalApp = cristalApp;\n }\n\n async pageLoaded(page: string): Promise<void> {\n try {\n this.logger.debug(\n \"Received callback that new document has been loaded\",\n page,\n );\n // We need to access the DocumentService lasily as otherwise the\n // internal pinia instance is initialized too early.\n const documentService = this.cristalApp\n .getContainer()\n .get<DocumentService>(documentServiceName);\n\n await documentService.refreshCurrentDocument();\n\n this.logger.debug(\n \"Done callback that new document has been loaded\",\n page,\n );\n } catch (e) {\n this.logger.error(\"Error calling loadPage\", e);\n }\n }\n\n public initialize(): void {\n try {\n if (this.workerInstance == null) {\n // this.workerInstance = new ComlinkWorker<typeof import('./worker')>(new URL('./worker',\n // import.meta.url), {/* normal Worker options*/})\n const sworker = new Worker({\n name: \"cristal-sharedworker\",\n });\n this.workerInstance = Comlink.wrap<MyWorker>(sworker.port);\n // TODO get rid of aliasing\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this;\n\n this.workerInstance.setPageLoadedCallback(\n Comlink.proxy(async (page: string) => {\n await that.pageLoaded(page);\n }),\n );\n\n console.debug(\"Worker initialized\", this.workerInstance);\n } else {\n console.debug(\"Already initialized\");\n }\n } catch (e) {\n console.error(\"Failed to initialize shared worker\", e);\n }\n }\n\n public getStatus(): boolean {\n if (this.workerInstance != null) {\n console.log(\"workerInstance is ready\");\n return true;\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n return false;\n }\n }\n\n public async increment(): Promise<number> {\n if (this.workerInstance == null) {\n console.log(\"workerInstance is null. Cannot call\");\n return -1;\n } else {\n const result = await this.workerInstance.add(1);\n console.log(\"Results from shared worker: \", result);\n return result;\n }\n }\n\n public async addToQueue(page: string): Promise<void> {\n console.log(\"worker Calling addToQueue\", page);\n if (this.workerInstance != null) {\n await this.workerInstance.addToQueue(page);\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n }\n }\n\n public async getQueueSize(): Promise<number> {\n console.log(\"worker Calling getQueueSize\");\n if (this.workerInstance == null) {\n return -1;\n } else {\n return await this.workerInstance.getQueueSize();\n }\n }\n}\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 DefaultQueueWorker from \"./defaultQueueWorker\";\nimport type { QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\nimport type { Container } from \"inversify\";\n\n/**\n * @beta\n */\nexport default class ComponentInit {\n constructor(container: Container) {\n container.bind<QueueWorker>(\"QueueWorker\").to(DefaultQueueWorker);\n }\n}\n"],"names":["DefaultQueueWorker","logger","cristalApp","page","documentServiceName","e","sworker","Worker","Comlink","that","result","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":"y7BA6BA,IAAqBA,EAArB,KAA+D,CAGrD,eACA,WACA,OAED,YACaC,EACIC,EACtB,CACA,KAAK,WAAA,EACL,KAAK,OAASD,EACd,KAAK,WAAaC,CACpB,CAEA,MAAM,WAAWC,EAA6B,CAC5C,GAAI,CACF,KAAK,OAAO,MACV,sDACAA,CAAA,EAQF,MAJwB,KAAK,WAC1B,aAAA,EACA,IAAqBC,MAAmB,EAErB,uBAAA,EAEtB,KAAK,OAAO,MACV,kDACAD,CAAA,CAEJ,OAASE,EAAG,CACV,KAAK,OAAO,MAAM,yBAA0BA,CAAC,CAC/C,CACF,CAEO,YAAmB,CACxB,GAAI,CACF,GAAI,KAAK,gBAAkB,KAAM,CAG/B,MAAMC,EAAU,IAAIC,EAAO,CACzB,KAAM,sBAAA,CACP,EACD,KAAK,eAAiBC,EAAQ,KAAeF,EAAQ,IAAI,EAGzD,MAAMG,EAAO,KAEb,KAAK,eAAe,sBAClBD,EAAQ,MAAM,MAAOL,GAAiB,CACpC,MAAMM,EAAK,WAAWN,CAAI,CAC5B,CAAC,CAAA,EAGH,QAAQ,MAAM,qBAAsB,KAAK,cAAc,CACzD,MACE,QAAQ,MAAM,qBAAqB,CAEvC,OAAS,EAAG,CACV,QAAQ,MAAM,qCAAsC,CAAC,CACvD,CACF,CAEO,WAAqB,CAC1B,OAAI,KAAK,gBAAkB,MACzB,QAAQ,IAAI,yBAAyB,EAC9B,KAEP,QAAQ,IAAI,qCAAqC,EAC1C,GAEX,CAEA,MAAa,WAA6B,CACxC,GAAI,KAAK,gBAAkB,KACzB,eAAQ,IAAI,qCAAqC,EAC1C,GACF,CACL,MAAMO,EAAS,MAAM,KAAK,eAAe,IAAI,CAAC,EAC9C,eAAQ,IAAI,+BAAgCA,CAAM,EAC3CA,CACT,CACF,CAEA,MAAa,WAAWP,EAA6B,CACnD,QAAQ,IAAI,4BAA6BA,CAAI,EACzC,KAAK,gBAAkB,KACzB,MAAM,KAAK,eAAe,WAAWA,CAAI,EAEzC,QAAQ,IAAI,qCAAqC,CAErD,CAEA,MAAa,cAAgC,CAE3C,OADA,QAAQ,IAAI,6BAA6B,EACrC,KAAK,gBAAkB,KAClB,GAEA,MAAM,KAAK,eAAe,aAAA,CAErC,CACF,EAzGqBH,EAArBW,EAAA,CADCC,aAAA,EASIC,aAAO,QAAQ,CAAA,EACfA,aAAO,YAAY,CAAA,CAAA,EATHb,CAAA,ECFrB,MAAqBc,CAAc,CACjC,YAAYC,EAAsB,CAChCA,EAAU,KAAkB,aAAa,EAAE,GAAGf,CAAkB,CAClE,CACF"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/components/defaultQueueWorker.ts","../src/components/componentsInit.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 { default as Worker } from \"./worker?sharedworker\";\nimport { name as documentServiceName } from \"@xwiki/platform-document-api\";\nimport * as Comlink from \"comlink\";\nimport { inject, injectable } from \"inversify\";\nimport type { MyWorker, QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\nimport type { CristalApp, Logger } from \"@xwiki/platform-api\";\nimport type { DocumentService } from \"@xwiki/platform-document-api\";\n\n@injectable()\nexport default class DefaultQueueWorker implements QueueWorker {\n // TODO remove use of any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private workerInstance: any;\n private cristalApp: CristalApp;\n private logger: Logger;\n\n public constructor(\n @inject(\"Logger\") logger: Logger,\n @inject(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.initialize();\n this.logger = logger;\n this.cristalApp = cristalApp;\n }\n\n async pageLoaded(page: string): Promise<void> {\n try {\n this.logger.debug(\n \"Received callback that new document has been loaded\",\n page,\n );\n // We need to access the DocumentService lasily as otherwise the\n // internal pinia instance is initialized too early.\n const documentService = this.cristalApp\n .getContainer()\n .get<DocumentService>(documentServiceName);\n\n await documentService.refreshCurrentDocument();\n\n this.logger.debug(\n \"Done callback that new document has been loaded\",\n page,\n );\n } catch (e) {\n this.logger.error(\"Error calling loadPage\", e);\n }\n }\n\n public initialize(): void {\n try {\n if (this.workerInstance == null) {\n // this.workerInstance = new ComlinkWorker<typeof import('./worker')>(new URL('./worker',\n // import.meta.url), {/* normal Worker options*/})\n const sworker = new Worker({\n name: \"cristal-sharedworker\",\n });\n this.workerInstance = Comlink.wrap<MyWorker>(sworker.port);\n // TODO get rid of aliasing\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this;\n\n this.workerInstance.setPageLoadedCallback(\n Comlink.proxy(async (page: string) => {\n await that.pageLoaded(page);\n }),\n );\n\n console.debug(\"Worker initialized\", this.workerInstance);\n } else {\n console.debug(\"Already initialized\");\n }\n } catch (e) {\n console.error(\"Failed to initialize shared worker\", e);\n }\n }\n\n public getStatus(): boolean {\n if (this.workerInstance != null) {\n console.log(\"workerInstance is ready\");\n return true;\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n return false;\n }\n }\n\n public async increment(): Promise<number> {\n if (this.workerInstance == null) {\n console.log(\"workerInstance is null. Cannot call\");\n return -1;\n } else {\n const result = await this.workerInstance.add(1);\n console.log(\"Results from shared worker: \", result);\n return result;\n }\n }\n\n public async addToQueue(page: string): Promise<void> {\n console.log(\"worker Calling addToQueue\", page);\n if (this.workerInstance != null) {\n await this.workerInstance.addToQueue(page);\n } else {\n console.log(\"workerInstance is null. Cannot call\");\n }\n }\n\n public async getQueueSize(): Promise<number> {\n console.log(\"worker Calling getQueueSize\");\n if (this.workerInstance == null) {\n return -1;\n } else {\n return await this.workerInstance.getQueueSize();\n }\n }\n}\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 DefaultQueueWorker from \"./defaultQueueWorker\";\nimport type { QueueWorker } from \"@xwiki/cristal-sharedworker-api\";\nimport type { Container } from \"inversify\";\n\n/**\n * @beta\n */\nexport default class ComponentInit {\n constructor(container: Container) {\n container.bind<QueueWorker>(\"QueueWorker\").to(DefaultQueueWorker);\n }\n}\n"],"names":["DefaultQueueWorker","logger","cristalApp","page","documentServiceName","e","sworker","Worker","Comlink","that","result","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":"47BA6BA,IAAqBA,EAArB,KAA+D,CAGrD,eACA,WACA,OAED,YACaC,EACIC,EACtB,CACA,KAAK,WAAA,EACL,KAAK,OAASD,EACd,KAAK,WAAaC,CACpB,CAEA,MAAM,WAAWC,EAA6B,CAC5C,GAAI,CACF,KAAK,OAAO,MACV,sDACAA,CAAA,EAQF,MAJwB,KAAK,WAC1B,aAAA,EACA,IAAqBC,MAAmB,EAErB,uBAAA,EAEtB,KAAK,OAAO,MACV,kDACAD,CAAA,CAEJ,OAASE,EAAG,CACV,KAAK,OAAO,MAAM,yBAA0BA,CAAC,CAC/C,CACF,CAEO,YAAmB,CACxB,GAAI,CACF,GAAI,KAAK,gBAAkB,KAAM,CAG/B,MAAMC,EAAU,IAAIC,EAAO,CACzB,KAAM,sBAAA,CACP,EACD,KAAK,eAAiBC,EAAQ,KAAeF,EAAQ,IAAI,EAGzD,MAAMG,EAAO,KAEb,KAAK,eAAe,sBAClBD,EAAQ,MAAM,MAAOL,GAAiB,CACpC,MAAMM,EAAK,WAAWN,CAAI,CAC5B,CAAC,CAAA,EAGH,QAAQ,MAAM,qBAAsB,KAAK,cAAc,CACzD,MACE,QAAQ,MAAM,qBAAqB,CAEvC,OAAS,EAAG,CACV,QAAQ,MAAM,qCAAsC,CAAC,CACvD,CACF,CAEO,WAAqB,CAC1B,OAAI,KAAK,gBAAkB,MACzB,QAAQ,IAAI,yBAAyB,EAC9B,KAEP,QAAQ,IAAI,qCAAqC,EAC1C,GAEX,CAEA,MAAa,WAA6B,CACxC,GAAI,KAAK,gBAAkB,KACzB,eAAQ,IAAI,qCAAqC,EAC1C,GACF,CACL,MAAMO,EAAS,MAAM,KAAK,eAAe,IAAI,CAAC,EAC9C,eAAQ,IAAI,+BAAgCA,CAAM,EAC3CA,CACT,CACF,CAEA,MAAa,WAAWP,EAA6B,CACnD,QAAQ,IAAI,4BAA6BA,CAAI,EACzC,KAAK,gBAAkB,KACzB,MAAM,KAAK,eAAe,WAAWA,CAAI,EAEzC,QAAQ,IAAI,qCAAqC,CAErD,CAEA,MAAa,cAAgC,CAE3C,OADA,QAAQ,IAAI,6BAA6B,EACrC,KAAK,gBAAkB,KAClB,GAEA,MAAM,KAAK,eAAe,aAAA,CAErC,CACF,EAzGqBH,EAArBW,EAAA,CADCC,aAAA,EASIC,aAAO,QAAQ,CAAA,EACfA,aAAO,YAAY,CAAA,CAAA,EATHb,CAAA,ECFrB,MAAqBc,CAAc,CACjC,YAAYC,EAAsB,CAChCA,EAAU,KAAkB,aAAa,EAAE,GAAGf,CAAkB,CAClE,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-sharedworker-impl",
3
- "version": "0.24.0-rc-1",
3
+ "version": "0.25.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -28,34 +28,35 @@
28
28
  "main": "./dist/index.es.js",
29
29
  "types": "./dist/index.d.ts",
30
30
  "dependencies": {
31
+ "@xwiki/platform-api": "18.0.0-1766398944",
32
+ "@xwiki/platform-configuration-api": "18.0.0-1766398944",
33
+ "@xwiki/platform-document-api": "18.0.0-1766398944",
31
34
  "comlink": "4.4.2",
32
35
  "reflect-metadata": "0.2.2",
33
- "vue-router": "4.6.3",
34
- "@xwiki/cristal-alerts-default": "0.24.0-rc-1",
35
- "@xwiki/cristal-authentication-default": "0.24.0-rc-1",
36
- "@xwiki/cristal-backend-dexie": "0.24.0-rc-1",
37
- "@xwiki/cristal-backend-github": "0.24.0-rc-1",
38
- "@xwiki/cristal-backend-nextcloud": "0.24.0-rc-1",
39
- "@xwiki/cristal-api": "0.24.0-rc-1",
40
- "@xwiki/cristal-backend-xwiki": "0.24.0-rc-1",
41
- "@xwiki/cristal-configuration-api": "0.24.0-rc-1",
42
- "@xwiki/cristal-configuration-web": "0.24.0-rc-1",
43
- "@xwiki/cristal-extension-manager": "0.24.0-rc-1",
44
- "@xwiki/cristal-sharedworker-api": "0.24.0-rc-1",
45
- "@xwiki/cristal-document-api": "0.24.0-rc-1"
36
+ "@xwiki/cristal-alerts-default": "0.25.0",
37
+ "@xwiki/cristal-backend-nextcloud": "0.25.0",
38
+ "@xwiki/cristal-backend-dexie": "0.25.0",
39
+ "@xwiki/cristal-backend-github": "0.25.0",
40
+ "@xwiki/cristal-backend-xwiki": "0.25.0",
41
+ "@xwiki/cristal-authentication-default": "0.25.0",
42
+ "@xwiki/cristal-sharedworker-api": "0.25.0",
43
+ "@xwiki/cristal-configuration-web": "0.25.0",
44
+ "@xwiki/cristal-extension-manager": "0.25.0"
46
45
  },
47
46
  "peerDependencies": {
48
47
  "inversify": "7.x",
49
48
  "reflect-metadata": "0.x",
50
- "vue": "3.x"
49
+ "vue": "3.x",
50
+ "vue-router": "4.x"
51
51
  },
52
52
  "devDependencies": {
53
- "@types/sharedworker": "0.0.193",
54
- "inversify": "7.10.4",
53
+ "@types/sharedworker": "0.0.197",
54
+ "inversify": "7.10.6",
55
55
  "typescript": "5.9.3",
56
- "vite": "7.1.12",
57
- "vue": "3.5.22",
58
- "@xwiki/cristal-dev-config": "0.24.0-rc-1"
56
+ "vite": "7.2.7",
57
+ "vue-router": "4.6.3",
58
+ "vue": "3.5.25",
59
+ "@xwiki/cristal-dev-config": "0.25.0"
59
60
  },
60
61
  "scripts": {
61
62
  "api-extractor:local": "api-extractor run --local",
@@ -19,12 +19,12 @@
19
19
  */
20
20
 
21
21
  import { default as Worker } from "./worker?sharedworker";
22
- import { name as documentServiceName } from "@xwiki/cristal-document-api";
22
+ import { name as documentServiceName } from "@xwiki/platform-document-api";
23
23
  import * as Comlink from "comlink";
24
24
  import { inject, injectable } from "inversify";
25
- import type { CristalApp, Logger } from "@xwiki/cristal-api";
26
- import type { DocumentService } from "@xwiki/cristal-document-api";
27
25
  import type { MyWorker, QueueWorker } from "@xwiki/cristal-sharedworker-api";
26
+ import type { CristalApp, Logger } from "@xwiki/platform-api";
27
+ import type { DocumentService } from "@xwiki/platform-document-api";
28
28
 
29
29
  @injectable()
30
30
  export default class DefaultQueueWorker implements QueueWorker {
@@ -29,16 +29,16 @@ import { ComponentInit as NextcloudBackendComponentInit } from "@xwiki/cristal-b
29
29
  import { ComponentInit as XWikiBackendComponentInit } from "@xwiki/cristal-backend-xwiki";
30
30
  import { CristalLoader } from "@xwiki/cristal-extension-manager";
31
31
  import * as Comlink from "comlink";
32
+ import type { MyWorker, QueueWorker } from "@xwiki/cristal-sharedworker-api";
32
33
  import type {
33
34
  CristalApp,
34
35
  WikiConfig,
35
36
  WrappingStorage,
36
- } from "@xwiki/cristal-api";
37
+ } from "@xwiki/platform-api";
37
38
  import type {
38
39
  ConfigurationLoader,
39
40
  Configurations,
40
- } from "@xwiki/cristal-configuration-api";
41
- import type { MyWorker, QueueWorker } from "@xwiki/cristal-sharedworker-api";
41
+ } from "@xwiki/platform-configuration-api";
42
42
  import type { Container } from "inversify";
43
43
 
44
44
  async function loadConfigWeb() {
@@ -18,7 +18,7 @@
18
18
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  */
20
20
 
21
- import { DefaultLogger } from "@xwiki/cristal-api";
21
+ import { DefaultLogger } from "@xwiki/platform-api";
22
22
  import { injectable } from "inversify";
23
23
  import type {
24
24
  CristalApp,
@@ -27,8 +27,8 @@ import type {
27
27
  PageData,
28
28
  SkinManager,
29
29
  WikiConfig,
30
- } from "@xwiki/cristal-api";
31
- import type { Configurations } from "@xwiki/cristal-configuration-api";
30
+ } from "@xwiki/platform-api";
31
+ import type { Configurations } from "@xwiki/platform-configuration-api";
32
32
  import type { Container } from "inversify";
33
33
  import type { App, Component } from "vue";
34
34
  import type { Router } from "vue-router";
package/CHANGELOG.md DELETED
@@ -1,365 +0,0 @@
1
- # @xwiki/cristal-sharedworker-impl
2
-
3
- ## 0.23.0
4
-
5
- ### Minor Changes
6
-
7
- - Cristal 0.23 Release
8
-
9
- ### Patch Changes
10
-
11
- - Updated dependencies
12
- - @xwiki/cristal-api@0.23.0
13
- - @xwiki/cristal-alerts-default@0.23.0
14
- - @xwiki/cristal-authentication-default@0.23.0
15
- - @xwiki/cristal-backend-dexie@0.23.0
16
- - @xwiki/cristal-backend-github@0.23.0
17
- - @xwiki/cristal-backend-nextcloud@0.23.0
18
- - @xwiki/cristal-backend-xwiki@0.23.0
19
- - @xwiki/cristal-configuration-api@0.23.0
20
- - @xwiki/cristal-configuration-web@0.23.0
21
- - @xwiki/cristal-document-api@0.23.0
22
- - @xwiki/cristal-extension-manager@0.23.0
23
- - @xwiki/cristal-sharedworker-api@0.23.0
24
-
25
- ## 0.22.0
26
-
27
- ### Minor Changes
28
-
29
- - Cristal 0.22 Release
30
-
31
- ### Patch Changes
32
-
33
- - Updated dependencies
34
- - @xwiki/cristal-api@0.22.0
35
- - @xwiki/cristal-alerts-default@0.22.0
36
- - @xwiki/cristal-authentication-default@0.22.0
37
- - @xwiki/cristal-backend-dexie@0.22.0
38
- - @xwiki/cristal-backend-github@0.22.0
39
- - @xwiki/cristal-backend-nextcloud@0.22.0
40
- - @xwiki/cristal-backend-xwiki@0.22.0
41
- - @xwiki/cristal-configuration-api@0.22.0
42
- - @xwiki/cristal-configuration-web@0.22.0
43
- - @xwiki/cristal-document-api@0.22.0
44
- - @xwiki/cristal-extension-manager@0.22.0
45
- - @xwiki/cristal-sharedworker-api@0.22.0
46
-
47
- ## 0.21.0
48
-
49
- ### Minor Changes
50
-
51
- - Cristal 0.21 Release
52
-
53
- ### Patch Changes
54
-
55
- - Updated dependencies
56
- - @xwiki/cristal-api@0.21.0
57
- - @xwiki/cristal-alerts-default@0.21.0
58
- - @xwiki/cristal-authentication-default@0.21.0
59
- - @xwiki/cristal-backend-dexie@0.21.0
60
- - @xwiki/cristal-backend-github@0.21.0
61
- - @xwiki/cristal-backend-nextcloud@0.21.0
62
- - @xwiki/cristal-backend-xwiki@0.21.0
63
- - @xwiki/cristal-configuration-api@0.21.0
64
- - @xwiki/cristal-configuration-web@0.21.0
65
- - @xwiki/cristal-document-api@0.21.0
66
- - @xwiki/cristal-extension-manager@0.21.0
67
- - @xwiki/cristal-sharedworker-api@0.21.0
68
-
69
- ## 0.20.0
70
-
71
- ### Minor Changes
72
-
73
- - Cristal 0.20 Release
74
-
75
- ### Patch Changes
76
-
77
- - Updated dependencies
78
- - @xwiki/cristal-api@0.20.0
79
- - @xwiki/cristal-alerts-default@0.20.0
80
- - @xwiki/cristal-authentication-default@0.20.0
81
- - @xwiki/cristal-backend-dexie@0.20.0
82
- - @xwiki/cristal-backend-github@0.20.0
83
- - @xwiki/cristal-backend-nextcloud@0.20.0
84
- - @xwiki/cristal-backend-xwiki@0.20.0
85
- - @xwiki/cristal-configuration-api@0.20.0
86
- - @xwiki/cristal-configuration-web@0.20.0
87
- - @xwiki/cristal-document-api@0.20.0
88
- - @xwiki/cristal-extension-manager@0.20.0
89
- - @xwiki/cristal-sharedworker-api@0.20.0
90
-
91
- ## 0.20.0-rc.0
92
-
93
- ### Minor Changes
94
-
95
- - Cristal 0.20-rc-1 Release
96
-
97
- ### Patch Changes
98
-
99
- - Updated dependencies
100
- - @xwiki/cristal-api@0.20.0-rc.0
101
- - @xwiki/cristal-alerts-default@0.20.0-rc.0
102
- - @xwiki/cristal-authentication-default@0.20.0-rc.0
103
- - @xwiki/cristal-backend-dexie@0.20.0-rc.0
104
- - @xwiki/cristal-backend-github@0.20.0-rc.0
105
- - @xwiki/cristal-backend-nextcloud@0.20.0-rc.0
106
- - @xwiki/cristal-backend-xwiki@0.20.0-rc.0
107
- - @xwiki/cristal-configuration-api@0.20.0-rc.0
108
- - @xwiki/cristal-configuration-web@0.20.0-rc.0
109
- - @xwiki/cristal-document-api@0.20.0-rc.0
110
- - @xwiki/cristal-extension-manager@0.20.0-rc.0
111
- - @xwiki/cristal-sharedworker-api@0.20.0-rc.0
112
-
113
- ## 0.19.0
114
-
115
- ### Minor Changes
116
-
117
- - 3eea53e: Cristal 0.19 Release
118
-
119
- ### Patch Changes
120
-
121
- - Updated dependencies [3eea53e]
122
- - @xwiki/cristal-api@0.19.0
123
- - @xwiki/cristal-alerts-default@0.19.0
124
- - @xwiki/cristal-authentication-default@0.19.0
125
- - @xwiki/cristal-backend-dexie@0.19.0
126
- - @xwiki/cristal-backend-github@0.19.0
127
- - @xwiki/cristal-backend-nextcloud@0.19.0
128
- - @xwiki/cristal-backend-xwiki@0.19.0
129
- - @xwiki/cristal-configuration-api@0.19.0
130
- - @xwiki/cristal-configuration-web@0.19.0
131
- - @xwiki/cristal-document-api@0.19.0
132
- - @xwiki/cristal-extension-manager@0.19.0
133
- - @xwiki/cristal-sharedworker-api@0.19.0
134
-
135
- ## 0.18.0
136
-
137
- ### Minor Changes
138
-
139
- - Cristal 0.18 Release
140
-
141
- ### Patch Changes
142
-
143
- - Updated dependencies
144
- - @xwiki/cristal-api@0.18.0
145
- - @xwiki/cristal-alerts-default@0.18.0
146
- - @xwiki/cristal-authentication-default@0.18.0
147
- - @xwiki/cristal-backend-dexie@0.18.0
148
- - @xwiki/cristal-backend-github@0.18.0
149
- - @xwiki/cristal-backend-nextcloud@0.18.0
150
- - @xwiki/cristal-backend-xwiki@0.18.0
151
- - @xwiki/cristal-configuration-api@0.18.0
152
- - @xwiki/cristal-configuration-web@0.18.0
153
- - @xwiki/cristal-document-api@0.18.0
154
- - @xwiki/cristal-extension-manager@0.18.0
155
- - @xwiki/cristal-sharedworker-api@0.18.0
156
-
157
- ## 0.17.0
158
-
159
- ### Minor Changes
160
-
161
- - Cristal 0.17 Release
162
-
163
- ### Patch Changes
164
-
165
- - Updated dependencies
166
- - @xwiki/cristal-api@0.17.0
167
- - @xwiki/cristal-alerts-default@0.17.0
168
- - @xwiki/cristal-authentication-default@0.17.0
169
- - @xwiki/cristal-backend-dexie@0.17.0
170
- - @xwiki/cristal-backend-github@0.17.0
171
- - @xwiki/cristal-backend-nextcloud@0.17.0
172
- - @xwiki/cristal-backend-xwiki@0.17.0
173
- - @xwiki/cristal-configuration-api@0.17.0
174
- - @xwiki/cristal-configuration-web@0.17.0
175
- - @xwiki/cristal-document-api@0.17.0
176
- - @xwiki/cristal-configuration-electron-renderer@0.17.0
177
- - @xwiki/cristal-extension-manager@0.17.0
178
- - @xwiki/cristal-sharedworker-api@0.17.0
179
-
180
- ## 0.16.0
181
-
182
- ### Minor Changes
183
-
184
- - Cristal 0.16 Release
185
-
186
- ### Patch Changes
187
-
188
- - Updated dependencies
189
- - @xwiki/cristal-api@0.16.0
190
- - @xwiki/cristal-alerts-default@0.16.0
191
- - @xwiki/cristal-authentication-default@0.16.0
192
- - @xwiki/cristal-backend-dexie@0.16.0
193
- - @xwiki/cristal-backend-github@0.16.0
194
- - @xwiki/cristal-backend-nextcloud@0.16.0
195
- - @xwiki/cristal-backend-xwiki@0.16.0
196
- - @xwiki/cristal-configuration-api@0.16.0
197
- - @xwiki/cristal-configuration-web@0.16.0
198
- - @xwiki/cristal-document-api@0.16.0
199
- - @xwiki/cristal-configuration-electron-renderer@0.16.0
200
- - @xwiki/cristal-extension-manager@0.16.0
201
- - @xwiki/cristal-sharedworker-api@0.16.0
202
-
203
- ## 0.15.0
204
-
205
- ### Minor Changes
206
-
207
- - Cristal 0.15 Release
208
-
209
- ### Patch Changes
210
-
211
- - Updated dependencies
212
- - @xwiki/cristal-api@0.15.0
213
- - @xwiki/cristal-alerts-default@0.15.0
214
- - @xwiki/cristal-authentication-default@0.15.0
215
- - @xwiki/cristal-backend-dexie@0.15.0
216
- - @xwiki/cristal-backend-github@0.15.0
217
- - @xwiki/cristal-backend-nextcloud@0.15.0
218
- - @xwiki/cristal-backend-xwiki@0.15.0
219
- - @xwiki/cristal-configuration-api@0.15.0
220
- - @xwiki/cristal-configuration-web@0.15.0
221
- - @xwiki/cristal-document-api@0.15.0
222
- - @xwiki/cristal-configuration-electron-renderer@0.15.0
223
- - @xwiki/cristal-extension-manager@0.15.0
224
- - @xwiki/cristal-sharedworker-api@0.15.0
225
-
226
- ## 0.14.0
227
-
228
- ### Minor Changes
229
-
230
- - 3e5f853: Cristal 0.14 Release
231
-
232
- ### Patch Changes
233
-
234
- - Updated dependencies [3e5f853]
235
- - @xwiki/cristal-api@0.14.0
236
- - @xwiki/cristal-alerts-default@0.14.0
237
- - @xwiki/cristal-authentication-default@0.14.0
238
- - @xwiki/cristal-backend-dexie@0.14.0
239
- - @xwiki/cristal-backend-nextcloud@0.14.0
240
- - @xwiki/cristal-backend-xwiki@0.14.0
241
- - @xwiki/cristal-configuration-api@0.14.0
242
- - @xwiki/cristal-configuration-web@0.14.0
243
- - @xwiki/cristal-document-api@0.14.0
244
- - @xwiki/cristal-configuration-electron-renderer@0.14.0
245
- - @xwiki/cristal-extension-manager@0.14.0
246
- - @xwiki/cristal-sharedworker-api@0.14.0
247
-
248
- ## 0.13.0
249
-
250
- ### Minor Changes
251
-
252
- - 06a5d1b: Cristal 0.13 Release
253
-
254
- ### Patch Changes
255
-
256
- - Updated dependencies [06a5d1b]
257
- - @xwiki/cristal-api@0.13.0
258
- - @xwiki/cristal-authentication-default@0.13.0
259
- - @xwiki/cristal-backend-dexie@0.13.0
260
- - @xwiki/cristal-backend-github@0.13.0
261
- - @xwiki/cristal-backend-nextcloud@0.13.0
262
- - @xwiki/cristal-backend-xwiki@0.13.0
263
- - @xwiki/cristal-document-api@0.13.0
264
- - @xwiki/cristal-extension-manager@0.13.0
265
- - @xwiki/cristal-sharedworker-api@0.13.0
266
-
267
- ## 0.12.0
268
-
269
- ### Minor Changes
270
-
271
- - 681a9b7: Cristal 0.12 Release
272
-
273
- ### Patch Changes
274
-
275
- - Updated dependencies [681a9b7]
276
- - @xwiki/cristal-api@0.12.0
277
- - @xwiki/cristal-authentication-api@0.12.0
278
- - @xwiki/cristal-backend-dexie@0.12.0
279
- - @xwiki/cristal-backend-github@0.12.0
280
- - @xwiki/cristal-backend-nextcloud@0.12.0
281
- - @xwiki/cristal-backend-xwiki@0.12.0
282
- - @xwiki/cristal-document-api@0.12.0
283
- - @xwiki/cristal-extension-manager@0.12.0
284
- - @xwiki/cristal-sharedworker-api@0.12.0
285
-
286
- ## 0.11.0
287
-
288
- ### Minor Changes
289
-
290
- - d54422d: Cristal 0.11 Release
291
-
292
- ### Patch Changes
293
-
294
- - Updated dependencies [d54422d]
295
- - @xwiki/cristal-api@0.11.0
296
- - @xwiki/cristal-authentication-api@0.11.0
297
- - @xwiki/cristal-backend-dexie@0.11.0
298
- - @xwiki/cristal-backend-github@0.11.0
299
- - @xwiki/cristal-backend-nextcloud@0.11.0
300
- - @xwiki/cristal-backend-xwiki@0.11.0
301
- - @xwiki/cristal-document-api@0.11.0
302
- - @xwiki/cristal-extension-manager@0.11.0
303
- - @xwiki/cristal-sharedworker-api@0.11.0
304
-
305
- ## 0.10.0
306
-
307
- ### Minor Changes
308
-
309
- - fa7fe9f: Cristal 0.10 Release
310
-
311
- ### Patch Changes
312
-
313
- - Updated dependencies [fa7fe9f]
314
- - @xwiki/cristal-api@0.10.0
315
- - @xwiki/cristal-backend-dexie@0.10.0
316
- - @xwiki/cristal-backend-github@0.10.0
317
- - @xwiki/cristal-backend-nextcloud@0.10.0
318
- - @xwiki/cristal-backend-xwiki@0.10.0
319
- - @xwiki/cristal-extension-manager@0.10.0
320
- - @xwiki/cristal-sharedworker-api@0.10.0
321
-
322
- ## 0.9.0
323
-
324
- ### Minor Changes
325
-
326
- - efbd020: Cristal 0.9 Release
327
-
328
- ### Patch Changes
329
-
330
- - Updated dependencies [efbd020]
331
- - @xwiki/cristal-api@0.9.0
332
- - @xwiki/cristal-backend-dexie@0.9.0
333
- - @xwiki/cristal-backend-github@0.9.0
334
- - @xwiki/cristal-backend-nextcloud@0.9.0
335
- - @xwiki/cristal-backend-xwiki@0.9.0
336
- - @xwiki/cristal-extension-manager@0.9.0
337
- - @xwiki/cristal-sharedworker-api@0.9.0
338
-
339
- ## 0.8.0
340
-
341
- ### Minor Changes
342
-
343
- - 30004dd: Cristal 0.8 Release
344
-
345
- ### Patch Changes
346
-
347
- - Updated dependencies [30004dd]
348
- - @xwiki/cristal-api@0.8.0
349
- - @xwiki/cristal-extension-manager@0.8.0
350
- - @xwiki/cristal-sharedworker-api@0.8.0
351
- - @xwiki/cristal-storage@0.8.0
352
-
353
- ## 0.7.0
354
-
355
- ### Minor Changes
356
-
357
- - aa0a7ca: Cristal 0.7 Release
358
-
359
- ### Patch Changes
360
-
361
- - Updated dependencies [aa0a7ca]
362
- - @xwiki/cristal-api@0.7.0
363
- - @xwiki/cristal-extension-manager@0.7.0
364
- - @xwiki/cristal-sharedworker-api@0.7.0
365
- - @xwiki/cristal-storage@0.7.0