npm-pkg-hook 1.13.7 → 1.13.8

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/.babelrc CHANGED
@@ -0,0 +1,6 @@
1
+ {
2
+ "presets": [
3
+ ["@babel/preset-env", { "targets": { "node": "current" } }],
4
+ "@babel/preset-typescript"
5
+ ]
6
+ }
package/dist/index.js CHANGED
@@ -293,14 +293,34 @@ module.exports = __toCommonJS(index_exports);
293
293
  // package.json
294
294
  var package_default = {
295
295
  dependencies: {
296
+ "@apollo/client": "3.13.5",
297
+ "file-saver": "2.0.5",
298
+ graphql: "16.12.0",
299
+ "js-cookie": "3.0.5",
300
+ lodash: "4.17.23",
301
+ typesdefs: "^1.0.6",
296
302
  xlsx: "0.18.5"
297
303
  },
298
304
  devDependencies: {
305
+ "@babel/core": "7.29.0",
306
+ "@babel/preset-env": "7.29.0",
307
+ "@babel/preset-typescript": "7.28.5",
308
+ "@eslint/js": "^9.39.2",
299
309
  "@types/file-saver": "2.0.7",
300
310
  "@types/js-cookie": "3.0.6",
301
311
  "@types/react": "18.0.20",
312
+ "babel-jest": "30.2.0",
313
+ eslint: "^9.39.2",
314
+ "eslint-plugin-import": "2.32.0",
315
+ "eslint-plugin-jsdoc": "62.5.0",
316
+ "eslint-plugin-react": "^7.37.5",
317
+ "eslint-plugin-react-hooks": "7.0.1",
318
+ globals: "^17.2.0",
319
+ jest: "30.2.0",
320
+ "ts-node": "10.9.2",
302
321
  tsup: "8.5.1",
303
- typescript: "5.9.3"
322
+ typescript: "5.9.3",
323
+ "typescript-eslint": "^8.54.0"
304
324
  },
305
325
  exports: {
306
326
  ".": {
@@ -313,10 +333,6 @@ var package_default = {
313
333
  module: "dist/index.mjs",
314
334
  name: "npm-pkg-hook",
315
335
  peerDependencies: {
316
- "@apollo/client": "^3 || ^4",
317
- "file-saver": "^2",
318
- graphql: "^16",
319
- lodash: "^4",
320
336
  next: "^14 || ^15",
321
337
  react: "^18 || ^19",
322
338
  "react-dom": "^18 || ^19"
@@ -328,8 +344,8 @@ var package_default = {
328
344
  prepublishOnly: "npm run build",
329
345
  test: "jest"
330
346
  },
331
- types: "dist/index.d.ts",
332
- version: "1.13.7"
347
+ types: "./node_modules/typesdefs/index.d.ts",
348
+ version: "1.13.8"
333
349
  };
334
350
 
335
351
  // src/hooks/updateExtProductFoodsOptional/index.ts
@@ -385,7 +401,7 @@ var UtilDateRange = class {
385
401
  };
386
402
 
387
403
  // src/utils/utils.ts
388
- var import_crypto = require("crypto");
404
+ var import_node_crypto = require("crypto");
389
405
  var validTypes = {
390
406
  text: true,
391
407
  password: true,
@@ -438,7 +454,7 @@ var RandomCode = (length, options = {}) => {
438
454
  }
439
455
  const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
440
456
  const charactersLength = characters.length;
441
- const randomBuffer = (0, import_crypto.randomBytes)(length);
457
+ const randomBuffer = (0, import_node_crypto.randomBytes)(length);
442
458
  let code = "";
443
459
  for (let i = 0; i < length; i++) {
444
460
  const index = randomBuffer[i] % charactersLength;
@@ -16005,9 +16021,9 @@ var useGetStoreCookie = () => {
16005
16021
  };
16006
16022
 
16007
16023
  // src/hooks/getGlobalSession/index.ts
16008
- var import_crypto2 = __toESM(require("crypto"));
16024
+ var import_crypto = __toESM(require("crypto"));
16009
16025
  function generateEncryptionKey(password, salt) {
16010
- return import_crypto2.default.pbkdf2Sync(password, salt, 1e5, 32, "sha256").toString("hex").slice(0, 32);
16026
+ return import_crypto.default.pbkdf2Sync(password, salt, 1e5, 32, "sha256").toString("hex").slice(0, 32);
16011
16027
  }
16012
16028
  var ENCRYPTION_KEY = generateEncryptionKey(
16013
16029
  "tu-contrase\xF1a",
@@ -16016,8 +16032,8 @@ var ENCRYPTION_KEY = generateEncryptionKey(
16016
16032
  var IV_LENGTH = 12;
16017
16033
  var encryptSession = (text) => {
16018
16034
  try {
16019
- const iv = import_crypto2.default.randomBytes(IV_LENGTH);
16020
- const cipher = import_crypto2.default.createCipheriv(
16035
+ const iv = import_crypto.default.randomBytes(IV_LENGTH);
16036
+ const cipher = import_crypto.default.createCipheriv(
16021
16037
  "aes-256-gcm",
16022
16038
  Buffer.from(ENCRYPTION_KEY),
16023
16039
  iv
@@ -16045,7 +16061,7 @@ var decryptSession = (text) => {
16045
16061
  const iv = Buffer.from(textParts[0], "hex");
16046
16062
  const authTag = Buffer.from(textParts[1], "hex");
16047
16063
  const encryptedText = Buffer.from(textParts[2], "hex");
16048
- const decipher = import_crypto2.default.createDecipheriv(
16064
+ const decipher = import_crypto.default.createDecipheriv(
16049
16065
  "aes-256-gcm",
16050
16066
  Buffer.from(ENCRYPTION_KEY),
16051
16067
  iv