@xwiki/cristal-electron-main 0.25.0 → 1.0.0-rc-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs +1 -1
  2. package/package.json +8 -8
package/dist/index.cjs CHANGED
@@ -155,7 +155,7 @@ ${c.comment}`:c.comment}this.doc.range[2]=c.offset;break}default:this.errors.pus
155
155
  `)+1;for(;c!==0;)this.onNewLine(this.offset+c),c=this.source.indexOf(`
156
156
  `,c)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(o){const c=o.items[o.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,c.value){const f="end"in c.value?c.value.end:void 0;(Array.isArray(f)?f[f.length-1]:void 0)?.type==="comment"?f?.push(this.sourceToken):o.items.push({start:[this.sourceToken]})}else c.sep?c.sep.push(this.sourceToken):c.start.push(this.sourceToken);return;case"space":case"comment":if(c.value)o.items.push({start:[this.sourceToken]});else if(c.sep)c.sep.push(this.sourceToken);else{if(this.atIndentedComment(c.start,o.indent)){const m=o.items[o.items.length-2]?.value?.end;if(Array.isArray(m)){Array.prototype.push.apply(m,c.start),m.push(this.sourceToken),o.items.pop();return}}c.start.push(this.sourceToken)}return}if(this.indent>=o.indent){const f=!this.onKeyLine&&this.indent===o.indent,m=f&&(c.sep||c.explicitKey)&&this.type!=="seq-item-ind";let v=[];if(m&&c.sep&&!c.value){const h=[];for(let g=0;g<c.sep.length;++g){const y=c.sep[g];switch(y.type){case"newline":h.push(g);break;case"space":break;case"comment":y.indent>o.indent&&(h.length=0);break;default:h.length=0}}h.length>=2&&(v=c.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":m||c.value?(v.push(this.sourceToken),o.items.push({start:v}),this.onKeyLine=!0):c.sep?c.sep.push(this.sourceToken):c.start.push(this.sourceToken);return;case"explicit-key-ind":!c.sep&&!c.explicitKey?(c.start.push(this.sourceToken),c.explicitKey=!0):m||c.value?(v.push(this.sourceToken),o.items.push({start:v,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(c.explicitKey)if(c.sep)if(c.value)o.items.push({start:[],key:null,sep:[this.sourceToken]});else if(n(c.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:v,key:null,sep:[this.sourceToken]}]});else if(l(c.key)&&!n(c.sep,"newline")){const h=u(c.start),g=c.key,y=c.sep;y.push(this.sourceToken),delete c.key,delete c.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:g,sep:y}]})}else v.length>0?c.sep=c.sep.concat(v,this.sourceToken):c.sep.push(this.sourceToken);else if(n(c.start,"newline"))Object.assign(c,{key:null,sep:[this.sourceToken]});else{const h=u(c.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else c.sep?c.value||m?o.items.push({start:v,key:null,sep:[this.sourceToken]}):n(c.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):c.sep.push(this.sourceToken):Object.assign(c,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);m||c.value?(o.items.push({start:v,key:h,sep:[]}),this.onKeyLine=!0):c.sep?this.stack.push(h):(Object.assign(c,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(o);if(h){if(h.type==="block-seq"){if(!c.explicitKey&&c.sep&&!n(c.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else f&&o.items.push({start:v});this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(o){const c=o.items[o.items.length-1];switch(this.type){case"newline":if(c.value){const f="end"in c.value?c.value.end:void 0;(Array.isArray(f)?f[f.length-1]:void 0)?.type==="comment"?f?.push(this.sourceToken):o.items.push({start:[this.sourceToken]})}else c.start.push(this.sourceToken);return;case"space":case"comment":if(c.value)o.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(c.start,o.indent)){const m=o.items[o.items.length-2]?.value?.end;if(Array.isArray(m)){Array.prototype.push.apply(m,c.start),m.push(this.sourceToken),o.items.pop();return}}c.start.push(this.sourceToken)}return;case"anchor":case"tag":if(c.value||this.indent<=o.indent)break;c.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==o.indent)break;c.value||n(c.start,"seq-item-ind")?o.items.push({start:[this.sourceToken]}):c.start.push(this.sourceToken);return}if(this.indent>o.indent){const f=this.startBlockValue(o);if(f){this.stack.push(f);return}}yield*this.pop(),yield*this.step()}*flowCollection(o){const c=o.items[o.items.length-1];if(this.type==="flow-error-end"){let f;do yield*this.pop(),f=this.peek(1);while(f?.type==="flow-collection")}else if(o.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!c||c.sep?o.items.push({start:[this.sourceToken]}):c.start.push(this.sourceToken);return;case"map-value-ind":!c||c.value?o.items.push({start:[],key:null,sep:[this.sourceToken]}):c.sep?c.sep.push(this.sourceToken):Object.assign(c,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!c||c.value?o.items.push({start:[this.sourceToken]}):c.sep?c.sep.push(this.sourceToken):c.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const m=this.flowScalar(this.type);!c||c.value?o.items.push({start:[],key:m,sep:[]}):c.sep?this.stack.push(m):Object.assign(c,{key:m,sep:[]});return}case"flow-map-end":case"flow-seq-end":o.end.push(this.sourceToken);return}const f=this.startBlockValue(o);f?this.stack.push(f):(yield*this.pop(),yield*this.step())}else{const f=this.peek(2);if(f.type==="block-map"&&(this.type==="map-value-ind"&&f.indent===o.indent||this.type==="newline"&&!f.items[f.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&f.type!=="flow-collection"){const m=s(f),v=u(m);d(o);const h=o.end.splice(1,o.end.length);h.push(this.sourceToken);const g={type:"block-map",offset:o.offset,indent:o.indent,items:[{start:v,key:o,sep:h}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=g}else yield*this.lineEnd(o)}}flowScalar(o){if(this.onNewLine){let c=this.source.indexOf(`
157
157
  `)+1;for(;c!==0;)this.onNewLine(this.offset+c),c=this.source.indexOf(`
158
- `,c)+1}return{type:o,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(o){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const c=s(o),f=u(c);return f.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const c=s(o),f=u(c);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(o,c){return this.type!=="comment"||this.indent<=c?!1:o.every(f=>f.type==="newline"||f.type==="space")}*documentEnd(o){this.type!=="doc-mode"&&(o.end?o.end.push(this.sourceToken):o.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(o){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:o.end?o.end.push(this.sourceToken):o.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}return Ho.Parser=p,Ho}var qt={},qm;function W_(){if(qm)return qt;qm=1;var e=Iv(),t=Ia(),i=qa(),n=gv(),r=oe(),l=Lv(),s=Dv();function u(c){const f=c.prettyErrors!==!1;return{lineCounter:c.lineCounter||f&&new l.LineCounter||null,prettyErrors:f}}function d(c,f={}){const{lineCounter:m,prettyErrors:v}=u(f),h=new s.Parser(m?.addNewLine),g=new e.Composer(f),y=Array.from(g.compose(h.parse(c)));if(v&&m)for(const b of y)b.errors.forEach(i.prettifyError(c,m)),b.warnings.forEach(i.prettifyError(c,m));return y.length>0?y:Object.assign([],{empty:!0},g.streamInfo())}function p(c,f={}){const{lineCounter:m,prettyErrors:v}=u(f),h=new s.Parser(m?.addNewLine),g=new e.Composer(f);let y=null;for(const b of g.compose(h.parse(c),!0,c.length))if(!y)y=b;else if(y.options.logLevel!=="silent"){y.errors.push(new i.YAMLParseError(b.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return v&&m&&(y.errors.forEach(i.prettifyError(c,m)),y.warnings.forEach(i.prettifyError(c,m))),y}function a(c,f,m){let v;typeof f=="function"?v=f:m===void 0&&f&&typeof f=="object"&&(m=f);const h=p(c,m);if(!h)return null;if(h.warnings.forEach(g=>n.warn(h.options.logLevel,g)),h.errors.length>0){if(h.options.logLevel!=="silent")throw h.errors[0];h.errors=[]}return h.toJS(Object.assign({reviver:v},m))}function o(c,f,m){let v=null;if(typeof f=="function"||Array.isArray(f)?v=f:m===void 0&&f&&(m=f),typeof m=="string"&&(m=m.length),typeof m=="number"){const h=Math.round(m);m=h<1?void 0:h>8?{indent:8}:{indent:h}}if(c===void 0){const{keepUndefined:h}=m??f??{};if(!h)return}return r.isDocument(c)&&!v?c.toString(m):new t.Document(c,v,m).toString(m)}return qt.parse=a,qt.parseAllDocuments=d,qt.parseDocument=p,qt.stringify=o,qt}var Lm;function Y_(){if(Lm)return ce;Lm=1;var e=Iv(),t=Ia(),i=Tv(),n=qa(),r=Ta(),l=oe(),s=_t(),u=ge(),d=Et(),p=$t(),a=el(),o=qv(),c=Lv(),f=Dv(),m=W_(),v=Aa();return ce.Composer=e.Composer,ce.Document=t.Document,ce.Schema=i.Schema,ce.YAMLError=n.YAMLError,ce.YAMLParseError=n.YAMLParseError,ce.YAMLWarning=n.YAMLWarning,ce.Alias=r.Alias,ce.isAlias=l.isAlias,ce.isCollection=l.isCollection,ce.isDocument=l.isDocument,ce.isMap=l.isMap,ce.isNode=l.isNode,ce.isPair=l.isPair,ce.isScalar=l.isScalar,ce.isSeq=l.isSeq,ce.Pair=s.Pair,ce.Scalar=u.Scalar,ce.YAMLMap=d.YAMLMap,ce.YAMLSeq=p.YAMLSeq,ce.CST=a,ce.Lexer=o.Lexer,ce.LineCounter=c.LineCounter,ce.Parser=f.Parser,ce.parse=m.parse,ce.parseAllDocuments=m.parseAllDocuments,ce.parseDocument=m.parseDocument,ce.stringify=m.stringify,ce.visit=v.visit,ce.visitAsync=v.visitAsync,ce}var Mv=Y_();class Fv{readPage(t){const i=t.split(`
158
+ `,c)+1}return{type:o,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(o){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const c=s(o),f=u(c);return f.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const c=s(o),f=u(c);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(o,c){return this.type!=="comment"||this.indent<=c?!1:o.every(f=>f.type==="newline"||f.type==="space")}*documentEnd(o){this.type!=="doc-mode"&&(o.end?o.end.push(this.sourceToken):o.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(o){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:o.end?o.end.push(this.sourceToken):o.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}return Ho.Parser=p,Ho}var qt={},qm;function W_(){if(qm)return qt;qm=1;var e=Iv(),t=Ia(),i=qa(),n=gv(),r=oe(),l=Lv(),s=Dv();function u(c){const f=c.prettyErrors!==!1;return{lineCounter:c.lineCounter||f&&new l.LineCounter||null,prettyErrors:f}}function d(c,f={}){const{lineCounter:m,prettyErrors:v}=u(f),h=new s.Parser(m?.addNewLine),g=new e.Composer(f),y=Array.from(g.compose(h.parse(c)));if(v&&m)for(const b of y)b.errors.forEach(i.prettifyError(c,m)),b.warnings.forEach(i.prettifyError(c,m));return y.length>0?y:Object.assign([],{empty:!0},g.streamInfo())}function p(c,f={}){const{lineCounter:m,prettyErrors:v}=u(f),h=new s.Parser(m?.addNewLine),g=new e.Composer(f);let y=null;for(const b of g.compose(h.parse(c),!0,c.length))if(!y)y=b;else if(y.options.logLevel!=="silent"){y.errors.push(new i.YAMLParseError(b.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return v&&m&&(y.errors.forEach(i.prettifyError(c,m)),y.warnings.forEach(i.prettifyError(c,m))),y}function a(c,f,m){let v;typeof f=="function"?v=f:m===void 0&&f&&typeof f=="object"&&(m=f);const h=p(c,m);if(!h)return null;if(h.warnings.forEach(g=>n.warn(h.options.logLevel,g)),h.errors.length>0){if(h.options.logLevel!=="silent")throw h.errors[0];h.errors=[]}return h.toJS(Object.assign({reviver:v},m))}function o(c,f,m){let v=null;if(typeof f=="function"||Array.isArray(f)?v=f:m===void 0&&f&&(m=f),typeof m=="string"&&(m=m.length),typeof m=="number"){const h=Math.round(m);m=h<1?void 0:h>8?{indent:8}:{indent:h}}if(c===void 0){const{keepUndefined:h}=m??f??{};if(!h)return}return r.isDocument(c)&&!v?c.toString(m):new t.Document(c,v,m).toString(m)}return qt.parse=a,qt.parseAllDocuments=d,qt.parseDocument=p,qt.stringify=o,qt}var Lm;function Y_(){if(Lm)return ce;Lm=1;var e=Iv(),t=Ia(),i=Tv(),n=qa(),r=Ta(),l=oe(),s=_t(),u=ge(),d=Et(),p=$t(),a=el(),o=qv(),c=Lv(),f=Dv(),m=W_(),v=Aa();return ce.Composer=e.Composer,ce.Document=t.Document,ce.Schema=i.Schema,ce.YAMLError=n.YAMLError,ce.YAMLParseError=n.YAMLParseError,ce.YAMLWarning=n.YAMLWarning,ce.Alias=r.Alias,ce.isAlias=l.isAlias,ce.isCollection=l.isCollection,ce.isDocument=l.isDocument,ce.isMap=l.isMap,ce.isNode=l.isNode,ce.isPair=l.isPair,ce.isScalar=l.isScalar,ce.isSeq=l.isSeq,ce.Pair=s.Pair,ce.Scalar=u.Scalar,ce.YAMLMap=d.YAMLMap,ce.YAMLSeq=p.YAMLSeq,ce.CST=a,ce.Lexer=o.Lexer,ce.LineCounter=c.LineCounter,ce.Parser=f.Parser,ce.parse=m.parse,ce.parseAllDocuments=m.parseAllDocuments,ce.parseDocument=m.parseDocument,ce.stringify=m.stringify,ce.visit=v.visit,ce.visitAsync=v.visitAsync,ce}var Mv=Y_();class Fv{readPage(t){const i=t.split(`
159
159
  `);if(i[0]=="---"){i.shift();const n=i.findIndex(r=>r=="---");if(n>=0){const r=i.slice(0,n).join(`
160
160
  `);return{...Mv.parse(r),content:i.slice(n+1).join(`
161
161
  `)}}else return{content:t}}else return{content:t}}}class J_{writePage(t){const{content:i,...n}=t;return n&&Object.keys(n).length>0?`---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-electron-main",
3
- "version": "0.25.0",
3
+ "version": "1.0.0-rc-1",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -15,17 +15,17 @@
15
15
  "dependencies": {
16
16
  "electron": "39.2.6",
17
17
  "reflect-metadata": "0.2.2",
18
- "@xwiki/cristal-electron-authentication-github-main": "0.25.0",
19
- "@xwiki/cristal-electron-authentication-nextcloud-main": "0.25.0",
20
- "@xwiki/cristal-electron-authentication-xwiki-main": "0.25.0",
21
- "@xwiki/cristal-browser-electron": "0.25.0",
22
- "@xwiki/cristal-electron-settings-main": "0.25.0",
23
- "@xwiki/cristal-electron-storage": "0.25.0"
18
+ "@xwiki/cristal-browser-electron": "1.0.0-rc-1",
19
+ "@xwiki/cristal-electron-authentication-nextcloud-main": "1.0.0-rc-1",
20
+ "@xwiki/cristal-electron-authentication-xwiki-main": "1.0.0-rc-1",
21
+ "@xwiki/cristal-electron-settings-main": "1.0.0-rc-1",
22
+ "@xwiki/cristal-electron-storage": "1.0.0-rc-1",
23
+ "@xwiki/cristal-electron-authentication-github-main": "1.0.0-rc-1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "24.10.2",
27
27
  "typescript": "5.9.3",
28
- "vite": "7.2.7"
28
+ "vite": "7.3.1"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "vite build",