@usesocial/cli 0.3.0 → 0.3.1
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 +6 -0
- package/README.md +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +20 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @usesocial/cli
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#11](https://github.com/usesocial/monorepo/pull/11) [`60bc3e0`](https://github.com/usesocial/monorepo/commit/60bc3e003bf751a02c637e1a93a43f44353cd9a5) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Price LinkedIn connections as following and follower reads.
|
|
8
|
+
|
|
3
9
|
## 0.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -292,6 +292,7 @@ social linkedin requests sent --limit 25 --offset 0
|
|
|
292
292
|
social x bookmarks --limit 50
|
|
293
293
|
social x followers --limit 100
|
|
294
294
|
social x following profile_id:<x-user-id> --limit 100
|
|
295
|
+
social x replies post_id:<post-id> --limit 25
|
|
295
296
|
social x messages --limit 50
|
|
296
297
|
|
|
297
298
|
# Writes (body via stdin)
|
package/dist/index.d.mts
CHANGED
|
@@ -1397,6 +1397,7 @@ declare const createSocialCommand: (deps?: {
|
|
|
1397
1397
|
parseQueryString: (name: string, value: unknown) => string;
|
|
1398
1398
|
parseBodyText: (name: string, value: unknown) => string;
|
|
1399
1399
|
readStdin: () => Promise<string>;
|
|
1400
|
+
isStdinTTY: () => boolean;
|
|
1400
1401
|
parseIntegerString: (name: string, value: unknown, options?: {
|
|
1401
1402
|
min?: number;
|
|
1402
1403
|
max?: number;
|
package/dist/index.mjs
CHANGED
|
@@ -11367,10 +11367,18 @@ const { costBPSForCategory: costBPSForCategory$1 } = createPricing([
|
|
|
11367
11367
|
"unitPriceUSD": .015,
|
|
11368
11368
|
"featureId": "user_interaction_create_request"
|
|
11369
11369
|
},
|
|
11370
|
+
{
|
|
11371
|
+
"key": "following_read",
|
|
11372
|
+
"label": "Following/Followers: Read",
|
|
11373
|
+
"description": "Read LinkedIn connections, priced to match X following and followers reads.",
|
|
11374
|
+
"unit": "per_resource",
|
|
11375
|
+
"unitPriceUSD": .01,
|
|
11376
|
+
"featureId": "following_followers_read_resource"
|
|
11377
|
+
},
|
|
11370
11378
|
{
|
|
11371
11379
|
"key": "owned_read",
|
|
11372
11380
|
"label": "Owned: Read",
|
|
11373
|
-
"description": "Read the connected LinkedIn account's own profile
|
|
11381
|
+
"description": "Read the connected LinkedIn account's own profile.",
|
|
11374
11382
|
"unit": "per_resource",
|
|
11375
11383
|
"unitPriceUSD": .001,
|
|
11376
11384
|
"featureId": "owned_read_resource"
|
|
@@ -12070,8 +12078,8 @@ const LINKEDIN_OPERATIONS = [
|
|
|
12070
12078
|
totalCountPath: "total_count",
|
|
12071
12079
|
itemsPath: "data"
|
|
12072
12080
|
},
|
|
12073
|
-
costBPS:
|
|
12074
|
-
billingCategory: "
|
|
12081
|
+
costBPS: 100,
|
|
12082
|
+
billingCategory: "following_read",
|
|
12075
12083
|
kind: "users"
|
|
12076
12084
|
},
|
|
12077
12085
|
parameters: [
|
|
@@ -13287,7 +13295,7 @@ const resolveBodyTextFromStdin$1 = async (op, deps, args, commandLabel) => {
|
|
|
13287
13295
|
const bodyTextArg = bodyTextDisplayKeyFor$1(op) ?? op.config.bodyTextArg;
|
|
13288
13296
|
if (bodyTextArg === void 0) return;
|
|
13289
13297
|
const required = stdinBodyTextRequired$1(op) && typeof args.body !== "string";
|
|
13290
|
-
if (
|
|
13298
|
+
if (deps.isStdinTTY()) {
|
|
13291
13299
|
if (required) throw noBodyTextError$1(commandLabel);
|
|
13292
13300
|
return;
|
|
13293
13301
|
}
|
|
@@ -13940,7 +13948,7 @@ const buildMessageEdit = (deps) => {
|
|
|
13940
13948
|
const account = typeof args.account === "string" ? args.account : void 0;
|
|
13941
13949
|
const message_id = messageIdFrom(deps, args.message_id ?? positionals[1]);
|
|
13942
13950
|
let textInput;
|
|
13943
|
-
if (
|
|
13951
|
+
if (deps.isStdinTTY()) throw noBodyTextError$1("social linkedin message <target> edit message_id:<id>");
|
|
13944
13952
|
const piped = trimTrailingNewline$1(await deps.readStdin());
|
|
13945
13953
|
if (piped.length > 0) textInput = piped;
|
|
13946
13954
|
const text = textInput === void 0 ? void 0 : deps.parseBodyText("<text>", textInput);
|
|
@@ -14027,7 +14035,7 @@ const buildMessage$1 = (deps, sendCommand) => {
|
|
|
14027
14035
|
const target = args.target ?? (Array.isArray(args._) && args._.length > 0 ? args._[0] : void 0);
|
|
14028
14036
|
const hasBody = typeof args.body === "string";
|
|
14029
14037
|
let textInput;
|
|
14030
|
-
if (
|
|
14038
|
+
if (deps.isStdinTTY()) {
|
|
14031
14039
|
if (!hasBody) throw noBodyTextError$1("social linkedin message <target>");
|
|
14032
14040
|
} else {
|
|
14033
14041
|
const piped = trimTrailingNewline$1(await deps.readStdin());
|
|
@@ -14286,6 +14294,7 @@ createLinkedinCommands({
|
|
|
14286
14294
|
parseQueryString: unconfigured$1,
|
|
14287
14295
|
parseBodyText: unconfigured$1,
|
|
14288
14296
|
readStdin: unconfigured$1,
|
|
14297
|
+
isStdinTTY: unconfigured$1,
|
|
14289
14298
|
parseIntegerString: unconfigured$1,
|
|
14290
14299
|
parseEnumString: unconfigured$1,
|
|
14291
14300
|
parseBooleanString: unconfigured$1,
|
|
@@ -17380,7 +17389,7 @@ const resolveBodyTextFromStdin = async (op, deps, args, commandLabel) => {
|
|
|
17380
17389
|
const bodyTextArg = bodyTextDisplayKeyFor(op) ?? op.config.bodyTextArg;
|
|
17381
17390
|
if (bodyTextArg === void 0) return;
|
|
17382
17391
|
const required = stdinBodyTextRequired(op) && args.body === void 0;
|
|
17383
|
-
if (
|
|
17392
|
+
if (deps.isStdinTTY()) {
|
|
17384
17393
|
if (required) throw noBodyTextError(commandLabel);
|
|
17385
17394
|
return;
|
|
17386
17395
|
}
|
|
@@ -17964,7 +17973,7 @@ const buildMessage = (deps) => {
|
|
|
17964
17973
|
const recipientsInput = args.recipients ?? args.target ?? (Array.isArray(args._) && args._.length > 0 ? args._[0] : void 0);
|
|
17965
17974
|
const hasBody = typeof args.body === "string";
|
|
17966
17975
|
let textInput;
|
|
17967
|
-
if (
|
|
17976
|
+
if (deps.isStdinTTY()) {
|
|
17968
17977
|
if (!hasBody) throw noBodyTextError("social x message <recipients>");
|
|
17969
17978
|
} else {
|
|
17970
17979
|
const piped = trimTrailingNewline(await deps.readStdin());
|
|
@@ -18194,6 +18203,7 @@ createXCommands({
|
|
|
18194
18203
|
parseQueryString: unconfigured,
|
|
18195
18204
|
parseBodyText: unconfigured,
|
|
18196
18205
|
readStdin: unconfigured,
|
|
18206
|
+
isStdinTTY: unconfigured,
|
|
18197
18207
|
parseIntegerString: unconfigured,
|
|
18198
18208
|
parseEnumString: unconfigured,
|
|
18199
18209
|
parseBooleanString: unconfigured,
|
|
@@ -21054,7 +21064,7 @@ const createInstance = (defaults) => {
|
|
|
21054
21064
|
const ky = createInstance();
|
|
21055
21065
|
//#endregion
|
|
21056
21066
|
//#region package.json
|
|
21057
|
-
var version$1 = "0.3.
|
|
21067
|
+
var version$1 = "0.3.1";
|
|
21058
21068
|
//#endregion
|
|
21059
21069
|
//#region src/lib/env.ts
|
|
21060
21070
|
const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
|
|
@@ -28508,6 +28518,7 @@ const createCLIDeps = () => {
|
|
|
28508
28518
|
parseQueryString,
|
|
28509
28519
|
parseBodyText,
|
|
28510
28520
|
readStdin,
|
|
28521
|
+
isStdinTTY: () => process.stdin.isTTY === true,
|
|
28511
28522
|
parseIntegerString,
|
|
28512
28523
|
parseEnumString,
|
|
28513
28524
|
parseBooleanString,
|