@arrowsphere/api-client 3.355.0-rc.fdi.1 → 3.355.0-rc.fdi.3

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.
@@ -104,7 +104,9 @@ class AxiosSingleton {
104
104
  if (seen.has(obj))
105
105
  return seen.get(obj);
106
106
  // Crée une copie de l'objet pour éviter de le modifier directement
107
- const sanitizedCopy = Array.isArray(obj) ? [] : {};
107
+ const sanitizedCopy = Array.isArray(obj)
108
+ ? []
109
+ : {};
108
110
  // Stocke l'objet dans WeakMap avant la récursion
109
111
  seen.set(obj, sanitizedCopy);
110
112
  for (const [key, value] of Object.entries(obj)) {
@@ -128,6 +130,20 @@ class AxiosSingleton {
128
130
  else if (typeof value === 'object' && value !== null) {
129
131
  sanitizedCopy[key] = AxiosSingleton.sanitizeObject(value, fieldsToObfuscate, seen); // 🔄 Récursion avec WeakMap
130
132
  }
133
+ else if (typeof value === 'string') {
134
+ try {
135
+ const parsed = JSON.parse(value);
136
+ if (parsed && typeof parsed === 'object') {
137
+ sanitizedCopy[key] = JSON.stringify(AxiosSingleton.sanitizeObject(parsed, fieldsToObfuscate, seen));
138
+ }
139
+ else {
140
+ sanitizedCopy[key] = value;
141
+ }
142
+ }
143
+ catch (_a) {
144
+ sanitizedCopy[key] = value;
145
+ }
146
+ }
131
147
  else {
132
148
  sanitizedCopy[key] = value;
133
149
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.355.0-rc.fdi.1",
7
+ "version": "3.355.0-rc.fdi.3",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",
@@ -34,7 +34,6 @@
34
34
  "@types/validatorjs": "3.15.0",
35
35
  "@types/chai": "4.2.15",
36
36
  "@types/chai-as-promised": "7.1.3",
37
- "@types/lodash": "4.14.191",
38
37
  "@types/mocha": "8.2.0",
39
38
  "@types/node": "18.19.9",
40
39
  "@types/sinon": "9.0.10",
@@ -80,11 +79,10 @@
80
79
  "test": "tests"
81
80
  },
82
81
  "dependencies": {
83
- "axios": "1.13.2",
82
+ "axios": "1.13.5",
84
83
  "graphql": "16.8.1",
85
84
  "graphql-request": "7.3.5",
86
85
  "json-to-graphql-query": "2.3.0",
87
- "lodash": "4.17.21",
88
86
  "type-fest": "2.19.0",
89
87
  "validatorjs": "3.22.1"
90
88
  }