campaign-cli 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -179
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,197 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
**A command-line interface for ACC (Campaign Classic) developers**
|
|
4
4
|
|
|
5
|
-
[
|
|
6
|
-
[](https://nodejs.org)
|
|
7
|
-
[](https://www.npmjs.com/)
|
|
5
|
+
Full article in the blog post [Getting started with acc](https://myrosblog.com/adobe-campaign/acc-cli-use-cases?utm_campaign=readme)
|
|
8
6
|
|
|
9
7
|
## 🚀 Quick Start
|
|
10
8
|
|
|
11
9
|
### Quick usage
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
|
-
|
|
12
|
+
$ npm install -g campaign-cli
|
|
15
13
|
|
|
16
|
-
acc instance
|
|
14
|
+
$ acc auth init --host https://instance.com --user username --password --alias staging
|
|
15
|
+
|
|
16
|
+
$ acc instance check --alias staging
|
|
17
17
|
# Downloaded /Administration/Configuration/Form rendering
|
|
18
18
|
# Downloaded /Administration/Configuration/Dynamic Javascript pages
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Quick installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
cd ~/Downloads
|
|
25
|
-
git clone https://github.com/myrosblog/campaign-cli.git
|
|
26
|
-
cd campaign-cli
|
|
27
|
-
npm install
|
|
28
|
-
npm link
|
|
29
|
-
acc # check installation
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Basic Usage
|
|
33
|
-
|
|
34
|
-
Folder structure recommendation, under a local folder, i.e. `Downloads`
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
/Downloads/
|
|
38
|
-
├── campaign-cli/ # Clone of this source code
|
|
39
|
-
│
|
|
40
|
-
├── instance1-staging/ # Staging Instance 1
|
|
41
|
-
│ ├── config/ # Instance-specific config => automatically created with acc check
|
|
42
|
-
│ │ └── acc.config.json
|
|
43
|
-
│ └── Administration/Configuration/ # Downloaded schemas => automatically downloaded with acc pull
|
|
44
|
-
│ ├── schema1.xml
|
|
45
|
-
│ └── schema2.xml
|
|
46
|
-
│
|
|
47
|
-
└── instance1-production/ # Production Instance 2
|
|
48
|
-
├── config/
|
|
49
|
-
│ └── acc.config.json
|
|
50
|
-
└── Administration/Configuration/
|
|
51
|
-
├── schema1.xml
|
|
52
|
-
└── schema2.xml
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
#### Step 1: Configure an ACC Instance
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
acc auth init \
|
|
59
|
-
--host http://localhost:8080 \
|
|
60
|
-
--user admin \
|
|
61
|
-
--password admin \
|
|
62
|
-
--alias local
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
This command:
|
|
66
|
-
|
|
67
|
-
- Saves credentials securely in your config store
|
|
68
|
-
- Tests the connection to your ACC instance
|
|
69
|
-
- Lists available schemas and record counts
|
|
70
|
-
|
|
71
|
-
#### Step 2: Pull Data from Your Instance with default configuration
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
acc instance check --alias local
|
|
75
|
-
acc instance pull --alias local
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
This command:
|
|
79
|
-
|
|
80
|
-
- Creates a local directory structure
|
|
81
|
-
- Downloads schema definitions as XML files
|
|
82
|
-
- Preserves original naming conventions
|
|
83
|
-
- Implements pagination for large datasets
|
|
84
|
-
|
|
85
|
-
#### Step 2-bis: Pull Data from Your Instance with custom configuration
|
|
86
|
-
|
|
87
|
-
Create
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## 📚 Features
|
|
94
|
-
|
|
95
|
-
### Authentication Management
|
|
96
19
|
|
|
97
|
-
|
|
98
|
-
# List all configured instances
|
|
99
|
-
acc auth list
|
|
100
|
-
|
|
101
|
-
# Troubleshoot IP via https://api.db-ip.com/v2/free/self @see https://opensource.adobe.com/acc-js-sdk/connecting.html
|
|
102
|
-
acc auth ip
|
|
103
|
-
|
|
104
|
-
# Login to an existing instance
|
|
105
|
-
acc auth login --alias prod
|
|
106
|
-
|
|
107
|
-
# Initialize a new instance
|
|
108
|
-
acc auth init --alias staging --host https://staging.example.com
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Data Operations
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
# Check instance (count records without downloading)
|
|
115
|
-
acc instance check --alias prod
|
|
116
|
-
|
|
117
|
-
# Pull data with custom config
|
|
118
|
-
acc instance pull \
|
|
119
|
-
--alias prod \
|
|
120
|
-
--path ./my-project/data \
|
|
121
|
-
--config ./config/acc.config.json
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Configuration Management
|
|
125
|
-
|
|
126
|
-
Create a `acc.config.json` file to customize data pulling:
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"nms:delivery": {
|
|
131
|
-
"filename": "Deliveries/{%name%}.xml",
|
|
132
|
-
"queryDef": {
|
|
133
|
-
"where": {
|
|
134
|
-
"condition": [{ "expr": "@builtIn = false AND @isModel = true" }]
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## 🎯 Use Cases
|
|
142
|
-
|
|
143
|
-
### For ACC Developers
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
# Setup development environment
|
|
147
|
-
acc auth init --alias dev --host http://localhost:8080
|
|
148
|
-
|
|
149
|
-
# Pull specific schemas
|
|
150
|
-
acc instance pull --alias dev
|
|
151
|
-
|
|
152
|
-
# Regular data refresh
|
|
153
|
-
acc instance pull --alias prod --path ./backup/$(date +%Y-%m-%d)
|
|
20
|
+
$ acc instance pull --alias staging
|
|
154
21
|
```
|
|
155
22
|
|
|
156
|
-
###
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
# CI/CD integration
|
|
160
|
-
acc auth init --alias ci --host $ACC_HOST --user $ACC_USER --password $ACC_PASSWORD
|
|
161
|
-
acc instance check --alias ci || exit 1
|
|
162
|
-
|
|
163
|
-
# Automated backups
|
|
164
|
-
acc instance pull --alias prod --path /backups/acc/$(date +%Y-%m-%d)
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### For Data Analysts
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
# Quick data extraction
|
|
171
|
-
acc instance pull --alias analytics --config ./config/analytics.config.json
|
|
172
|
-
|
|
173
|
-
# Schema documentation
|
|
174
|
-
acc instance check --alias prod > schema_report.txt
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## 🔧 Advanced Configuration
|
|
178
|
-
|
|
179
|
-
### Custom Paths and Configs
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
acc instance pull \
|
|
183
|
-
--alias staging \
|
|
184
|
-
--path /projects/acc-migration/data \
|
|
185
|
-
--config ./config/migration.config.json
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Filename Patterns
|
|
189
|
-
|
|
190
|
-
Available variables for filename patterns:
|
|
23
|
+
### 🔧 Advanced Configuration
|
|
191
24
|
|
|
192
|
-
|
|
193
|
-
- `%namespace%` - Schema namespace
|
|
194
|
-
- `%name%` - Schema display name
|
|
195
|
-
- `%internalName%` - Internal schema name
|
|
25
|
+
[Advanced use cases with acc](https://myrosblog.com/adobe-campaign/acc-cli-use-cases?utm_campaign=readme)
|
|
196
26
|
|
|
197
27
|
## 🤝 Contributing
|
|
198
28
|
|
|
@@ -232,7 +62,7 @@ config/
|
|
|
232
62
|
|
|
233
63
|
## Roadmap
|
|
234
64
|
|
|
235
|
-
-
|
|
65
|
+
- `acc instance push`
|
|
236
66
|
|
|
237
67
|
## 🔒 Security
|
|
238
68
|
|