@cyberskill/shared 1.204.0 → 1.205.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.
@@ -0,0 +1,10 @@
1
+ "use strict";var _=Object.defineProperty,O=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var C=(h,t,e)=>t in h?_(h,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):h[t]=e,y=(h,t)=>{for(var e in t||(t={}))I.call(t,e)&&C(h,e,t[e]);if(b)for(var e of b(t))A.call(t,e)&&C(h,e,t[e]);return h},S=(h,t)=>O(h,N(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var T=44,j=59,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=new Uint8Array(64),$=new Uint8Array(128);for(let h=0;h<v.length;h++){const t=v.charCodeAt(h);L[h]=t,$[t]=h}function c(h,t,e){let i=t-e;i=i<0?-i<<1|1:i<<1;do{let n=i&31;i>>>=5,i>0&&(n|=32),h.write(L[n])}while(i>0);return t}var x=1024*16,E=typeof TextDecoder!="undefined"?new TextDecoder:typeof Buffer!="undefined"?{decode(h){return Buffer.from(h.buffer,h.byteOffset,h.byteLength).toString()}}:{decode(h){let t="";for(let e=0;e<h.length;e++)t+=String.fromCharCode(h[e]);return t}},U=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(x)}write(h){const{buffer:t}=this;t[this.pos++]=h,this.pos===x&&(this.out+=E.decode(t),this.pos=0)}flush(){const{buffer:h,out:t,pos:e}=this;return e>0?t+E.decode(h.subarray(0,e)):t}};function M(h){const t=new U;let e=0,i=0,n=0,r=0;for(let s=0;s<h.length;s++){const l=h[s];if(s>0&&t.write(j),l.length===0)continue;let o=0;for(let u=0;u<l.length;u++){const a=l[u];u>0&&t.write(T),o=c(t,a[0],o),a.length!==1&&(e=c(t,a[1],e),i=c(t,a[2],i),n=c(t,a[3],n),a.length!==4&&(r=c(t,a[4],r)))}}return t.flush()}class p{constructor(t){this.bits=t instanceof p?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}}class g{constructor(t,e,i){this.start=t,this.end=e,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){const t=new g(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous}edit(t,e,i){return this.content=t,i||(this.intro="",this.outro=""),this.storeName=e,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const e=t-this.start,i=this.original.slice(0,e),n=this.original.slice(e);this.original=i;const r=new g(t,this.end,n);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=i,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;const e=this.content.replace(t,"");if(e.length)return e!==this.content&&(this.split(this.start+e.length).edit("",void 0,!0),this.edited&&this.edit(e,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;const e=this.content.replace(t,"");if(e.length){if(e!==this.content){const i=this.split(this.end-e.length);this.edited&&i.edit(e,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}}function B(){return typeof globalThis!="undefined"&&typeof globalThis.btoa=="function"?h=>globalThis.btoa(unescape(encodeURIComponent(h))):typeof Buffer=="function"?h=>Buffer.from(h,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const P=B();class R{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=M(t.mappings),typeof t.x_google_ignoreList!="undefined"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId!="undefined"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+P(this.toString())}}function D(h){const t=h.split(`
2
+ `),e=t.filter(r=>/^\t+/.test(r)),i=t.filter(r=>/^ {2,}/.test(r));if(e.length===0&&i.length===0)return null;if(e.length>=i.length)return" ";const n=i.reduce((r,s)=>{const l=/^ +/.exec(s)[0].length;return Math.min(l,r)},1/0);return new Array(n+1).join(" ")}function z(h,t){const e=h.split(/[/\\]/),i=t.split(/[/\\]/);for(e.pop();e[0]===i[0];)e.shift(),i.shift();if(e.length){let n=e.length;for(;n--;)e[n]=".."}return e.concat(i).join("/")}const F=Object.prototype.toString;function H(h){return F.call(h)==="[object Object]"}function k(h){const t=h.split(`
3
+ `),e=[];for(let i=0,n=0;i<t.length;i++)e.push(n),n+=t[i].length+1;return function(n){let r=0,s=e.length;for(;r<s;){const u=r+s>>1;n<e[u]?s=u:r=u+1}const l=r-1,o=n-e[l];return{line:l,column:o}}}const J=/\w/;class W{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,e,i,n){if(e.length){const r=e.length-1;let s=e.indexOf(`
4
+ `,0),l=-1;for(;s>=0&&r>s;){const u=[this.generatedCodeColumn,t,i.line,i.column];n>=0&&u.push(n),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=s,s=e.indexOf(`
5
+ `,s+1)}const o=[this.generatedCodeColumn,t,i.line,i.column];n>=0&&o.push(n),this.rawSegments.push(o),this.advance(e.slice(l+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(e));this.pending=null}addUneditedChunk(t,e,i,n,r){let s=e.start,l=!0,o=!1;for(;s<e.end;){if(i[s]===`
6
+ `)n.line+=1,n.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=!0,o=!1;else{if(this.hires||l||r.has(s)){const u=[this.generatedCodeColumn,t,n.line,n.column];this.hires==="boundary"?J.test(i[s])?o||(this.rawSegments.push(u),o=!0):(this.rawSegments.push(u),o=!1):this.rawSegments.push(u)}n.column+=1,this.generatedCodeColumn+=1,l=!1}s+=1}this.pending=null}advance(t){if(!t)return;const e=t.split(`
7
+ `);if(e.length>1){for(let i=0;i<e.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e[e.length-1].length}}const d=`
8
+ `,f={insertLeft:!1,insertRight:!1,storeName:!1};class m{constructor(t,e={}){const i=new g(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:e.filename},indentExclusionRanges:{writable:!0,value:e.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new p},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:e.ignoreList},offset:{writable:!0,value:e.offset||0}}),this.byStart[0]=i,this.byEnd[t.length]=i}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byEnd[t];return i?i.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byStart[t];return i?i.appendRight(e):this.outro+=e,this}clone(){const t=new m(this.original,{filename:this.filename,offset:this.offset});let e=this.firstChunk,i=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[i.start]=i,t.byEnd[i.end]=i;const n=e.next,r=n&&n.clone();r&&(i.next=r,r.previous=i,i=r),e=n}return t.lastChunk=i,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new p(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};const e=0,i=Object.keys(this.storedNames),n=new W(t.hires),r=k(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext(s=>{const l=r(s.start);s.intro.length&&n.advance(s.intro),s.edited?n.addEdit(e,s.content,l,s.storeName?i.indexOf(s.original):-1):n.addUneditedChunk(e,s,this.original,l,this.sourcemapLocations),s.outro.length&&n.advance(s.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?z(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:i,mappings:n.raw,x_google_ignoreList:this.ignoreList?[e]:void 0}}generateMap(t){return new R(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=D(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,e){const i=/^[^\r\n]/gm;if(H(t)&&(e=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;e=e||{};const n={};e.exclude&&(typeof e.exclude[0]=="number"?[e.exclude]:e.exclude).forEach(a=>{for(let w=a[0];w<a[1];w+=1)n[w]=!0});let r=e.indentStart!==!1;const s=u=>r?`${t}${u}`:(r=!0,u);this.intro=this.intro.replace(i,s);let l=0,o=this.firstChunk;for(;o;){const u=o.end;if(o.edited)n[l]||(o.content=o.content.replace(i,s),o.content.length&&(r=o.content[o.content.length-1]===`
9
+ `));else for(l=o.start;l<u;){if(!n[l]){const a=this.original[l];a===`
10
+ `?r=!0:a!=="\r"&&r&&(r=!1,l===o.start||(this._splitChunk(o,l),o=o.next),o.prependRight(t))}l+=1}l=o.end,o=o.next}return this.outro=this.outro.replace(i,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return f.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),f.insertLeft=!0),this.appendLeft(t,e)}insertRight(t,e){return f.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),f.insertRight=!0),this.prependRight(t,e)}move(t,e,i){if(t=t+this.offset,e=e+this.offset,i=i+this.offset,i>=t&&i<=e)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(i);const n=this.byStart[t],r=this.byEnd[e],s=n.previous,l=r.next,o=this.byStart[i];if(!o&&r===this.lastChunk)return this;const u=o?o.previous:this.lastChunk;return s&&(s.next=l),l&&(l.previous=s),u&&(u.next=n),o&&(o.previous=r),n.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=n.previous,this.lastChunk.next=null),n.previous=u,r.next=o||null,u||(this.firstChunk=n),o||(this.lastChunk=r),this}overwrite(t,e,i,n){return n=n||{},this.update(t,e,i,S(y({},n),{overwrite:!n.contentOnly}))}update(t,e,i,n){if(t=t+this.offset,e=e+this.offset,typeof i!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(e>this.original.length)throw new Error("end is out of bounds");if(t===e)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(t),this._split(e),n===!0&&(f.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),f.storeName=!0),n={storeName:!0});const r=n!==void 0?n.storeName:!1,s=n!==void 0?n.overwrite:!1;if(r){const u=this.original.slice(t,e);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}const l=this.byStart[t],o=this.byEnd[e];if(l){let u=l;for(;u!==o;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",!1)}l.edit(i,r,!s)}else{const u=new g(t,e,"").edit(i,r);o.next=u,u.previous=o}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byEnd[t];return i?i.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byStart[t];return i?i.prependRight(e):this.outro=e+this.outro,this}remove(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.intro="",i.outro="",i.edit(""),i=e>i.end?this.byStart[i.end]:null;return this}reset(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.reset(),i=e>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(d);if(t!==-1)return this.outro.substr(t+1);let e=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(t=i.outro.lastIndexOf(d),t!==-1)return i.outro.substr(t+1)+e;e=i.outro+e}if(i.content.length>0){if(t=i.content.lastIndexOf(d),t!==-1)return i.content.substr(t+1)+e;e=i.content+e}if(i.intro.length>0){if(t=i.intro.lastIndexOf(d),t!==-1)return i.intro.substr(t+1)+e;e=i.intro+e}}while(i=i.previous);return t=this.intro.lastIndexOf(d),t!==-1?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length-this.offset){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}let i="",n=this.firstChunk;for(;n&&(n.start>t||n.end<=t);){if(n.start<e&&n.end>=e)return i;n=n.next}if(n&&n.edited&&n.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);const r=n;for(;n;){n.intro&&(r!==n||n.start===t)&&(i+=n.intro);const s=n.start<e&&n.end>=e;if(s&&n.edited&&n.end!==e)throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);const l=r===n?t-n.start:0,o=s?n.content.length+e-n.end:n.content.length;if(i+=n.content.slice(l,o),n.outro&&(!s||n.end===e)&&(i+=n.outro),s)break;n=n.next}return i}snip(t,e){const i=this.clone();return i.remove(0,t),i.remove(e,i.original.length),i}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk;const i=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);e=i?this.byStart[e.end]:this.byEnd[e.start]}}_splitChunk(t,e){if(t.edited&&t.content.length){const n=k(this.original)(e);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`)}const i=t.split(e);return this.byEnd[e]=t,this.byStart[e]=i,this.byEnd[i.end]=i,t===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){const e=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let i=this.lastChunk;do{const n=i.end,r=i.trimEnd(e);if(i.end!==n&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.previous}while(i);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){const e=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let i=this.firstChunk;do{const n=i.end,r=i.trimStart(e);if(i.end!==n&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.next}while(i);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function i(r,s){return typeof e=="string"?e.replace(/\$(\$|&|\d+)/g,(l,o)=>o==="$"?"$":o==="&"?r[0]:+o<r.length?r[+o]:`$${o}`):e(...r,r.index,s,r.groups)}function n(r,s){let l;const o=[];for(;l=r.exec(s);)o.push(l);return o}if(t.global)n(t,this.original).forEach(s=>{if(s.index!=null){const l=i(s,this.original);l!==s[0]&&this.overwrite(s.index,s.index+s[0].length,l)}});else{const r=this.original.match(t);if(r&&r.index!=null){const s=i(r,this.original);s!==r[0]&&this.overwrite(r.index,r.index+r[0].length,s)}}return this}_replaceString(t,e){const{original:i}=this,n=i.indexOf(t);return n!==-1&&this.overwrite(n,n+t.length,e),this}replace(t,e){return typeof t=="string"?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){const{original:i}=this,n=t.length;for(let r=i.indexOf(t);r!==-1;r=i.indexOf(t,r+n))i.slice(r,r+n)!==e&&this.overwrite(r,r+n,e);return this}replaceAll(t,e){if(typeof t=="string")return this._replaceAllString(t,e);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}}exports.SourceMap=R;exports.default=m;
@@ -89,6 +89,7 @@ declare const _default: {
89
89
  clearTimeout: false;
90
90
  clientInformation: false;
91
91
  Clipboard: false;
92
+ ClipboardChangeEvent: false;
92
93
  ClipboardEvent: false;
93
94
  ClipboardItem: false;
94
95
  close: false;
@@ -111,6 +112,7 @@ declare const _default: {
111
112
  CookieStoreManager: false;
112
113
  CountQueuingStrategy: false;
113
114
  createImageBitmap: false;
115
+ CreateMonitor: false;
114
116
  Credential: false;
115
117
  credentialless: false;
116
118
  CredentialsContainer: false;
@@ -449,6 +451,7 @@ declare const _default: {
449
451
  InputDeviceCapabilities: false;
450
452
  InputDeviceInfo: false;
451
453
  InputEvent: false;
454
+ IntegrityViolationReportBody: false;
452
455
  IntersectionObserver: false;
453
456
  IntersectionObserverEntry: false;
454
457
  isSecureContext: false;
@@ -764,6 +767,7 @@ declare const _default: {
764
767
  PushSubscriptionOptions: false;
765
768
  queryLocalFonts: false;
766
769
  queueMicrotask: false;
770
+ QuotaExceededError: false;
767
771
  RadioNodeList: false;
768
772
  Range: false;
769
773
  ReadableByteStreamController: false;
@@ -887,6 +891,7 @@ declare const _default: {
887
891
  SubmitEvent: false;
888
892
  Subscriber: false;
889
893
  SubtleCrypto: false;
894
+ Summarizer: false;
890
895
  SuppressedError: false;
891
896
  SVGAElement: false;
892
897
  SVGAngle: false;
@@ -1017,6 +1022,7 @@ declare const _default: {
1017
1022
  TransformStream: false;
1018
1023
  TransformStreamDefaultController: false;
1019
1024
  TransitionEvent: false;
1025
+ Translator: false;
1020
1026
  TreeWalker: false;
1021
1027
  TrustedHTML: false;
1022
1028
  TrustedScript: false;
@@ -1048,6 +1054,8 @@ declare const _default: {
1048
1054
  VideoEncoder: false;
1049
1055
  VideoFrame: false;
1050
1056
  VideoPlaybackQuality: false;
1057
+ viewport: false;
1058
+ Viewport: false;
1051
1059
  ViewTimeline: false;
1052
1060
  ViewTransition: false;
1053
1061
  ViewTransitionTypeSet: false;
@@ -471,7 +471,7 @@ One of the following is possible:
471
471
  - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
472
472
  `;throw new Error(t)}return e}function f3(){const e=eu();return e==null?void 0:e.environment.name}function PT(){return typeof process!="undefined"&&!!process.send}function p3(e,t=!1){const r=[/\/vitest\/dist\//,/\/vite-node\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.forEach((n,a)=>{r.some(o=>o.test(a))||e.invalidateModule(n)})}function m3(){const{setTimeout:e}=Fr();return new Promise(t=>e(t,0))}function xT(){return me(this,null,function*(){yield m3();const e=eu(),t=[];let r=0;for(const n of e.moduleCache.values())n.promise&&!n.evaluated&&t.push(n.promise),n.resolving&&r++;!t.length&&!r||(yield Promise.allSettled(t),yield xT())})}var Xp=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function h3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const b3=44,nE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v3=new Uint8Array(64),TT=new Uint8Array(128);for(let e=0;e<nE.length;e++){const t=nE.charCodeAt(e);v3[e]=t,TT[t]=e}function wl(e,t){let r=0,n=0,a=0;do{const i=e.next();a=TT[i],r|=(a&31)<<n,n+=5}while(a&32);const o=r&1;return r>>>=1,o&&(r=-2147483648|-r),t+r}function aE(e,t){return e.pos>=t?!1:e.peek()!==b3}class y3{constructor(t){this.pos=0,this.buffer=t}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(t){const{buffer:r,pos:n}=this,a=r.indexOf(t,n);return a===-1?r.length:a}}function g3(e){const{length:t}=e,r=new y3(e),n=[];let a=0,o=0,i=0,s=0,u=0;do{const l=r.indexOf(";"),c=[];let f=!0,d=0;for(a=0;r.pos<l;){let m;a=wl(r,a),a<d&&(f=!1),d=a,aE(r,l)?(o=wl(r,o),i=wl(r,i),s=wl(r,s),aE(r,l)?(u=wl(r,u),m=[a,o,i,s,u]):m=[a,o,i,s]):m=[a],c.push(m),r.pos++}f||R3(c),n.push(c),r.pos=l+1}while(r.pos<=t);return n}function R3(e){e.sort(w3)}function w3(e,t){return e[0]-t[0]}const _3=/^[\w+.-]+:\/\//,q3=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,C3=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var Le;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"})(Le||(Le={}));function E3(e){return _3.test(e)}function P3(e){return e.startsWith("//")}function ST(e){return e.startsWith("/")}function x3(e){return e.startsWith("file:")}function oE(e){return/^[.?#]/.test(e)}function hu(e){const t=q3.exec(e);return $T(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function T3(e){const t=C3.exec(e),r=t[2];return $T("file:","",t[1]||"","",ST(r)?r:"/"+r,t[3]||"",t[4]||"")}function $T(e,t,r,n,a,o,i){return{scheme:e,user:t,host:r,port:n,path:a,query:o,hash:i,type:Le.Absolute}}function iE(e){if(P3(e)){const r=hu("http:"+e);return r.scheme="",r.type=Le.SchemeRelative,r}if(ST(e)){const r=hu("http://foo.com"+e);return r.scheme="",r.host="",r.type=Le.AbsolutePath,r}if(x3(e))return T3(e);if(E3(e))return hu(e);const t=hu("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?Le.Query:e.startsWith("#")?Le.Hash:Le.RelativePath:Le.Empty,t}function S3(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}function $3(e,t){OT(t,t.type),e.path==="/"?e.path=t.path:e.path=S3(t.path)+e.path}function OT(e,t){const r=t<=Le.RelativePath,n=e.path.split("/");let a=1,o=0,i=!1;for(let u=1;u<n.length;u++){const l=n[u];if(!l){i=!0;continue}if(i=!1,l!=="."){if(l===".."){o?(i=!0,o--,a--):r&&(n[a++]=l);continue}n[a++]=l,o++}}let s="";for(let u=1;u<a;u++)s+="/"+n[u];(!s||i&&!s.endsWith("/.."))&&(s+="/"),e.path=s}function O3(e,t){if(!e&&!t)return"";const r=iE(e);let n=r.type;if(t&&n!==Le.Absolute){const o=iE(t),i=o.type;switch(n){case Le.Empty:r.hash=o.hash;case Le.Hash:r.query=o.query;case Le.Query:case Le.RelativePath:$3(r,o);case Le.AbsolutePath:r.user=o.user,r.host=o.host,r.port=o.port;case Le.SchemeRelative:r.scheme=o.scheme}i>n&&(n=i)}OT(r,n);const a=r.query+r.hash;switch(n){case Le.Hash:case Le.Query:return a;case Le.RelativePath:{const o=r.path.slice(1);return o?oE(t||e)&&!oE(o)?"./"+o+a:o+a:a||"."}case Le.AbsolutePath:return r.path+a;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+a}}function sE(e,t){return t&&!t.endsWith("/")&&(t+="/"),O3(e,t)}function M3(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}const tr=0,A3=1,I3=2,N3=3,k3=4;function j3(e,t){const r=lE(e,0);if(r===e.length)return e;t||(e=e.slice());for(let n=r;n<e.length;n=lE(e,n+1))e[n]=L3(e[n],t);return e}function lE(e,t){for(let r=t;r<e.length;r++)if(!D3(e[r]))return r;return e.length}function D3(e){for(let t=1;t<e.length;t++)if(e[t][tr]<e[t-1][tr])return!1;return!0}function L3(e,t){return t||(e=e.slice()),e.sort(F3)}function F3(e,t){return e[tr]-t[tr]}let Ju=!1;function B3(e,t,r,n){for(;r<=n;){const a=r+(n-r>>1),o=e[a][tr]-t;if(o===0)return Ju=!0,a;o<0?r=a+1:n=a-1}return Ju=!1,r-1}function H3(e,t,r){for(let n=r+1;n<e.length&&e[n][tr]===t;r=n++);return r}function U3(e,t,r){for(let n=r-1;n>=0&&e[n][tr]===t;r=n--);return r}function V3(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function z3(e,t,r,n){const{lastKey:a,lastNeedle:o,lastIndex:i}=r;let s=0,u=e.length-1;if(n===a){if(t===o)return Ju=i!==-1&&e[i][tr]===t,i;t>=o?s=i===-1?0:i:u=i}return r.lastKey=n,r.lastNeedle=t,r.lastIndex=B3(e,t,s,u)}const W3="`line` must be greater than 0 (lines start at line 1)",G3="`column` must be greater than or equal to 0 (columns start at column 0)",uE=-1,J3=1;class K3{constructor(t,r){const n=typeof t=="string";if(!n&&t._decodedMemo)return t;const a=n?JSON.parse(t):t,{version:o,file:i,names:s,sourceRoot:u,sources:l,sourcesContent:c}=a;this.version=o,this.file=i,this.names=s||[],this.sourceRoot=u,this.sources=l,this.sourcesContent=c,this.ignoreList=a.ignoreList||a.x_google_ignoreList||void 0;const f=sE(u||"",M3(r));this.resolvedSources=l.map(m=>sE(m||"",f));const{mappings:d}=a;typeof d=="string"?(this._encoded=d,this._decoded=void 0):(this._encoded=void 0,this._decoded=j3(d,n)),this._decodedMemo=V3(),this._bySources=void 0,this._bySourceMemos=void 0}}function X3(e){var t;return(t=e)._decoded||(t._decoded=g3(e._encoded))}function Y3(e,t){let{line:r,column:n,bias:a}=t;if(r--,r<0)throw new Error(W3);if(n<0)throw new Error(G3);const o=X3(e);if(r>=o.length)return bu(null,null,null,null);const i=o[r],s=Q3(i,e._decodedMemo,r,n,a||J3);if(s===-1)return bu(null,null,null,null);const u=i[s];if(u.length===1)return bu(null,null,null,null);const{names:l,resolvedSources:c}=e;return bu(c[u[A3]],u[I3]+1,u[N3],u.length===5?l[u[k3]]:null)}function bu(e,t,r,n){return{source:e,line:t,column:r,name:n}}function Q3(e,t,r,n,a){let o=z3(e,n,t,r);return Ju?o=(a===uE?H3:U3)(e,n,o):a===uE&&o++,o===-1||o===e.length?-1:o}function MT(e){return e!=null}function Z3(e){return e===null||typeof e!="function"&&typeof e!="object"}function Pu(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function eV(e){let t=-1,r=null,n=0,a=0,o=null;for(;t<=e.length;){o=e[t],t++;const i=e[t];if((i==='"'||i==="'"||i==="`")&&o!=="\\"&&(r===i?r=null:r||(r=i)),r||(i==="("&&n++,i===")"&&a++),n&&a&&n===a)return t}return null}const AT=/^\s*at .*(?:\S:\d+|\(native\))/m,tV=/^(?:eval@)?(?:\[native code\])?$/,rV=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/vite-node/dist/","/vite-node/src/","/node_modules/chai/","/node_modules/tinypool/","/node_modules/tinyspy/","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function IT(e){if(!e.includes(":"))return[e];const r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!r)return[e];let n=r[1];if(n.startsWith("async ")&&(n=n.slice(6)),n.startsWith("http:")||n.startsWith("https:")){const a=new URL(n);a.searchParams.delete("import"),a.searchParams.delete("browserv"),n=a.pathname+a.hash+a.search}if(n.startsWith("/@fs/")){const a=/^\/@fs\/[a-zA-Z]:\//.test(n);n=n.slice(a?5:4)}return[n,r[2]||void 0,r[3]||void 0]}function nV(e){let t=e.trim();if(tV.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;const r=/((.*".+"[^@]*)?[^@]*)(@)/,n=t.match(r),a=n&&n[1]?n[1]:void 0,[o,i,s]=IT(t.replace(r,""));return!o||!i||!s?null:{file:o,method:a||"",line:Number.parseInt(i),column:Number.parseInt(s)}}function aV(e){let t=e.trim();if(!AT.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let r=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const n=r.match(/ (\(.+\)$)/);r=n?r.replace(n[0],""):r;const[a,o,i]=IT(n?n[1]:r);let s=n&&r||"",u=a&&["eval","<anonymous>"].includes(a)?void 0:a;return!u||!o||!i?null:(s.startsWith("async ")&&(s=s.slice(6)),u.startsWith("file://")&&(u=u.slice(7)),u=u.startsWith("node:")||u.startsWith("internal:")?u:AU(u),s&&(s=s.replace(/__vite_ssr_import_\d+__\./g,"")),{method:s,file:u,line:Number.parseInt(o),column:Number.parseInt(i)})}function Df(e,t={}){const{ignoreStackEntries:r=rV}=t;return(AT.test(e)?iV(e):oV(e)).map(a=>{var o;t.getUrlId&&(a.file=t.getUrlId(a.file));const i=(o=t.getSourceMap)===null||o===void 0?void 0:o.call(t,a.file);if(!i||typeof i!="object"||!i.version)return cE(r,a.file)?null:a;const s=new K3(i),{line:u,column:l,source:c,name:f}=Y3(s,a);let d=a.file;if(c){const m=a.file.startsWith("file://")?a.file:`file://${a.file}`,b=i.sourceRoot?new URL(i.sourceRoot,m):m;d=new URL(c,b).pathname,d.match(/\/\w:\//)&&(d=d.slice(1))}return cE(r,d)?null:u!=null&&l!=null?{line:u,column:l,file:d,method:f||a.method}:a}).filter(a=>a!=null)}function cE(e,t){return e.some(r=>t.match(r))}function oV(e){return e.split(`
473
473
  `).map(t=>nV(t)).filter(MT)}function iV(e){return e.split(`
474
- `).map(t=>aV(t)).filter(MT)}function sV(e,t={}){if(!e||Z3(e))return[];if(e.stacks)return e.stacks;const r=e.stack||"";let n=typeof r=="string"?Df(r,t):[];if(!n.length){const a=e;a.fileName!=null&&a.lineNumber!=null&&a.columnNumber!=null&&(n=Df(`${a.fileName}:${a.lineNumber}:${a.columnNumber}`,t)),a.sourceURL!=null&&a.line!=null&&a._column!=null&&(n=Df(`${a.sourceURL}:${a.line}:${a.column}`,t))}return t.frameFilter&&(n=n.filter(a=>t.frameFilter(e,a)!==!1)),e.stacks=n,n}let lV=()=>"Promise{…}";try{const{getPromiseDetails:e,kPending:t,kRejected:r}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(lV=(n,a)=>{const[o,i]=e(n);return o===t?"Promise{<pending>}":`Promise${o===r?"!":""}{${a.inspect(i,a)}}`})}catch(e){}function uV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lf,dE;function cV(){if(dE)return Lf;dE=1;var e,t,r,n,a,o,i,s,u,l,c,f,d,m,b,h,v,p,R;return d=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,f=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,b=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,c=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,h=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,R=/[\t\v\f\ufeff\p{Zs}]+/yu,s=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,m=/\/\/.*/y,r=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,n=/(['"])(?:(?!\1)[^])*(\1)?/y,a=/[^<>{}]+/y,p=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,v=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,o=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(s.source),Lf=function*(C,{jsx:q=!1}={}){var w,y,g,_,E,O,P,$,N,L,W,F,B,J;for({length:O}=C,_=0,E="",J=[{tag:"JS"}],w=[],W=0,F=!1;_<O;){switch($=J[J.length-1],$.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(C[_]==="/"&&(p.test(E)||o.test(E))&&(d.lastIndex=_,P=d.exec(C))){_=d.lastIndex,E=P[0],F=!0,yield{type:"RegularExpressionLiteral",value:P[0],closed:P[1]!==void 0&&P[1]!=="\\"};continue}if(f.lastIndex=_,P=f.exec(C)){switch(B=P[0],N=f.lastIndex,L=B,B){case"(":E==="?NonExpressionParenKeyword"&&J.push({tag:"JSNonExpressionParen",nesting:W}),W++,F=!1;break;case")":W--,F=!0,$.tag==="JSNonExpressionParen"&&W===$.nesting&&(J.pop(),L="?NonExpressionParenEnd",F=!1);break;case"{":f.lastIndex=0,g=!v.test(E)&&(p.test(E)||o.test(E)),w.push(g),F=!1;break;case"}":switch($.tag){case"InterpolationInTemplate":if(w.length===$.nesting){h.lastIndex=_,P=h.exec(C),_=h.lastIndex,E=P[0],P[1]==="${"?(E="?InterpolationInTemplate",F=!1,yield{type:"TemplateMiddle",value:P[0]}):(J.pop(),F=!0,yield{type:"TemplateTail",value:P[0],closed:P[1]==="`"});continue}break;case"InterpolationInJSX":if(w.length===$.nesting){J.pop(),_+=1,E="}",yield{type:"JSXPunctuator",value:"}"};continue}}F=w.pop(),L=F?"?ExpressionBraceEnd":"}";break;case"]":F=!0;break;case"++":case"--":L=F?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(q&&(p.test(E)||o.test(E))){J.push({tag:"JSXTag"}),_+=1,E="<",yield{type:"JSXPunctuator",value:B};continue}F=!1;break;default:F=!1}_=N,E=L,yield{type:"Punctuator",value:B};continue}if(e.lastIndex=_,P=e.exec(C)){switch(_=e.lastIndex,L=P[0],P[0]){case"for":case"if":case"while":case"with":E!=="."&&E!=="?."&&(L="?NonExpressionParenKeyword")}E=L,F=!o.test(P[0]),yield{type:P[1]==="#"?"PrivateIdentifier":"IdentifierName",value:P[0]};continue}if(b.lastIndex=_,P=b.exec(C)){_=b.lastIndex,E=P[0],F=!0,yield{type:"StringLiteral",value:P[0],closed:P[2]!==void 0};continue}if(c.lastIndex=_,P=c.exec(C)){_=c.lastIndex,E=P[0],F=!0,yield{type:"NumericLiteral",value:P[0]};continue}if(h.lastIndex=_,P=h.exec(C)){_=h.lastIndex,E=P[0],P[1]==="${"?(E="?InterpolationInTemplate",J.push({tag:"InterpolationInTemplate",nesting:w.length}),F=!1,yield{type:"TemplateHead",value:P[0]}):(F=!0,yield{type:"NoSubstitutionTemplate",value:P[0],closed:P[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(r.lastIndex=_,P=r.exec(C)){switch(_=r.lastIndex,L=P[0],P[0]){case"<":J.push({tag:"JSXTag"});break;case">":J.pop(),E==="/"||$.tag==="JSXTagEnd"?(L="?JSX",F=!0):J.push({tag:"JSXChildren"});break;case"{":J.push({tag:"InterpolationInJSX",nesting:w.length}),L="?InterpolationInJSX",F=!1;break;case"/":E==="<"&&(J.pop(),J[J.length-1].tag==="JSXChildren"&&J.pop(),J.push({tag:"JSXTagEnd"}))}E=L,yield{type:"JSXPunctuator",value:P[0]};continue}if(t.lastIndex=_,P=t.exec(C)){_=t.lastIndex,E=P[0],yield{type:"JSXIdentifier",value:P[0]};continue}if(n.lastIndex=_,P=n.exec(C)){_=n.lastIndex,E=P[0],yield{type:"JSXString",value:P[0],closed:P[2]!==void 0};continue}break;case"JSXChildren":if(a.lastIndex=_,P=a.exec(C)){_=a.lastIndex,E=P[0],yield{type:"JSXText",value:P[0]};continue}switch(C[_]){case"<":J.push({tag:"JSXTag"}),_++,E="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":J.push({tag:"InterpolationInJSX",nesting:w.length}),_++,E="?InterpolationInJSX",F=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(R.lastIndex=_,P=R.exec(C)){_=R.lastIndex,yield{type:"WhiteSpace",value:P[0]};continue}if(s.lastIndex=_,P=s.exec(C)){_=s.lastIndex,F=!1,i.test(E)&&(E="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:P[0]};continue}if(u.lastIndex=_,P=u.exec(C)){_=u.lastIndex,l.test(P[0])&&(F=!1,i.test(E)&&(E="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:P[0],closed:P[1]!==void 0};continue}if(m.lastIndex=_,P=m.exec(C)){_=m.lastIndex,F=!1,yield{type:"SingleLineComment",value:P[0]};continue}y=String.fromCodePoint(C.codePointAt(_)),_+=y.length,E=y,F=!1,yield{type:$.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:y}}},Lf}cV();var NT={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(NT.keyword);new Set(NT.strict);var dV={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},fV=Object.entries(dV);function vh(e){return String(e)}vh.open="";vh.close="";function pV(e=!1){let t=typeof process!="undefined"?process:void 0,r=(t==null?void 0:t.env)||{},n=(t==null?void 0:t.argv)||[];return!("NO_COLOR"in r||n.includes("--no-color"))&&("FORCE_COLOR"in r||n.includes("--color")||(t==null?void 0:t.platform)==="win32"||e&&r.TERM!=="dumb"||"CI"in r)||typeof window!="undefined"&&!!window.chrome}function mV(e=!1){let t=pV(e),r=(i,s,u,l)=>{let c="",f=0;do c+=i.substring(f,l)+u,f=l+s.length,l=i.indexOf(s,f);while(~l);return c+i.substring(f)},n=(i,s,u=i)=>{let l=c=>{let f=String(c),d=f.indexOf(s,i.length);return~d?i+r(f,s,u,d)+s:i+f+s};return l.open=i,l.close=s,l},a={isColorSupported:t},o=i=>`\x1B[${i}m`;for(let[i,s]of fV)a[i]=t?n(o(s[0]),o(s[1]),s[2]):vh;return a}mV();const yh=/\r?\n/;function hV(e,t,r){const n=e.split(yh),a=/\r\n/.test(e)?2:1;let o=0;if(t>n.length)return e.length;for(let i=0;i<t-1;i++)o+=n[i].length+a;return o+r}function bV(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const r=e.split(yh),n=/\r\n/.test(e)?2:1;let a=0,o=0;for(;o<r.length;o++){const i=r[o].length+n;if(a+i>=t)break;a+=i}return o+1}function vV(e,t){return me(this,null,function*(){const r=(yield Promise.resolve().then(()=>require("../../../magic-string.es-D_iPNVbJ.cjs"))).default,n=new Set(t.map(a=>a.file));yield Promise.all(Array.from(n).map(a=>me(null,null,function*(){const o=t.filter(l=>l.file===a),i=yield e.readSnapshotFile(a),s=new r(i);for(const l of o){const c=hV(i,l.line,l.column);qV(i,s,c,l.snapshot)}const u=s.toString();u!==i&&(yield e.saveSnapshotFile(a,u))})))})}const yV=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function gV(e,t,r,n){let a=e.slice(r);const o=yV.exec(a);if(!o)return!1;a=a.slice(o.index);let i=eV(a);if(i===null)return!1;i+=r+o.index;const s=r+o.index+o[0].length,u=RV(e,s),l=`, ${kT(n,e,r)}`;return u===i?t.appendLeft(i,l):t.overwrite(u,i,l),!0}function RV(e,t){let r=1,n=0;for(;r!==n&&t<e.length;){const a=e[t++];a==="{"?r++:a==="}"&&n++}return t}function kT(e,t,r){const n=bV(t,r),o=t.split(yh)[n-1].match(/^\s*/)[0]||"",i=o.includes(" ")?`${o} `:`${o} `,s=e.trim().replace(/\\/g,"\\\\").split(/\n/g),u=s.length<=1,l="`";return u?`${l}${s.join(`
474
+ `).map(t=>aV(t)).filter(MT)}function sV(e,t={}){if(!e||Z3(e))return[];if(e.stacks)return e.stacks;const r=e.stack||"";let n=typeof r=="string"?Df(r,t):[];if(!n.length){const a=e;a.fileName!=null&&a.lineNumber!=null&&a.columnNumber!=null&&(n=Df(`${a.fileName}:${a.lineNumber}:${a.columnNumber}`,t)),a.sourceURL!=null&&a.line!=null&&a._column!=null&&(n=Df(`${a.sourceURL}:${a.line}:${a.column}`,t))}return t.frameFilter&&(n=n.filter(a=>t.frameFilter(e,a)!==!1)),e.stacks=n,n}let lV=()=>"Promise{…}";try{const{getPromiseDetails:e,kPending:t,kRejected:r}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(lV=(n,a)=>{const[o,i]=e(n);return o===t?"Promise{<pending>}":`Promise${o===r?"!":""}{${a.inspect(i,a)}}`})}catch(e){}function uV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lf,dE;function cV(){if(dE)return Lf;dE=1;var e,t,r,n,a,o,i,s,u,l,c,f,d,m,b,h,v,p,R;return d=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,f=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,b=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,c=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,h=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,R=/[\t\v\f\ufeff\p{Zs}]+/yu,s=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,m=/\/\/.*/y,r=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,n=/(['"])(?:(?!\1)[^])*(\1)?/y,a=/[^<>{}]+/y,p=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,v=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,o=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(s.source),Lf=function*(C,{jsx:q=!1}={}){var w,y,g,_,E,O,P,$,N,L,W,F,B,J;for({length:O}=C,_=0,E="",J=[{tag:"JS"}],w=[],W=0,F=!1;_<O;){switch($=J[J.length-1],$.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(C[_]==="/"&&(p.test(E)||o.test(E))&&(d.lastIndex=_,P=d.exec(C))){_=d.lastIndex,E=P[0],F=!0,yield{type:"RegularExpressionLiteral",value:P[0],closed:P[1]!==void 0&&P[1]!=="\\"};continue}if(f.lastIndex=_,P=f.exec(C)){switch(B=P[0],N=f.lastIndex,L=B,B){case"(":E==="?NonExpressionParenKeyword"&&J.push({tag:"JSNonExpressionParen",nesting:W}),W++,F=!1;break;case")":W--,F=!0,$.tag==="JSNonExpressionParen"&&W===$.nesting&&(J.pop(),L="?NonExpressionParenEnd",F=!1);break;case"{":f.lastIndex=0,g=!v.test(E)&&(p.test(E)||o.test(E)),w.push(g),F=!1;break;case"}":switch($.tag){case"InterpolationInTemplate":if(w.length===$.nesting){h.lastIndex=_,P=h.exec(C),_=h.lastIndex,E=P[0],P[1]==="${"?(E="?InterpolationInTemplate",F=!1,yield{type:"TemplateMiddle",value:P[0]}):(J.pop(),F=!0,yield{type:"TemplateTail",value:P[0],closed:P[1]==="`"});continue}break;case"InterpolationInJSX":if(w.length===$.nesting){J.pop(),_+=1,E="}",yield{type:"JSXPunctuator",value:"}"};continue}}F=w.pop(),L=F?"?ExpressionBraceEnd":"}";break;case"]":F=!0;break;case"++":case"--":L=F?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(q&&(p.test(E)||o.test(E))){J.push({tag:"JSXTag"}),_+=1,E="<",yield{type:"JSXPunctuator",value:B};continue}F=!1;break;default:F=!1}_=N,E=L,yield{type:"Punctuator",value:B};continue}if(e.lastIndex=_,P=e.exec(C)){switch(_=e.lastIndex,L=P[0],P[0]){case"for":case"if":case"while":case"with":E!=="."&&E!=="?."&&(L="?NonExpressionParenKeyword")}E=L,F=!o.test(P[0]),yield{type:P[1]==="#"?"PrivateIdentifier":"IdentifierName",value:P[0]};continue}if(b.lastIndex=_,P=b.exec(C)){_=b.lastIndex,E=P[0],F=!0,yield{type:"StringLiteral",value:P[0],closed:P[2]!==void 0};continue}if(c.lastIndex=_,P=c.exec(C)){_=c.lastIndex,E=P[0],F=!0,yield{type:"NumericLiteral",value:P[0]};continue}if(h.lastIndex=_,P=h.exec(C)){_=h.lastIndex,E=P[0],P[1]==="${"?(E="?InterpolationInTemplate",J.push({tag:"InterpolationInTemplate",nesting:w.length}),F=!1,yield{type:"TemplateHead",value:P[0]}):(F=!0,yield{type:"NoSubstitutionTemplate",value:P[0],closed:P[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(r.lastIndex=_,P=r.exec(C)){switch(_=r.lastIndex,L=P[0],P[0]){case"<":J.push({tag:"JSXTag"});break;case">":J.pop(),E==="/"||$.tag==="JSXTagEnd"?(L="?JSX",F=!0):J.push({tag:"JSXChildren"});break;case"{":J.push({tag:"InterpolationInJSX",nesting:w.length}),L="?InterpolationInJSX",F=!1;break;case"/":E==="<"&&(J.pop(),J[J.length-1].tag==="JSXChildren"&&J.pop(),J.push({tag:"JSXTagEnd"}))}E=L,yield{type:"JSXPunctuator",value:P[0]};continue}if(t.lastIndex=_,P=t.exec(C)){_=t.lastIndex,E=P[0],yield{type:"JSXIdentifier",value:P[0]};continue}if(n.lastIndex=_,P=n.exec(C)){_=n.lastIndex,E=P[0],yield{type:"JSXString",value:P[0],closed:P[2]!==void 0};continue}break;case"JSXChildren":if(a.lastIndex=_,P=a.exec(C)){_=a.lastIndex,E=P[0],yield{type:"JSXText",value:P[0]};continue}switch(C[_]){case"<":J.push({tag:"JSXTag"}),_++,E="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":J.push({tag:"InterpolationInJSX",nesting:w.length}),_++,E="?InterpolationInJSX",F=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(R.lastIndex=_,P=R.exec(C)){_=R.lastIndex,yield{type:"WhiteSpace",value:P[0]};continue}if(s.lastIndex=_,P=s.exec(C)){_=s.lastIndex,F=!1,i.test(E)&&(E="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:P[0]};continue}if(u.lastIndex=_,P=u.exec(C)){_=u.lastIndex,l.test(P[0])&&(F=!1,i.test(E)&&(E="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:P[0],closed:P[1]!==void 0};continue}if(m.lastIndex=_,P=m.exec(C)){_=m.lastIndex,F=!1,yield{type:"SingleLineComment",value:P[0]};continue}y=String.fromCodePoint(C.codePointAt(_)),_+=y.length,E=y,F=!1,yield{type:$.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:y}}},Lf}cV();var NT={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(NT.keyword);new Set(NT.strict);var dV={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},fV=Object.entries(dV);function vh(e){return String(e)}vh.open="";vh.close="";function pV(e=!1){let t=typeof process!="undefined"?process:void 0,r=(t==null?void 0:t.env)||{},n=(t==null?void 0:t.argv)||[];return!("NO_COLOR"in r||n.includes("--no-color"))&&("FORCE_COLOR"in r||n.includes("--color")||(t==null?void 0:t.platform)==="win32"||e&&r.TERM!=="dumb"||"CI"in r)||typeof window!="undefined"&&!!window.chrome}function mV(e=!1){let t=pV(e),r=(i,s,u,l)=>{let c="",f=0;do c+=i.substring(f,l)+u,f=l+s.length,l=i.indexOf(s,f);while(~l);return c+i.substring(f)},n=(i,s,u=i)=>{let l=c=>{let f=String(c),d=f.indexOf(s,i.length);return~d?i+r(f,s,u,d)+s:i+f+s};return l.open=i,l.close=s,l},a={isColorSupported:t},o=i=>`\x1B[${i}m`;for(let[i,s]of fV)a[i]=t?n(o(s[0]),o(s[1]),s[2]):vh;return a}mV();const yh=/\r?\n/;function hV(e,t,r){const n=e.split(yh),a=/\r\n/.test(e)?2:1;let o=0;if(t>n.length)return e.length;for(let i=0;i<t-1;i++)o+=n[i].length+a;return o+r}function bV(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const r=e.split(yh),n=/\r\n/.test(e)?2:1;let a=0,o=0;for(;o<r.length;o++){const i=r[o].length+n;if(a+i>=t)break;a+=i}return o+1}function vV(e,t){return me(this,null,function*(){const r=(yield Promise.resolve().then(()=>require("../../../magic-string.es-CjWtD8Pa.cjs"))).default,n=new Set(t.map(a=>a.file));yield Promise.all(Array.from(n).map(a=>me(null,null,function*(){const o=t.filter(l=>l.file===a),i=yield e.readSnapshotFile(a),s=new r(i);for(const l of o){const c=hV(i,l.line,l.column);qV(i,s,c,l.snapshot)}const u=s.toString();u!==i&&(yield e.saveSnapshotFile(a,u))})))})}const yV=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function gV(e,t,r,n){let a=e.slice(r);const o=yV.exec(a);if(!o)return!1;a=a.slice(o.index);let i=eV(a);if(i===null)return!1;i+=r+o.index;const s=r+o.index+o[0].length,u=RV(e,s),l=`, ${kT(n,e,r)}`;return u===i?t.appendLeft(i,l):t.overwrite(u,i,l),!0}function RV(e,t){let r=1,n=0;for(;r!==n&&t<e.length;){const a=e[t++];a==="{"?r++:a==="}"&&n++}return t}function kT(e,t,r){const n=bV(t,r),o=t.split(yh)[n-1].match(/^\s*/)[0]||"",i=o.includes(" ")?`${o} `:`${o} `,s=e.trim().replace(/\\/g,"\\\\").split(/\n/g),u=s.length<=1,l="`";return u?`${l}${s.join(`
475
475
  `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${l}`:`${l}
476
476
  ${s.map(c=>c?i+c:"").join(`
477
477
  `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
@@ -29146,7 +29146,7 @@ One of the following is possible:
29146
29146
  }
29147
29147
  function vV(e, t) {
29148
29148
  return me(this, null, function* () {
29149
- const r = (yield import("../../../magic-string.es-cELbkQ5L.js")).default, n = new Set(t.map((o) => o.file));
29149
+ const r = (yield import("../../../magic-string.es-C6Zk6wMx.js")).default, n = new Set(t.map((o) => o.file));
29150
29150
  yield Promise.all(Array.from(n).map((o) => me(null, null, function* () {
29151
29151
  const a = t.filter((l) => l.file === o), i = yield e.readSnapshotFile(o), s = new r(i);
29152
29152
  for (const l of a) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var s=(t,i,n)=>new Promise((a,g)=>{var w=o=>{try{l(n.next(o))}catch(p){g(p)}},h=o=>{try{l(n.throw(o))}catch(p){g(p)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(w,h);l((n=n.apply(t,i)).next())});const m=require("node:process"),q=require("yargs/helpers"),k=require("yargs/yargs"),e=require("../../../path.constant-CWtb99gS.cjs"),r=require("../fs/fs.util.cjs"),u=require("../../../log.type-CMvG6Box.cjs"),c=require("../log/log.util.cjs");require("../path/path.util.cjs");const C="@cyberskill/shared",v="module",E="1.203.0",S="CyberSkill Shared",_="Stephen Cheng",b="MIT",I="https://github.com/cyberskill-world/shared#readme",L={type:"git",url:"git+https://github.com/cyberskill-world/shared.git"},T={url:"https://github.com/cyberskill-world/shared/issues"},M={"./config":{types:"./dist/src/config/index.d.ts",import:"./dist/src/config/index.js",require:"./dist/src/config/index.cjs"},"./config/commitlint":{types:"./dist/src/config/commitlint/index.d.ts",import:"./dist/src/config/commitlint/index.js",require:"./dist/src/config/commitlint/index.cjs"},"./config/env":{types:"./dist/src/config/env/index.d.ts",import:"./dist/src/config/env/index.js",require:"./dist/src/config/env/index.cjs"},"./config/eslint":{types:"./dist/src/config/eslint/index.d.ts",import:"./dist/src/config/eslint/index.js",require:"./dist/src/config/eslint/index.cjs"},"./config/graphql-codegen":{types:"./dist/src/config/graphql-codegen/index.d.ts",import:"./dist/src/config/graphql-codegen/index.js",require:"./dist/src/config/graphql-codegen/index.cjs"},"./config/lint-staged":{types:"./dist/src/config/lint-staged/index.d.ts",import:"./dist/src/config/lint-staged/index.js",require:"./dist/src/config/lint-staged/index.cjs"},"./config/vitest":{types:"./dist/src/config/vitest/index.d.ts",import:"./dist/src/config/vitest/index.js",require:"./dist/src/config/vitest/index.cjs"},"./constant":{types:"./dist/src/constant/index.d.ts",import:"./dist/src/constant/index.js",require:"./dist/src/constant/index.cjs"},"./node/apollo-server":{types:"./dist/src/node/apollo-server/index.d.ts",import:"./dist/src/node/apollo-server/index.js",require:"./dist/src/node/apollo-server/index.cjs"},"./node/cli":{types:"./dist/src/node/cli/index.d.ts",import:"./dist/src/node/cli/index.js",require:"./dist/src/node/cli/index.cjs"},"./node/command":{types:"./dist/src/node/command/index.d.ts",import:"./dist/src/node/command/index.js",require:"./dist/src/node/command/index.cjs"},"./node/express":{types:"./dist/src/node/express/index.d.ts",import:"./dist/src/node/express/index.js",require:"./dist/src/node/express/index.cjs"},"./node/fs":{types:"./dist/src/node/fs/index.d.ts",import:"./dist/src/node/fs/index.js",require:"./dist/src/node/fs/index.cjs"},"./node/log":{types:"./dist/src/node/log/index.d.ts",import:"./dist/src/node/log/index.js",require:"./dist/src/node/log/index.cjs"},"./node/mongo":{types:"./dist/src/node/mongo/index.d.ts",import:"./dist/src/node/mongo/index.js",require:"./dist/src/node/mongo/index.cjs"},"./node/package":{types:"./dist/src/node/package/index.d.ts",import:"./dist/src/node/package/index.js",require:"./dist/src/node/package/index.cjs"},"./node/path":{types:"./dist/src/node/path/index.d.ts",import:"./dist/src/node/path/index.js",require:"./dist/src/node/path/index.cjs"},"./node/storage":{types:"./dist/src/node/storage/index.d.ts",import:"./dist/src/node/storage/index.js",require:"./dist/src/node/storage/index.cjs"},"./node/upload":{types:"./dist/src/node/upload/index.d.ts",import:"./dist/src/node/upload/index.js",require:"./dist/src/node/upload/index.cjs"},"./node/ws":{types:"./dist/src/node/ws/index.d.ts",import:"./dist/src/node/ws/index.js",require:"./dist/src/node/ws/index.cjs"},"./react/apollo-client":{types:"./dist/src/react/apollo-client/index.d.ts",import:"./dist/src/react/apollo-client/index.js",require:"./dist/src/react/apollo-client/index.cjs"},"./react/apollo-client-nextjs":{types:"./dist/src/react/apollo-client-nextjs/index.d.ts",import:"./dist/src/react/apollo-client-nextjs/index.js",require:"./dist/src/react/apollo-client-nextjs/index.cjs"},"./react/apollo-client-nextjs/rsc":{types:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts",import:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js",require:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs"},"./react/apollo-error":{types:"./dist/src/react/apollo-error/index.d.ts",import:"./dist/src/react/apollo-error/index.js",require:"./dist/src/react/apollo-error/index.cjs"},"./react/i18next":{types:"./dist/src/react/i18next/index.d.ts",import:"./dist/src/react/i18next/index.js",require:"./dist/src/react/i18next/index.cjs"},"./react/loading":{types:"./dist/src/react/loading/index.d.ts",import:"./dist/src/react/loading/index.js",require:"./dist/src/react/loading/index.cjs"},"./react/log":{types:"./dist/src/react/log/index.d.ts",import:"./dist/src/react/log/index.js",require:"./dist/src/react/log/index.cjs"},"./react/next-intl":{types:"./dist/src/react/next-intl/index.d.ts",import:"./dist/src/react/next-intl/index.js",require:"./dist/src/react/next-intl/index.cjs"},"./react/storage":{types:"./dist/src/react/storage/index.d.ts",import:"./dist/src/react/storage/index.js",require:"./dist/src/react/storage/index.cjs"},"./react/toast":{types:"./dist/src/react/toast/index.d.ts",import:"./dist/src/react/toast/index.js",require:"./dist/src/react/toast/index.cjs"},"./react/userback":{types:"./dist/src/react/userback/index.d.ts",import:"./dist/src/react/userback/index.js",require:"./dist/src/react/userback/index.cjs"},"./typescript":{types:"./dist/src/typescript/index.d.ts",import:"./dist/src/typescript/index.js",require:"./dist/src/typescript/index.cjs"},"./util":{types:"./dist/src/util/index.d.ts",import:"./dist/src/util/index.js",require:"./dist/src/util/index.cjs"},"./style.css":{import:"./dist/style.css",require:"./dist/style.css"}},P={cyberskill:"dist/src/node/cli/index.js"},A=["dist","public"],O={build:"vite build",commitlint:"tsx src/node/cli/index.ts commitlint",dev:"vite build --watch",inspect:"tsx src/node/cli/index.ts inspect",lint:"tsx src/node/cli/index.ts lint","lint:fix":"tsx src/node/cli/index.ts lint:fix","lint:inspect":"tsx src/node/cli/index.ts lint:inspect",ready:"tsx src/node/cli/index.ts ready",reset:"tsx src/node/cli/index.ts reset","test:e2e":"tsx src/node/cli/index.ts test:e2e","test:unit":"tsx src/node/cli/index.ts test:unit"},G={"@antfu/eslint-config":"4.16.1","@apollo/client":"3.13.8","@apollo/client-integration-nextjs":"0.12.2","@apollo/server":"4.12.2","@dotenvx/dotenvx":"1.45.1","@eddeee888/gcg-typescript-resolver-files":"0.12.1","@eslint-react/eslint-plugin":"1.52.2","@graphql-codegen/cli":"5.0.7","@graphql-codegen/client-preset":"4.8.3","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@userback/widget":"0.3.11","@vitejs/plugin-react-swc":"3.10.2","body-parser":"2.2.0",chalk:"5.4.1",clsx:"2.1.1",compression:"1.8.0",consola:"3.4.2","cookie-parser":"1.4.7",cors:"2.8.5","crypto-js":"4.2.0","date-fns":"4.1.0",envalid:"8.0.0","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.20",express:"4.21.2","express-session":"1.18.1","express-useragent":"1.0.15","fs-extra":"11.3.0",globals:"16.2.0",graphql:"16.11.0","graphql-upload":"17.0.0","graphql-ws":"6.0.5",i18next:"25.3.0",jsdom:"26.1.0",localforage:"1.10.0","migrate-mongo":"12.1.3",mongodb:"6.17.0",mongoose:"8.16.1","mongoose-aggregate-paginate-v2":"1.1.4","mongoose-paginate-v2":"1.9.1","next-intl":"4.3.1","node-fetch":"3.3.2","node-persist":"4.0.4",qs:"6.14.0",react:"19.1.0","react-dom":"19.1.0","react-hot-toast":"2.5.2","react-i18next":"15.5.3",slugify:"1.6.6",unorm:"1.6.0",uuid:"11.1.0",vite:"7.0.0",ws:"8.18.3",yargs:"18.0.0"},R={"@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@eslint/config-inspector":"1.1.0","@microsoft/api-extractor":"7.52.8","@next/eslint-plugin-next":"15.3.4","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.0","@types/body-parser":"1.19.6","@types/compression":"1.8.1","@types/cookie-parser":"1.4.9","@types/cors":"2.8.19","@types/crypto-js":"4.2.2","@types/express":"4.17.21","@types/express-session":"1.18.2","@types/express-useragent":"1.0.5","@types/fs-extra":"11.0.4","@types/graphql-upload":"17.0.0","@types/migrate-mongo":"10.0.5","@types/node":"24.0.8","@types/node-persist":"3.1.8","@types/react":"19.1.8","@types/react-dom":"19.1.6","@types/unorm":"1.3.31","@types/uuid":"10.0.0","@types/ws":"8.18.1","@types/yargs":"17.0.33","@vitest/browser":"3.2.4",eslint:"9.30.0","eslint-config-next":"15.3.4",glob:"11.0.3","lint-staged":"16.1.2","node-modules-inspector":"1.0.0",sass:"1.89.2","simple-git-hooks":"2.13.0",tsx:"4.20.3",typescript:"5.8.3",vite:"7.0.0","vite-plugin-dts":"4.5.4",vitest:"3.2.4"},H={access:"public",registry:"https://registry.npmjs.org/"},N={name:C,type:v,version:E,description:S,author:_,license:b,homepage:I,repository:L,bugs:T,exports:M,bin:P,files:A,scripts:O,dependencies:G,devDependencies:R,publishConfig:H};function y(){return s(this,null,function*(){r.pathExistsSync(e.PATH.TS_CONFIG)?yield e.runCommand("Performing TypeScript validation",yield e.command.typescriptCheck()):c.log.warn("No TypeScript configuration found. Skipping type check.")})}function f(t=!1){return s(this,null,function*(){t?yield e.runCommand("Running ESLint with auto-fix",yield e.command.eslintFix()):yield e.runCommand("Running ESLint check",yield e.command.eslintCheck())})}function x(t,i){if(!i.length)return;const n=t==="Errors"?"red":"yellow";c.log.printBoxedLog(t==="Errors"?"✖ Errors":"⚠ Warnings",i,n)}function d(){return s(this,null,function*(){setTimeout(()=>s(null,null,function*(){const t=yield e.getStoredErrorLists(),i=t.filter(a=>a.type===u.E_IssueType.Error),n=t.filter(a=>a.type===u.E_IssueType.Warning);!i.length&&!n.length?c.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(x("Warnings",n),x("Errors",i),(i.length>0||n.length>0)&&m.exit(1))}),0)})}function D(){return s(this,null,function*(){yield e.clearAllErrorLists();const t=yield e.getPackage({name:e.CYBERSKILL_PACKAGE_NAME});if(!t.success){c.log.error("Failed to retrieve package information. Aborting lint-staged.");return}t.result.isCurrentProject&&(yield e.runCommand(`Building package: ${e.CYBERSKILL_PACKAGE_NAME}`,yield e.command.build())),yield e.runCommand("Executing lint-staged",yield e.command.lintStaged()),d()})}function B(){return s(this,null,function*(){yield e.runCommand("Inspecting ESLint configuration",yield e.command.eslintInspect())})}function F(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f()]),d()})}function K(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f(!0)]),d()})}function U(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield e.runCommand("Validating commit message",yield e.command.commitLint()),d()})}function j(){return s(this,null,function*(){yield e.runCommand("Configuring Git hooks",yield e.command.configureGitHook()),r.removeSync(e.PATH.GIT_HOOK);const t=yield e.resolveCommands(e.createGitHooksConfig);r.writeFileSync(e.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(t,null,4));const i=`
2
+ "use strict";var s=(t,i,n)=>new Promise((a,g)=>{var w=o=>{try{l(n.next(o))}catch(p){g(p)}},h=o=>{try{l(n.throw(o))}catch(p){g(p)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(w,h);l((n=n.apply(t,i)).next())});const m=require("node:process"),q=require("yargs/helpers"),k=require("yargs/yargs"),e=require("../../../path.constant-CWtb99gS.cjs"),r=require("../fs/fs.util.cjs"),u=require("../../../log.type-CMvG6Box.cjs"),c=require("../log/log.util.cjs");require("../path/path.util.cjs");const C="@cyberskill/shared",v="module",E="1.204.0",S="CyberSkill Shared",_="Stephen Cheng",b="MIT",I="https://github.com/cyberskill-world/shared#readme",L={type:"git",url:"git+https://github.com/cyberskill-world/shared.git"},T={url:"https://github.com/cyberskill-world/shared/issues"},M={"./config":{types:"./dist/src/config/index.d.ts",import:"./dist/src/config/index.js",require:"./dist/src/config/index.cjs"},"./config/commitlint":{types:"./dist/src/config/commitlint/index.d.ts",import:"./dist/src/config/commitlint/index.js",require:"./dist/src/config/commitlint/index.cjs"},"./config/env":{types:"./dist/src/config/env/index.d.ts",import:"./dist/src/config/env/index.js",require:"./dist/src/config/env/index.cjs"},"./config/eslint":{types:"./dist/src/config/eslint/index.d.ts",import:"./dist/src/config/eslint/index.js",require:"./dist/src/config/eslint/index.cjs"},"./config/graphql-codegen":{types:"./dist/src/config/graphql-codegen/index.d.ts",import:"./dist/src/config/graphql-codegen/index.js",require:"./dist/src/config/graphql-codegen/index.cjs"},"./config/lint-staged":{types:"./dist/src/config/lint-staged/index.d.ts",import:"./dist/src/config/lint-staged/index.js",require:"./dist/src/config/lint-staged/index.cjs"},"./config/vitest":{types:"./dist/src/config/vitest/index.d.ts",import:"./dist/src/config/vitest/index.js",require:"./dist/src/config/vitest/index.cjs"},"./constant":{types:"./dist/src/constant/index.d.ts",import:"./dist/src/constant/index.js",require:"./dist/src/constant/index.cjs"},"./node/apollo-server":{types:"./dist/src/node/apollo-server/index.d.ts",import:"./dist/src/node/apollo-server/index.js",require:"./dist/src/node/apollo-server/index.cjs"},"./node/cli":{types:"./dist/src/node/cli/index.d.ts",import:"./dist/src/node/cli/index.js",require:"./dist/src/node/cli/index.cjs"},"./node/command":{types:"./dist/src/node/command/index.d.ts",import:"./dist/src/node/command/index.js",require:"./dist/src/node/command/index.cjs"},"./node/express":{types:"./dist/src/node/express/index.d.ts",import:"./dist/src/node/express/index.js",require:"./dist/src/node/express/index.cjs"},"./node/fs":{types:"./dist/src/node/fs/index.d.ts",import:"./dist/src/node/fs/index.js",require:"./dist/src/node/fs/index.cjs"},"./node/log":{types:"./dist/src/node/log/index.d.ts",import:"./dist/src/node/log/index.js",require:"./dist/src/node/log/index.cjs"},"./node/mongo":{types:"./dist/src/node/mongo/index.d.ts",import:"./dist/src/node/mongo/index.js",require:"./dist/src/node/mongo/index.cjs"},"./node/package":{types:"./dist/src/node/package/index.d.ts",import:"./dist/src/node/package/index.js",require:"./dist/src/node/package/index.cjs"},"./node/path":{types:"./dist/src/node/path/index.d.ts",import:"./dist/src/node/path/index.js",require:"./dist/src/node/path/index.cjs"},"./node/storage":{types:"./dist/src/node/storage/index.d.ts",import:"./dist/src/node/storage/index.js",require:"./dist/src/node/storage/index.cjs"},"./node/upload":{types:"./dist/src/node/upload/index.d.ts",import:"./dist/src/node/upload/index.js",require:"./dist/src/node/upload/index.cjs"},"./node/ws":{types:"./dist/src/node/ws/index.d.ts",import:"./dist/src/node/ws/index.js",require:"./dist/src/node/ws/index.cjs"},"./react/apollo-client":{types:"./dist/src/react/apollo-client/index.d.ts",import:"./dist/src/react/apollo-client/index.js",require:"./dist/src/react/apollo-client/index.cjs"},"./react/apollo-client-nextjs":{types:"./dist/src/react/apollo-client-nextjs/index.d.ts",import:"./dist/src/react/apollo-client-nextjs/index.js",require:"./dist/src/react/apollo-client-nextjs/index.cjs"},"./react/apollo-client-nextjs/rsc":{types:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts",import:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js",require:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs"},"./react/apollo-error":{types:"./dist/src/react/apollo-error/index.d.ts",import:"./dist/src/react/apollo-error/index.js",require:"./dist/src/react/apollo-error/index.cjs"},"./react/i18next":{types:"./dist/src/react/i18next/index.d.ts",import:"./dist/src/react/i18next/index.js",require:"./dist/src/react/i18next/index.cjs"},"./react/loading":{types:"./dist/src/react/loading/index.d.ts",import:"./dist/src/react/loading/index.js",require:"./dist/src/react/loading/index.cjs"},"./react/log":{types:"./dist/src/react/log/index.d.ts",import:"./dist/src/react/log/index.js",require:"./dist/src/react/log/index.cjs"},"./react/next-intl":{types:"./dist/src/react/next-intl/index.d.ts",import:"./dist/src/react/next-intl/index.js",require:"./dist/src/react/next-intl/index.cjs"},"./react/storage":{types:"./dist/src/react/storage/index.d.ts",import:"./dist/src/react/storage/index.js",require:"./dist/src/react/storage/index.cjs"},"./react/toast":{types:"./dist/src/react/toast/index.d.ts",import:"./dist/src/react/toast/index.js",require:"./dist/src/react/toast/index.cjs"},"./react/userback":{types:"./dist/src/react/userback/index.d.ts",import:"./dist/src/react/userback/index.js",require:"./dist/src/react/userback/index.cjs"},"./typescript":{types:"./dist/src/typescript/index.d.ts",import:"./dist/src/typescript/index.js",require:"./dist/src/typescript/index.cjs"},"./util":{types:"./dist/src/util/index.d.ts",import:"./dist/src/util/index.js",require:"./dist/src/util/index.cjs"},"./style.css":{import:"./dist/style.css",require:"./dist/style.css"}},P={cyberskill:"dist/src/node/cli/index.js"},A=["dist","public"],O={build:"vite build",commitlint:"tsx src/node/cli/index.ts commitlint",dev:"vite build --watch",inspect:"tsx src/node/cli/index.ts inspect",lint:"tsx src/node/cli/index.ts lint","lint:fix":"tsx src/node/cli/index.ts lint:fix","lint:inspect":"tsx src/node/cli/index.ts lint:inspect",ready:"tsx src/node/cli/index.ts ready",reset:"tsx src/node/cli/index.ts reset","test:e2e":"tsx src/node/cli/index.ts test:e2e","test:unit":"tsx src/node/cli/index.ts test:unit"},G={"@antfu/eslint-config":"4.16.2","@apollo/client":"3.13.8","@apollo/client-integration-nextjs":"0.12.2","@apollo/server":"4.12.2","@dotenvx/dotenvx":"1.45.2","@eddeee888/gcg-typescript-resolver-files":"0.12.1","@eslint-react/eslint-plugin":"1.52.2","@graphql-codegen/cli":"5.0.7","@graphql-codegen/client-preset":"4.8.3","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@userback/widget":"0.3.11","@vitejs/plugin-react-swc":"3.10.2","body-parser":"2.2.0",chalk:"5.4.1",clsx:"2.1.1",compression:"1.8.0",consola:"3.4.2","cookie-parser":"1.4.7",cors:"2.8.5","crypto-js":"4.2.0","date-fns":"4.1.0",envalid:"8.0.0","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.20",express:"4.21.2","express-session":"1.18.1","express-useragent":"1.0.15","fs-extra":"11.3.0",globals:"16.3.0",graphql:"16.11.0","graphql-upload":"17.0.0","graphql-ws":"6.0.5",i18next:"25.3.0",jsdom:"26.1.0",localforage:"1.10.0","migrate-mongo":"12.1.3",mongodb:"6.17.0",mongoose:"8.16.1","mongoose-aggregate-paginate-v2":"1.1.4","mongoose-paginate-v2":"1.9.1","next-intl":"4.3.4","node-fetch":"3.3.2","node-persist":"4.0.4",qs:"6.14.0",react:"19.1.0","react-dom":"19.1.0","react-hot-toast":"2.5.2","react-i18next":"15.5.3",slugify:"1.6.6",unorm:"1.6.0",uuid:"11.1.0",vite:"7.0.0",ws:"8.18.3",yargs:"18.0.0"},R={"@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@eslint/config-inspector":"1.1.0","@microsoft/api-extractor":"7.52.8","@next/eslint-plugin-next":"15.3.4","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.0","@types/body-parser":"1.19.6","@types/compression":"1.8.1","@types/cookie-parser":"1.4.9","@types/cors":"2.8.19","@types/crypto-js":"4.2.2","@types/express":"4.17.21","@types/express-session":"1.18.2","@types/express-useragent":"1.0.5","@types/fs-extra":"11.0.4","@types/graphql-upload":"17.0.0","@types/migrate-mongo":"10.0.5","@types/node":"24.0.10","@types/node-persist":"3.1.8","@types/react":"19.1.8","@types/react-dom":"19.1.6","@types/unorm":"1.3.31","@types/uuid":"10.0.0","@types/ws":"8.18.1","@types/yargs":"17.0.33","@vitest/browser":"3.2.4",eslint:"9.30.1","eslint-config-next":"15.3.4",glob:"11.0.3","lint-staged":"16.1.2","node-modules-inspector":"1.0.0",sass:"1.89.2","simple-git-hooks":"2.13.0",tsx:"4.20.3",typescript:"5.8.3",vite:"7.0.0","vite-plugin-dts":"4.5.4",vitest:"3.2.4"},H={access:"public",registry:"https://registry.npmjs.org/"},N={name:C,type:v,version:E,description:S,author:_,license:b,homepage:I,repository:L,bugs:T,exports:M,bin:P,files:A,scripts:O,dependencies:G,devDependencies:R,publishConfig:H};function y(){return s(this,null,function*(){r.pathExistsSync(e.PATH.TS_CONFIG)?yield e.runCommand("Performing TypeScript validation",yield e.command.typescriptCheck()):c.log.warn("No TypeScript configuration found. Skipping type check.")})}function f(t=!1){return s(this,null,function*(){t?yield e.runCommand("Running ESLint with auto-fix",yield e.command.eslintFix()):yield e.runCommand("Running ESLint check",yield e.command.eslintCheck())})}function x(t,i){if(!i.length)return;const n=t==="Errors"?"red":"yellow";c.log.printBoxedLog(t==="Errors"?"✖ Errors":"⚠ Warnings",i,n)}function d(){return s(this,null,function*(){setTimeout(()=>s(null,null,function*(){const t=yield e.getStoredErrorLists(),i=t.filter(a=>a.type===u.E_IssueType.Error),n=t.filter(a=>a.type===u.E_IssueType.Warning);!i.length&&!n.length?c.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(x("Warnings",n),x("Errors",i),(i.length>0||n.length>0)&&m.exit(1))}),0)})}function D(){return s(this,null,function*(){yield e.clearAllErrorLists();const t=yield e.getPackage({name:e.CYBERSKILL_PACKAGE_NAME});if(!t.success){c.log.error("Failed to retrieve package information. Aborting lint-staged.");return}t.result.isCurrentProject&&(yield e.runCommand(`Building package: ${e.CYBERSKILL_PACKAGE_NAME}`,yield e.command.build())),yield e.runCommand("Executing lint-staged",yield e.command.lintStaged()),d()})}function B(){return s(this,null,function*(){yield e.runCommand("Inspecting ESLint configuration",yield e.command.eslintInspect())})}function F(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f()]),d()})}function K(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f(!0)]),d()})}function U(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield e.runCommand("Validating commit message",yield e.command.commitLint()),d()})}function j(){return s(this,null,function*(){yield e.runCommand("Configuring Git hooks",yield e.command.configureGitHook()),r.removeSync(e.PATH.GIT_HOOK);const t=yield e.resolveCommands(e.createGitHooksConfig);r.writeFileSync(e.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(t,null,4));const i=`
3
3
  ${e.SIMPLE_GIT_HOOK_JSON}
4
4
  `;r.pathExistsSync(e.PATH.GIT_IGNORE)?r.readFileSync(e.PATH.GIT_IGNORE,"utf-8").split(`
5
5
  `).includes(e.SIMPLE_GIT_HOOK_JSON)||r.appendFileSync(e.PATH.GIT_IGNORE,i):r.writeFileSync(e.PATH.GIT_IGNORE,i),yield e.runCommand("Setting up simple-git-hooks",yield e.command.simpleGitHooks())})}function J(){return s(this,null,function*(){yield e.installDependencies(),yield j()})}function Y(){return s(this,null,function*(){r.removeSync(e.PATH.NODE_MODULES,e.PATH.PNPM_LOCK_YAML),yield e.runCommand("Pruning pnpm store",yield e.command.pnpmPruneStore()),yield e.runCommand("Clearing pnpm cache",yield e.command.pnpmCleanCache()),yield e.installDependencies(),yield j()})}function $(){return s(this,null,function*(){yield e.runCommand("Inspecting project dependencies",yield e.command.nodeModulesInspect())})}function V(){return s(this,null,function*(){yield e.runCommand("Running unit tests",yield e.command.testUnit())})}function W(){return s(this,null,function*(){yield e.runCommand("Running end-to-end tests",yield e.command.testE2e())})}function z(t){return s(this,null,function*(){yield e.runCommand("Creating MongoDB migration",yield e.command.mongoMigrateCreate(t))})}function Q(){return s(this,null,function*(){yield e.runCommand("Running MongoDB migrations",yield e.command.mongoMigrateUp())})}function X(){return s(this,null,function*(){yield e.runCommand("Rolling back MongoDB migration",yield e.command.mongoMigrateDown())})}s(null,null,function*(){try{yield k(q.hideBin(m.argv)).scriptName(e.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",F).command("lint:fix","Fix linting issues automatically",K).command("lint:inspect","View active ESLint configuration",B).command("lint-staged","Run lint checks on staged files",D).command("commitlint","Validate commit message format",U).command("ready","Initialize project and dependencies",J).command("reset","Reset the project and reinstall dependencies",Y).command("inspect","Analyze installed project dependencies",$).command("test:unit","Run unit test suite",V).command("test:e2e","Run end-to-end test suite",W).command("mongo:migrate:create <name>","Create a MongoDB migration",t=>t.positional("name",{describe:"Migration name",type:"string"}),t=>s(null,null,function*(){if(!t.name){c.log.error("Migration name is required.");return}yield z(t.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",Q).command("mongo:migrate:down","Rollback last MongoDB migration",X).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(N.version).epilog(`💡 Tip: Use "--help" with any command to see options
@@ -25,7 +25,7 @@ import { E as h } from "../../../log.type-DTOvZHyz.js";
25
25
  import { log as d, catchError as F } from "../log/log.util.js";
26
26
  import "../path/path.util.js";
27
27
  var fe = L((u) => {
28
- const A = "@cyberskill/shared", H = "module", U = "1.203.0", K = "CyberSkill Shared", Y = "Stephen Cheng", J = "MIT", V = "https://github.com/cyberskill-world/shared#readme", W = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, $ = { url: "https://github.com/cyberskill-world/shared/issues" }, z = { "./config": { types: "./dist/src/config/index.d.ts", import: "./dist/src/config/index.js", require: "./dist/src/config/index.cjs" }, "./config/commitlint": { types: "./dist/src/config/commitlint/index.d.ts", import: "./dist/src/config/commitlint/index.js", require: "./dist/src/config/commitlint/index.cjs" }, "./config/env": { types: "./dist/src/config/env/index.d.ts", import: "./dist/src/config/env/index.js", require: "./dist/src/config/env/index.cjs" }, "./config/eslint": { types: "./dist/src/config/eslint/index.d.ts", import: "./dist/src/config/eslint/index.js", require: "./dist/src/config/eslint/index.cjs" }, "./config/graphql-codegen": { types: "./dist/src/config/graphql-codegen/index.d.ts", import: "./dist/src/config/graphql-codegen/index.js", require: "./dist/src/config/graphql-codegen/index.cjs" }, "./config/lint-staged": { types: "./dist/src/config/lint-staged/index.d.ts", import: "./dist/src/config/lint-staged/index.js", require: "./dist/src/config/lint-staged/index.cjs" }, "./config/vitest": { types: "./dist/src/config/vitest/index.d.ts", import: "./dist/src/config/vitest/index.js", require: "./dist/src/config/vitest/index.cjs" }, "./constant": { types: "./dist/src/constant/index.d.ts", import: "./dist/src/constant/index.js", require: "./dist/src/constant/index.cjs" }, "./node/apollo-server": { types: "./dist/src/node/apollo-server/index.d.ts", import: "./dist/src/node/apollo-server/index.js", require: "./dist/src/node/apollo-server/index.cjs" }, "./node/cli": { types: "./dist/src/node/cli/index.d.ts", import: "./dist/src/node/cli/index.js", require: "./dist/src/node/cli/index.cjs" }, "./node/command": { types: "./dist/src/node/command/index.d.ts", import: "./dist/src/node/command/index.js", require: "./dist/src/node/command/index.cjs" }, "./node/express": { types: "./dist/src/node/express/index.d.ts", import: "./dist/src/node/express/index.js", require: "./dist/src/node/express/index.cjs" }, "./node/fs": { types: "./dist/src/node/fs/index.d.ts", import: "./dist/src/node/fs/index.js", require: "./dist/src/node/fs/index.cjs" }, "./node/log": { types: "./dist/src/node/log/index.d.ts", import: "./dist/src/node/log/index.js", require: "./dist/src/node/log/index.cjs" }, "./node/mongo": { types: "./dist/src/node/mongo/index.d.ts", import: "./dist/src/node/mongo/index.js", require: "./dist/src/node/mongo/index.cjs" }, "./node/package": { types: "./dist/src/node/package/index.d.ts", import: "./dist/src/node/package/index.js", require: "./dist/src/node/package/index.cjs" }, "./node/path": { types: "./dist/src/node/path/index.d.ts", import: "./dist/src/node/path/index.js", require: "./dist/src/node/path/index.cjs" }, "./node/storage": { types: "./dist/src/node/storage/index.d.ts", import: "./dist/src/node/storage/index.js", require: "./dist/src/node/storage/index.cjs" }, "./node/upload": { types: "./dist/src/node/upload/index.d.ts", import: "./dist/src/node/upload/index.js", require: "./dist/src/node/upload/index.cjs" }, "./node/ws": { types: "./dist/src/node/ws/index.d.ts", import: "./dist/src/node/ws/index.js", require: "./dist/src/node/ws/index.cjs" }, "./react/apollo-client": { types: "./dist/src/react/apollo-client/index.d.ts", import: "./dist/src/react/apollo-client/index.js", require: "./dist/src/react/apollo-client/index.cjs" }, "./react/apollo-client-nextjs": { types: "./dist/src/react/apollo-client-nextjs/index.d.ts", import: "./dist/src/react/apollo-client-nextjs/index.js", require: "./dist/src/react/apollo-client-nextjs/index.cjs" }, "./react/apollo-client-nextjs/rsc": { types: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts", import: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js", require: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs" }, "./react/apollo-error": { types: "./dist/src/react/apollo-error/index.d.ts", import: "./dist/src/react/apollo-error/index.js", require: "./dist/src/react/apollo-error/index.cjs" }, "./react/i18next": { types: "./dist/src/react/i18next/index.d.ts", import: "./dist/src/react/i18next/index.js", require: "./dist/src/react/i18next/index.cjs" }, "./react/loading": { types: "./dist/src/react/loading/index.d.ts", import: "./dist/src/react/loading/index.js", require: "./dist/src/react/loading/index.cjs" }, "./react/log": { types: "./dist/src/react/log/index.d.ts", import: "./dist/src/react/log/index.js", require: "./dist/src/react/log/index.cjs" }, "./react/next-intl": { types: "./dist/src/react/next-intl/index.d.ts", import: "./dist/src/react/next-intl/index.js", require: "./dist/src/react/next-intl/index.cjs" }, "./react/storage": { types: "./dist/src/react/storage/index.d.ts", import: "./dist/src/react/storage/index.js", require: "./dist/src/react/storage/index.cjs" }, "./react/toast": { types: "./dist/src/react/toast/index.d.ts", import: "./dist/src/react/toast/index.js", require: "./dist/src/react/toast/index.cjs" }, "./react/userback": { types: "./dist/src/react/userback/index.d.ts", import: "./dist/src/react/userback/index.js", require: "./dist/src/react/userback/index.cjs" }, "./typescript": { types: "./dist/src/typescript/index.d.ts", import: "./dist/src/typescript/index.js", require: "./dist/src/typescript/index.cjs" }, "./util": { types: "./dist/src/util/index.d.ts", import: "./dist/src/util/index.js", require: "./dist/src/util/index.cjs" }, "./style.css": { import: "./dist/style.css", require: "./dist/style.css" } }, Z = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["dist", "public"], X = { build: "vite build", commitlint: "tsx src/node/cli/index.ts commitlint", dev: "vite build --watch", inspect: "tsx src/node/cli/index.ts inspect", lint: "tsx src/node/cli/index.ts lint", "lint:fix": "tsx src/node/cli/index.ts lint:fix", "lint:inspect": "tsx src/node/cli/index.ts lint:inspect", ready: "tsx src/node/cli/index.ts ready", reset: "tsx src/node/cli/index.ts reset", "test:e2e": "tsx src/node/cli/index.ts test:e2e", "test:unit": "tsx src/node/cli/index.ts test:unit" }, ee = { "@antfu/eslint-config": "4.16.1", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.1", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@eslint-react/eslint-plugin": "1.52.2", "@graphql-codegen/cli": "5.0.7", "@graphql-codegen/client-preset": "4.8.3", "@nestjs/common": "11.1.3", "@nestjs/core": "11.1.3", "@userback/widget": "0.3.11", "@vitejs/plugin-react-swc": "3.10.2", "body-parser": "2.2.0", chalk: "5.4.1", clsx: "2.1.1", compression: "1.8.0", consola: "3.4.2", "cookie-parser": "1.4.7", cors: "2.8.5", "crypto-js": "4.2.0", "date-fns": "4.1.0", envalid: "8.0.0", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.2.0", graphql: "16.11.0", "graphql-upload": "17.0.0", "graphql-ws": "6.0.5", i18next: "25.3.0", jsdom: "26.1.0", localforage: "1.10.0", "migrate-mongo": "12.1.3", mongodb: "6.17.0", mongoose: "8.16.1", "mongoose-aggregate-paginate-v2": "1.1.4", "mongoose-paginate-v2": "1.9.1", "next-intl": "4.3.1", "node-fetch": "3.3.2", "node-persist": "4.0.4", qs: "6.14.0", react: "19.1.0", "react-dom": "19.1.0", "react-hot-toast": "2.5.2", "react-i18next": "15.5.3", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.0", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.4", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.0", "@types/body-parser": "1.19.6", "@types/compression": "1.8.1", "@types/cookie-parser": "1.4.9", "@types/cors": "2.8.19", "@types/crypto-js": "4.2.2", "@types/express": "4.17.21", "@types/express-session": "1.18.2", "@types/express-useragent": "1.0.5", "@types/fs-extra": "11.0.4", "@types/graphql-upload": "17.0.0", "@types/migrate-mongo": "10.0.5", "@types/node": "24.0.8", "@types/node-persist": "3.1.8", "@types/react": "19.1.8", "@types/react-dom": "19.1.6", "@types/unorm": "1.3.31", "@types/uuid": "10.0.0", "@types/ws": "8.18.1", "@types/yargs": "17.0.33", "@vitest/browser": "3.2.4", eslint: "9.30.0", "eslint-config-next": "15.3.4", glob: "11.0.3", "lint-staged": "16.1.2", "node-modules-inspector": "1.0.0", sass: "1.89.2", "simple-git-hooks": "2.13.0", tsx: "4.20.3", typescript: "5.8.3", vite: "7.0.0", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
28
+ const A = "@cyberskill/shared", H = "module", U = "1.204.0", K = "CyberSkill Shared", Y = "Stephen Cheng", J = "MIT", V = "https://github.com/cyberskill-world/shared#readme", W = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, $ = { url: "https://github.com/cyberskill-world/shared/issues" }, z = { "./config": { types: "./dist/src/config/index.d.ts", import: "./dist/src/config/index.js", require: "./dist/src/config/index.cjs" }, "./config/commitlint": { types: "./dist/src/config/commitlint/index.d.ts", import: "./dist/src/config/commitlint/index.js", require: "./dist/src/config/commitlint/index.cjs" }, "./config/env": { types: "./dist/src/config/env/index.d.ts", import: "./dist/src/config/env/index.js", require: "./dist/src/config/env/index.cjs" }, "./config/eslint": { types: "./dist/src/config/eslint/index.d.ts", import: "./dist/src/config/eslint/index.js", require: "./dist/src/config/eslint/index.cjs" }, "./config/graphql-codegen": { types: "./dist/src/config/graphql-codegen/index.d.ts", import: "./dist/src/config/graphql-codegen/index.js", require: "./dist/src/config/graphql-codegen/index.cjs" }, "./config/lint-staged": { types: "./dist/src/config/lint-staged/index.d.ts", import: "./dist/src/config/lint-staged/index.js", require: "./dist/src/config/lint-staged/index.cjs" }, "./config/vitest": { types: "./dist/src/config/vitest/index.d.ts", import: "./dist/src/config/vitest/index.js", require: "./dist/src/config/vitest/index.cjs" }, "./constant": { types: "./dist/src/constant/index.d.ts", import: "./dist/src/constant/index.js", require: "./dist/src/constant/index.cjs" }, "./node/apollo-server": { types: "./dist/src/node/apollo-server/index.d.ts", import: "./dist/src/node/apollo-server/index.js", require: "./dist/src/node/apollo-server/index.cjs" }, "./node/cli": { types: "./dist/src/node/cli/index.d.ts", import: "./dist/src/node/cli/index.js", require: "./dist/src/node/cli/index.cjs" }, "./node/command": { types: "./dist/src/node/command/index.d.ts", import: "./dist/src/node/command/index.js", require: "./dist/src/node/command/index.cjs" }, "./node/express": { types: "./dist/src/node/express/index.d.ts", import: "./dist/src/node/express/index.js", require: "./dist/src/node/express/index.cjs" }, "./node/fs": { types: "./dist/src/node/fs/index.d.ts", import: "./dist/src/node/fs/index.js", require: "./dist/src/node/fs/index.cjs" }, "./node/log": { types: "./dist/src/node/log/index.d.ts", import: "./dist/src/node/log/index.js", require: "./dist/src/node/log/index.cjs" }, "./node/mongo": { types: "./dist/src/node/mongo/index.d.ts", import: "./dist/src/node/mongo/index.js", require: "./dist/src/node/mongo/index.cjs" }, "./node/package": { types: "./dist/src/node/package/index.d.ts", import: "./dist/src/node/package/index.js", require: "./dist/src/node/package/index.cjs" }, "./node/path": { types: "./dist/src/node/path/index.d.ts", import: "./dist/src/node/path/index.js", require: "./dist/src/node/path/index.cjs" }, "./node/storage": { types: "./dist/src/node/storage/index.d.ts", import: "./dist/src/node/storage/index.js", require: "./dist/src/node/storage/index.cjs" }, "./node/upload": { types: "./dist/src/node/upload/index.d.ts", import: "./dist/src/node/upload/index.js", require: "./dist/src/node/upload/index.cjs" }, "./node/ws": { types: "./dist/src/node/ws/index.d.ts", import: "./dist/src/node/ws/index.js", require: "./dist/src/node/ws/index.cjs" }, "./react/apollo-client": { types: "./dist/src/react/apollo-client/index.d.ts", import: "./dist/src/react/apollo-client/index.js", require: "./dist/src/react/apollo-client/index.cjs" }, "./react/apollo-client-nextjs": { types: "./dist/src/react/apollo-client-nextjs/index.d.ts", import: "./dist/src/react/apollo-client-nextjs/index.js", require: "./dist/src/react/apollo-client-nextjs/index.cjs" }, "./react/apollo-client-nextjs/rsc": { types: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts", import: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js", require: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs" }, "./react/apollo-error": { types: "./dist/src/react/apollo-error/index.d.ts", import: "./dist/src/react/apollo-error/index.js", require: "./dist/src/react/apollo-error/index.cjs" }, "./react/i18next": { types: "./dist/src/react/i18next/index.d.ts", import: "./dist/src/react/i18next/index.js", require: "./dist/src/react/i18next/index.cjs" }, "./react/loading": { types: "./dist/src/react/loading/index.d.ts", import: "./dist/src/react/loading/index.js", require: "./dist/src/react/loading/index.cjs" }, "./react/log": { types: "./dist/src/react/log/index.d.ts", import: "./dist/src/react/log/index.js", require: "./dist/src/react/log/index.cjs" }, "./react/next-intl": { types: "./dist/src/react/next-intl/index.d.ts", import: "./dist/src/react/next-intl/index.js", require: "./dist/src/react/next-intl/index.cjs" }, "./react/storage": { types: "./dist/src/react/storage/index.d.ts", import: "./dist/src/react/storage/index.js", require: "./dist/src/react/storage/index.cjs" }, "./react/toast": { types: "./dist/src/react/toast/index.d.ts", import: "./dist/src/react/toast/index.js", require: "./dist/src/react/toast/index.cjs" }, "./react/userback": { types: "./dist/src/react/userback/index.d.ts", import: "./dist/src/react/userback/index.js", require: "./dist/src/react/userback/index.cjs" }, "./typescript": { types: "./dist/src/typescript/index.d.ts", import: "./dist/src/typescript/index.js", require: "./dist/src/typescript/index.cjs" }, "./util": { types: "./dist/src/util/index.d.ts", import: "./dist/src/util/index.js", require: "./dist/src/util/index.cjs" }, "./style.css": { import: "./dist/style.css", require: "./dist/style.css" } }, Z = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["dist", "public"], X = { build: "vite build", commitlint: "tsx src/node/cli/index.ts commitlint", dev: "vite build --watch", inspect: "tsx src/node/cli/index.ts inspect", lint: "tsx src/node/cli/index.ts lint", "lint:fix": "tsx src/node/cli/index.ts lint:fix", "lint:inspect": "tsx src/node/cli/index.ts lint:inspect", ready: "tsx src/node/cli/index.ts ready", reset: "tsx src/node/cli/index.ts reset", "test:e2e": "tsx src/node/cli/index.ts test:e2e", "test:unit": "tsx src/node/cli/index.ts test:unit" }, ee = { "@antfu/eslint-config": "4.16.2", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.2", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@eslint-react/eslint-plugin": "1.52.2", "@graphql-codegen/cli": "5.0.7", "@graphql-codegen/client-preset": "4.8.3", "@nestjs/common": "11.1.3", "@nestjs/core": "11.1.3", "@userback/widget": "0.3.11", "@vitejs/plugin-react-swc": "3.10.2", "body-parser": "2.2.0", chalk: "5.4.1", clsx: "2.1.1", compression: "1.8.0", consola: "3.4.2", "cookie-parser": "1.4.7", cors: "2.8.5", "crypto-js": "4.2.0", "date-fns": "4.1.0", envalid: "8.0.0", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.3.0", graphql: "16.11.0", "graphql-upload": "17.0.0", "graphql-ws": "6.0.5", i18next: "25.3.0", jsdom: "26.1.0", localforage: "1.10.0", "migrate-mongo": "12.1.3", mongodb: "6.17.0", mongoose: "8.16.1", "mongoose-aggregate-paginate-v2": "1.1.4", "mongoose-paginate-v2": "1.9.1", "next-intl": "4.3.4", "node-fetch": "3.3.2", "node-persist": "4.0.4", qs: "6.14.0", react: "19.1.0", "react-dom": "19.1.0", "react-hot-toast": "2.5.2", "react-i18next": "15.5.3", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.0", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.4", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.0", "@types/body-parser": "1.19.6", "@types/compression": "1.8.1", "@types/cookie-parser": "1.4.9", "@types/cors": "2.8.19", "@types/crypto-js": "4.2.2", "@types/express": "4.17.21", "@types/express-session": "1.18.2", "@types/express-useragent": "1.0.5", "@types/fs-extra": "11.0.4", "@types/graphql-upload": "17.0.0", "@types/migrate-mongo": "10.0.5", "@types/node": "24.0.10", "@types/node-persist": "3.1.8", "@types/react": "19.1.8", "@types/react-dom": "19.1.6", "@types/unorm": "1.3.31", "@types/uuid": "10.0.0", "@types/ws": "8.18.1", "@types/yargs": "17.0.33", "@vitest/browser": "3.2.4", eslint: "9.30.1", "eslint-config-next": "15.3.4", glob: "11.0.3", "lint-staged": "16.1.2", "node-modules-inspector": "1.0.0", sass: "1.89.2", "simple-git-hooks": "2.13.0", tsx: "4.20.3", typescript: "5.8.3", vite: "7.0.0", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
29
29
  name: A,
30
30
  type: H,
31
31
  version: U,
@@ -1,5 +1,5 @@
1
- "use strict";var M=Object.defineProperty,x=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var R=(c,t,e)=>t in c?M(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e,g=(c,t)=>{for(var e in t||(t={}))b.call(t,e)&&R(c,e,t[e]);if(T)for(var e of T(t))I.call(t,e)&&R(c,e,t[e]);return c},S=(c,t)=>x(c,C(t));var p=(c,t,e)=>R(c,typeof t!="symbol"?t+"":t,e);var a=(c,t,e)=>new Promise((r,s)=>{var n=l=>{try{i(e.next(l))}catch(m){s(m)}},u=l=>{try{i(e.throw(l))}catch(m){s(m)}},i=l=>l.done?r(l.value):Promise.resolve(l.value).then(n,u);i((e=e.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("date-fns"),F=require("migrate-mongo"),G=require("mongoose"),D=require("mongoose-aggregate-paginate-v2"),A=require("mongoose-paginate-v2"),w=require("uuid"),d=require("../../constant/response-status.cjs"),U=require("../../util/common/common.util.cjs"),f=require("../../util/object/object.util.cjs"),O=require("../../util/string/string.util.cjs"),j=require("../../util/validate/validate.util.cjs"),E=require("../fs/fs.util.cjs"),o=require("../log/log.util.cjs"),y=require("../../../path.constant-CWtb99gS.cjs");require("../path/path.util.cjs");const h={getDateTime(c=new Date){return P.format(c,"yyyy-MM-dd HH:mm:ss.SSS")},createGenericFields({returnDateAs:c="string"}={}){const t=c==="string"?h.getDateTime():new Date;return{id:w.v4(),isDel:!1,createdAt:t,updatedAt:t}},applyPlugins(c,t){t.filter(e=>typeof e=="function").forEach(e=>c.plugin(e))},applyMiddlewares(c,t){t.forEach(({method:e,pre:r,post:s})=>{e&&r&&c.pre(e,r),e&&s&&c.post(e,s)})},createGenericSchema(c){return new c.Schema({id:{type:String,default:w.v4,unique:!0},isDel:{type:Boolean,default:!1}},{timestamps:!0})},createSchema({mongoose:c,schema:t,virtuals:e=[],standalone:r=!1}){const s=new c.Schema(t);return e.forEach(({name:n,options:u,get:i})=>{const l=s.virtual(n,u);i&&l.get(i)}),r||s.add(h.createGenericSchema(c)),s},createModel({mongoose:c,name:t,schema:e,pagination:r=!1,aggregate:s=!1,virtuals:n=[],middlewares:u=[]}){if(!t)throw new Error("Model name is required.");if(c.models[t])return c.models[t];const i=h.createSchema({mongoose:c,schema:e,virtuals:n});return h.applyPlugins(i,[r&&A,s&&D]),h.applyMiddlewares(i,u),c.model(t,i)},validator:{isRequired(){return function(c){return a(this,null,function*(){return!j.validate.isEmpty(c)})}},isUnique(c){return function(t){return a(this,null,function*(){if(!Array.isArray(c)||c.length===0)throw new Error("Fields must be a non-empty array of strings.");const e={$or:c.map(s=>({[s]:t}))};return!(yield this.constructor.exists(e))})}},matchesRegex(c){return function(t){return a(this,null,function*(){if(!Array.isArray(c)||c.some(e=>!(e instanceof RegExp)))throw new Error("regexArray must be an array of valid RegExp objects.");return c.every(e=>e.test(t))})}}},migrate:S(g({},F),{setConfig:c=>{const t=`// This file is automatically generated by the Cyberskill CLI.
2
- module.exports = ${JSON.stringify(c,null,4)}`;E.writeFileSync(y.PATH.MIGRATE_MONGO_CONFIG,t);const e=`
3
- ${y.MIGRATE_MONGO_CONFIG}
4
- `;E.pathExistsSync(y.PATH.GIT_IGNORE)?E.readFileSync(y.PATH.GIT_IGNORE,"utf-8").split(`
5
- `).includes(y.MIGRATE_MONGO_CONFIG)||E.appendFileSync(y.PATH.GIT_IGNORE,e):E.writeFileSync(y.PATH.GIT_IGNORE,e)}}),regexify(c,t){if(!c)return{};let e=f.deepClone(c);if(!t||t.length===0)return e;for(const r of t){const s=r.toString().split("."),n=f.getNestedValue(e,s);if(typeof n=="string"&&n.length>0){const u={$regex:`.*${U.regexSearchMapper(n)}.*`,$options:"i"};e=f.setNestedValue(e,s,u)}}return e}};class ${constructor(t,e){p(this,"collection");this.collection=t.collection(e)}createOne(t){return a(this,null,function*(){try{const e=g(g({},h.createGenericFields()),t);return(yield this.collection.insertOne(e)).acknowledged?{success:!0,message:"Document created successfully",result:e}:{success:!1,message:"Document creation failed",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}catch(e){return o.catchError(e)}})}createMany(t){return a(this,null,function*(){try{const e=t.map(s=>g(g({},h.createGenericFields()),s)),r=yield this.collection.insertMany(e);return r.insertedCount===0?{success:!1,message:"No documents were inserted",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:`${r.insertedCount} documents created successfully`,result:e}}catch(e){return o.catchError(e)}})}findOne(t){return a(this,null,function*(){try{const e=yield this.collection.findOne(t);return e?{success:!0,message:"Document found",result:e}:{success:!1,message:"Document not found",code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(e){return o.catchError(e)}})}findAll(){return a(this,arguments,function*(t={}){try{return{success:!0,message:"Documents retrieved successfully",result:yield this.collection.find(t).toArray()}}catch(e){return o.catchError(e)}})}count(){return a(this,arguments,function*(t={}){try{return{success:!0,message:"Count retrieved successfully",result:yield this.collection.countDocuments(t)}}catch(e){return o.catchError(e)}})}updateOne(t,e){return a(this,null,function*(){try{const r=yield this.collection.updateOne(t,{$set:e});return r.matchedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document updated successfully",result:r}}catch(r){return o.catchError(r)}})}updateMany(t,e){return a(this,null,function*(){try{const r=yield this.collection.updateMany(t,{$set:e});return r.matchedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents updated successfully",result:r}}catch(r){return o.catchError(r)}})}deleteOne(t){return a(this,null,function*(){try{const e=yield this.collection.deleteOne(t);return e.deletedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document deleted successfully",result:e}}catch(e){return o.catchError(e)}})}deleteMany(t){return a(this,null,function*(){try{const e=yield this.collection.deleteMany(t);return e.deletedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents deleted successfully",result:e}}catch(e){return o.catchError(e)}})}}class v{constructor(t){this.model=t}getModelName(){return this.model.modelName}findOne(){return a(this,arguments,function*(t={},e={},r={},s){try{const n=this.model.findOne(t,e,r);s&&n.populate(s);const u=yield n.exec();return u?{success:!0,result:u}:{success:!1,message:`No ${this.getModelName()} found.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(n){return o.catchError(n)}})}findAll(){return a(this,arguments,function*(t={},e={},r={},s){try{const n=this.model.find(t,e,r);return s&&n.populate(s),{success:!0,result:yield n.exec()}}catch(n){return o.catchError(n)}})}findPaging(){return a(this,arguments,function*(t={},e={}){try{return{success:!0,result:yield this.model.paginate(t,e)}}catch(r){return o.catchError(r)}})}findPagingAggregate(r){return a(this,arguments,function*(t,e={}){try{return{success:!0,result:yield this.model.aggregatePaginate(this.model.aggregate(t),e)}}catch(s){return o.catchError(s)}})}count(){return a(this,arguments,function*(t={}){try{return{success:!0,result:yield this.model.countDocuments(t)}}catch(e){return o.catchError(e)}})}createOne(t){return a(this,null,function*(){try{return{success:!0,result:yield this.model.create(t)}}catch(e){return o.catchError(e)}})}createMany(r){return a(this,arguments,function*(t,e={}){try{return{success:!0,result:(yield this.model.insertMany(t,e)).map(u=>u instanceof G.Document?u.toObject():null).filter(u=>u!==null)}}catch(s){return o.catchError(s)}})}updateOne(){return a(this,arguments,function*(t={},e={},r={}){try{const s=yield this.model.findOneAndUpdate(t,e,g({new:!0},r)).exec();return s?{success:!0,result:s}:{success:!1,message:`Failed to update ${this.getModelName()}.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(s){return o.catchError(s)}})}updateMany(){return a(this,arguments,function*(t={},e={},r={}){try{return{success:!0,result:yield this.model.updateMany(t,e,r).exec()}}catch(s){return o.catchError(s)}})}deleteOne(){return a(this,arguments,function*(t={},e={}){try{const r=yield this.model.findOneAndDelete(t,e).exec();return r?{success:!0,result:r}:{success:!1,message:`No ${this.getModelName()} found to delete.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(r){return o.catchError(r)}})}deleteMany(){return a(this,arguments,function*(t={},e={}){try{const r=yield this.model.deleteMany(t,e).exec();return r.deletedCount===0?{success:!1,message:"No documents found to delete.",code:d.RESPONSE_STATUS.NOT_FOUND.CODE}:{success:!0,result:r}}catch(r){return o.catchError(r)}})}createShortId(t,e=4){return a(this,null,function*(){try{const s=new Set;for(let n=0;n<10;n++){const u=O.generateShortId(t,n+e);if(!s.has(u)&&(s.add(u),!(yield this.model.exists({shortId:u}))))return{success:!0,result:u}}return{success:!1,message:"Failed to create a unique shortId",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}catch(r){return o.catchError(r)}})}createSlugQuery({slug:t,field:e,isObject:r,filter:s}){const n=g({},s!=null?s:{});return r?S(g({},n),{$or:[{[`slug.${e}`]:t},{slugHistory:{$elemMatch:{[`slug.${e}`]:t}}}]}):S(g({},n),{$or:[{slug:t},{slugHistory:t}]})}createUniqueSlug(n){return a(this,arguments,function*({slug:t,field:e,isObject:r,filter:s}){const u=O.generateSlug(t);let i=u,l=1;for(;yield this.model.exists(this.createSlugQuery({slug:i,field:e,isObject:r,filter:s}));)i=`${u}-${l++}`;return i})}createSlug(s){return a(this,arguments,function*({field:t,from:e,filter:r}){try{const n=e[t];return f.isObject(n)?{success:!0,result:Object.fromEntries(yield Promise.all(Object.entries(n).map(q=>a(this,[q],function*([m,_]){const N=yield this.createUniqueSlug({slug:_,field:m,isObject:!0,filter:r});return[m,N]}))))}:{success:!0,result:yield this.createUniqueSlug({slug:n,field:t,isObject:!1,filter:r})}}catch(n){return o.catchError(n)}})}checkSlug(n){return a(this,arguments,function*({slug:t,field:e,from:r,filter:s}){try{const u=r[e];if(f.isObject(u)){for(const _ of Object.values(u)){const q=O.generateSlug(_);if(yield this.model.exists(this.createSlugQuery({slug:q,field:e,isObject:!0,filter:s})))return{success:!0,result:!0}}return{success:!0,result:!1}}const l=O.generateSlug(t);return{success:!0,result:(yield this.model.exists(this.createSlugQuery({slug:l,field:e,isObject:!1,filter:s})))!==null}}catch(u){return o.catchError(u)}})}aggregate(t){return a(this,null,function*(){try{return{success:!0,result:yield this.model.aggregate(t)}}catch(e){return o.catchError(e)}})}}exports.aggregatePaginate=D;exports.mongoosePaginate=A;exports.MongoController=$;exports.MongooseController=v;exports.mongo=h;
1
+ "use strict";var x=Object.defineProperty,C=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var R=(c,t,e)=>t in c?x(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e,g=(c,t)=>{for(var e in t||(t={}))b.call(t,e)&&R(c,e,t[e]);if(p)for(var e of p(t))I.call(t,e)&&R(c,e,t[e]);return c},S=(c,t)=>C(c,M(t));var T=(c,t,e)=>R(c,typeof t!="symbol"?t+"":t,e);var a=(c,t,e)=>new Promise((r,s)=>{var n=l=>{try{i(e.next(l))}catch(h){s(h)}},u=l=>{try{i(e.throw(l))}catch(h){s(h)}},i=l=>l.done?r(l.value):Promise.resolve(l.value).then(n,u);i((e=e.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("migrate-mongo"),G=require("mongoose"),D=require("mongoose-aggregate-paginate-v2"),A=require("mongoose-paginate-v2"),w=require("uuid"),d=require("../../constant/response-status.cjs"),U=require("../../util/common/common.util.cjs"),f=require("../../util/object/object.util.cjs"),O=require("../../util/string/string.util.cjs"),j=require("../../util/validate/validate.util.cjs"),E=require("../fs/fs.util.cjs"),o=require("../log/log.util.cjs"),m=require("../../../path.constant-CWtb99gS.cjs");require("../path/path.util.cjs");const y={createGenericFields(){return{id:w.v4(),isDel:!1,createdAt:new Date,updatedAt:new Date}},applyPlugins(c,t){t.filter(e=>typeof e=="function").forEach(e=>c.plugin(e))},applyMiddlewares(c,t){t.forEach(({method:e,pre:r,post:s})=>{e&&r&&c.pre(e,r),e&&s&&c.post(e,s)})},createGenericSchema(c){return new c.Schema({id:{type:String,default:w.v4,unique:!0},isDel:{type:Boolean,default:!1}},{timestamps:!0})},createSchema({mongoose:c,schema:t,virtuals:e=[],standalone:r=!1}){const s=new c.Schema(t);return e.forEach(({name:n,options:u,get:i})=>{const l=s.virtual(n,u);i&&l.get(i)}),r||s.add(y.createGenericSchema(c)),s},createModel({mongoose:c,name:t,schema:e,pagination:r=!1,aggregate:s=!1,virtuals:n=[],middlewares:u=[]}){if(!t)throw new Error("Model name is required.");if(c.models[t])return c.models[t];const i=y.createSchema({mongoose:c,schema:e,virtuals:n});return y.applyPlugins(i,[r&&A,s&&D]),y.applyMiddlewares(i,u),c.model(t,i)},validator:{isRequired(){return function(c){return a(this,null,function*(){return!j.validate.isEmpty(c)})}},isUnique(c){return function(t){return a(this,null,function*(){if(!Array.isArray(c)||c.length===0)throw new Error("Fields must be a non-empty array of strings.");const e={$or:c.map(s=>({[s]:t}))};return!(yield this.constructor.exists(e))})}},matchesRegex(c){return function(t){return a(this,null,function*(){if(!Array.isArray(c)||c.some(e=>!(e instanceof RegExp)))throw new Error("regexArray must be an array of valid RegExp objects.");return c.every(e=>e.test(t))})}}},migrate:S(g({},P),{setConfig:c=>{const t=`// This file is automatically generated by the Cyberskill CLI.
2
+ module.exports = ${JSON.stringify(c,null,4)}`;E.writeFileSync(m.PATH.MIGRATE_MONGO_CONFIG,t);const e=`
3
+ ${m.MIGRATE_MONGO_CONFIG}
4
+ `;E.pathExistsSync(m.PATH.GIT_IGNORE)?E.readFileSync(m.PATH.GIT_IGNORE,"utf-8").split(`
5
+ `).includes(m.MIGRATE_MONGO_CONFIG)||E.appendFileSync(m.PATH.GIT_IGNORE,e):E.writeFileSync(m.PATH.GIT_IGNORE,e)}}),regexify(c,t){if(!c)return{};let e=f.deepClone(c);if(!t||t.length===0)return e;for(const r of t){const s=r.toString().split("."),n=f.getNestedValue(e,s);if(typeof n=="string"&&n.length>0){const u={$regex:`.*${U.regexSearchMapper(n)}.*`,$options:"i"};e=f.setNestedValue(e,s,u)}}return e}};class F{constructor(t,e){T(this,"collection");this.collection=t.collection(e)}createOne(t){return a(this,null,function*(){try{const e=g(g({},y.createGenericFields()),t);return(yield this.collection.insertOne(e)).acknowledged?{success:!0,message:"Document created successfully",result:e}:{success:!1,message:"Document creation failed",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}catch(e){return o.catchError(e)}})}createMany(t){return a(this,null,function*(){try{const e=t.map(s=>g(g({},y.createGenericFields()),s)),r=yield this.collection.insertMany(e);return r.insertedCount===0?{success:!1,message:"No documents were inserted",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:`${r.insertedCount} documents created successfully`,result:e}}catch(e){return o.catchError(e)}})}findOne(t){return a(this,null,function*(){try{const e=yield this.collection.findOne(t);return e?{success:!0,message:"Document found",result:e}:{success:!1,message:"Document not found",code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(e){return o.catchError(e)}})}findAll(){return a(this,arguments,function*(t={}){try{return{success:!0,message:"Documents retrieved successfully",result:yield this.collection.find(t).toArray()}}catch(e){return o.catchError(e)}})}count(){return a(this,arguments,function*(t={}){try{return{success:!0,message:"Count retrieved successfully",result:yield this.collection.countDocuments(t)}}catch(e){return o.catchError(e)}})}updateOne(t,e){return a(this,null,function*(){try{const r=yield this.collection.updateOne(t,{$set:e});return r.matchedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document updated successfully",result:r}}catch(r){return o.catchError(r)}})}updateMany(t,e){return a(this,null,function*(){try{const r=yield this.collection.updateMany(t,{$set:e});return r.matchedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents updated successfully",result:r}}catch(r){return o.catchError(r)}})}deleteOne(t){return a(this,null,function*(){try{const e=yield this.collection.deleteOne(t);return e.deletedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document deleted successfully",result:e}}catch(e){return o.catchError(e)}})}deleteMany(t){return a(this,null,function*(){try{const e=yield this.collection.deleteMany(t);return e.deletedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents deleted successfully",result:e}}catch(e){return o.catchError(e)}})}}class ${constructor(t){this.model=t}getModelName(){return this.model.modelName}findOne(){return a(this,arguments,function*(t={},e={},r={},s){try{const n=this.model.findOne(t,e,r);s&&n.populate(s);const u=yield n.exec();return u?{success:!0,result:u}:{success:!1,message:`No ${this.getModelName()} found.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(n){return o.catchError(n)}})}findAll(){return a(this,arguments,function*(t={},e={},r={},s){try{const n=this.model.find(t,e,r);return s&&n.populate(s),{success:!0,result:yield n.exec()}}catch(n){return o.catchError(n)}})}findPaging(){return a(this,arguments,function*(t={},e={}){try{return{success:!0,result:yield this.model.paginate(t,e)}}catch(r){return o.catchError(r)}})}findPagingAggregate(r){return a(this,arguments,function*(t,e={}){try{return{success:!0,result:yield this.model.aggregatePaginate(this.model.aggregate(t),e)}}catch(s){return o.catchError(s)}})}count(){return a(this,arguments,function*(t={}){try{return{success:!0,result:yield this.model.countDocuments(t)}}catch(e){return o.catchError(e)}})}createOne(t){return a(this,null,function*(){try{return{success:!0,result:yield this.model.create(t)}}catch(e){return o.catchError(e)}})}createMany(r){return a(this,arguments,function*(t,e={}){try{return{success:!0,result:(yield this.model.insertMany(t,e)).map(u=>u instanceof G.Document?u.toObject():null).filter(u=>u!==null)}}catch(s){return o.catchError(s)}})}updateOne(){return a(this,arguments,function*(t={},e={},r={}){try{const s=yield this.model.findOneAndUpdate(t,e,g({new:!0},r)).exec();return s?{success:!0,result:s}:{success:!1,message:`Failed to update ${this.getModelName()}.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(s){return o.catchError(s)}})}updateMany(){return a(this,arguments,function*(t={},e={},r={}){try{return{success:!0,result:yield this.model.updateMany(t,e,r).exec()}}catch(s){return o.catchError(s)}})}deleteOne(){return a(this,arguments,function*(t={},e={}){try{const r=yield this.model.findOneAndDelete(t,e).exec();return r?{success:!0,result:r}:{success:!1,message:`No ${this.getModelName()} found to delete.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(r){return o.catchError(r)}})}deleteMany(){return a(this,arguments,function*(t={},e={}){try{const r=yield this.model.deleteMany(t,e).exec();return r.deletedCount===0?{success:!1,message:"No documents found to delete.",code:d.RESPONSE_STATUS.NOT_FOUND.CODE}:{success:!0,result:r}}catch(r){return o.catchError(r)}})}createShortId(t,e=4){return a(this,null,function*(){try{const s=new Set;for(let n=0;n<10;n++){const u=O.generateShortId(t,n+e);if(!s.has(u)&&(s.add(u),!(yield this.model.exists({shortId:u}))))return{success:!0,result:u}}return{success:!1,message:"Failed to create a unique shortId",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}catch(r){return o.catchError(r)}})}createSlugQuery({slug:t,field:e,isObject:r,filter:s}){const n=g({},s!=null?s:{});return r?S(g({},n),{$or:[{[`slug.${e}`]:t},{slugHistory:{$elemMatch:{[`slug.${e}`]:t}}}]}):S(g({},n),{$or:[{slug:t},{slugHistory:t}]})}createUniqueSlug(n){return a(this,arguments,function*({slug:t,field:e,isObject:r,filter:s}){const u=O.generateSlug(t);let i=u,l=1;for(;yield this.model.exists(this.createSlugQuery({slug:i,field:e,isObject:r,filter:s}));)i=`${u}-${l++}`;return i})}createSlug(s){return a(this,arguments,function*({field:t,from:e,filter:r}){try{const n=e[t];return f.isObject(n)?{success:!0,result:Object.fromEntries(yield Promise.all(Object.entries(n).map(q=>a(this,[q],function*([h,_]){const N=yield this.createUniqueSlug({slug:_,field:h,isObject:!0,filter:r});return[h,N]}))))}:{success:!0,result:yield this.createUniqueSlug({slug:n,field:t,isObject:!1,filter:r})}}catch(n){return o.catchError(n)}})}checkSlug(n){return a(this,arguments,function*({slug:t,field:e,from:r,filter:s}){try{const u=r[e];if(f.isObject(u)){for(const _ of Object.values(u)){const q=O.generateSlug(_);if(yield this.model.exists(this.createSlugQuery({slug:q,field:e,isObject:!0,filter:s})))return{success:!0,result:!0}}return{success:!0,result:!1}}const l=O.generateSlug(t);return{success:!0,result:(yield this.model.exists(this.createSlugQuery({slug:l,field:e,isObject:!1,filter:s})))!==null}}catch(u){return o.catchError(u)}})}aggregate(t){return a(this,null,function*(){try{return{success:!0,result:yield this.model.aggregate(t)}}catch(e){return o.catchError(e)}})}}exports.aggregatePaginate=D;exports.mongoosePaginate=A;exports.MongoController=F;exports.MongooseController=$;exports.mongo=y;
@@ -6,10 +6,7 @@ import { I_Return } from '../../typescript/index.js';
6
6
  import { C_Db, C_Document, I_CreateModelOptions, I_CreateSchemaOptions, I_DeleteOptionsExtended, I_ExtendedModel, I_GenericDocument, I_Input_CheckSlug, I_Input_CreateSlug, I_Input_GenerateSlug, I_MongooseModelMiddleware, I_UpdateOptionsExtended, T_AggregatePaginateResult, T_DeleteResult, T_Filter, T_FilterQuery, T_Input_Populate, T_InsertManyOptions, T_MongoosePlugin, T_MongooseShema, T_PaginateOptionsWithPopulate, T_PaginateResult, T_PipelineStage, T_ProjectionType, T_QueryOptions, T_UpdateQuery, T_UpdateResult, T_WithId } from './mongo.type.js';
7
7
  export { aggregatePaginate, mongoosePaginate };
8
8
  export declare const mongo: {
9
- getDateTime(now?: Date): string;
10
- createGenericFields({ returnDateAs, }?: {
11
- returnDateAs?: "string" | "date";
12
- }): I_GenericDocument;
9
+ createGenericFields(): I_GenericDocument;
13
10
  applyPlugins<T>(schema: T_MongooseShema<T>, plugins: Array<T_MongoosePlugin | false>): void;
14
11
  applyMiddlewares<T extends Partial<C_Document>>(schema: T_MongooseShema<T>, middlewares: I_MongooseModelMiddleware<T>[]): void;
15
12
  createGenericSchema(mongoose: typeof mongooseRaw): mongooseRaw.Schema<I_GenericDocument, mongooseRaw.Model<I_GenericDocument, any, any, any, mongooseRaw.Document<unknown, any, I_GenericDocument, any> & I_GenericDocument & Required<{