Socket
Socket
Sign inDemoInstall

@wix/app-market_embedded-scripts

Package Overview
Dependencies
1
Maintainers
26
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

5

build/cjs/src/devcenter-scripts-v1-script-properties-embedded-scripts.context.d.ts

@@ -1,1 +0,4 @@

import './devcenter-scripts-v1-script-properties-embedded-scripts.public';
import { embedScript as publicEmbedScript, getEmbeddedScript as publicGetEmbeddedScript } from './devcenter-scripts-v1-script-properties-embedded-scripts.public';
import { BuildRESTFunction } from '@wix/sdk-types';
export declare const embedScript: BuildRESTFunction<typeof publicEmbedScript>;
export declare const getEmbeddedScript: BuildRESTFunction<typeof publicGetEmbeddedScript>;

37

build/cjs/src/devcenter-scripts-v1-script-properties-embedded-scripts.context.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("./devcenter-scripts-v1-script-properties-embedded-scripts.public");
exports.getEmbeddedScript = exports.embedScript = void 0;
const devcenter_scripts_v1_script_properties_embedded_scripts_public_1 = require("./devcenter-scripts-v1-script-properties-embedded-scripts.public");
const embedScript = (...args) => {
var _a;
const context =
// @ts-expect-error
typeof $wixContext !== 'undefined'
? // @ts-expect-error
$wixContext
: // @ts-expect-error
globalThis.__wix_context__;
if (!context) {
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
}
return context
.initWixModules(devcenter_scripts_v1_script_properties_embedded_scripts_public_1.embedScript, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
.apply(undefined, args);
};
exports.embedScript = embedScript;
const getEmbeddedScript = (...args) => {
var _a;
const context =
// @ts-expect-error
typeof $wixContext !== 'undefined'
? // @ts-expect-error
$wixContext
: // @ts-expect-error
globalThis.__wix_context__;
if (!context) {
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
}
return context
.initWixModules(devcenter_scripts_v1_script_properties_embedded_scripts_public_1.getEmbeddedScript, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
.apply(undefined, args);
};
exports.getEmbeddedScript = getEmbeddedScript;
//# sourceMappingURL=devcenter-scripts-v1-script-properties-embedded-scripts.context.js.map

@@ -36,11 +36,5 @@ "use strict";

exports.getEmbeddedScript = exports.embedScript = void 0;
const velo_1 = require("@wix/metro-runtime/velo");
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
const ambassadorWixDevcenterScriptsV1ScriptProperties = __importStar(require("./devcenter-scripts-v1-script-properties-embedded-scripts.http"));
const _toVeloEntity = '$';
const _fromVeloEntity = '$';
const _embedScriptRequest = {};
const _embedScriptResponse = {};
const _getEmbeddedScriptRequest = {};
const _getEmbeddedScriptResponse = {};
/**

@@ -64,25 +58,7 @@ * Inserts custom script tags into a site.

var _a, _b, _c;
const requestTransformation = { properties: '$[0]' };
const responseTransformation = '$';
// @ts-ignore
const { httpClient, sideEffects } = arguments_1[1];
const { toAmbassadorRequest } = (0, velo_1.serializer)({
rootSchema: _embedScriptRequest,
depSchemas: {},
fqdnTransformation: {
paths: [...['properties']],
transformation: _fromVeloEntity,
},
customTransformation: requestTransformation,
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
properties: properties,
});
const { fromJSON } = (0, velo_1.serializer)({
rootSchema: _embedScriptResponse,
depSchemas: {},
fqdnTransformation: {
paths: [...['properties']],
transformation: _toVeloEntity,
},
customTransformation: responseTransformation,
});
const payload = toAmbassadorRequest([properties]);
const reqOpts = ambassadorWixDevcenterScriptsV1ScriptProperties.embedScript(payload);

@@ -93,3 +69,3 @@ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);

(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
return fromJSON(result.data);
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
}

@@ -123,26 +99,6 @@ catch (err) {

return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const requestTransformation = {};
const responseTransformation = '$.properties';
var _a, _b, _c, _d;
// @ts-ignore
const { httpClient, sideEffects } = arguments_2[0];
const { toAmbassadorRequest } = (0, velo_1.serializer)({
rootSchema: _getEmbeddedScriptRequest,
depSchemas: {},
fqdnTransformation: {
paths: [],
transformation: _fromVeloEntity,
},
customTransformation: requestTransformation,
});
const { fromJSON } = (0, velo_1.serializer)({
rootSchema: _getEmbeddedScriptResponse,
depSchemas: {},
fqdnTransformation: {
paths: [...['properties']],
transformation: _toVeloEntity,
},
customTransformation: responseTransformation,
});
const payload = toAmbassadorRequest([]);
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
const reqOpts = ambassadorWixDevcenterScriptsV1ScriptProperties.getEmbeddedScript(payload);

@@ -153,3 +109,3 @@ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);

(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
return fromJSON(result.data);
return (_c = (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)) === null || _c === void 0 ? void 0 : _c.properties;
}

@@ -162,3 +118,3 @@ catch (err) {

}, []);
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
(_d = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _d === void 0 ? void 0 : _d.call(sideEffects, err);
throw transformedError;

@@ -165,0 +121,0 @@ }

@@ -1,1 +0,4 @@

import './devcenter-scripts-v1-script-properties-embedded-scripts.public';
import { embedScript as publicEmbedScript, getEmbeddedScript as publicGetEmbeddedScript } from './devcenter-scripts-v1-script-properties-embedded-scripts.public';
import { BuildRESTFunction } from '@wix/sdk-types';
export declare const embedScript: BuildRESTFunction<typeof publicEmbedScript>;
export declare const getEmbeddedScript: BuildRESTFunction<typeof publicGetEmbeddedScript>;

@@ -1,2 +0,34 @@

import './devcenter-scripts-v1-script-properties-embedded-scripts.public';
import { embedScript as publicEmbedScript, getEmbeddedScript as publicGetEmbeddedScript, } from './devcenter-scripts-v1-script-properties-embedded-scripts.public';
export const embedScript = (...args) => {
var _a;
const context =
// @ts-expect-error
typeof $wixContext !== 'undefined'
? // @ts-expect-error
$wixContext
: // @ts-expect-error
globalThis.__wix_context__;
if (!context) {
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
}
return context
.initWixModules(publicEmbedScript, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
.apply(undefined, args);
};
export const getEmbeddedScript = (...args) => {
var _a;
const context =
// @ts-expect-error
typeof $wixContext !== 'undefined'
? // @ts-expect-error
$wixContext
: // @ts-expect-error
globalThis.__wix_context__;
if (!context) {
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
}
return context
.initWixModules(publicGetEmbeddedScript, ((_a = args[1]) === null || _a === void 0 ? void 0 : _a.supressAuth) ? true : false)
.apply(undefined, args);
};
//# sourceMappingURL=devcenter-scripts-v1-script-properties-embedded-scripts.context.js.map

@@ -10,11 +10,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

};
import { serializer } from '@wix/metro-runtime/velo';
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
import * as ambassadorWixDevcenterScriptsV1ScriptProperties from './devcenter-scripts-v1-script-properties-embedded-scripts.http';
const _toVeloEntity = '$';
const _fromVeloEntity = '$';
const _embedScriptRequest = {};
const _embedScriptResponse = {};
const _getEmbeddedScriptRequest = {};
const _getEmbeddedScriptResponse = {};
/**

@@ -38,25 +32,7 @@ * Inserts custom script tags into a site.

var _a, _b, _c;
const requestTransformation = { properties: '$[0]' };
const responseTransformation = '$';
// @ts-ignore
const { httpClient, sideEffects } = arguments_1[1];
const { toAmbassadorRequest } = serializer({
rootSchema: _embedScriptRequest,
depSchemas: {},
fqdnTransformation: {
paths: [...['properties']],
transformation: _fromVeloEntity,
},
customTransformation: requestTransformation,
const payload = renameKeysFromSDKRequestToRESTRequest({
properties: properties,
});
const { fromJSON } = serializer({
rootSchema: _embedScriptResponse,
depSchemas: {},
fqdnTransformation: {
paths: [...['properties']],
transformation: _toVeloEntity,
},
customTransformation: responseTransformation,
});
const payload = toAmbassadorRequest([properties]);
const reqOpts = ambassadorWixDevcenterScriptsV1ScriptProperties.embedScript(payload);

@@ -67,3 +43,3 @@ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);

(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
return fromJSON(result.data);
return renameKeysFromRESTResponseToSDKResponse(result.data);
}

@@ -96,26 +72,6 @@ catch (err) {

return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c;
const requestTransformation = {};
const responseTransformation = '$.properties';
var _a, _b, _c, _d;
// @ts-ignore
const { httpClient, sideEffects } = arguments_2[0];
const { toAmbassadorRequest } = serializer({
rootSchema: _getEmbeddedScriptRequest,
depSchemas: {},
fqdnTransformation: {
paths: [],
transformation: _fromVeloEntity,
},
customTransformation: requestTransformation,
});
const { fromJSON } = serializer({
rootSchema: _getEmbeddedScriptResponse,
depSchemas: {},
fqdnTransformation: {
paths: [...['properties']],
transformation: _toVeloEntity,
},
customTransformation: responseTransformation,
});
const payload = toAmbassadorRequest([]);
const payload = renameKeysFromSDKRequestToRESTRequest({});
const reqOpts = ambassadorWixDevcenterScriptsV1ScriptProperties.getEmbeddedScript(payload);

@@ -126,3 +82,3 @@ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);

(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
return fromJSON(result.data);
return (_c = renameKeysFromRESTResponseToSDKResponse(result.data)) === null || _c === void 0 ? void 0 : _c.properties;
}

@@ -135,3 +91,3 @@ catch (err) {

}, []);
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
(_d = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _d === void 0 ? void 0 : _d.call(sideEffects, err);
throw transformedError;

@@ -138,0 +94,0 @@ }

{
"name": "@wix/app-market_embedded-scripts",
"version": "1.0.3",
"version": "1.0.4",
"publishConfig": {

@@ -21,3 +21,3 @@ "registry": "https://registry.npmjs.org/",

"@wix/motion-edm-autogen-query-wrapper": "^1.0.37",
"@wix/sdk-runtime": "^0.2.7",
"@wix/sdk-runtime": "^0.2.10",
"@wix/sdk-types": "^1.5.11"

@@ -43,3 +43,3 @@ },

},
"falconPackageHash": "25a2d72f99c01a2bf3552cf97c8de53314cc9dd9dc05ace9b5e9a5be"
"falconPackageHash": "d90d6b988ec20927ac92b6e477985b44ca9538078b9fa94107fce302"
}

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