Socket
Book a DemoInstallSign in
Socket

sfcc-webdav

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sfcc-webdav

Salesforce Commerce Cloud simple webdav API

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
73
17.74%
Maintainers
1
Weekly downloads
 
Created
Source

sfcc-webdav

Salesforce Commerce Cloud simple webdav API

Features

  • API for upload and delete files via webdav, useful for real-time upload of changes file during development
  • Authentication via OCAPI client, uses dw.json for configuration

Installation

$ npm i sfcc-webdav

Requirements

  • Node >= 10

Configuration

Requires a dw.json with client_id/secret

{
  "hostname": "dev01-mysandbox.demandware.net",
  "client_id": "a12464ae-b484-4b90-4dfe-17e20844e9f0",
  "client_secret": "mysupersecretpassword"
}

API client configuration

The API client must be created from the account.demandware.com consoleand must be granted the required permissions for accessing the cartridges folder through webdav.

For doing so access Business Manager and add the following in Administration -> Organization -> WebDAV Client Permissions. Replace client id with your client id, you may need to merge these settings with existing ones.

{
  "clients": [
    {
      "client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "permissions": [
        {
          "path": "/cartridges",
          "operations": [
            "read_write"
          ]
        }
      ]
    }
  ]
}

Usage

const sfccwebdav = require('sfcc-webdav');

sfccwebdav.fileUpload('/path/to/local/file', '/cartridges/mycodeversion/app_storefront/cartridge/static/filetoupload');

sfccwebdav.fileDelete('/path/to/local/file', '/cartridges/mycodeversion/app_storefront/cartridge/static/filetodelete');

License

Released under the MIT license.

Keywords

Salesforce Commerce Cloud

FAQs

Package last updated on 22 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.