Socket
Socket
Sign inDemoInstall

@wix/api-client

Package Overview
Dependencies
8
Maintainers
18
Versions
114
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.38 to 1.1.39

dist/cjs/bi/biHeaderGenerator.js

10

dist/cjs/wixClient.js

@@ -5,4 +5,6 @@ "use strict";

exports.createClient = createClient;
var _biHeaderGenerator = require("./bi/biHeaderGenerator");
var _common = require("./common");
const API_URL = 'www.wixapis.com';
const wrapperBuilder = (origFunc, authStrategy, headers
const wrapperBuilder = (origFunc, authStrategy, headers, publicMetadata
// @ts-expect-error

@@ -21,2 +23,3 @@ ) => {

const authHeaders = await authStrategy.getAuthHeaders();
const biHeader = (0, _biHeaderGenerator.biHeaderGenerator)(requestOptions, publicMetadata);
const res = await fetch(url, {

@@ -29,3 +32,4 @@ method: requestOptions.method,

...headers,
...(authHeaders == null ? void 0 : authHeaders.headers)
...(authHeaders == null ? void 0 : authHeaders.headers),
...biHeader
}

@@ -97,3 +101,3 @@ });

} else if (typeof obj[key] === 'function') {
prev[key] = wrapperBuilder(value, authStrategy, _headers);
prev[key] = wrapperBuilder(value, authStrategy, _headers, obj[_common.PUBLIC_METADATA_KEY] ?? {});
} else {

@@ -100,0 +104,0 @@ prev[key] = value;

@@ -0,3 +1,5 @@

import { biHeaderGenerator } from './bi/biHeaderGenerator';
import { PUBLIC_METADATA_KEY } from './common';
const API_URL = 'www.wixapis.com';
const wrapperBuilder = (origFunc, authStrategy, headers
const wrapperBuilder = (origFunc, authStrategy, headers, publicMetadata
// @ts-expect-error

@@ -16,2 +18,3 @@ ) => {

const authHeaders = await authStrategy.getAuthHeaders();
const biHeader = biHeaderGenerator(requestOptions, publicMetadata);
const res = await fetch(url, {

@@ -24,3 +27,4 @@ method: requestOptions.method,

...headers,
...(authHeaders == null ? void 0 : authHeaders.headers)
...(authHeaders == null ? void 0 : authHeaders.headers),
...biHeader
}

@@ -93,3 +97,4 @@ });

} else if (typeof obj[key] === 'function') {
prev[key] = wrapperBuilder(value, authStrategy, _headers);
var _obj$PUBLIC_METADATA_;
prev[key] = wrapperBuilder(value, authStrategy, _headers, (_obj$PUBLIC_METADATA_ = obj[PUBLIC_METADATA_KEY]) != null ? _obj$PUBLIC_METADATA_ : {});
} else {

@@ -96,0 +101,0 @@ prev[key] = value;

{
"name": "@wix/api-client",
"version": "1.1.38",
"version": "1.1.39",
"license": "UNLICENSED",

@@ -34,3 +34,3 @@ "author": {

"@wix/redirects-api": "^1.0.18",
"@wix/sdk-types": "^1.1.38",
"@wix/sdk-types": "^1.1.39",
"pkce-challenge": "^3.0.0",

@@ -43,5 +43,6 @@ "querystring": "^0.2.1",

"@types/node": "^16.18.20",
"@wix/ecom": "^1.0.137",
"@wix/ecom": "^1.0.138",
"@wix/events": "^1.0.70",
"@wix/jest-yoshi-preset": "^6.53.0",
"@wix/motion": "^1.0.22",
"@wix/yoshi-flow-library": "^6.53.0",

@@ -74,3 +75,3 @@ "ts-jest": "^27.1.5",

},
"falconPackageHash": "cba0ea569534170c3c61e21797d120935d874cd98d4c08878aa27681"
"falconPackageHash": "d6425ff3444e28e7baf4fdf64d8e5856fbfff576864b4ed497808fb4"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc