@dereekb/nestjs 13.11.9 → 13.11.11

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.
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/discord",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
- "@dereekb/nestjs": "13.11.9",
6
- "@dereekb/rxjs": "13.11.9",
7
- "@dereekb/util": "13.11.9",
5
+ "@dereekb/nestjs": "13.11.11",
6
+ "@dereekb/rxjs": "13.11.11",
7
+ "@dereekb/util": "13.11.11",
8
8
  "@nestjs/common": "^11.1.19",
9
9
  "@nestjs/config": "^4.0.4",
10
10
  "discord.js": "^14.26.3",
@@ -266,30 +266,7 @@ function _unsupported_iterable_to_array(o, minLen) {
266
266
  var hasValidDecorator = paramDecoratorsOnNode && paramDecoratorsOnNode.length > 0 && paramDecoratorsOnNode.some(function(d) {
267
267
  return paramDecorators.has(getDecoratorName(d));
268
268
  });
269
- if (!hasValidDecorator) {
270
- // Missing @Inject() entirely
271
- var tokenName = getInjectTokenName(param);
272
- context.report({
273
- node: param,
274
- messageId: 'missingInject',
275
- data: {
276
- name: getParamName(param),
277
- classDecorator: classDecoratorName
278
- },
279
- fix: tokenName ? function(fixer) {
280
- var fixes = [];
281
- fixes.push(fixer.insertTextBefore(param, "@Inject(".concat(tokenName, ") ")));
282
- if (!nestjsImports.has('Inject') && nestjsImportNode) {
283
- var lastSpecifier = nestjsImportNode.specifiers[nestjsImportNode.specifiers.length - 1];
284
- if (lastSpecifier) {
285
- fixes.push(fixer.insertTextAfter(lastSpecifier, ', Inject'));
286
- }
287
- nestjsImports.add('Inject');
288
- }
289
- return fixes;
290
- } : undefined
291
- });
292
- } else {
269
+ if (hasValidDecorator) {
293
270
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
294
271
  try {
295
272
  var _loop = function() {
@@ -345,6 +322,29 @@ function _unsupported_iterable_to_array(o, minLen) {
345
322
  }
346
323
  }
347
324
  }
325
+ } else {
326
+ // Missing @Inject() entirely
327
+ var tokenName = getInjectTokenName(param);
328
+ context.report({
329
+ node: param,
330
+ messageId: 'missingInject',
331
+ data: {
332
+ name: getParamName(param),
333
+ classDecorator: classDecoratorName
334
+ },
335
+ fix: tokenName ? function(fixer) {
336
+ var fixes = [];
337
+ fixes.push(fixer.insertTextBefore(param, "@Inject(".concat(tokenName, ") ")));
338
+ if (!nestjsImports.has('Inject') && nestjsImportNode) {
339
+ var lastSpecifier = nestjsImportNode.specifiers[nestjsImportNode.specifiers.length - 1];
340
+ if (lastSpecifier) {
341
+ fixes.push(fixer.insertTextAfter(lastSpecifier, ', Inject'));
342
+ }
343
+ nestjsImports.add('Inject');
344
+ }
345
+ return fixes;
346
+ } : undefined
347
+ });
348
348
  }
349
349
  };
350
350
  for(var _iterator = constructor.value.params[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
@@ -264,30 +264,7 @@ function _unsupported_iterable_to_array(o, minLen) {
264
264
  var hasValidDecorator = paramDecoratorsOnNode && paramDecoratorsOnNode.length > 0 && paramDecoratorsOnNode.some(function(d) {
265
265
  return paramDecorators.has(getDecoratorName(d));
266
266
  });
267
- if (!hasValidDecorator) {
268
- // Missing @Inject() entirely
269
- var tokenName = getInjectTokenName(param);
270
- context.report({
271
- node: param,
272
- messageId: 'missingInject',
273
- data: {
274
- name: getParamName(param),
275
- classDecorator: classDecoratorName
276
- },
277
- fix: tokenName ? function(fixer) {
278
- var fixes = [];
279
- fixes.push(fixer.insertTextBefore(param, "@Inject(".concat(tokenName, ") ")));
280
- if (!nestjsImports.has('Inject') && nestjsImportNode) {
281
- var lastSpecifier = nestjsImportNode.specifiers[nestjsImportNode.specifiers.length - 1];
282
- if (lastSpecifier) {
283
- fixes.push(fixer.insertTextAfter(lastSpecifier, ', Inject'));
284
- }
285
- nestjsImports.add('Inject');
286
- }
287
- return fixes;
288
- } : undefined
289
- });
290
- } else {
267
+ if (hasValidDecorator) {
291
268
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
292
269
  try {
293
270
  var _loop = function() {
@@ -343,6 +320,29 @@ function _unsupported_iterable_to_array(o, minLen) {
343
320
  }
344
321
  }
345
322
  }
323
+ } else {
324
+ // Missing @Inject() entirely
325
+ var tokenName = getInjectTokenName(param);
326
+ context.report({
327
+ node: param,
328
+ messageId: 'missingInject',
329
+ data: {
330
+ name: getParamName(param),
331
+ classDecorator: classDecoratorName
332
+ },
333
+ fix: tokenName ? function(fixer) {
334
+ var fixes = [];
335
+ fixes.push(fixer.insertTextBefore(param, "@Inject(".concat(tokenName, ") ")));
336
+ if (!nestjsImports.has('Inject') && nestjsImportNode) {
337
+ var lastSpecifier = nestjsImportNode.specifiers[nestjsImportNode.specifiers.length - 1];
338
+ if (lastSpecifier) {
339
+ fixes.push(fixer.insertTextAfter(lastSpecifier, ', Inject'));
340
+ }
341
+ nestjsImports.add('Inject');
342
+ }
343
+ return fixes;
344
+ } : undefined
345
+ });
346
346
  }
347
347
  };
348
348
  for(var _iterator = constructor.value.params[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/eslint",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
5
  "@typescript-eslint/utils": "8.59.0"
6
6
  },
package/index.cjs.js CHANGED
@@ -1987,6 +1987,16 @@ function _non_iterable_rest() {
1987
1987
  function _sliced_to_array(arr, i) {
1988
1988
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1989
1989
  }
1990
+ function _tagged_template_literal(strings, raw) {
1991
+ if (!raw) {
1992
+ raw = strings.slice(0);
1993
+ }
1994
+ return Object.freeze(Object.defineProperties(strings, {
1995
+ raw: {
1996
+ value: Object.freeze(raw)
1997
+ }
1998
+ }));
1999
+ }
1990
2000
  function _unsupported_iterable_to_array(o, minLen) {
1991
2001
  if (!o) return;
1992
2002
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1995,6 +2005,21 @@ function _unsupported_iterable_to_array(o, minLen) {
1995
2005
  if (n === "Map" || n === "Set") return Array.from(n);
1996
2006
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1997
2007
  }
2008
+ function _templateObject() {
2009
+ var data = _tagged_template_literal([
2010
+ "(?:^|[\r\ns])",
2011
+ "s+",
2012
+ "s+obj\b"
2013
+ ], [
2014
+ "(?:^|[\\r\\n\\s])",
2015
+ "\\s+",
2016
+ "\\s+obj\\b"
2017
+ ]);
2018
+ _templateObject = function _templateObject() {
2019
+ return data;
2020
+ };
2021
+ return data;
2022
+ }
1998
2023
  /**
1999
2024
  * 32-byte password padding string defined by ISO 32000 §7.6.3.3 (Algorithm 2).
2000
2025
  * Used to pad short or empty user/owner passwords for the standard security handler.
@@ -2250,7 +2275,7 @@ function decodePdfHexString(content) {
2250
2275
  if (hex.length % 2 === 1) hex.push(0x30);
2251
2276
  var out = Buffer.alloc(hex.length / 2);
2252
2277
  for(var i = 0; i < out.length; i++){
2253
- out[i] = parseInt(String.fromCharCode(hex[i * 2], hex[i * 2 + 1]), 16);
2278
+ out[i] = Number.parseInt(String.fromCodePoint(hex[i * 2], hex[i * 2 + 1]), 16);
2254
2279
  }
2255
2280
  return out;
2256
2281
  }
@@ -2282,9 +2307,7 @@ function parsePdfDict(buffer, dictStart) {
2282
2307
  entries: entries,
2283
2308
  end: i + 2
2284
2309
  };
2285
- } else if (buffer[i] !== 0x2f /* / */ ) {
2286
- aborted = true;
2287
- } else {
2310
+ } else if (buffer[i] === 0x2f /* / */ ) {
2288
2311
  var nameStart = i + 1;
2289
2312
  var nameEnd = nameStart;
2290
2313
  while(nameEnd < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[nameEnd]))nameEnd++;
@@ -2294,13 +2317,15 @@ function parsePdfDict(buffer, dictStart) {
2294
2317
  aborted = true;
2295
2318
  } else {
2296
2319
  var valueResult = readPdfValue(buffer, i);
2297
- if (!valueResult) {
2298
- aborted = true;
2299
- } else {
2320
+ if (valueResult) {
2300
2321
  entries.set(name, valueResult.entry);
2301
2322
  i = skipPdfWhitespaceAndComments(buffer, valueResult.end);
2323
+ } else {
2324
+ aborted = true;
2302
2325
  }
2303
2326
  }
2327
+ } else {
2328
+ aborted = true;
2304
2329
  }
2305
2330
  }
2306
2331
  return result;
@@ -2512,7 +2537,7 @@ function resolveIndirectEncryptionDictionary(buffer, start) {
2512
2537
  }
2513
2538
  function findIndirectObjectStart(buffer, objNum, objGen) {
2514
2539
  var text = buffer.toString('latin1');
2515
- var re = new RegExp("(?:^|[\\r\\n\\s])".concat(objNum, "\\s+").concat(objGen, "\\s+obj\\b"));
2540
+ var re = new RegExp(String.raw(_templateObject(), objNum, objGen));
2516
2541
  var match = re.exec(text);
2517
2542
  return match ? match.index + match[0].length : -1;
2518
2543
  }
@@ -2647,7 +2672,7 @@ function computeFileEncryptionKeyR2to4(info, password, fileId) {
2647
2672
  md5.update(padded);
2648
2673
  md5.update(info.O);
2649
2674
  var pBytes = Buffer.alloc(4);
2650
- pBytes.writeInt32LE(info.P | 0, 0);
2675
+ pBytes.writeInt32LE(Math.trunc(info.P), 0);
2651
2676
  md5.update(pBytes);
2652
2677
  md5.update(fileId);
2653
2678
  if (info.R >= 4 && !info.encryptMetadata) md5.update(Buffer.from([
@@ -2701,7 +2726,7 @@ function validateEmptyPasswordR6(info) {
2701
2726
  function pdfAlgorithm2B(input, password, userKey) {
2702
2727
  var K = node_crypto.createHash('sha256').update(input).digest();
2703
2728
  var round = 0;
2704
- var lastE = Buffer.alloc(0);
2729
+ var lastE;
2705
2730
  while(true){
2706
2731
  var part = Buffer.concat([
2707
2732
  password,
@@ -2710,6 +2735,8 @@ function pdfAlgorithm2B(input, password, userKey) {
2710
2735
  ]);
2711
2736
  var K1 = Buffer.alloc(part.length * 64);
2712
2737
  for(var i = 0; i < 64; i++)part.copy(K1, i * part.length);
2738
+ // PDF 1.7 spec (Algorithm 2.B) requires AES-128-CBC with autoPadding disabled
2739
+ // NOSONAR (typescript:S5542): cipher mode is dictated by the PDF standard
2713
2740
  var cipher = node_crypto.createCipheriv('aes-128-cbc', K.subarray(0, 16), K.subarray(16, 32));
2714
2741
  cipher.setAutoPadding(false);
2715
2742
  var E = Buffer.concat([
package/index.esm.js CHANGED
@@ -1985,6 +1985,16 @@ function _non_iterable_rest() {
1985
1985
  function _sliced_to_array(arr, i) {
1986
1986
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1987
1987
  }
1988
+ function _tagged_template_literal(strings, raw) {
1989
+ if (!raw) {
1990
+ raw = strings.slice(0);
1991
+ }
1992
+ return Object.freeze(Object.defineProperties(strings, {
1993
+ raw: {
1994
+ value: Object.freeze(raw)
1995
+ }
1996
+ }));
1997
+ }
1988
1998
  function _unsupported_iterable_to_array(o, minLen) {
1989
1999
  if (!o) return;
1990
2000
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1993,6 +2003,21 @@ function _unsupported_iterable_to_array(o, minLen) {
1993
2003
  if (n === "Map" || n === "Set") return Array.from(n);
1994
2004
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1995
2005
  }
2006
+ function _templateObject() {
2007
+ var data = _tagged_template_literal([
2008
+ "(?:^|[\r\ns])",
2009
+ "s+",
2010
+ "s+obj\b"
2011
+ ], [
2012
+ "(?:^|[\\r\\n\\s])",
2013
+ "\\s+",
2014
+ "\\s+obj\\b"
2015
+ ]);
2016
+ _templateObject = function _templateObject() {
2017
+ return data;
2018
+ };
2019
+ return data;
2020
+ }
1996
2021
  /**
1997
2022
  * 32-byte password padding string defined by ISO 32000 §7.6.3.3 (Algorithm 2).
1998
2023
  * Used to pad short or empty user/owner passwords for the standard security handler.
@@ -2248,7 +2273,7 @@ function decodePdfHexString(content) {
2248
2273
  if (hex.length % 2 === 1) hex.push(0x30);
2249
2274
  var out = Buffer.alloc(hex.length / 2);
2250
2275
  for(var i = 0; i < out.length; i++){
2251
- out[i] = parseInt(String.fromCharCode(hex[i * 2], hex[i * 2 + 1]), 16);
2276
+ out[i] = Number.parseInt(String.fromCodePoint(hex[i * 2], hex[i * 2 + 1]), 16);
2252
2277
  }
2253
2278
  return out;
2254
2279
  }
@@ -2280,9 +2305,7 @@ function parsePdfDict(buffer, dictStart) {
2280
2305
  entries: entries,
2281
2306
  end: i + 2
2282
2307
  };
2283
- } else if (buffer[i] !== 0x2f /* / */ ) {
2284
- aborted = true;
2285
- } else {
2308
+ } else if (buffer[i] === 0x2f /* / */ ) {
2286
2309
  var nameStart = i + 1;
2287
2310
  var nameEnd = nameStart;
2288
2311
  while(nameEnd < buffer.length && !isPdfWhitespaceOrDelimiter(buffer[nameEnd]))nameEnd++;
@@ -2292,13 +2315,15 @@ function parsePdfDict(buffer, dictStart) {
2292
2315
  aborted = true;
2293
2316
  } else {
2294
2317
  var valueResult = readPdfValue(buffer, i);
2295
- if (!valueResult) {
2296
- aborted = true;
2297
- } else {
2318
+ if (valueResult) {
2298
2319
  entries.set(name, valueResult.entry);
2299
2320
  i = skipPdfWhitespaceAndComments(buffer, valueResult.end);
2321
+ } else {
2322
+ aborted = true;
2300
2323
  }
2301
2324
  }
2325
+ } else {
2326
+ aborted = true;
2302
2327
  }
2303
2328
  }
2304
2329
  return result;
@@ -2510,7 +2535,7 @@ function resolveIndirectEncryptionDictionary(buffer, start) {
2510
2535
  }
2511
2536
  function findIndirectObjectStart(buffer, objNum, objGen) {
2512
2537
  var text = buffer.toString('latin1');
2513
- var re = new RegExp("(?:^|[\\r\\n\\s])".concat(objNum, "\\s+").concat(objGen, "\\s+obj\\b"));
2538
+ var re = new RegExp(String.raw(_templateObject(), objNum, objGen));
2514
2539
  var match = re.exec(text);
2515
2540
  return match ? match.index + match[0].length : -1;
2516
2541
  }
@@ -2645,7 +2670,7 @@ function computeFileEncryptionKeyR2to4(info, password, fileId) {
2645
2670
  md5.update(padded);
2646
2671
  md5.update(info.O);
2647
2672
  var pBytes = Buffer.alloc(4);
2648
- pBytes.writeInt32LE(info.P | 0, 0);
2673
+ pBytes.writeInt32LE(Math.trunc(info.P), 0);
2649
2674
  md5.update(pBytes);
2650
2675
  md5.update(fileId);
2651
2676
  if (info.R >= 4 && !info.encryptMetadata) md5.update(Buffer.from([
@@ -2699,7 +2724,7 @@ function validateEmptyPasswordR6(info) {
2699
2724
  function pdfAlgorithm2B(input, password, userKey) {
2700
2725
  var K = createHash('sha256').update(input).digest();
2701
2726
  var round = 0;
2702
- var lastE = Buffer.alloc(0);
2727
+ var lastE;
2703
2728
  while(true){
2704
2729
  var part = Buffer.concat([
2705
2730
  password,
@@ -2708,6 +2733,8 @@ function pdfAlgorithm2B(input, password, userKey) {
2708
2733
  ]);
2709
2734
  var K1 = Buffer.alloc(part.length * 64);
2710
2735
  for(var i = 0; i < 64; i++)part.copy(K1, i * part.length);
2736
+ // PDF 1.7 spec (Algorithm 2.B) requires AES-128-CBC with autoPadding disabled
2737
+ // NOSONAR (typescript:S5542): cipher mode is dictated by the PDF standard
2711
2738
  var cipher = createCipheriv('aes-128-cbc', K.subarray(0, 16), K.subarray(16, 32));
2712
2739
  cipher.setAutoPadding(false);
2713
2740
  var E = Buffer.concat([
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/mailgun",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.11.9",
6
- "@dereekb/model": "13.11.9",
7
- "@dereekb/nestjs": "13.11.9",
8
- "@dereekb/rxjs": "13.11.9",
9
- "@dereekb/util": "13.11.9",
5
+ "@dereekb/date": "13.11.11",
6
+ "@dereekb/model": "13.11.11",
7
+ "@dereekb/nestjs": "13.11.11",
8
+ "@dereekb/rxjs": "13.11.11",
9
+ "@dereekb/util": "13.11.11",
10
10
  "@nestjs/common": "^11.1.19",
11
11
  "@nestjs/config": "^4.0.4",
12
12
  "form-data": "^4.0.5",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/openai",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.11.9",
6
- "@dereekb/model": "13.11.9",
7
- "@dereekb/nestjs": "13.11.9",
8
- "@dereekb/rxjs": "13.11.9",
9
- "@dereekb/util": "13.11.9",
5
+ "@dereekb/date": "13.11.11",
6
+ "@dereekb/model": "13.11.11",
7
+ "@dereekb/nestjs": "13.11.11",
8
+ "@dereekb/rxjs": "13.11.11",
9
+ "@dereekb/util": "13.11.11",
10
10
  "@nestjs/common": "^11.1.19",
11
11
  "@nestjs/config": "^4.0.4",
12
12
  "express": "^5.2.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "types": "./src/index.d.ts",
5
5
  "module": "./index.esm.js",
6
6
  "main": "./index.cjs.js",
@@ -56,8 +56,8 @@
56
56
  }
57
57
  },
58
58
  "peerDependencies": {
59
- "@dereekb/rxjs": "13.11.9",
60
- "@dereekb/util": "13.11.9",
59
+ "@dereekb/rxjs": "13.11.11",
60
+ "@dereekb/util": "13.11.11",
61
61
  "@nestjs/common": "^11.1.19",
62
62
  "@nestjs/config": "^4.0.4",
63
63
  "@typeform/api-client": "^2.10.2",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/stripe",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.11.9",
6
- "@dereekb/model": "13.11.9",
7
- "@dereekb/nestjs": "13.11.9",
8
- "@dereekb/rxjs": "13.11.9",
9
- "@dereekb/util": "13.11.9",
5
+ "@dereekb/date": "13.11.11",
6
+ "@dereekb/model": "13.11.11",
7
+ "@dereekb/nestjs": "13.11.11",
8
+ "@dereekb/rxjs": "13.11.11",
9
+ "@dereekb/util": "13.11.11",
10
10
  "@nestjs/common": "^11.1.19",
11
11
  "@nestjs/config": "^4.0.4",
12
12
  "express": "^5.2.1",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/typeform",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.11.9",
6
- "@dereekb/model": "13.11.9",
7
- "@dereekb/nestjs": "13.11.9",
8
- "@dereekb/rxjs": "13.11.9",
9
- "@dereekb/util": "13.11.9",
5
+ "@dereekb/date": "13.11.11",
6
+ "@dereekb/model": "13.11.11",
7
+ "@dereekb/nestjs": "13.11.11",
8
+ "@dereekb/rxjs": "13.11.11",
9
+ "@dereekb/util": "13.11.11",
10
10
  "@nestjs/common": "^11.1.19",
11
11
  "@nestjs/config": "^4.0.4",
12
12
  "@typeform/api-client": "^2.10.2",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dereekb/nestjs/vapiai",
3
- "version": "13.11.9",
3
+ "version": "13.11.11",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.11.9",
6
- "@dereekb/model": "13.11.9",
7
- "@dereekb/nestjs": "13.11.9",
8
- "@dereekb/rxjs": "13.11.9",
9
- "@dereekb/util": "13.11.9",
5
+ "@dereekb/date": "13.11.11",
6
+ "@dereekb/model": "13.11.11",
7
+ "@dereekb/nestjs": "13.11.11",
8
+ "@dereekb/rxjs": "13.11.11",
9
+ "@dereekb/util": "13.11.11",
10
10
  "@nestjs/common": "^11.1.19",
11
11
  "@nestjs/config": "^4.0.4",
12
12
  "@vapi-ai/server-sdk": "^0.11.0",