@nuelink/nuelink-cli 1.6.3 → 1.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.6.4
4
+
5
+ - Default `posts:create --auto-thread-text` to true, with false available to disable automatic splitting.
6
+
3
7
  ## 1.6.3
4
8
 
5
9
  - Show automation draft behavior and refresh interval in table output.
package/README.md CHANGED
@@ -276,6 +276,10 @@ You can also pipe JSON through stdin with `--payload -`.
276
276
  CLI 1.6.0 and later preserves contract-nullable fields exactly; the dry-run body matches
277
277
  the JSON body sent by the request.
278
278
 
279
+ If `autoThreadText` is omitted, the Public API defaults it to `true` and
280
+ automatically splits long text on supported platforms. Set it to `false` to
281
+ disable automatic splitting.
282
+
279
283
  Example `post.json`:
280
284
 
281
285
  ```json
@@ -296,6 +300,7 @@ nuelink-cli posts:create \
296
300
  --caption "body here as well" \
297
301
  --alt "is this fine" \
298
302
  --link "https://nuelink.com" \
303
+ --auto-thread-text true \
299
304
  --publish-mode DRAFT \
300
305
  --post-as-story true \
301
306
  --comment "this is a comment" \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuelink/nuelink-cli",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
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/commands.js CHANGED
@@ -881,7 +881,7 @@ function registerCommands(program, runtimeApiKey, cliVersion) {
881
881
  .option("--caption <text>", "Post caption/body")
882
882
  .option("--alt <text>", "Alt text")
883
883
  .option("--link <url>", "Post link")
884
- .option("--auto-thread-text <boolean>", "Automatically thread text: true/false")
884
+ .option("--auto-thread-text <boolean>", "Automatically thread text: true/false (defaults to true)")
885
885
  .option("--publish-mode <mode>", `Publish mode (${VALID_PUBLISH_MODES.join(", ")})`, "DRAFT")
886
886
  .option("--scheduled-at <value>", "Publish datetime (YYYY-MM-DD HH:mm:ss) or null")
887
887
  .option("--post-as-story <boolean>", "Post as story: true/false")
@@ -142,6 +142,7 @@ function buildPostPayload(options) {
142
142
  const media = mergeMedia(options.mediaIds, options.mediaUrls);
143
143
  const publishMode = normalizePublishMode(options.publishMode);
144
144
  const scheduledAt = validateScheduledAt(options.scheduledAt);
145
+ const autoThreadText = parseBooleanStrict(options.autoThreadText, "auto-thread-text") ?? true;
145
146
 
146
147
  if (publishMode === "SCHEDULE" && !scheduledAt) {
147
148
  throw new Error("scheduledAt is required when publishMode is SCHEDULE.");
@@ -288,9 +289,7 @@ function buildPostPayload(options) {
288
289
  ...(options.link ? { link: validateHttpUrl(options.link, "link") } : {}),
289
290
  publishMode,
290
291
  scheduledAt,
291
- ...(parseBooleanStrict(options.autoThreadText, "auto-thread-text") !== undefined
292
- ? { autoThreadText: parseBooleanStrict(options.autoThreadText, "auto-thread-text") }
293
- : {}),
292
+ autoThreadText,
294
293
  ...(parseBooleanStrict(options.postAsStory, "post-as-story") !== undefined
295
294
  ? { postAsStory: parseBooleanStrict(options.postAsStory, "post-as-story") }
296
295
  : {}),
package/test/cli.test.mjs CHANGED
@@ -1050,6 +1050,29 @@ test("posts:create builds full payload from options", async () => {
1050
1050
  assert.equal(capture.body.platforms.googlemybusiness.uploadToPhotosSection, true);
1051
1051
  });
1052
1052
 
1053
+ test("posts:create defaults autoThreadText to true and accepts false override", async () => {
1054
+ const homeDir = await setupTempHome();
1055
+
1056
+ for (const [suffix, extraArgs, expected] of [
1057
+ ["default", [], true],
1058
+ ["disabled", ["--auto-thread-text", "false"], false],
1059
+ ]) {
1060
+ const capturePath = path.join(homeDir, `capture-post-thread-text-${suffix}.json`);
1061
+ const result = runCli({
1062
+ args: [
1063
+ "posts:create", "--brand-id", "13493", "--collection-id", "33273",
1064
+ "--caption", "Post body", ...extraArgs,
1065
+ ],
1066
+ homeDir,
1067
+ capturePath,
1068
+ });
1069
+
1070
+ assert.equal(result.status, 0, result.stderr);
1071
+ const capture = JSON.parse(await readFile(capturePath, "utf8"));
1072
+ assert.equal(capture.body.autoThreadText, expected);
1073
+ }
1074
+ });
1075
+
1053
1076
  test("posts:create rejects invalid boolean values", async () => {
1054
1077
  const homeDir = await setupTempHome();
1055
1078