Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aptly-as/sdk-web

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aptly-as/sdk-web - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

16

dist/media/Media.js

@@ -78,3 +78,3 @@ import { getImageSets } from './media.sets.js';

const replace = [`w_${width}`, ...urlOptions].join(',');
return cloudUrl.replace(/\/(v[^\/]*)\//, `/${areaOptions}${replace}/`);
return cloudUrl.replace(/\/upload\//, `/upload/${areaOptions}${replace}/`);
}

@@ -88,4 +88,16 @@ getUrl(url) {

return undefined;
return cloudUrl.startsWith('http') ? cloudUrl : `https://res.cloudinary.com/${this.cloudinaryKey}/image/upload/vOptions/${cloudUrl}`;
let key = this.cloudinaryKey;
let id = cloudUrl;
if (cloudUrl.startsWith('http')) {
const match = cloudUrl.match(/cloudinary.com\/([^\/]*)\//);
if (match) {
key = match[1];
id = cloudUrl.substring(cloudUrl.lastIndexOf('/') + 1);
}
else {
return cloudUrl;
}
}
return `https://res.cloudinary.com/${key}/image/upload/${id}`;
}
}

3

package.json
{
"name": "@aptly-as/sdk-web",
"version": "0.0.1",
"version": "0.0.2",
"description": "Aptly SDK library for web applications",
"type": "module",
"main": "dist/index.js",
"source": "lib/index.html",
"engines": {

@@ -9,0 +8,0 @@ "node": ">14.0.0 <17.0.0"

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc