@wix/sdk 1.17.7 → 1.17.9

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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ *
3
+ * TODO - implement this function
4
+ */
5
+ export declare function unflatten(target: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * TODO - implement this function
4
+ */
5
+ export function unflatten(target) {
6
+ return target;
7
+ }
@@ -1,5 +1,5 @@
1
- import { unflatten } from 'flat';
2
1
  import { RESTResponseToSDKResponseRenameMap } from '@wix/sdk-runtime/rest-modules';
2
+ import { unflatten } from './flat-utils.js';
3
3
  export class ModifiedFieldsManipulator {
4
4
  BRACKET_PATTERN = /\[(\d+)\]/g;
5
5
  NUMERIC_PATTERN = /^\d+$/;
@@ -156,8 +156,9 @@ export function createClient(config) {
156
156
  const wrappedModules = config.modules
157
157
  ? use(config.modules)
158
158
  : {};
159
- const authStrategy = { ...getAuthStrategy() };
160
- authStrategy.getAuthHeaders = boundGetAuthHeaders;
159
+ const authStrategy = getAuthStrategy();
160
+ const originalGetAuthHeaders = authStrategy.getAuthHeaders;
161
+ authStrategy.getAuthHeaders = originalGetAuthHeaders.bind(undefined, config.host);
161
162
  return {
162
163
  ...wrappedModules,
163
164
  auth: authStrategy,
@@ -0,0 +1,5 @@
1
+ /**
2
+ *
3
+ * TODO - implement this function
4
+ */
5
+ export declare function unflatten(target: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * TODO - implement this function
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.unflatten = unflatten;
8
+ function unflatten(target) {
9
+ return target;
10
+ }
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModifiedFieldsManipulator = void 0;
4
4
  exports.attemptTransformationWithModifiedFields = attemptTransformationWithModifiedFields;
5
- const flat_1 = require("flat");
6
5
  const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
6
+ const flat_utils_js_1 = require("./flat-utils.js");
7
7
  class ModifiedFieldsManipulator {
8
8
  BRACKET_PATTERN = /\[(\d+)\]/g;
9
9
  NUMERIC_PATTERN = /^\d+$/;
@@ -37,7 +37,7 @@ class ModifiedFieldsManipulator {
37
37
  this.replaceEscapedCharacters(this.bracketToDotNotation(key)),
38
38
  value,
39
39
  ]));
40
- return (0, flat_1.unflatten)(this.cleanedModifiedFields);
40
+ return (0, flat_utils_js_1.unflatten)(this.cleanedModifiedFields);
41
41
  }
42
42
  flatten(transformedModifiedFields) {
43
43
  let result = {};
@@ -160,8 +160,9 @@ function createClient(config) {
160
160
  const wrappedModules = config.modules
161
161
  ? use(config.modules)
162
162
  : {};
163
- const authStrategy = { ...getAuthStrategy() };
164
- authStrategy.getAuthHeaders = boundGetAuthHeaders;
163
+ const authStrategy = getAuthStrategy();
164
+ const originalGetAuthHeaders = authStrategy.getAuthHeaders;
165
+ authStrategy.getAuthHeaders = originalGetAuthHeaders.bind(undefined, config.host);
165
166
  return {
166
167
  ...wrappedModules,
167
168
  auth: authStrategy,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk",
3
- "version": "1.17.7",
3
+ "version": "1.17.9",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -78,7 +78,6 @@
78
78
  "@wix/sdk-context": "0.0.1",
79
79
  "@wix/sdk-runtime": "1.0.1",
80
80
  "@wix/sdk-types": "1.16.0",
81
- "flat": "^6.0.1",
82
81
  "jose": "^5.10.0",
83
82
  "type-fest": "^4.41.0"
84
83
  },
@@ -127,5 +126,5 @@
127
126
  "wallaby": {
128
127
  "autoDetect": true
129
128
  },
130
- "falconPackageHash": "56ca4bfad88fe040bd3a7acf7270870a21caf1eac8736de6ef704215"
129
+ "falconPackageHash": "4d056ebe7a6d4e37777504dff4376355ffb98bb9d968c7c69bfe19f2"
131
130
  }