socialdatax-skills 0.2.18 → 0.2.19

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/cli.mjs +34 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -71,7 +71,7 @@ Common search phrases for this skill package:
71
71
  - Sensitive Check MCP server name: `sensitive-check`
72
72
  - Sensitive Check future MCP registry name: `com.socialdatax/sensitive-check`
73
73
  - Unified MCP registry name: none; this package installs skills and calls explicit platform services.
74
- - Current public capability version: `0.2.18`
74
+ - Current public capability version: `0.2.19`
75
75
 
76
76
  ## Direct CLI
77
77
 
package/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import { dirname, join, resolve } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
9
  const PACKAGE_NAME = "socialdatax-skills";
10
- const PACKAGE_VERSION = "0.2.18";
10
+ const PACKAGE_VERSION = "0.2.19";
11
11
  const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
12
12
  const LOG_PREFIX = `[${PACKAGE_NAME}]`;
13
13
  const MIN_NODE_VERSION = "20.18.1";
@@ -978,6 +978,15 @@ function validateKnownOptions(options, allowedOptions) {
978
978
  }
979
979
  }
980
980
 
981
+ function shouldPrintDirectHelp(options, positional) {
982
+ return (
983
+ options.help !== undefined ||
984
+ options.h !== undefined ||
985
+ positional.includes("help") ||
986
+ positional.includes("-h")
987
+ );
988
+ }
989
+
981
990
  function allowedDirectOptions(allowedOptions) {
982
991
  return [...allowedOptions, ...DIRECT_META_OPTIONS];
983
992
  }
@@ -2030,6 +2039,10 @@ function printRemovedMcpConfigHelp(command) {
2030
2039
 
2031
2040
  async function runXhsDirectCommand(args) {
2032
2041
  const { options, positional } = parseCommandArgs(args);
2042
+ if (shouldPrintDirectHelp(options, positional)) {
2043
+ printHelp();
2044
+ return;
2045
+ }
2033
2046
  const action = positional[0];
2034
2047
  if (!action) {
2035
2048
  throw new Error(
@@ -2057,6 +2070,10 @@ async function runXhsDirectCommand(args) {
2057
2070
 
2058
2071
  async function runDouyinDirectCommand(args) {
2059
2072
  const { options, positional } = parseCommandArgs(args);
2073
+ if (shouldPrintDirectHelp(options, positional)) {
2074
+ printHelp();
2075
+ return;
2076
+ }
2060
2077
  const action = positional[0];
2061
2078
  if (!action) {
2062
2079
  throw new Error(
@@ -2084,6 +2101,10 @@ async function runDouyinDirectCommand(args) {
2084
2101
 
2085
2102
  async function runKuaishouDirectCommand(args) {
2086
2103
  const { options, positional } = parseCommandArgs(args);
2104
+ if (shouldPrintDirectHelp(options, positional)) {
2105
+ printHelp();
2106
+ return;
2107
+ }
2087
2108
  const action = positional[0];
2088
2109
  if (!action) {
2089
2110
  throw new Error(
@@ -2111,6 +2132,10 @@ async function runKuaishouDirectCommand(args) {
2111
2132
 
2112
2133
  async function runWeiboDirectCommand(args) {
2113
2134
  const { options, positional } = parseCommandArgs(args);
2135
+ if (shouldPrintDirectHelp(options, positional)) {
2136
+ printHelp();
2137
+ return;
2138
+ }
2114
2139
  const action = positional[0];
2115
2140
  if (!action) {
2116
2141
  throw new Error(
@@ -2138,6 +2163,10 @@ async function runWeiboDirectCommand(args) {
2138
2163
 
2139
2164
  async function runWechatDirectCommand(args) {
2140
2165
  const { options, positional } = parseCommandArgs(args);
2166
+ if (shouldPrintDirectHelp(options, positional)) {
2167
+ printHelp();
2168
+ return;
2169
+ }
2141
2170
  const action = positional[0];
2142
2171
  if (!action) {
2143
2172
  throw new Error(
@@ -2165,6 +2194,10 @@ async function runWechatDirectCommand(args) {
2165
2194
 
2166
2195
  async function runSensitiveCheckDirectCommand(args) {
2167
2196
  const { options, positional } = parseCommandArgs(args);
2197
+ if (shouldPrintDirectHelp(options, positional)) {
2198
+ printHelp();
2199
+ return;
2200
+ }
2168
2201
  const action = positional[0];
2169
2202
  if (!action) {
2170
2203
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socialdatax-skills",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "SocialDataX / 社媒数据助手 skill installer and direct CLI helper for hosted platform social media MCP services.",
5
5
  "license": "MIT",
6
6
  "type": "module",