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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ac-sync

v2.2.2

Published

Adobe Campaign Classic Synchronisation : tools to synchronise Adobe Campaign Classic objects to local files. NeoSync v2.0

Downloads

45

Readme

ac-sync

Synchronisation utility for Adobe Campaign Classic.

Fetch, push and watch local files against an Adobe Campaign Classic instance. Supports both the CLI and a Node.js API.

Built on top of ac-connector.

Install

npm install -g ac-sync

Prerequisites

Configure at least one connection using the ac-connector UI:

node node_modules/ac-connector/startUI.js

This opens http://localhost:4545/ where you can add connections (ACC v7 user/password or ACC v8 IMS/OAuth2). See ac-connector for full setup instructions.


CLI

ac-sync -c <connectionName> [command] [options]

Fetch — download from Campaign :arrow_lower_left:

ac-sync -c myConnection -f nms:delivery=MY_DELIVERY
ac-sync -c myConnection --fetch xtk:javascript=nms:campaign.js

# Multiple objects separated by semicolons
ac-sync -c myConnection -f nms:delivery=TOTO;nms:delivery=TATA

# Multiple objects of the same schema (comma-separated)
ac-sync -c myConnection --fetchCollection nms:delivery=TOTO,TATA

# Fetch to a specific directory
ac-sync -c myConnection -f xtk:javascript=/path/to/dir/nms:campaign.js

Push — upload to Campaign :arrow_upper_right:

ac-sync -c myConnection -p localfile.xml
ac-sync -c myConnection --push localfile.html

ac-sync detects what to push from the file extension (and the XML content for .xml files). Before pushing, it automatically backs up the current server version to ~/.ac-connector/ACSyncBackup/.

Push all files in the current folder

ac-sync -c myConnection -pa
ac-sync -c myConnection --pushall

Watch and auto-push on change :eyes:

ac-sync -c myConnection -w
ac-sync -c myConnection --watch

# Watch a specific directory
ac-sync -c myConnection -w -d /path/to/watch

# Only push files matching a pattern
ac-sync -c myConnection -w -pattern *.js

Supported object types

| Fetch string | Key | Local file | |---|---|---| | xtk:javascript | ns:name | ns_name.js | | xtk:jst | ns:name | ns_name.jst | | xtk:jssp | ns:name | ns_name.jssp | | xtk:workflow | internalName | internalName.xml | | xtk:form | ns:name | ns_name.xml | | xtk:srcSchema | ns:name | ns_name.xml | | nms:delivery | internalName | internalName.xml | | nms:delivery[html] | internalName | internalName.html (HTML source only) | | nms:delivery[txt] | internalName | internalName.txt (text source only) | | nms:includeView | internalName | internalName.xml | | nms:includeView[html] | internalName | internalName.iview.html | | nms:includeView[txt] | internalName | internalName.iview.txt | | ncm:content | internalName | internalName.xml |


Node.js API

const ACSync = require('ac-sync');

(async () => {
  const sync = new ACSync({ connectionName: 'My Connection' });

  // Fetch a file from Campaign
  await sync.fetch('nms:delivery=MY_DELIVERY');
  await sync.fetch('xtk:javascript=nms:campaign.js');

  // Fetch to a specific directory
  await sync.fetch('xtk:javascript=/path/to/dir/nms:campaign.js');

  // Fetch multiple objects of the same schema
  await sync.fetchCollection('nms:delivery=TOTO,TATA');

  // Push a local file to Campaign (with automatic server-side backup)
  await sync.push('MY_DELIVERY.xml');

  // Watch a directory and auto-push on changes
  sync.addWatcher('/path/to/watch');
})();

Custom file mapping

The built-in mappings are defined in conf/fileMapping.json. You can extend them without touching the package by creating ~/.ac-connector/ACSyncFileMapping.json (the directory is created automatically by ac-connector on first use).

The file is an array of mapping objects:

[
  {
    "name"            : "uniqueName",
    "label"           : "My Object Type",
    "fileExtension"   : "xml",
    "schema"          : "xtk:srcSchema",
    "primaryKey"      : "@namespace + ':' + @name",
    "forceExtension"  : false,
    "specificKey"     : null,

    "querySelector"   : "<node expr='data'/><node expr='@xtkschema'/>",
    "queryCondition"  : "<condition expr=\"@namespace + ':' + @name = '${primaryKey}'\"/>",
    "responseStructure": "<srcSchema[\\s\\S]*<\\/srcSchema>",
    "contentFilter"   : null,

    "xmlStructure"    : "<srcSchema xtkschema='xtk:srcSchema' namespace='${nameSpace}' name='${xmlName}' _operation='update'>${content}</srcSchema>"
  }
]

| Field | Description | |---|---| | name | Unique identifier for this mapping | | label | Human-readable label | | fileExtension | Local file extension (js, xml, html, etc.) | | schema | Adobe Campaign schema name | | primaryKey | XPath expression for the object's primary key | | forceExtension | Set to true if the extension is part of the object name on the server (e.g. nms:myScript.js) | | specificKey | For sub-object mappings (e.g. html, txt); used with bracket syntax (nms:delivery=DM1[html]) | | querySelector | XPath nodes to select in the queryDef | | queryCondition | QueryDef <where> condition; use ${primaryKey}, ${name}, ${nameSpace} as variables | | responseStructure | For non-XML: JS dot-path to reach the content in the SOAP response. For XML: regex matching the XML block to keep | | contentFilter | String or array of regex patterns to strip from fetched content | | xmlStructure | Template for the XML to push via xtk:session#Write; available variables: ${nameSpace}, ${xmlName}, ${internalName}, ${content} |

For reference, see the built-in conf/fileMapping.json.


Author

Cédric Reygithub.com/cedricrey