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

@commerce-apps/core

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commerce-apps/core - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

6

CHANGELOG.md

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

### 1.5.1
* Security updates
### 1.5.0

@@ -11,2 +14,3 @@

* Updated to TypeScript 3.9
* Removed "beta" tag
* Removed "beta" tag

10

dist/base/cacheManagerKeyv.js

@@ -11,3 +11,3 @@ /*

const tslib_1 = require("tslib");
const url_1 = tslib_1.__importDefault(require("url"));
const url_1 = tslib_1.__importStar(require("url"));
const minipass_fetch_1 = tslib_1.__importDefault(require("minipass-fetch"));

@@ -75,3 +75,3 @@ const keyv_1 = tslib_1.__importDefault(require("keyv"));

normalizeUrl(urlString) {
const parsed = new URL(urlString);
const parsed = new url_1.URL(urlString);
parsed.searchParams.sort();

@@ -105,4 +105,4 @@ return parsed.toString();

matchDetails(req, cached) {
const reqUrl = new URL(this.normalizeUrl(req.url));
const cacheUrl = new URL(this.normalizeUrl(cached.url));
const reqUrl = new url_1.URL(this.normalizeUrl(req.url));
const cacheUrl = new url_1.URL(this.normalizeUrl(cached.url));
const vary = cached.resHeaders.get("Vary");

@@ -125,3 +125,3 @@ // https://tools.ietf.org/html/rfc7234#section-4.1

if (cached.integrity) {
return ssri_1.default.parse(cached.integrity).match(cached.cacheIntegrity);
return !!ssri_1.default.parse(cached.integrity).match(cached.cacheIntegrity);
}

@@ -128,0 +128,0 @@ reqUrl.hash = null;

{
"name": "@commerce-apps/core",
"version": "1.5.0",
"description": "Commerce SDK Generator, contains the templates to generate the SDK",
"version": "1.5.1",
"description": "The Core package provides a variety of functions that make interacting with Salesforce Commerce APIs easy",
"homepage": "https://developer.commercecloud.com/s/",
"repository": {
"type": "git",
"url": "https://github.com/SalesforceCommerceCloud/commerce-sdk-core"
},
"license": "BSD-3-Clause",
"author": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"README.md",
"LICENSE.txt"
],
"scripts": {
"depcheck": "depcheck",
"lint": "eslint . --ext .ts --fix",
"lint:ci": "eslint . --ext .ts --quiet",
"pretest": "npm run lint && npm run depcheck",
"pretest:ci": "npm run lint:ci && npm run depcheck",
"build": "tsc",
"clean": "rm -rf package-lock.json && rm -rf dist",
"clean:all": "npm run clean && npm run clean:node",
"clean:node": "rm -rf node_modules",
"clean:all": "npm run clean && npm run clean:node",
"build": "tsc",
"test": "npm run cover:all",
"test:ci": "npm run pretest:ci && npm run cover:ci",
"test:unit": "mocha \"test/**/*.test.ts\"",
"test:unit:ci": "npm run test:unit -- --reporter=xunit --reporter-options output=./reports/unitTests.xml",
"test:integration": "mocha \"testIntegration/**/*.test.ts\"",
"test:integration:redis": "npm run redis && npm run test:integration && npm run redis:shutdown",
"test:integration:ci": "npm run test:integration -- --reporter=xunit --reporter-options output=./reports/integrationTests.xml",
"cover:all": "npm run cover:unit && npm run cover:integration && npm run cover:report",
"cover:unit": "nyc --silent npm run test:unit",
"cover:ci": "npm run cover:unit:ci && npm run cover:integration:ci && npm run cover:report",
"cover:integration": "nyc --silent --no-clean npm run test:integration:redis",
"cover:integration:ci": "nyc --silent --no-clean npm run test:integration",
"cover:report": "nyc report --reporter=lcov --reporter=text",
"cover:ci": "npm run cover:unit:ci && npm run cover:integration:ci && npm run cover:report",
"cover:unit": "nyc --silent npm run test:unit",
"cover:unit:ci": "nyc --silent npm run test:unit:ci",
"cover:integration:ci": "nyc --silent --no-clean npm run test:integration",
"depcheck": "depcheck",
"lint": "sort-package-json && eslint . --ext .ts --fix",
"lint:ci": "npm run lint -- --quiet",
"prepare": "npm run snyk-protect",
"redis": "docker rm --force redis-commerce-sdk; docker run -dp 6379:6379 --name redis-commerce-sdk redis:5-alpine",
"redis:shutdown": "docker rm --force redis-commerce-sdk",
"redis:debug": "docker rm --force redis-commerce-sdk-debug; docker run -dp 6379:6379 --name redis-commerce-sdk-debug redis:5-alpine && docker exec -it redis-commerce-sdk-debug redis-cli monitor",
"redis:debug:shutdown": "docker rm --force redis-commerce-sdk-debug",
"redis:shutdown": "docker rm --force redis-commerce-sdk",
"snyk-protect": "snyk protect",
"prepare": "npm run snyk-protect"
"pretest": "npm run lint && npm run depcheck",
"test": "npm run cover:all",
"pretest:ci": "npm run lint:ci && npm run depcheck",
"test:ci": "npm run pretest:ci && npm run cover:ci",
"test:integration": "mocha \"testIntegration/**/*.test.ts\"",
"test:integration:ci": "npm run test:integration -- --reporter=xunit --reporter-options output=./reports/integrationTests.xml",
"test:integration:redis": "npm run redis && npm run test:integration && npm run redis:shutdown",
"test:unit": "mocha \"test/**/*.test.ts\"",
"test:unit:ci": "npm run test:unit -- --reporter=xunit --reporter-options output=./reports/unitTests.xml"
},
"files": [
"dist",
"README.md",
"LICENSE.txt"
],
"publishConfig": {
"access": "public"
},
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"include": [
"src/**/*.ts"
],
"reporter": [
"lcov",
"text"
],
"extension": [
".ts"
],
"all": true,
"check-coverage": true,
"branches": 80,
"functions": 80,
"lines": 80,
"statements": -10,
"per-file": true
},
"mocha": {
"forbidOnly": true,
"require": [
"source-map-support/register",
"ts-node/register"
],
"colors": true
},
"lint-staged": {

@@ -80,53 +56,33 @@ "*.js": [

},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": [
"@typescript-eslint",
"header"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"@typescript-eslint/interface-name-prefix": [
"error",
{
"prefixWithI": "always"
}
],
"header/header": [
2,
"block",
[
"",
{
"pattern": "^ \\* Copyright \\(c\\) \\d{4}, salesforce.com, inc\\.$",
"template": " * Copyright (c) 2020, salesforce.com, inc."
},
" * All rights reserved.",
" * SPDX-License-Identifier: BSD-3-Clause",
" * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause",
" "
]
]
}
"dependencies": {
"@keyv/redis": "^2.1.1",
"dotenv": "~8.2.0",
"fetch-to-curl": "^0.4.0",
"ioredis": "^4.16.2",
"jsonwebtoken": "^8.5.1",
"keyv": "^4.0.3",
"lodash": "^4.17.20",
"make-fetch-happen": "^8.0.10",
"loglevel": "^1.7.0",
"minipass-fetch": "^1.3.2",
"qs": "~6.9.1",
"quick-lru": "^5.1.1",
"retry": "^0.12.0",
"snyk": "^1.428.2",
"ssri": "^7.1.0"
},
"devDependencies": {
"@commerce-apps/raml-toolkit": "^0.4.2",
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/chai": "^4.2.3",
"@types/chai-as-promised": "^7.1.2",
"@types/ioredis": "^4.17.0",
"@types/jsonwebtoken": "^8.3.7",
"@types/lodash": "^4.14.146",
"@types/ioredis": "^4.16.7",
"@types/jsonwebtoken": "^8.5.0",
"@types/lodash": "^4.14.161",
"@types/mocha": "^5.2.7",
"@types/node": "^12.6.9",
"@types/qs": "^6.5.3",
"@types/qs": "^6.9.5",
"@types/retry": "^0.12.0",
"@types/sinon": "^7.5.0",
"@types/ssri": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^2.30.0",

@@ -142,4 +98,5 @@ "@typescript-eslint/parser": "^2.30.0",

"eslint-plugin-header": "^3.0.0",
"eslint-plugin-prettier": "^3.1.4",
"lint-staged": "^10.1.3",
"mocha": "^7.0.1",
"mocha": "^8.2.1",
"nock": "^11.7.0",

@@ -150,28 +107,11 @@ "nyc": "^15.1.0",

"sinon": "^9.0.2",
"sort-package-json": "^1.46.1",
"source-map-support": "^0.5.16",
"ts-node": "^8.10.2",
"@commerce-apps/raml-toolkit": "^0.4.2",
"eslint-plugin-prettier": "^3.1.4"
"ts-node": "^8.10.2"
},
"author": "",
"license": "BSD-3-Clause",
"publishConfig": {
"access": "public"
},
"gitHead": "2a6031f5f57c4ba5df8bfb5c4ca42b2631befe58",
"dependencies": {
"@keyv/redis": "^2.1.1",
"dotenv": "~8.2.0",
"fetch-to-curl": "^0.4.0",
"ioredis": "^4.16.2",
"jsonwebtoken": "^8.5.1",
"keyv": "^4.0.0",
"lodash": "~4.17.15",
"loglevel": "^1.6.8",
"make-fetch-happen": "^8.0.4",
"minipass-fetch": "^1.2.1",
"qs": "~6.9.1",
"quick-lru": "^5.1.1",
"retry": "^0.12.0",
"ssri": "^7.1.0",
"snyk": "^1.360.0"
},
"snyk": true
}
# core
The Core package provides a variety of functions that make interacting with Salesforce Commerce APIs easy. The following are some of the functions that the Core package can perform:
The Core package provides a variety of functions that make interacting with Salesforce Commerce APIs easy. The following are some of the Core package functions:
* Authentication - An easy way to authenticate with the APIs that require Account Manager authentication.
* HTTP operations - TypeScript functions for all the HTTP operations.
* Caching - Ability to specify whether the results of HTTP requests should be cached or not.
* Caching - Ability to specify whether or not the results of HTTP requests should be cached.

@@ -13,3 +13,3 @@ [commerce-sdk](https://www.npmjs.com/package/commerce-sdk) uses core to communicate with Salesforce Commerce APIs.

Execute the following commands to install dependencies and build core.
To install dependencies and build core:

@@ -25,7 +25,7 @@ # To setup

To run tests, execute
To run tests:
```bash
npm run test
```
To print the detailed test results and errors on the console, execute
To print the detailed test results and the errors on the console:
```bash

@@ -32,0 +32,0 @@ npm run test:debug

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