@nuelink/nuelink-cli 1.6.2 → 1.6.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.3
4
+
5
+ - Show automation draft behavior and refresh interval in table output.
6
+ - Document CLI options for setting automation draft behavior and refresh interval.
7
+
3
8
  ## 1.6.2
4
9
 
5
10
  - Show effective channel names in table output for posts and other resources with channel summaries.
package/README.md CHANGED
@@ -191,9 +191,8 @@ with `--description`.
191
191
  nuelink-cli automations --brand-id 13493 --per-page 5 --page 1
192
192
  ```
193
193
 
194
- This table view is especially useful for quickly scanning automation status, feed type, and feed URL.
195
- JSON responses also include `loadOldPosts`, `addPostsAsDraft`, and
196
- `refreshRate` (hours; 1, 6, 12, or 24).
194
+ The table and JSON output include `addPostsAsDraft` and `refreshRate`
195
+ (hours; 1, 6, 12, or 24). JSON also includes other fields returned by the API.
197
196
 
198
197
  Create automation:
199
198
 
@@ -207,6 +206,8 @@ nuelink-cli automations:create \
207
206
  --type RSS \
208
207
  --title "{{title}}" \
209
208
  --caption "{{description}} {{link}}" \
209
+ --add-posts-as-draft true \
210
+ --refresh-rate 6 \
210
211
  --dry-run
211
212
  ```
212
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuelink/nuelink-cli",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "The official Nuelink CLI for automating social media workflows from your terminal. Schedule posts, upload media, manage brands, and integrate Nuelink into scripts, CI/CD pipelines, and AI agents.",
5
5
  "license": "MIT",
6
6
  "author": "Nuelink",
package/src/output.js CHANGED
@@ -49,6 +49,8 @@ function pickColumns(items) {
49
49
  "queueStatus",
50
50
  "timezone",
51
51
  "collectionId",
52
+ "addPostsAsDraft",
53
+ "refreshRate",
52
54
  "channels",
53
55
  "postType",
54
56
  "postingType",
package/test/cli.test.mjs CHANGED
@@ -177,6 +177,20 @@ test("automations command builds pagination query", async () => {
177
177
  assert.equal(url.searchParams.get("page"), "2");
178
178
  });
179
179
 
180
+ test("automation table shows draft setting and refresh interval", async () => {
181
+ const homeDir = await setupTempHome();
182
+ const result = runCli({
183
+ args: ["automations", "--brand-id", "13493"],
184
+ homeDir,
185
+ });
186
+
187
+ assert.equal(result.status, 0, result.stderr);
188
+ assert.match(result.stdout, /\|\s*Add Posts As Draft\s*\|/);
189
+ assert.match(result.stdout, /\|\s*Refresh Rate\s*\|/);
190
+ assert.match(result.stdout, /\|\s*true\s*\|/);
191
+ assert.match(result.stdout, /\|\s*6\s*\|/);
192
+ });
193
+
180
194
  test("media command builds pagination query", async () => {
181
195
  const homeDir = await setupTempHome();
182
196
  const capturePath = path.join(homeDir, "capture-media.json");
@@ -500,6 +514,26 @@ test("automations:create works when boolean flags are omitted", async () => {
500
514
  assert.equal(capture.body.addPostsAsDraft, undefined);
501
515
  });
502
516
 
517
+ test("automations:create sends draft setting and refresh interval", async () => {
518
+ const homeDir = await setupTempHome();
519
+ const capturePath = path.join(homeDir, "capture-automation-options.json");
520
+ const result = runCli({
521
+ args: [
522
+ "automations:create", "--brand-id", "10", "--collection-id", "20",
523
+ "--feed-url", "https://example.com/feed.xml", "--import-as-type", "IMAGE",
524
+ "--type", "RSS", "--name", "Automation", "--add-posts-as-draft", "true",
525
+ "--refresh-rate", "6",
526
+ ],
527
+ homeDir,
528
+ capturePath,
529
+ });
530
+
531
+ assert.equal(result.status, 0, result.stderr);
532
+ const capture = JSON.parse(await readFile(capturePath, "utf8"));
533
+ assert.equal(capture.body.addPostsAsDraft, true);
534
+ assert.equal(capture.body.refreshRate, 6);
535
+ });
536
+
503
537
  test("auth:login stores token in isolated home config", async () => {
504
538
  const homeDir = await setupTempHome();
505
539
  const result = runCli({
@@ -173,6 +173,8 @@ globalThis.fetch = async (input, init = {}) => {
173
173
  feedUrl: "https://www.nasa.gov/rss/dyn/breaking_news.rss",
174
174
  runCount: 0,
175
175
  importAsType: "IMAGE",
176
+ addPostsAsDraft: true,
177
+ refreshRate: 6,
176
178
  lastRun: 0,
177
179
  title: "{{title}}",
178
180
  caption: "{{description}} {{link}}",
@@ -173,6 +173,8 @@ globalThis.fetch = async (input, init = {}) => {
173
173
  feedUrl: "https://www.nasa.gov/rss/dyn/breaking_news.rss",
174
174
  runCount: 0,
175
175
  importAsType: "IMAGE",
176
+ addPostsAsDraft: true,
177
+ refreshRate: 6,
176
178
  lastRun: 0,
177
179
  title: "{{title}}",
178
180
  caption: "{{description}} {{link}}",