@thirdweb-dev/service-utils 0.4.9 → 0.4.10-nightly-bf27b887-20231121194818

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-d608dae0.cjs.dev.js');
5
+ var index = require('../../dist/index-c9486214.cjs.dev.js');
6
6
  var aws4fetch = require('aws4fetch');
7
7
  var zod = require('zod');
8
8
  var services = require('../../dist/services-79b4664f.cjs.dev.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-1b996e5d.cjs.prod.js');
5
+ var index = require('../../dist/index-208ce992.cjs.prod.js');
6
6
  var aws4fetch = require('aws4fetch');
7
7
  var zod = require('zod');
8
8
  var services = require('../../dist/services-04997839.cjs.prod.js');
@@ -1,5 +1,5 @@
1
- import { a as authorize } from '../../dist/index-15cb98ec.esm.js';
2
- export { r as rateLimit, u as usageLimit } from '../../dist/index-15cb98ec.esm.js';
1
+ import { a as authorize } from '../../dist/index-b6ba32b4.esm.js';
2
+ export { r as rateLimit, u as usageLimit } from '../../dist/index-b6ba32b4.esm.js';
3
3
  import { AwsClient } from 'aws4fetch';
4
4
  import { z } from 'zod';
5
5
  export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-bc12a5f6.esm.js';
@@ -261,9 +261,9 @@ async function authorize(authData, serviceConfig, cacheOptions) {
261
261
  // if the difference is greater than the cacheTtl we want to ignore the cached data
262
262
  const now = Date.now();
263
263
  const diff = now - parsed.updatedAt;
264
- const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
264
+ const cacheTtlMs = cacheOptions.cacheTtlSeconds * 1000;
265
265
  // only if the diff is less than the cacheTtl do we want to use the cached key
266
- if (diff < cacheTtl * 1000) {
266
+ if (diff < cacheTtlMs) {
267
267
  accountMeta = parsed.apiKeyMeta;
268
268
  }
269
269
  } else {
@@ -347,9 +347,9 @@ async function authorize(authData, serviceConfig, cacheOptions) {
347
347
  // if the difference is greater than the cacheTtl we want to ignore the cached data
348
348
  const now = Date.now();
349
349
  const diff = now - parsed.updatedAt;
350
- const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
350
+ const cacheTtlMs = cacheOptions.cacheTtlSeconds * 1000;
351
351
  // only if the diff is less than the cacheTtl do we want to use the cached key
352
- if (diff < cacheTtl * 1000) {
352
+ if (diff < cacheTtlMs) {
353
353
  apiKeyMeta = parsed.apiKeyMeta;
354
354
  }
355
355
  } else {
@@ -259,9 +259,9 @@ async function authorize(authData, serviceConfig, cacheOptions) {
259
259
  // if the difference is greater than the cacheTtl we want to ignore the cached data
260
260
  const now = Date.now();
261
261
  const diff = now - parsed.updatedAt;
262
- const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
262
+ const cacheTtlMs = cacheOptions.cacheTtlSeconds * 1000;
263
263
  // only if the diff is less than the cacheTtl do we want to use the cached key
264
- if (diff < cacheTtl * 1000) {
264
+ if (diff < cacheTtlMs) {
265
265
  accountMeta = parsed.apiKeyMeta;
266
266
  }
267
267
  } else {
@@ -345,9 +345,9 @@ async function authorize(authData, serviceConfig, cacheOptions) {
345
345
  // if the difference is greater than the cacheTtl we want to ignore the cached data
346
346
  const now = Date.now();
347
347
  const diff = now - parsed.updatedAt;
348
- const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
348
+ const cacheTtlMs = cacheOptions.cacheTtlSeconds * 1000;
349
349
  // only if the diff is less than the cacheTtl do we want to use the cached key
350
- if (diff < cacheTtl * 1000) {
350
+ if (diff < cacheTtlMs) {
351
351
  apiKeyMeta = parsed.apiKeyMeta;
352
352
  }
353
353
  } else {
@@ -261,9 +261,9 @@ async function authorize(authData, serviceConfig, cacheOptions) {
261
261
  // if the difference is greater than the cacheTtl we want to ignore the cached data
262
262
  const now = Date.now();
263
263
  const diff = now - parsed.updatedAt;
264
- const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
264
+ const cacheTtlMs = cacheOptions.cacheTtlSeconds * 1000;
265
265
  // only if the diff is less than the cacheTtl do we want to use the cached key
266
- if (diff < cacheTtl * 1000) {
266
+ if (diff < cacheTtlMs) {
267
267
  accountMeta = parsed.apiKeyMeta;
268
268
  }
269
269
  } else {
@@ -347,9 +347,9 @@ async function authorize(authData, serviceConfig, cacheOptions) {
347
347
  // if the difference is greater than the cacheTtl we want to ignore the cached data
348
348
  const now = Date.now();
349
349
  const diff = now - parsed.updatedAt;
350
- const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
350
+ const cacheTtlMs = cacheOptions.cacheTtlSeconds * 1000;
351
351
  // only if the diff is less than the cacheTtl do we want to use the cached key
352
- if (diff < cacheTtl * 1000) {
352
+ if (diff < cacheTtlMs) {
353
353
  apiKeyMeta = parsed.apiKeyMeta;
354
354
  }
355
355
  } else {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var node_crypto = require('node:crypto');
6
- var index = require('../../dist/index-d608dae0.cjs.dev.js');
6
+ var index = require('../../dist/index-c9486214.cjs.dev.js');
7
7
  var services = require('../../dist/services-79b4664f.cjs.dev.js');
8
8
 
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var node_crypto = require('node:crypto');
6
- var index = require('../../dist/index-1b996e5d.cjs.prod.js');
6
+ var index = require('../../dist/index-208ce992.cjs.prod.js');
7
7
  var services = require('../../dist/services-04997839.cjs.prod.js');
8
8
 
9
9
  /**
@@ -1,6 +1,6 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { a as authorize } from '../../dist/index-15cb98ec.esm.js';
3
- export { r as rateLimit, u as usageLimit } from '../../dist/index-15cb98ec.esm.js';
2
+ import { a as authorize } from '../../dist/index-b6ba32b4.esm.js';
3
+ export { r as rateLimit, u as usageLimit } from '../../dist/index-b6ba32b4.esm.js';
4
4
  export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-bc12a5f6.esm.js';
5
5
 
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdweb-dev/service-utils",
3
- "version": "0.4.9",
3
+ "version": "0.4.10-nightly-bf27b887-20231121194818",
4
4
  "main": "dist/thirdweb-dev-service-utils.cjs.js",
5
5
  "module": "dist/thirdweb-dev-service-utils.esm.js",
6
6
  "exports": {