@usesocial/cli 0.3.3 → 0.3.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 +6 -0
- package/dist/index.mjs +15 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @usesocial/cli
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#17](https://github.com/usesocial/monorepo/pull/17) [`677e5a9`](https://github.com/usesocial/monorepo/commit/677e5a98f8c7603ddf5707459340e22736b6057f) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Improve CLI onboarding and seat pricing copy.
|
|
8
|
+
|
|
3
9
|
## 0.3.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ const exampleDeviceCode = "KN42-A98N";
|
|
|
32
32
|
const brand = {
|
|
33
33
|
org,
|
|
34
34
|
name: "social",
|
|
35
|
-
tagline: "Let your agent
|
|
35
|
+
tagline: "Let your agent run LinkedIn & X for you",
|
|
36
36
|
description: "A CLI for LinkedIn and X: outreach, posting, and audience insights from any shell."
|
|
37
37
|
};
|
|
38
38
|
const brandURLs = {
|
|
@@ -21059,7 +21059,7 @@ const createInstance = (defaults) => {
|
|
|
21059
21059
|
const ky = createInstance();
|
|
21060
21060
|
//#endregion
|
|
21061
21061
|
//#region package.json
|
|
21062
|
-
var version$1 = "0.3.
|
|
21062
|
+
var version$1 = "0.3.4";
|
|
21063
21063
|
//#endregion
|
|
21064
21064
|
//#region src/lib/env.ts
|
|
21065
21065
|
const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
|
|
@@ -27425,6 +27425,15 @@ const unknownOutputContract = (message = "Output schema is not declared.") => ({
|
|
|
27425
27425
|
});
|
|
27426
27426
|
new TextEncoder();
|
|
27427
27427
|
//#endregion
|
|
27428
|
+
//#region ../../packages/lib/src/email-hint.ts
|
|
27429
|
+
const base64URLFromText = (value) => {
|
|
27430
|
+
const bytes = new TextEncoder().encode(value);
|
|
27431
|
+
let binary = "";
|
|
27432
|
+
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
27433
|
+
return btoa(binary).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "");
|
|
27434
|
+
};
|
|
27435
|
+
const emailHintFromEmail = (email) => base64URLFromText(email);
|
|
27436
|
+
//#endregion
|
|
27428
27437
|
//#region ../../packages/lib/src/phone.ts
|
|
27429
27438
|
const phoneFormattingRegex = /[\s().-]/g;
|
|
27430
27439
|
const PhoneNumber = string().trim().transform((value) => value.replace(phoneFormattingRegex, "")).pipe(string().regex(/^\+[1-9]\d{1,14}$/, { message: "Enter a phone number with +country code." }));
|
|
@@ -27492,6 +27501,7 @@ const deviceCallbackURLFor = (deviceCode, email) => {
|
|
|
27492
27501
|
parsed = new URL("/device", "https://social.local");
|
|
27493
27502
|
}
|
|
27494
27503
|
parsed.searchParams.set("user_code", formatUserCode(deviceCode.user_code));
|
|
27504
|
+
parsed.searchParams.set("email_hint", emailHintFromEmail(email));
|
|
27495
27505
|
parsed.searchParams.set("email", email);
|
|
27496
27506
|
return `${parsed.pathname}${parsed.search}`;
|
|
27497
27507
|
};
|
|
@@ -27586,7 +27596,7 @@ const signInPhase = async (ctx) => {
|
|
|
27586
27596
|
}
|
|
27587
27597
|
};
|
|
27588
27598
|
};
|
|
27589
|
-
const onboardingLegalNotice = (termsURL = TERMS_URL) => `By signing up and connecting accounts, you accept the terms
|
|
27599
|
+
const onboardingLegalNotice = (termsURL = TERMS_URL) => `By signing up and connecting accounts, you accept the terms\nand conditions and use this software at your own risk.\nRead the terms: ${termsURL}`;
|
|
27590
27600
|
const resolveEmail = async (ctx) => await ctx.ui.text({
|
|
27591
27601
|
message: "Email",
|
|
27592
27602
|
placeholder: "you@example.com",
|
|
@@ -27700,6 +27710,7 @@ const openBrowser = async (url) => {
|
|
|
27700
27710
|
]);
|
|
27701
27711
|
return await runCommand(["xdg-open", url]);
|
|
27702
27712
|
};
|
|
27713
|
+
const SEAT_PRICING_MESSAGE = `social costs $60/month/account + usage. Full details at ${createAbsoluteURL(env.SOCIAL_WEB_URL, siteConfig.links.pricing)}. Continue?`;
|
|
27703
27714
|
const SEAT_CHECKOUT_RETURN_PATH = "/setup/billing/done";
|
|
27704
27715
|
const SEAT_POLL_INTERVAL_MS = 2e3;
|
|
27705
27716
|
const SEAT_POLL_TIMEOUT_MS = 1800 * 1e3;
|
|
@@ -27725,7 +27736,7 @@ const runSeatPhase = async (ctx, deps = {}) => {
|
|
|
27725
27736
|
data: status
|
|
27726
27737
|
};
|
|
27727
27738
|
if (!await ctx.ui.confirm({
|
|
27728
|
-
message:
|
|
27739
|
+
message: SEAT_PRICING_MESSAGE,
|
|
27729
27740
|
initialValue: true
|
|
27730
27741
|
})) return {
|
|
27731
27742
|
status: "needs_input",
|