# dwupload

> Upload storefront cartridges to Salesforce B2C Commerce WebDAV server

Latest version **4.0.0** (published 2025-12-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install dwupload
pnpm add dwupload
yarn add dwupload
bun add dwupload
```

Provides the command `dwupload`.

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-12-18 |
| First published | 2016-05-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 18.20.8 |
| Dependencies | 12 |
| Unpacked size | 34.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tri Nguyen |
| Maintainers | tridnguyen, zlatin.zlatev, mobify, ecchessman, tlohr, sgd |

## Links

- npm: https://www.npmjs.com/package/dwupload
- Repository: https://github.com/SalesforceCommerceCloud/dwupload
- Homepage: https://github.com/SalesforceCommerceCloud/dwupload#readme
- Issues: https://github.com/SalesforceCommerceCloud/dwupload/issues
- npm.io page: https://npm.io/package/dwupload

## Dependencies (12)

- [walk](https://npm.io/package/walk.md) ^2.3.15
- [yazl](https://npm.io/package/yazl.md) ^3.3.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [dwdav](https://npm.io/package/dwdav.md) ^4.0.0
- [watch](https://npm.io/package/watch.md) ^1.0.2
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [multimatch](https://npm.io/package/multimatch.md) ^5.0.0
- [sync-queue](https://npm.io/package/sync-queue.md) 0.0.2
- [is-path-cwd](https://npm.io/package/is-path-cwd.md) ^2.2.0
- [node-notifier](https://npm.io/package/node-notifier.md) ^10.0.1
- [is-path-inside](https://npm.io/package/is-path-inside.md) ^3.0.3
- [@tridnguyen/config](https://npm.io/package/@tridnguyen/config.md) ^2.3.1

## Recent versions

- 4.0.0 (latest) — 2025-12-18
- 3.7.0 (2fa) — 2016-10-28
- 3.8.2 — 2019-08-27
- 3.8.1 — 2019-08-27
- 3.8.0 — 2017-03-02
- 3.7.3 — 2017-03-02
- 3.7.2 — 2017-02-28
- 3.7.1 — 2016-11-29
- 3.6.0 — 2016-08-25
- 3.5.0 — 2016-08-11
- 3.4.0 — 2016-06-14
- 3.3.0 — 2016-06-14
- 3.2.0 — 2016-05-15
- 3.1.0 — 2016-05-15
- 3.0.1 — 2016-05-03

## README

# dwupload
> Upload a storefront cartridge to a Demandware WebDAV server from command line.

## Who do I talk to?

* Maintainer: @intel352
* [Commerce Cloud Community Slack](https://sfcc-community.slack.com)

## Contributing

1. Create a [fork](https://bitbucket.org/demandware/dwupload/fork), if you don't already have one
2. Ensure your fork is caught up (message from Bitbucket shows up on your fork main page, if you are not current on commits)
3. Create a new branch in your fork to hold your changes
4. Submit a [pull request](https://bitbucket.org/demandware/dwupload/pull-requests/new)

## Installation

```shell
:; npm install -g dwupload
```

Instead of installing this as a global npm package, you can install it locally and access it as `./node_modules/.bin/dwupload`.

## Usage

```shell
# uploading a cartridge
:; dwupload --hostname example.demandware.net --username admin --password password --cartridge app_storefront_core  --code-version version1

# uploading file(s) using configuration in `dw.json`
:; dwupload --file path/to/app.js --file path/to/style.css

# watch for file changes and upload automatically
:; dwupload watch --cartridge app_storefront_controllers

# delete a file, with root option
:; dwupload delete --file rootDir/path/to/file --root rootDir

# 2-factor authentication
:; dwupload --hostname cert.example.demandware.net --username admin --password password --p12 admin.p12 --passphrase passphrase
:; dwupload --hostname cert.example.demandware.net --p12 admin.12 --passphrase passphrase --self-signed

# get version information
:; dwupload version
```

*In case you're running the command within an other directory than the cartridges directory, don't forget to use the `--root` option (in the command or in the dw.json file)*
See `--help` for more information.


### Exclude patterns
Exclude patterns can be declared via the `-x` or `--exclude` flag. This work for both file and folder exclude patterns. For example:

```
*.swp
**/node_modules/**
```

Please note that the `**` after the folder name is important. Without it, child directories of `node_modules` would still be included.

## Config file
Instead of passing command line options every single time, you can store your config options in a `dw.json` file in the current working directory instead. For example:

```js
{
        "hostname": "example.demandware.net",
        "username": "user",
        "password": "password",
        "cartridge": ["cartridgeA", "cartridgeB"],
        "root": "path/to/root",
        "code-version": "version2",
        "p12": "path/to/file.p12",
        "passphrase": "passphrase"
}
```

Command line options will always **override** the options declared in the config file.

---
_Source: https://npm.io/package/dwupload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
