@nuelink/nuelink-cli 1.3.1 → 1.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuelink/nuelink-cli",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
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",
@@ -5,7 +5,7 @@ import {
5
5
  splitCsv,
6
6
  validateHttpUrl,
7
7
  validatePollOptions,
8
- validatePublishAt,
8
+ validateScheduledAt,
9
9
  } from "./validation.js";
10
10
 
11
11
  const VALID_PUBLISH_MODES = ["DRAFT", "QUEUE", "SCHEDULE", "IMMEDIATE"];
@@ -60,10 +60,10 @@ function normalizePublishMode(value) {
60
60
  function buildPostPayload(options) {
61
61
  const media = mergeMedia(options.mediaIds, options.mediaUrls);
62
62
  const publishMode = normalizePublishMode(options.publishMode);
63
- const publishAt = validatePublishAt(options.publishAt);
63
+ const scheduledAt = validateScheduledAt(options.scheduledAt);
64
64
 
65
- if (publishMode === "SCHEDULE" && !publishAt) {
66
- throw new Error("publishAt is required when publishMode is SCHEDULE.");
65
+ if (publishMode === "SCHEDULE" && !scheduledAt) {
66
+ throw new Error("scheduledAt is required when publishMode is SCHEDULE.");
67
67
  }
68
68
 
69
69
  const pollOptions = options.pollOptions ? parseCsv(options.pollOptions) : [];
@@ -135,7 +135,7 @@ function buildPostPayload(options) {
135
135
  ...(options.link ? { link: validateHttpUrl(options.link, "link") } : {}),
136
136
  ...(options.postType ? { postType: options.postType } : {}),
137
137
  publishMode,
138
- publishAt,
138
+ scheduledAt,
139
139
  ...(parseBooleanStrict(options.postAsStory, "post-as-story") !== undefined
140
140
  ? { postAsStory: parseBooleanStrict(options.postAsStory, "post-as-story") }
141
141
  : {}),
package/src/validation.js CHANGED
@@ -106,7 +106,7 @@ function validateQueueSlots(queueSlots) {
106
106
  return queueSlots;
107
107
  }
108
108
 
109
- function validatePublishAt(value) {
109
+ function validateScheduledAt(value) {
110
110
  if (value === undefined || value === null || value === "" || value === "null") {
111
111
  return null;
112
112
  }
@@ -180,7 +180,7 @@ export {
180
180
  validateHttpUrl,
181
181
  validateMediaFile,
182
182
  validatePollOptions,
183
- validatePublishAt,
183
+ validateScheduledAt,
184
184
  validateQueueSlots,
185
185
  normalizeEnum,
186
186
  };