@dereekb/calcom 13.6.17 → 13.7.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.
@@ -3,9 +3,9 @@
3
3
  var common = require('@nestjs/common');
4
4
  var calcom = require('@dereekb/calcom');
5
5
  var util = require('@dereekb/util');
6
- var crypto = require('crypto');
7
- var path = require('path');
8
- var fs = require('fs');
6
+ var node_crypto = require('node:crypto');
7
+ var node_path = require('node:path');
8
+ var node_fs = require('node:fs');
9
9
  var config = require('@nestjs/config');
10
10
  var nestjs = require('@dereekb/nestjs');
11
11
 
@@ -322,7 +322,7 @@ exports.CalcomOAuthAccessTokenCacheService = __decorate([
322
322
  * @param refreshToken - the OAuth refresh token to hash
323
323
  * @returns a 16-character hex string suitable for use as a cache key
324
324
  */ function calcomRefreshTokenCacheKey(refreshToken) {
325
- return crypto.createHash('md5').update(refreshToken).digest('hex').substring(0, 16);
325
+ return node_crypto.createHash('md5').update(refreshToken).digest('hex').substring(0, 16);
326
326
  }
327
327
  /**
328
328
  * Default error logging function for {@link mergeCalcomOAuthAccessTokenCacheServices}.
@@ -510,14 +510,14 @@ var CALCOM_SERVER_TOKEN_FILE_KEY = 'server';
510
510
  var cacheDir = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_FILE_CALCOM_ACCESS_TOKEN_CACHE_DIR;
511
511
  var memoryTokens = new Map();
512
512
  function filePathForKey(key) {
513
- return path.join(cacheDir, "".concat(key, ".json"));
513
+ return node_path.join(cacheDir, "".concat(key, ".json"));
514
514
  }
515
515
  function readTokenFile(filePath) {
516
516
  return new Promise(function(resolve) {
517
- fs.mkdirSync(path.dirname(filePath), {
517
+ node_fs.mkdirSync(node_path.dirname(filePath), {
518
518
  recursive: true
519
519
  });
520
- fs.readFile(filePath, {}, function(err, data) {
520
+ node_fs.readFile(filePath, {}, function(err, data) {
521
521
  var result = undefined;
522
522
  if (!err) {
523
523
  try {
@@ -535,10 +535,10 @@ var CALCOM_SERVER_TOKEN_FILE_KEY = 'server';
535
535
  }
536
536
  function writeTokenFile(filePath, content) {
537
537
  return new Promise(function(resolve, reject) {
538
- fs.mkdirSync(path.dirname(filePath), {
538
+ node_fs.mkdirSync(node_path.dirname(filePath), {
539
539
  recursive: true
540
540
  });
541
- fs.writeFile(filePath, JSON.stringify(content, null, 2), {}, function(err) {
541
+ node_fs.writeFile(filePath, JSON.stringify(content, null, 2), {}, function(err) {
542
542
  if (!err) {
543
543
  resolve();
544
544
  } else {
@@ -1460,7 +1460,7 @@ var CALCOM_WEBHOOK_SECRET_CONFIG_KEY = 'CALCOM_WEBHOOK_SECRET';
1460
1460
  var _headers_xcalsignature256;
1461
1461
  var rawBodyString = rawBody.toString('utf8');
1462
1462
  var signature = (_headers_xcalsignature256 = headers['x-cal-signature-256']) !== null && _headers_xcalsignature256 !== void 0 ? _headers_xcalsignature256 : '';
1463
- var expectedSignature = crypto.createHmac('sha256', secret).update(rawBodyString).digest('hex');
1463
+ var expectedSignature = node_crypto.createHmac('sha256', secret).update(rawBodyString).digest('hex');
1464
1464
  var valid = signature === expectedSignature;
1465
1465
  var event;
1466
1466
  try {
@@ -1,9 +1,9 @@
1
1
  import { Injectable, Inject, Logger, Post, Res, Req, Controller, Module } from '@nestjs/common';
2
2
  import { calcomOAuthFactory, exchangeAuthorizationCode, calcomFactory, getMe, getSchedules, createBooking, getBooking, cancelBooking, getEventTypes, createEventType, updateEventType, deleteEventType, getCalendars, getBusyTimes, createWebhook, getWebhooks, getWebhook, updateWebhook, deleteWebhook, getAvailableSlots } from '@dereekb/calcom';
3
3
  import { tryWithPromiseFactoriesFunction, isPast, filterMaybeArrayValues, cachedGetter, handlerFactory, handlerConfigurerFactory, handlerMappedSetFunctionFactory } from '@dereekb/util';
4
- import { createHash, createHmac } from 'crypto';
5
- import { join, dirname } from 'path';
6
- import { mkdirSync, writeFile, readFile } from 'fs';
4
+ import { createHash, createHmac } from 'node:crypto';
5
+ import { join, dirname } from 'node:path';
6
+ import { mkdirSync, writeFile, readFile } from 'node:fs';
7
7
  import { ConfigService, ConfigModule } from '@nestjs/config';
8
8
  import { RawBody } from '@dereekb/nestjs';
9
9
 
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dereekb/calcom/nestjs",
3
- "version": "13.6.17",
3
+ "version": "13.7.0",
4
4
  "peerDependencies": {
5
- "@dereekb/nestjs": "13.6.17",
6
- "@dereekb/rxjs": "13.6.17",
7
- "@dereekb/util": "13.6.17",
8
- "@dereekb/calcom": "13.6.17",
5
+ "@dereekb/nestjs": "13.7.0",
6
+ "@dereekb/rxjs": "13.7.0",
7
+ "@dereekb/util": "13.7.0",
8
+ "@dereekb/calcom": "13.7.0",
9
9
  "@nestjs/common": "^11.1.17",
10
10
  "@nestjs/config": "^4.0.3",
11
11
  "express": "^5.0.0"
@@ -1,5 +1,5 @@
1
1
  import { type CalcomConfig, type CalcomFactoryConfig } from '@dereekb/calcom';
2
- export type CalcomServiceApiConfig = CalcomConfig & {};
2
+ export type CalcomServiceApiConfig = CalcomConfig;
3
3
  /**
4
4
  * Configuration for CalcomService
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/calcom",
3
- "version": "13.6.17",
3
+ "version": "13.7.0",
4
4
  "exports": {
5
5
  "./nestjs": {
6
6
  "module": "./nestjs/index.esm.js",
@@ -17,9 +17,9 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@dereekb/nestjs": "13.6.17",
21
- "@dereekb/rxjs": "13.6.17",
22
- "@dereekb/util": "13.6.17",
20
+ "@dereekb/nestjs": "13.7.0",
21
+ "@dereekb/rxjs": "13.7.0",
22
+ "@dereekb/util": "13.7.0",
23
23
  "@nestjs/common": "^11.1.17",
24
24
  "@nestjs/config": "^4.0.3",
25
25
  "express": "^5.0.0",