@discordeno/utils 19.0.0-next.f1f4322 → 19.0.0-next.f2b6590

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/bucket.d.ts CHANGED
@@ -16,6 +16,8 @@ export declare class LeakyBucket implements LeakyBucketOptions {
16
16
  constructor(options?: LeakyBucketOptions);
17
17
  /** The amount of requests that still remain. */
18
18
  get remaining(): number;
19
+ /** Refills the bucket as needed. */
20
+ refillBucket(): void;
19
21
  /** Begin processing the queue. */
20
22
  processQueue(): Promise<void>;
21
23
  /** Pauses the execution until the request is available to be made. */
@@ -1 +1 @@
1
- {"version":3,"file":"bucket.d.ts","sourceRoot":"","sources":["../src/bucket.ts"],"names":[],"mappings":";AAGA,qBAAa,WAAY,YAAW,kBAAkB;IACpD,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IAEpB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAI;IAChB,4FAA4F;IAC5F,KAAK,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAK;IAC5D,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAQ;IAC3B,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC,OAAO,CAAA;IAC1B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;gBAEN,OAAO,CAAC,EAAE,kBAAkB;IAMxC,gDAAgD;IAChD,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,kCAAkC;IAC5B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAgDnC,sEAAsE;IAChE,OAAO,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAWrD;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
1
+ {"version":3,"file":"bucket.d.ts","sourceRoot":"","sources":["../src/bucket.ts"],"names":[],"mappings":";AAGA,qBAAa,WAAY,YAAW,kBAAkB;IACpD,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IAEpB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAI;IAChB,4FAA4F;IAC5F,KAAK,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAK;IAC5D,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAQ;IAC3B,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC,OAAO,CAAA;IAC1B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;gBAEN,OAAO,CAAC,EAAE,kBAAkB;IAMxC,gDAAgD;IAChD,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,oCAAoC;IACpC,YAAY,IAAI,IAAI;IAepB,kCAAkC;IAC5B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAwCnC,sEAAsE;IAChE,OAAO,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAWrD;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
package/dist/bucket.js CHANGED
@@ -12,13 +12,23 @@ export class LeakyBucket {
12
12
  /** The amount of requests that still remain. */ get remaining() {
13
13
  return this.max < this.used ? 0 : this.max - this.used;
14
14
  }
15
+ /** Refills the bucket as needed. */ refillBucket() {
16
+ console.log('refilling bucket');
17
+ logger.info(`[LeakyBucket] Timeout for leaky bucket requests executed. Refilling bucket.`);
18
+ // Lower the used amount by the refill amount
19
+ this.used = this.refillAmount > this.used ? 0 : this.used - this.refillAmount;
20
+ // Reset the refillsAt timestamp since it just got refilled
21
+ this.refillsAt = undefined;
22
+ if (this.used > 0) {
23
+ if (this.timeoutId) clearTimeout(this.timeoutId);
24
+ this.timeoutId = setTimeout(()=>this.refillBucket, this.refillInterval);
25
+ this.refillsAt = Date.now() + this.refillInterval;
26
+ }
27
+ }
15
28
  /** Begin processing the queue. */ async processQueue() {
16
29
  logger.debug('[Gateway] Processing queue');
17
30
  // There is already a queue that is processing
18
- if (this.processing) {
19
- logger.debug('[Gateway] Queue is already processing.');
20
- return;
21
- }
31
+ if (this.processing) return logger.debug('[Gateway] Queue is already processing.');
22
32
  // Begin going through the queue.
23
33
  while(this.queue.length){
24
34
  if (this.remaining) {
@@ -30,13 +40,7 @@ export class LeakyBucket {
30
40
  // Create a new timeout for this request if none exists.
31
41
  if (!this.timeoutId) {
32
42
  logger.debug(`[LeakyBucket] Creating new timeout for leaky bucket requests.`);
33
- this.timeoutId = setTimeout(()=>{
34
- logger.debug(`[LeakyBucket] Timeout for leaky bucket requests executed. Refilling bucket.`);
35
- // Lower the used amount by the refill amount
36
- this.used -= this.refillAmount;
37
- // Reset the refillsAt timestamp since it just got refilled
38
- this.refillsAt = undefined;
39
- }, this.refillInterval);
43
+ this.timeoutId = setTimeout(()=>this.refillBucket, this.refillInterval);
40
44
  // Set the time for when this refill will occur.
41
45
  this.refillsAt = Date.now() + this.refillInterval;
42
46
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/bucket.ts"],"sourcesContent":["import logger from './logger.js'\nimport { delay } from './utils.js'\n\nexport class LeakyBucket implements LeakyBucketOptions {\n max: number\n refillInterval: number\n refillAmount: number\n\n /** The amount of requests that have been used up already. */\n used: number = 0\n /** The queue of requests to acquire an available request. Mapped by <shardId, resolve()> */\n queue: Array<(value: void | PromiseLike<void>) => void> = []\n /** Whether or not the queue is already processing. */\n processing: boolean = false\n /** The timeout id for the timer to reduce the used amount by the refill amount. */\n timeoutId?: NodeJS.Timeout\n /** The timestamp in milliseconds when the next refill is scheduled. */\n refillsAt?: number\n\n constructor(options?: LeakyBucketOptions) {\n this.max = options?.max ?? 1\n this.refillAmount = options?.refillAmount ? (options.refillAmount > this.max ? this.max : options.refillAmount) : 1\n this.refillInterval = options?.refillInterval ?? 5000\n }\n\n /** The amount of requests that still remain. */\n get remaining(): number {\n return this.max < this.used ? 0 : this.max - this.used\n }\n\n /** Begin processing the queue. */\n async processQueue(): Promise<void> {\n logger.debug('[Gateway] Processing queue')\n // There is already a queue that is processing\n if (this.processing) {\n logger.debug('[Gateway] Queue is already processing.')\n return\n }\n\n // Begin going through the queue.\n while (this.queue.length) {\n if (this.remaining) {\n logger.debug(`[LeakyBucket] Processing queue. Remaining: ${this.remaining} Length: ${this.queue.length}`)\n // Resolves the promise allowing the paused execution of this request to resolve and continue.\n this.queue.shift()?.()\n // A request can be made\n this.used++\n\n // Create a new timeout for this request if none exists.\n if (!this.timeoutId) {\n logger.debug(`[LeakyBucket] Creating new timeout for leaky bucket requests.`)\n this.timeoutId = setTimeout(() => {\n logger.debug(`[LeakyBucket] Timeout for leaky bucket requests executed. Refilling bucket.`)\n // Lower the used amount by the refill amount\n this.used -= this.refillAmount\n // Reset the refillsAt timestamp since it just got refilled\n this.refillsAt = undefined\n }, this.refillInterval)\n // Set the time for when this refill will occur.\n this.refillsAt = Date.now() + this.refillInterval\n }\n }\n\n // Check if a refill is scheduled, since we have used up all available requests\n else if (this.refillsAt) {\n const now = Date.now()\n // If there is time left until next refill, just delay execution.\n if (this.refillsAt > now) {\n logger.debug(`[LeakyBucket] Delaying execution of leaky bucket requests for ${this.refillsAt - now}ms`)\n await delay(this.refillsAt - now)\n logger.debug(`[LeakyBucket] Resuming execution`)\n }\n }\n }\n\n // Loop has ended mark false so it can restart later when needed\n this.processing = false\n }\n\n /** Pauses the execution until the request is available to be made. */\n async acquire(highPriority?: boolean): Promise<void> {\n return await new Promise((resolve) => {\n // High priority requests get added to the start of the queue\n if (highPriority) this.queue.unshift(resolve)\n // All other requests get pushed to the end.\n else this.queue.push(resolve)\n\n // Each request should trigger the queue to be processesd.\n void this.processQueue()\n })\n }\n}\n\nexport interface LeakyBucketOptions {\n /**\n * Max requests allowed at once.\n * @default 1\n */\n max?: number\n /**\n * Interval in milliseconds between refills.\n * @default 5000\n */\n refillInterval?: number\n /**\n * Amount of requests to refill at each interval.\n * @default 1\n */\n refillAmount?: number\n}\n"],"names":["logger","delay","LeakyBucket","constructor","options","used","queue","processing","max","refillAmount","refillInterval","remaining","processQueue","debug","length","shift","timeoutId","setTimeout","refillsAt","undefined","Date","now","acquire","highPriority","Promise","resolve","unshift","push"],"mappings":"AAAA,OAAOA,YAAY,cAAa;AAChC,SAASC,KAAK,QAAQ,aAAY;AAElC,OAAO,MAAMC;IAgBXC,YAAYC,OAA4B,CAAE;QAX1C,2DAA2D,QAC3DC,OAAe;QACf,0FAA0F,QAC1FC,QAA0D,EAAE;QAC5D,oDAAoD,QACpDC,aAAsB,KAAK;QAOzB,IAAI,CAACC,GAAG,GAAGJ,SAASI,OAAO;QAC3B,IAAI,CAACC,YAAY,GAAGL,SAASK,eAAgBL,QAAQK,YAAY,GAAG,IAAI,CAACD,GAAG,GAAG,IAAI,CAACA,GAAG,GAAGJ,QAAQK,YAAY,GAAI,CAAC;QACnH,IAAI,CAACC,cAAc,GAAGN,SAASM,kBAAkB;IACnD;IAEA,8CAA8C,GAC9C,IAAIC,YAAoB;QACtB,OAAO,IAAI,CAACH,GAAG,GAAG,IAAI,CAACH,IAAI,GAAG,IAAI,IAAI,CAACG,GAAG,GAAG,IAAI,CAACH,IAAI;IACxD;IAEA,gCAAgC,GAChC,MAAMO,eAA8B;QAClCZ,OAAOa,KAAK,CAAC;QACb,8CAA8C;QAC9C,I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,UAAU,GAAG,KAAK;IACzB;IAEA,oEAAoE,GACpE,MAAMe,QAAQC,YAAsB,EAAiB;QACnD,OAAO,MAAM,IAAIC,QAAQ,CAACC,UAAY;YACpC,6DAA6D;YAC7D,IAAIF,cAAc,IAAI,CAACjB,KAAK,CAACoB,OAAO,CAACD;iBAEhC,IAAI,CAACnB,KAAK,CAACqB,IAAI,CAACF;YAErB,0DAA0D;YAC1D,KAAK,IAAI,CAACb,YAAY;QACxB;IACF;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/bucket.ts"],"sourcesContent":["import logger from './logger.js'\nimport { delay } from './utils.js'\n\nexport class LeakyBucket implements LeakyBucketOptions {\n max: number\n refillInterval: number\n refillAmount: number\n\n /** The amount of requests that have been used up already. */\n used: number = 0\n /** The queue of requests to acquire an available request. Mapped by <shardId, resolve()> */\n queue: Array<(value: void | PromiseLike<void>) => void> = []\n /** Whether or not the queue is already processing. */\n processing: boolean = false\n /** The timeout id for the timer to reduce the used amount by the refill amount. */\n timeoutId?: NodeJS.Timeout\n /** The timestamp in milliseconds when the next refill is scheduled. */\n refillsAt?: number\n\n constructor(options?: LeakyBucketOptions) {\n this.max = options?.max ?? 1\n this.refillAmount = options?.refillAmount ? (options.refillAmount > this.max ? this.max : options.refillAmount) : 1\n this.refillInterval = options?.refillInterval ?? 5000\n }\n\n /** The amount of requests that still remain. */\n get remaining(): number {\n return this.max < this.used ? 0 : this.max - this.used\n }\n\n /** Refills the bucket as needed. */\n refillBucket(): void {\n console.log('refilling bucket');\n logger.info(`[LeakyBucket] Timeout for leaky bucket requests executed. Refilling bucket.`)\n // Lower the used amount by the refill amount\n this.used = this.refillAmount > this.used ? 0 : this.used - this.refillAmount\n // Reset the refillsAt timestamp since it just got refilled\n this.refillsAt = undefined\n\n if (this.used > 0) {\n if (this.timeoutId) clearTimeout(this.timeoutId)\n this.timeoutId = setTimeout(() => this.refillBucket, this.refillInterval)\n this.refillsAt = Date.now() + this.refillInterval\n }\n }\n\n /** Begin processing the queue. */\n async processQueue(): Promise<void> {\n logger.debug('[Gateway] Processing queue')\n // There is already a queue that is processing\n if (this.processing) return logger.debug('[Gateway] Queue is already processing.')\n\n // Begin going through the queue.\n while (this.queue.length) {\n if (this.remaining) {\n logger.debug(`[LeakyBucket] Processing queue. Remaining: ${this.remaining} Length: ${this.queue.length}`)\n // Resolves the promise allowing the paused execution of this request to resolve and continue.\n this.queue.shift()?.()\n // A request can be made\n this.used++\n\n // Create a new timeout for this request if none exists.\n if (!this.timeoutId) {\n logger.debug(`[LeakyBucket] Creating new timeout for leaky bucket requests.`)\n\n this.timeoutId = setTimeout(() => this.refillBucket, this.refillInterval)\n // Set the time for when this refill will occur.\n this.refillsAt = Date.now() + this.refillInterval\n }\n }\n\n // Check if a refill is scheduled, since we have used up all available requests\n else if (this.refillsAt) {\n const now = Date.now()\n // If there is time left until next refill, just delay execution.\n if (this.refillsAt > now) {\n logger.debug(`[LeakyBucket] Delaying execution of leaky bucket requests for ${this.refillsAt - now}ms`)\n await delay(this.refillsAt - now)\n logger.debug(`[LeakyBucket] Resuming execution`)\n }\n }\n }\n\n // Loop has ended mark false so it can restart later when needed\n this.processing = false\n }\n\n /** Pauses the execution until the request is available to be made. */\n async acquire(highPriority?: boolean): Promise<void> {\n return await new Promise((resolve) => {\n // High priority requests get added to the start of the queue\n if (highPriority) this.queue.unshift(resolve)\n // All other requests get pushed to the end.\n else this.queue.push(resolve)\n\n // Each request should trigger the queue to be processesd.\n void this.processQueue()\n })\n }\n}\n\nexport interface LeakyBucketOptions {\n /**\n * Max requests allowed at once.\n * @default 1\n */\n max?: number\n /**\n * Interval in milliseconds between refills.\n * @default 5000\n */\n refillInterval?: number\n /**\n * Amount of requests to refill at each interval.\n * @default 1\n */\n refillAmount?: number\n}\n"],"names":["logger","delay","LeakyBucket","constructor","options","used","queue","processing","max","refillAmount","refillInterval","remaining","refillBucket","console","log","info","refillsAt","undefined","timeoutId","clearTimeout","setTimeout","Date","now","processQueue","debug","length","shift","acquire","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,CAACC,UAAY;YACpC,6DAA6D;YAC7D,IAAIF,cAAc,IAAI,CAACtB,KAAK,CAACyB,OAAO,CAACD;iBAEhC,IAAI,CAACxB,KAAK,CAAC0B,IAAI,CAACF;YAErB,0DAA0D;YAC1D,KAAK,IAAI,CAACP,YAAY;QACxB;IACF;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discordeno/utils",
3
- "version": "19.0.0-next.f1f4322",
3
+ "version": "19.0.0-next.f2b6590",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
@@ -16,14 +16,14 @@
16
16
  "fmt": "eslint --fix \"src/**/*.ts*\"",
17
17
  "lint": "eslint \"src/**/*.ts*\"",
18
18
  "test:unit-coverage": "c8 mocha --no-warnings 'tests/**/*.spec.ts'",
19
- "test:unit": "c8 --r lcov mocha --no-warnings 'tests/**/*.spec.ts' && node ../../scripts/coveragePathFixing.js utils",
19
+ "test:unit": "c8 --r lcov mocha --no-warnings 'tests/**/bucket.spec.ts' && node ../../scripts/coveragePathFixing.js utils",
20
20
  "test:deno-unit": "swc tests --delete-dir-on-start -C jsc.minify.mangle=false --out-dir denoTestsDist && node ../../scripts/fixDenoTestExtension.js && deno test -A --import-map ../../denoImportMap.json denoTestsDist",
21
21
  "test:unit:watch": "mocha --no-warnings --watch --parallel 'tests/**/*.spec.ts'",
22
22
  "test:type": "tsc --noEmit",
23
23
  "test:test-type": "tsc --project tsconfig.test.json"
24
24
  },
25
25
  "dependencies": {
26
- "@discordeno/types": "19.0.0-next.f1f4322",
26
+ "@discordeno/types": "19.0.0-next.f2b6590",
27
27
  "node-fetch": "^3.3.1",
28
28
  "tweetnacl": "^1.0.3"
29
29
  },