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