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

@arcteryx/js-cms

Package Overview
Dependencies
Maintainers
7
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcteryx/js-cms - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [2.0.1](https://bitbucket.org/arcteryx/arcteryx-js-helpers/compare/@arcteryx/js-cms@2.0.0...@arcteryx/js-cms@2.0.1) (2021-08-09)
### Bug Fixes
* (getCsPhoneNumber) Prefix url with https for the cmsUrl and check for data if null ([117b454](https://bitbucket.org/arcteryx/arcteryx-js-helpers/commits/117b454e8763e412eb2969fa5f12d2145903f10f))
# [2.0.0](https://bitbucket.org/arcteryx/arcteryx-js-helpers/compare/@arcteryx/js-cms@1.27.20...@arcteryx/js-cms@2.0.0) (2021-04-28)

@@ -8,0 +19,0 @@

4

dist/cjs/index.js

@@ -215,5 +215,5 @@ 'use strict';

async function getCsPhoneNumber(cmsUrl, market, country) {
const drupalUrl = `//${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const drupalUrl = `https://${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const data = await GetDrupalData(drupalUrl);
return data.length ? data[0].title : null;
return data !== null && data !== void 0 && data.length ? data[0].title : null;
}

@@ -220,0 +220,0 @@ /*

@@ -211,5 +211,5 @@ /**

async function getCsPhoneNumber(cmsUrl, market, country) {
const drupalUrl = `//${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const drupalUrl = `https://${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const data = await GetDrupalData(drupalUrl);
return data.length ? data[0].title : null;
return data !== null && data !== void 0 && data.length ? data[0].title : null;
}

@@ -216,0 +216,0 @@ /*

@@ -222,5 +222,5 @@ (function (global, factory) {

async function getCsPhoneNumber(cmsUrl, market, country) {
const drupalUrl = `//${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const drupalUrl = `https://${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const data = await GetDrupalData(drupalUrl);
return data.length ? data[0].title : null;
return data !== null && data !== void 0 && data.length ? data[0].title : null;
}

@@ -227,0 +227,0 @@ /*

{
"name": "@arcteryx/js-cms",
"version": "2.0.0",
"version": "2.0.1",
"source": "src/index.js",

@@ -32,3 +32,3 @@ "main": "dist/cjs/index.js",

"license": "ISC",
"gitHead": "fa786f3a7393d5e4814cf840f2da037d85b7c4a0",
"gitHead": "09ee5f71e2466e8590366487dd32493c75fd8167",
"files": [

@@ -35,0 +35,0 @@ "dist",

@@ -195,5 +195,5 @@ import { toQueryParams } from "@arcteryx/js-url";

export async function getCsPhoneNumber(cmsUrl, market, country) {
const drupalUrl = `//${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const drupalUrl = `https://${cmsUrl}/jsonapi/node/cs_phone_number/?filter%5Bfield_market%5D=${market}&filter%5Bfield_allowed_countries%5D=${country}&fields%5Bnode--cs_phone_number%5D=title`;
const data = await GetDrupalData(drupalUrl);
return data.length ? data[0].title : null;
return data?.length ? data[0].title : null;
}

@@ -324,11 +324,3 @@

*/
export const getCategoryIntro = async (
cmsUrl,
basicAuthToken,
market,
country,
language,
path,
previewDraft
) => {
export const getCategoryIntro = async (cmsUrl, basicAuthToken, market, country, language, path, previewDraft) => {
const fetchOptions = previewDraft

@@ -335,0 +327,0 @@ ? {

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc