@usesocial/cli 0.19.11 → 0.19.12
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/dist/index.mjs +32 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @usesocial/cli
|
|
2
2
|
|
|
3
|
+
## 0.19.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#174](https://github.com/usesocial/monorepo/pull/174) [`c4e3f88`](https://github.com/usesocial/monorepo/commit/c4e3f88ee253404bd142f7540763a58368fa625d) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Show a recovery hint for LinkedIn profile section fuse limits, suggesting fewer sections or an experience preview.
|
|
8
|
+
|
|
3
9
|
## 0.19.11
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.mjs
CHANGED
|
@@ -12871,6 +12871,10 @@ const parseTypedSocialSelectorResult = (value, options = {}) => {
|
|
|
12871
12871
|
}));
|
|
12872
12872
|
};
|
|
12873
12873
|
new RegExp(String.raw`^/search/(?<category>companies|jobs|people|posts)$`);
|
|
12874
|
+
object({
|
|
12875
|
+
detail: string().includes("Fuse limit was reached"),
|
|
12876
|
+
type: literal("provider/invalid_parameters")
|
|
12877
|
+
});
|
|
12874
12878
|
//#endregion
|
|
12875
12879
|
//#region ../../packages/linkedin/src/profiles.ts
|
|
12876
12880
|
const displayNameFrom = (firstName, lastName, username) => [firstName, lastName].filter(Boolean).join(" ").trim() || username || "";
|
|
@@ -24845,7 +24849,7 @@ function createEnv(opts) {
|
|
|
24845
24849
|
}
|
|
24846
24850
|
//#endregion
|
|
24847
24851
|
//#region package.json
|
|
24848
|
-
var version$1 = "0.19.
|
|
24852
|
+
var version$1 = "0.19.12";
|
|
24849
24853
|
//#endregion
|
|
24850
24854
|
//#region src/lib/env.ts
|
|
24851
24855
|
const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
|
|
@@ -25090,34 +25094,44 @@ var CLIAPIError = class extends Error {
|
|
|
25090
25094
|
this.syncResume = details.syncResume;
|
|
25091
25095
|
}
|
|
25092
25096
|
};
|
|
25093
|
-
const
|
|
25097
|
+
const TransportOptionalString = string().optional().catch(void 0);
|
|
25094
25098
|
const TransportRetryAfterSeconds = number().finite().optional().catch(void 0);
|
|
25095
25099
|
const TransportAPIError = object({
|
|
25096
25100
|
code: string(),
|
|
25101
|
+
hint: TransportOptionalString,
|
|
25097
25102
|
message: string(),
|
|
25098
|
-
requestId:
|
|
25103
|
+
requestId: TransportOptionalString,
|
|
25099
25104
|
retryAfterSeconds: TransportRetryAfterSeconds
|
|
25100
25105
|
});
|
|
25101
25106
|
const LegacyTransportAPIError = object({
|
|
25102
25107
|
error: string(),
|
|
25103
|
-
|
|
25108
|
+
hint: TransportOptionalString,
|
|
25109
|
+
request_id: TransportOptionalString,
|
|
25104
25110
|
retryAfterSeconds: TransportRetryAfterSeconds
|
|
25105
25111
|
});
|
|
25106
25112
|
const parseAPIErrorBody = (body) => {
|
|
25107
25113
|
const modern = TransportAPIError.safeParse(body);
|
|
25108
|
-
if (modern.success)
|
|
25109
|
-
|
|
25110
|
-
|
|
25111
|
-
|
|
25112
|
-
|
|
25113
|
-
|
|
25114
|
+
if (modern.success) {
|
|
25115
|
+
const parsed = {
|
|
25116
|
+
code: modern.data.code,
|
|
25117
|
+
message: modern.data.message,
|
|
25118
|
+
requestId: modern.data.requestId,
|
|
25119
|
+
retryAfterSeconds: modern.data.retryAfterSeconds
|
|
25120
|
+
};
|
|
25121
|
+
if (modern.data.hint !== void 0) parsed.hint = modern.data.hint;
|
|
25122
|
+
return parsed;
|
|
25123
|
+
}
|
|
25114
25124
|
const legacy = LegacyTransportAPIError.safeParse(body);
|
|
25115
|
-
if (legacy.success)
|
|
25116
|
-
|
|
25117
|
-
|
|
25118
|
-
|
|
25119
|
-
|
|
25120
|
-
|
|
25125
|
+
if (legacy.success) {
|
|
25126
|
+
const parsed = {
|
|
25127
|
+
code: legacy.data.error,
|
|
25128
|
+
message: legacy.data.error,
|
|
25129
|
+
requestId: legacy.data.request_id,
|
|
25130
|
+
retryAfterSeconds: legacy.data.retryAfterSeconds
|
|
25131
|
+
};
|
|
25132
|
+
if (legacy.data.hint !== void 0) parsed.hint = legacy.data.hint;
|
|
25133
|
+
return parsed;
|
|
25134
|
+
}
|
|
25121
25135
|
return {};
|
|
25122
25136
|
};
|
|
25123
25137
|
const retryContextKey = (request) => `${request.method} ${request.url}`;
|
|
@@ -25157,6 +25171,7 @@ const createAPI = (opts = {}) => {
|
|
|
25157
25171
|
const retryContext = retryContextFor(error.request);
|
|
25158
25172
|
return new CLIAPIError(parsed.message ?? error.response.statusText, error.response.status, body, retryAfterSeconds, {
|
|
25159
25173
|
code: parsed.code,
|
|
25174
|
+
hint: parsed.hint,
|
|
25160
25175
|
requestId: parsed.requestId ?? error.response.headers.get("x-social-request-id") ?? void 0,
|
|
25161
25176
|
retryBudgetExhausted: retryContext && retryContext.retryCount >= LINKEDIN_RATE_LIMIT_RETRY_LIMIT ? true : retryContext?.retryBudgetExhausted,
|
|
25162
25177
|
retryCount: retryContext?.retryCount
|
|
@@ -25229,6 +25244,7 @@ const toCLIAPIError = (error) => {
|
|
|
25229
25244
|
const parsed = parseAPIErrorBody(body);
|
|
25230
25245
|
return new CLIAPIError(parsed.message ?? transport.data.message, transport.data.status, body, parsed.retryAfterSeconds, {
|
|
25231
25246
|
code: parsed.code,
|
|
25247
|
+
hint: parsed.hint,
|
|
25232
25248
|
orpcCode: transport.data.code,
|
|
25233
25249
|
requestId: parsed.requestId
|
|
25234
25250
|
});
|