@postonus/cli 0.1.55 → 0.1.57
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/dist/index.js +1 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -81,7 +81,6 @@ var PLAN_CONFIGS = {
|
|
|
81
81
|
perPlatformMonthlyPosts: { TWITTER: 1e3 },
|
|
82
82
|
mediaStorageGb: UNLIMITED,
|
|
83
83
|
vaCredits: UNLIMITED,
|
|
84
|
-
// Finite on purpose — see the `requestsPerMinute` doc comment.
|
|
85
84
|
requestsPerMinute: 6e3,
|
|
86
85
|
requestsPerMinutePerKey: 3e3,
|
|
87
86
|
webRequestsPerMinute: 2400,
|
|
@@ -174,12 +173,6 @@ var SITE = {
|
|
|
174
173
|
description: "Plan, automate and track your social content across platforms with ease.",
|
|
175
174
|
shortDescription: "Post once and publish everywhere.",
|
|
176
175
|
colorScheme: "light",
|
|
177
|
-
/**
|
|
178
|
-
* GA4 measurement id for the marketing site. Public by design — it ships in
|
|
179
|
-
* the page source of every site that uses gtag — so it is a constant rather
|
|
180
|
-
* than an env var, and there is nothing per-environment to configure. The tag
|
|
181
|
-
* only loads in production, so a dev session cannot pollute the property.
|
|
182
|
-
*/
|
|
183
176
|
gaMeasurementId: "G-896SCPPTRK"
|
|
184
177
|
};
|
|
185
178
|
|
|
@@ -193,8 +186,6 @@ var scenarios = {
|
|
|
193
186
|
"image/png",
|
|
194
187
|
"image/webp",
|
|
195
188
|
"image/gif",
|
|
196
|
-
// Cloudflare re-encodes our CDN's image responses to AVIF, so a user who
|
|
197
|
-
// downloads their own image and re-uploads it sends us one of these.
|
|
198
189
|
"image/avif",
|
|
199
190
|
"video/mp4",
|
|
200
191
|
"video/webm",
|
|
@@ -12773,17 +12764,13 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
|
|
|
12773
12764
|
}
|
|
12774
12765
|
|
|
12775
12766
|
// src/version.ts
|
|
12776
|
-
var CLI_VERSION = "0.1.
|
|
12767
|
+
var CLI_VERSION = "0.1.57";
|
|
12777
12768
|
|
|
12778
12769
|
// src/client.ts
|
|
12779
12770
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
12780
12771
|
async function requestToken(apiUrl, body) {
|
|
12781
12772
|
const response = await fetch(`${apiUrl}/api/auth/oauth2/token`, {
|
|
12782
12773
|
method: "POST",
|
|
12783
|
-
// Form-encoded, not JSON. The token endpoint answers a JSON body with
|
|
12784
|
-
// `UNSUPPORTED_MEDIA_TYPE` — RFC 6749 §4.1.3 specifies form encoding here, and
|
|
12785
|
-
// better-auth enforces it. `/device/code` and `/oauth2/register` do take JSON,
|
|
12786
|
-
// so the three calls in this flow are deliberately not all encoded the same way.
|
|
12787
12774
|
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
12788
12775
|
body: new URLSearchParams(body).toString()
|
|
12789
12776
|
});
|
|
@@ -12802,8 +12789,6 @@ async function refreshAccessToken(apiUrl, clientId, refreshToken) {
|
|
|
12802
12789
|
if (!result.ok || !result.tokens.access_token) return null;
|
|
12803
12790
|
return {
|
|
12804
12791
|
accessToken: result.tokens.access_token,
|
|
12805
|
-
// Rotation is the default, but fall back to the token that just worked if
|
|
12806
|
-
// the server ever omits it rather than treating that as a hard failure.
|
|
12807
12792
|
refreshToken: result.tokens.refresh_token ?? refreshToken,
|
|
12808
12793
|
expiresAt: Date.now() + result.tokens.expires_in * 1e3
|
|
12809
12794
|
};
|
|
@@ -13062,8 +13047,6 @@ async function registerClient(apiUrl) {
|
|
|
13062
13047
|
application_type: "native",
|
|
13063
13048
|
grant_types: [DEVICE_CODE_GRANT_TYPE, "refresh_token"],
|
|
13064
13049
|
scope: CLI_OAUTH_SCOPE,
|
|
13065
|
-
// Self-registered clients default to the MCP resource; the CLI talks to
|
|
13066
|
-
// `/api/v1` as well, so it must ask for that audience explicitly here.
|
|
13067
13050
|
resources: cliAudiences(apiUrl)
|
|
13068
13051
|
})
|
|
13069
13052
|
});
|
|
@@ -13541,8 +13524,6 @@ async function mcpServe() {
|
|
|
13541
13524
|
const headersFor = (currentAuth) => {
|
|
13542
13525
|
const headers = new Headers({
|
|
13543
13526
|
"content-type": "application/json",
|
|
13544
|
-
// Both, because the endpoint may answer either way and refuses a request
|
|
13545
|
-
// that accepts only one.
|
|
13546
13527
|
accept: "application/json, text/event-stream",
|
|
13547
13528
|
[CLI_VERSION_HEADER]: CLI_VERSION
|
|
13548
13529
|
});
|
|
@@ -14056,7 +14037,6 @@ async function listQueue(options) {
|
|
|
14056
14037
|
limit,
|
|
14057
14038
|
direction: "forward",
|
|
14058
14039
|
platforms: platforms.length > 0 ? platforms : void 0,
|
|
14059
|
-
// The same default as MCP's `list_queue`: work the user can still act on.
|
|
14060
14040
|
statuses: statuses.length > 0 ? statuses : ["DRAFT", "SCHEDULED", "FAILED"]
|
|
14061
14041
|
});
|
|
14062
14042
|
schedules = result.schedules;
|