@nocobase/plugin-workflow 0.13.0-alpha.9 → 0.14.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.js +16 -16
- package/dist/externalVersion.js +24 -0
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/lru-cache/LICENSE +15 -0
- package/dist/node_modules/lru-cache/dist/cjs/index-cjs.js +1 -0
- package/dist/node_modules/lru-cache/dist/cjs/package.json +3 -0
- package/dist/node_modules/lru-cache/dist/mjs/index.d.ts +807 -0
- package/dist/node_modules/lru-cache/dist/mjs/index.js +1330 -0
- package/dist/node_modules/lru-cache/dist/mjs/index.min.js +2 -0
- package/dist/node_modules/lru-cache/dist/mjs/package.json +3 -0
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/server/Plugin.d.ts +1 -0
- package/dist/server/Plugin.js +37 -29
- package/package.json +2 -2
- package/dist/node_modules/lru-cache/index-cjs.js +0 -1
- /package/dist/node_modules/lru-cache/{index-cjs.d.ts → dist/cjs/index-cjs.d.ts} +0 -0
- /package/dist/node_modules/lru-cache/{index.d.ts → dist/cjs/index.d.ts} +0 -0
- /package/dist/node_modules/lru-cache/{index.js → dist/cjs/index.js} +0 -0
- /package/dist/node_modules/lru-cache/{index.min.js → dist/cjs/index.min.js} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"@ant-design/icons": "5.1.4",
|
|
3
|
+
"@nocobase/client": "0.14.0-alpha.2",
|
|
4
|
+
"antd": "5.8.6",
|
|
5
|
+
"react": "18.2.0",
|
|
6
|
+
"@nocobase/utils": "0.14.0-alpha.2",
|
|
7
|
+
"react-router-dom": "6.14.1",
|
|
8
|
+
"react-i18next": "11.18.6",
|
|
9
|
+
"winston": "3.9.0",
|
|
10
|
+
"@nocobase/database": "0.14.0-alpha.2",
|
|
11
|
+
"@nocobase/server": "0.14.0-alpha.2",
|
|
12
|
+
"@nocobase/logger": "0.14.0-alpha.2",
|
|
13
|
+
"@nocobase/evaluators": "0.14.0-alpha.2",
|
|
14
|
+
"@formily/react": "2.2.27",
|
|
15
|
+
"@formily/core": "2.2.27",
|
|
16
|
+
"@formily/antd-v5": "1.1.0",
|
|
17
|
+
"lodash": "4.17.21",
|
|
18
|
+
"@nocobase/actions": "0.14.0-alpha.2",
|
|
19
|
+
"axios": "0.26.1",
|
|
20
|
+
"sequelize": "6.32.1",
|
|
21
|
+
"@emotion/css": "11.11.2",
|
|
22
|
+
"dayjs": "1.11.9",
|
|
23
|
+
"@nocobase/resourcer": "0.14.0-alpha.2"
|
|
24
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2023-09-
|
|
1
|
+
{"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2023-09-12T20:08:52.870Z"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";var t={914:function(t,e,i){var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const n=s(i(947));t.exports=Object.assign(n.default,{default:n.default,LRUCache:n.default})},947:function(t,e){Object.defineProperty(e,"__esModule",{value:true});e.LRUCache=void 0;const i=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const s=new Set;const emitWarning=(t,e,i,s)=>{typeof process==="object"&&process&&typeof process.emitWarning==="function"?process.emitWarning(t,e,i,s):console.error(`[${i}] ${e}: ${t}`)};const shouldWarn=t=>!s.has(t);const n=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#t=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#t=true;const i=new Stack(t,e);Stack.#t=false;return i}constructor(t,e){if(!Stack.#t){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#e;#i;#s;#n;#h;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#o;#r;#l;#c;#f;#d;#u;#p;#g;#S;#y;#m;#z;#w;#_;#L;static unsafeExposeInternals(t){return{starts:t.#m,ttls:t.#z,sizes:t.#y,keyMap:t.#r,keyList:t.#l,valList:t.#c,next:t.#f,prev:t.#d,get head(){return t.#u},get tail(){return t.#p},free:t.#g,isBackgroundFetch:e=>t.#v(e),backgroundFetch:(e,i,s,n)=>t.#k(e,i,s,n),moveToTail:e=>t.#x(e),indexes:e=>t.#F(e),rindexes:e=>t.#A(e),isStale:e=>t.#T(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#o}get size(){return this.#a}get fetchMethod(){return this.#h}get dispose(){return this.#s}get disposeAfter(){return this.#n}constructor(t){const{max:e=0,ttl:i,ttlResolution:n=1,ttlAutopurge:h,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:r,dispose:l,disposeAfter:c,noDisposeOnSet:f,noUpdateTTL:d,maxSize:u=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:S,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:z,allowStaleOnFetchAbort:w,ignoreFetchAbort:_}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const L=e?getUintArray(e):Array;if(!L){throw new Error("invalid max value: "+e)}this.#e=e;this.#i=u;this.maxEntrySize=p||this.#i;this.sizeCalculation=g;if(this.sizeCalculation){if(!this.#i&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(S!==undefined&&typeof S!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#h=S;this.#_=!!S;this.#r=new Map;this.#l=new Array(e).fill(undefined);this.#c=new Array(e).fill(undefined);this.#f=new L(e);this.#d=new L(e);this.#u=0;this.#p=0;this.#g=Stack.create(e);this.#a=0;this.#o=0;if(typeof l==="function"){this.#s=l}if(typeof c==="function"){this.#n=c;this.#S=[]}else{this.#n=undefined;this.#S=undefined}this.#w=!!this.#s;this.#L=!!this.#n;this.noDisposeOnSet=!!f;this.noUpdateTTL=!!d;this.noDeleteOnFetchRejection=!!y;this.allowStaleOnFetchRejection=!!z;this.allowStaleOnFetchAbort=!!w;this.ignoreFetchAbort=!!_;if(this.maxEntrySize!==0){if(this.#i!==0){if(!isPosInt(this.#i)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#b()}this.allowStale=!!r;this.noDeleteOnStaleGet=!!m;this.updateAgeOnGet=!!a;this.updateAgeOnHas=!!o;this.ttlResolution=isPosInt(n)||n===0?n:1;this.ttlAutopurge=!!h;this.ttl=i||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#O()}if(this.#e===0&&this.ttl===0&&this.#i===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#e&&!this.#i){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){s.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#r.has(t)?Infinity:0}#O(){const t=new ZeroArray(this.#e);const e=new ZeroArray(this.#e);this.#z=t;this.#m=e;this.#D=(s,n,h=i.now())=>{e[s]=n!==0?h:0;t[s]=n;if(n!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#T(s)){this.delete(this.#l[s])}}),n+1);if(t.unref){t.unref()}}};this.#E=s=>{e[s]=t[s]!==0?i.now():0};this.#M=(i,n)=>{if(t[n]){const h=t[n];const a=e[n];i.ttl=h;i.start=a;i.now=s||getNow();i.remainingTTL=i.now+h-a}};let s=0;const getNow=()=>{const t=i.now();if(this.ttlResolution>0){s=t;const e=setTimeout((()=>s=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=i=>{const n=this.#r.get(i);if(n===undefined){return 0}return t[n]===0||e[n]===0?Infinity:e[n]+t[n]-(s||getNow())};this.#T=i=>t[i]!==0&&e[i]!==0&&(s||getNow())-e[i]>t[i]}#E=()=>{};#M=()=>{};#D=()=>{};#T=()=>false;#b(){const t=new ZeroArray(this.#e);this.#o=0;this.#y=t;this.#C=e=>{this.#o-=t[e];t[e]=0};this.#R=(t,e,i,s)=>{if(this.#v(e)){return 0}if(!isPosInt(i)){if(s){if(typeof s!=="function"){throw new TypeError("sizeCalculation must be a function")}i=s(e,t);if(!isPosInt(i)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return i};this.#W=(e,i,s)=>{t[e]=i;if(this.#i){const i=this.#i-t[e];while(this.#o>i){this.#B(true)}}this.#o+=t[e];if(s){s.entrySize=i;s.totalCalculatedSize=this.#o}}}#C=t=>{};#W=(t,e,i)=>{};#R=(t,e,i,s)=>{if(i||s){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#a){for(let e=this.#p;true;){if(!this.#I(e)){break}if(t||!this.#T(e)){yield e}if(e===this.#u){break}else{e=this.#d[e]}}}}*#A({allowStale:t=this.allowStale}={}){if(this.#a){for(let e=this.#u;true;){if(!this.#I(e)){break}if(t||!this.#T(e)){yield e}if(e===this.#p){break}else{e=this.#f[e]}}}}#I(t){return t!==undefined&&this.#r.get(this.#l[t])===t}*entries(){for(const t of this.#F()){if(this.#c[t]!==undefined&&this.#l[t]!==undefined&&!this.#v(this.#c[t])){yield[this.#l[t],this.#c[t]]}}}*rentries(){for(const t of this.#A()){if(this.#c[t]!==undefined&&this.#l[t]!==undefined&&!this.#v(this.#c[t])){yield[this.#l[t],this.#c[t]]}}}*keys(){for(const t of this.#F()){const e=this.#l[t];if(e!==undefined&&!this.#v(this.#c[t])){yield e}}}*rkeys(){for(const t of this.#A()){const e=this.#l[t];if(e!==undefined&&!this.#v(this.#c[t])){yield e}}}*values(){for(const t of this.#F()){const e=this.#c[t];if(e!==undefined&&!this.#v(this.#c[t])){yield this.#c[t]}}}*rvalues(){for(const t of this.#A()){const e=this.#c[t];if(e!==undefined&&!this.#v(this.#c[t])){yield this.#c[t]}}}[Symbol.iterator](){return this.entries()}find(t,e={}){for(const i of this.#F()){const s=this.#c[i];const n=this.#v(s)?s.__staleWhileFetching:s;if(n===undefined)continue;if(t(n,this.#l[i],this)){return this.get(this.#l[i],e)}}}forEach(t,e=this){for(const i of this.#F()){const s=this.#c[i];const n=this.#v(s)?s.__staleWhileFetching:s;if(n===undefined)continue;t.call(e,n,this.#l[i],this)}}rforEach(t,e=this){for(const i of this.#A()){const s=this.#c[i];const n=this.#v(s)?s.__staleWhileFetching:s;if(n===undefined)continue;t.call(e,n,this.#l[i],this)}}purgeStale(){let t=false;for(const e of this.#A({allowStale:true})){if(this.#T(e)){this.delete(this.#l[e]);t=true}}return t}dump(){const t=[];for(const e of this.#F({allowStale:true})){const s=this.#l[e];const n=this.#c[e];const h=this.#v(n)?n.__staleWhileFetching:n;if(h===undefined||s===undefined)continue;const a={value:h};if(this.#z&&this.#m){a.ttl=this.#z[e];const t=i.now()-this.#m[e];a.start=Math.floor(Date.now()-t)}if(this.#y){a.size=this.#y[e]}t.unshift([s,a])}return t}load(t){this.clear();for(const[e,s]of t){if(s.start){const t=Date.now()-s.start;s.start=i.now()-t}this.set(e,s.value,s)}}set(t,e,i={}){const{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=i;let{noUpdateTTL:r=this.noUpdateTTL}=i;const l=this.#R(t,e,i.size||0,a);if(this.maxEntrySize&&l>this.maxEntrySize){if(o){o.set="miss";o.maxEntrySizeExceeded=true}this.delete(t);return this}let c=this.#a===0?undefined:this.#r.get(t);if(c===undefined){c=this.#a===0?this.#p:this.#g.length!==0?this.#g.pop():this.#a===this.#e?this.#B(false):this.#a;this.#l[c]=t;this.#c[c]=e;this.#r.set(t,c);this.#f[this.#p]=c;this.#d[c]=this.#p;this.#p=c;this.#a++;this.#W(c,l,o);if(o)o.set="add";r=false}else{this.#x(c);const i=this.#c[c];if(e!==i){if(this.#_&&this.#v(i)){i.__abortController.abort(new Error("replaced"))}else if(!h){if(this.#w){this.#s?.(i,t,"set")}if(this.#L){this.#S?.push([i,t,"set"])}}this.#C(c);this.#W(c,l,o);this.#c[c]=e;if(o){o.set="replace";const t=i&&this.#v(i)?i.__staleWhileFetching:i;if(t!==undefined)o.oldValue=t}}else if(o){o.set="update"}}if(s!==0&&!this.#z){this.#O()}if(this.#z){if(!r){this.#D(c,s,n)}if(o)this.#M(o,c)}if(!h&&this.#L&&this.#S){const t=this.#S;let e;while(e=t?.shift()){this.#n?.(...e)}}return this}pop(){try{while(this.#a){const t=this.#c[this.#u];this.#B(true);if(this.#v(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#L&&this.#S){const t=this.#S;let e;while(e=t?.shift()){this.#n?.(...e)}}}}#B(t){const e=this.#u;const i=this.#l[e];const s=this.#c[e];if(this.#_&&this.#v(s)){s.__abortController.abort(new Error("evicted"))}else if(this.#w||this.#L){if(this.#w){this.#s?.(s,i,"evict")}if(this.#L){this.#S?.push([s,i,"evict"])}}this.#C(e);if(t){this.#l[e]=undefined;this.#c[e]=undefined;this.#g.push(e)}if(this.#a===1){this.#u=this.#p=0;this.#g.length=0}else{this.#u=this.#f[e]}this.#r.delete(i);this.#a--;return e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e;const n=this.#r.get(t);if(n!==undefined){const t=this.#c[n];if(this.#v(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#T(n)){if(i){this.#E(n)}if(s){s.has="hit";this.#M(s,n)}return true}else if(s){s.has="stale";this.#M(s,n)}}else if(s){s.has="miss"}return false}peek(t,e={}){const{allowStale:i=this.allowStale}=e;const s=this.#r.get(t);if(s!==undefined&&(i||!this.#T(s))){const t=this.#c[s];return this.#v(t)?t.__staleWhileFetching:t}}#k(t,e,i,s){const n=e===undefined?undefined:this.#c[e];if(this.#v(n)){return n}const h=new AbortController;const{signal:a}=i;a?.addEventListener("abort",(()=>h.abort(a.reason)),{signal:h.signal});const o={signal:h.signal,options:i,context:s};const cb=(s,n=false)=>{const{aborted:a}=h.signal;const l=i.ignoreFetchAbort&&s!==undefined;if(i.status){if(a&&!n){i.status.fetchAborted=true;i.status.fetchError=h.signal.reason;if(l)i.status.fetchAbortIgnored=true}else{i.status.fetchResolved=true}}if(a&&!l&&!n){return fetchFail(h.signal.reason)}const c=r;if(this.#c[e]===r){if(s===undefined){if(c.__staleWhileFetching){this.#c[e]=c.__staleWhileFetching}else{this.delete(t)}}else{if(i.status)i.status.fetchUpdated=true;this.set(t,s,o.options)}}return s};const eb=t=>{if(i.status){i.status.fetchRejected=true;i.status.fetchError=t}return fetchFail(t)};const fetchFail=s=>{const{aborted:n}=h.signal;const a=n&&i.allowStaleOnFetchAbort;const o=a||i.allowStaleOnFetchRejection;const l=o||i.noDeleteOnFetchRejection;const c=r;if(this.#c[e]===r){const i=!l||c.__staleWhileFetching===undefined;if(i){this.delete(t)}else if(!a){this.#c[e]=c.__staleWhileFetching}}if(o){if(i.status&&c.__staleWhileFetching!==undefined){i.status.returnedStale=true}return c.__staleWhileFetching}else if(c.__returned===c){throw s}};const pcall=(e,s)=>{const a=this.#h?.(t,n,o);if(a&&a instanceof Promise){a.then((t=>e(t)),s)}h.signal.addEventListener("abort",(()=>{if(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort){e();if(i.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(i.status)i.status.fetchDispatched=true;const r=new Promise(pcall).then(cb,eb);const l=Object.assign(r,{__abortController:h,__staleWhileFetching:n,__returned:undefined});if(e===undefined){this.set(t,l,{...o.options,status:undefined});e=this.#r.get(t)}else{this.#c[e]=l}return l}#v(t){if(!this.#_)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof AbortController}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:r=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=false,status:S,signal:y}=e;if(!this.#_){if(S)S.fetch="get";return this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:S})}const m={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:a,size:o,sizeCalculation:r,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:u,ignoreFetchAbort:d,status:S,signal:y};let z=this.#r.get(t);if(z===undefined){if(S)S.fetch="miss";const e=this.#k(t,z,m,p);return e.__returned=e}else{const e=this.#c[z];if(this.#v(e)){const t=i&&e.__staleWhileFetching!==undefined;if(S){S.fetch="inflight";if(t)S.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const n=this.#T(z);if(!g&&!n){if(S)S.fetch="hit";this.#x(z);if(s){this.#E(z)}if(S)this.#M(S,z);return e}const h=this.#k(t,z,m,p);const a=h.__staleWhileFetching!==undefined;const o=a&&i;if(S){S.fetch=n?"stale":"refresh";if(o&&n)S.returnedStale=true}return o?h.__staleWhileFetching:h.__returned=h}}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e;const a=this.#r.get(t);if(a!==undefined){const e=this.#c[a];const o=this.#v(e);if(h)this.#M(h,a);if(this.#T(a)){if(h)h.get="stale";if(!o){if(!n){this.delete(t)}if(h&&i)h.returnedStale=true;return i?e:undefined}else{if(h&&i&&e.__staleWhileFetching!==undefined){h.returnedStale=true}return i?e.__staleWhileFetching:undefined}}else{if(h)h.get="hit";if(o){return e.__staleWhileFetching}this.#x(a);if(s){this.#E(a)}return e}}else if(h){h.get="miss"}}#U(t,e){this.#d[e]=t;this.#f[t]=e}#x(t){if(t!==this.#p){if(t===this.#u){this.#u=this.#f[t]}else{this.#U(this.#d[t],this.#f[t])}this.#U(this.#p,t);this.#p=t}}delete(t){let e=false;if(this.#a!==0){const i=this.#r.get(t);if(i!==undefined){e=true;if(this.#a===1){this.clear()}else{this.#C(i);const e=this.#c[i];if(this.#v(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#w||this.#L){if(this.#w){this.#s?.(e,t,"delete")}if(this.#L){this.#S?.push([e,t,"delete"])}}this.#r.delete(t);this.#l[i]=undefined;this.#c[i]=undefined;if(i===this.#p){this.#p=this.#d[i]}else if(i===this.#u){this.#u=this.#f[i]}else{this.#f[this.#d[i]]=this.#f[i];this.#d[this.#f[i]]=this.#d[i]}this.#a--;this.#g.push(i)}}}if(this.#L&&this.#S?.length){const t=this.#S;let e;while(e=t?.shift()){this.#n?.(...e)}}return e}clear(){for(const t of this.#A({allowStale:true})){const e=this.#c[t];if(this.#v(e)){e.__abortController.abort(new Error("deleted"))}else{const i=this.#l[t];if(this.#w){this.#s?.(e,i,"delete")}if(this.#L){this.#S?.push([e,i,"delete"])}}}this.#r.clear();this.#c.fill(undefined);this.#l.fill(undefined);if(this.#z&&this.#m){this.#z.fill(0);this.#m.fill(0)}if(this.#y){this.#y.fill(0)}this.#u=0;this.#p=0;this.#g.length=0;this.#o=0;this.#a=0;if(this.#L&&this.#S){const t=this.#S;let e;while(e=t?.shift()){this.#n?.(...e)}}}}e.LRUCache=LRUCache;e["default"]=LRUCache}};var e={};function __nccwpck_require__(i){var s=e[i];if(s!==undefined){return s.exports}var n=e[i]={exports:{}};var h=true;try{t[i].call(n.exports,n,n.exports,__nccwpck_require__);h=false}finally{if(h)delete e[i]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(914);module.exports=i})();
|