npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@red-van-workshop/autobahn-cli

v2.2.3

Published

A CLI tool to organize and handling meta-data imports to SFCC environments

Downloads

47

Readme

Logo

Autobahn-CLI

A command line suite for performing autobahn related tasks with ease

Current Version: 2.2.3

Introduction

This tool originally was designed to handle cartridge specific data imports to SFCC instances. Our main product is titled Autobahn, hence Autobahn-CLI. Since, it has evolved into a universal data management/import tool for any SFCC instance. By simply creating a top level folder in your project called data, you can organize metadata based on specific cartridge integrations, and import data on demand. This tool wraps the popular sfcc-ci library, and just extends on its functionality to provide the developer with a more granular control over data management.

  • [x] Import instance meta/site data
  • [x] Upload a zipped folder to any eligible webdav location
  • [x] Perform string replacements for files and file contents

Developer Overview

Commands

Install

npm install

npm install -g @red-van-workshop/autobahn-cli
autobahn-cli --help

Setup

Configuration

data example

Data-1

Data folders should be structured as "Site Import" archives for the import command. They may be of any zippable structure for the upload command.

Data-2

dw.json or a .js file using --config dw.js

For sandbox setup:

{
  "hostname": "",
  "username": "",
  "password": "",
  "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "clientSecret": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "dataFinal": "data_final"
}

or using a .js file:

module.exports = {
  hostname: '',
  username: '',
  password: '',
  clientId: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
  clientSecret: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
  dataFinal: 'data_final'
}

or using a .js file function with optional command string --config-cmd start:

module.exports = function (cmd) {
  return {
   hostname: '',
   username: '',
   password: '',
   clientId: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
   clientSecret: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
   dataFinal: 'data_final'
  };
}

Open Commerce API Settings (data)

{
  "_v":"21.9",
  "clients":
  [
    {
      "client_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "resources": [
            {
               "resource_id":"/**",
               "methods":["get","put","post","patch","delete"],
               "read_attributes":"(**)",
               "write_attributes":"(**)"
            }
         ]
    }
  ]
}

WebDAV Client Permissions

{
   "clients":[
      {
         "client_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
         "permissions":[
            {
               "path":"/impex",
               "operations":[
                  "read_write"
               ]
            },
            {
               "path":"/cartridges",
               "operations":[
                  "read_write"
               ]
            },
            {
               "path":"/static",
               "operations":[
                  "read_write"
               ]
            },
            {
               "path":"/catalogs/<your-catalog-id>",
               "operations":[
                  "read_write"
               ]
            },
            {
               "path":"/libraries/<your-library-id>",
               "operations":[
                  "read_write"
               ]
            },
            {
               "path":"/dynamic/<your-site-id>",
               "operations":[
                  "read_write"
               ]
            }
         ]
      }
   ]
}

Contributing

git clone

cd ~
git clone https://github.com/redvanworkshop/autobahn-cli.git
cd autobahn-cli
npm install -g .
autobahn-cli --help

Change History

v2.0

  • --initialize option has been removed from the import command. If you wish to imitate that old feature you would do so with:
autobahn-cli import --data-ignore "catalogs/**" "custom-objects/**" "custom-quotas/**" "libraries/**" "pricebooks/**" "inventory-lists/**" "sites/**" "static/**"
  • upload command has been added to upload a zip file (and unzip it on demand) to an arbitrary WebDAV directory
  • data-dirs option has been added for the import and upload command. It allows you to have multiple directories in /data and choose which ones to process
  • site-rename has been added as an option for both the upload and import commands to allow you to deploy generic site data as a new fully renamed site with ease
  • getSitePreferenceGroup command has been added to retrieve set site preference group values from the specified host and instance
  • setSitePreferenceGroup command has been added to set set site preference group values for the specified host and instance
  • --debug command has been added to import and upload so that you can inspect the payload zip without actually sending it to your instance

v2.0.1

  • added a .nvmrc file
  • fixed an issue where renamed folders were not cleaned up

v2.0.2

  • --config now supports using .js files. This allows you to have dynamic runtime configuration
  • import and upload will no longer attempt to upload/import an empty .zip file to prevent job errors

v2.2.2

  • added support for get and set global preferences

v2.2.3

  • added support for --config-cmd and --config js file function export